def BuildAttackAction(user=BuildPokemonBattleWrapper(), target=BuildPokemonBattleWrapper(), attack="TACKLE"): """ Builds an Attack Action """ attack = BuildAttack(attack=attack) environment = BattleEnvironment() return AttackAction(attack, user, target, environment)
def setUp(self): """ Build the Pkmn and Delegate for the test """ self.user = BuildPokemonBattleWrapper() self.target = BuildPokemonBattleWrapper() self.environment = BattleEnvironment() self.delegate = NullDamageDelegate()
def setUp(self): """ Build the Pkmn and Precondition Checker for the test """ self.user = BuildPokemonBattleWrapper() self.target = BuildPokemonBattleWrapper() self.environment = BattleEnvironment() attack = AttackFactory.getAttackAsNew("TACKLE") self.preconditionChecker = PreconditionChecker(self.user, self.target, self.environment, attack)
def setUp(self): """ Build the Pkmn and Delegate for the test """ self.attack = BuildAttack() self.user = BuildPokemonBattleWrapper() self.target = BuildPokemonBattleWrapper() self.environment = BattleEnvironment() self.toHit = 100.0 self.delegate = HitDelegate(self.attack, self.toHit)
def __init__(self, playerTrainer, oppTrainer): """ Builds the two participating sides of the battle """ self.playerSide = BattleSide(playerTrainer) self.oppSide = BattleSide(oppTrainer) self.environment = BattleEnvironment() self.over = False self.round = BattleRound(self.playerSide, self.oppSide, self.environment) self.eventQueue = deque() self.introduce()
def setUp(self): """ Build the Effect, Environment, and Pokemon for the test """ self.turnToAttack = 1 self.effect = WeatherChargeDelegate(2, self.turnToAttack, "Some Message", Hail.type) self.environment = BattleEnvironment() self.user = BuildPokemonBattleWrapper()
def setUp(self): """ Build the Pkmn and Delegate for the test """ self.delegate = AlwaysHitDelegate("") self.environment = BattleEnvironment()
def setUp(self): """ Build the *** for the test """ self.environment = BattleEnvironment() self.environment.weather = None
def setUp(self): """ Grabs the message dictionary from StatModDelegate """ self.environment = BattleEnvironment() self.pkmn = BuildPokemonBattleWrapper() self.delegate = ChargeDelegate(2, 0, "")