コード例 #1
0
    def testMeleeDamageZeroSword(self):
        attacker = self.createUnit(weaponType=self.TYPE_WEAPON_SWORD,
                                   damage=100,
                                   agility=60)
        target = self.createUnit(armorType=self.TYPE_ARMOR_MAIL)

        self.assertEqual(Actions._getMeleeDamage(attacker, target), 100)
コード例 #2
0
    def testMeleeDamageBlunt(self):
        attacker = self.createUnit(weaponType=self.TYPE_WEAPON_BLUNT,
                                   damage=100,
                                   agility=60)
        target = self.createUnit(armorType=self.TYPE_ARMOR_MAIL)

        self.assertEqual(Actions._getMeleeDamage(attacker, target), 150)