예제 #1
0
    def test_freezing(self):
        battle_abilities.FREEZING().use(self.messenger, self.attacker,
                                        self.defender)
        self.assertEqual(self.defender.health, self.defender.max_health)
        self.assertFalse(self.attacker.context.initiative_queue)
        self.assertTrue(1 - E < self.attacker.context.initiative < 1 + E)
        self.assertTrue(self.defender.context.initiative_queue)

        self.defender.context.on_enemy_turn()
        self.assertTrue(self.defender.context.initiative < 1)

        self.assertEqual(self.messenger.messages, ['hero_ability_freezing'])
예제 #2
0
파일: effects.py 프로젝트: angru/the-tale
class BattleAbilityFreezing(BaseBattleAbility):
    TYPE = relations.EFFECT.BATTLE_ABILITY_FREEZING
    ABILITY = battle_abilities.FREEZING(5)