Thread: [Question] Battle Frontier Mechanics
View Single Post
  #2    
Old September 23rd, 2012 (05:36 AM).
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
I done something similar, I know that this isn't the best way and is a little bizarre. Create in some place:

Code:
def sampleRules3Pokemon
  ret=PokemonChallengeRules.new
  ret.setLevelAdjustment( OpenLevelAdjustment.new(PBExperience::MAXLEVEL))
  ret.setNumber(3)
  return ret
end

def useThreePokemon
  pbBattleChallenge.set("sampleRules3Pokemon",7,sampleRules3Pokemon)
  pbEntryScreen(8,100)
  oldParty=$Trainer.party
  newParty=pbBattleChallenge.getParty
  pbBattleChallenge.pbCancel
  $Trainer.party=newParty
  ret=yield
  $Trainer.party=oldParty
  return ret
end
So, instead of calling something like: 'pbTrainerBattle(PBTrainers::TRAINER,"Dave",_I("No!!!"))', calls 'useThreePokemon{pbTrainerBattle(PBTrainers::TRAINER,"Dave",_I("No!!!"))}'. Untested.
__________________
Reply With Quote