mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 08:11:54 +00:00
bugfix: boat attack now donates troops instead of attacking when alliance is created during boat attack
This commit is contained in:
@@ -122,8 +122,12 @@ export class BoatAttackExecution implements Execution {
|
|||||||
this.active = false
|
this.active = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.attacker.conquer(this.dst)
|
if (this.target.isPlayer() && this.attacker.isAlliedWith(this.target)) {
|
||||||
this.mg.addExecution(new AttackExecution(this.troops, this.attacker.id(), this.targetID, this.dst.cell(), null, false))
|
this.target.addTroops(this.troops)
|
||||||
|
} else {
|
||||||
|
this.attacker.conquer(this.dst)
|
||||||
|
this.mg.addExecution(new AttackExecution(this.troops, this.attacker.id(), this.targetID, this.dst.cell(), null, false))
|
||||||
|
}
|
||||||
this.boat.delete()
|
this.boat.delete()
|
||||||
this.active = false
|
this.active = false
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user