コード例 #1
0
 def attacked(self, ent, damages, kind):
     for eq in self.equipments:
         if kind is DamageKind.PHYSICAL:
             damages -= eq.defense
         elif kind == DamageKind.SPIRITUAL:
             damages -= eq.res
     return Movable.attacked(self, ent, damages, kind)
コード例 #2
0
 def attacked(self, ent, damages, kind):
     for eq in self.equipments:
         if kind == PHYSICAL:
             damages -= eq.get_def()
         elif kind == SPIRITUAL:
             damages -= eq.get_res()
     return Movable.attacked(self, ent, damages, kind)