mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 08:20:50 +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
|
||||
return
|
||||
}
|
||||
if (this.target.isPlayer() && this.attacker.isAlliedWith(this.target)) {
|
||||
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.active = false
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user