游戏可以运行
This commit is contained in:
@@ -79,12 +79,17 @@ class Battlefield:
|
||||
|
||||
def resolve_attack(self, attacker, defender):
|
||||
dead = []
|
||||
owner = self._get_unit_owner(attacker)
|
||||
if owner:
|
||||
attack_cost = owner.get_attack_cost(attacker)
|
||||
if owner.provisions < attack_cost:
|
||||
return dead
|
||||
owner.provisions -= attack_cost
|
||||
atk = attacker.get_effective_attack()
|
||||
|
||||
if "siege" in attacker.abilities and defender == "capital":
|
||||
atk *= 2
|
||||
|
||||
owner = self._get_unit_owner(attacker)
|
||||
if (owner and owner.faction_id == "han"
|
||||
and attacker.unit_type == "archer" and defender == "capital"):
|
||||
atk += 1
|
||||
|
||||
Reference in New Issue
Block a user