mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-23 03:55:40 +00:00
update alliance()
This commit is contained in:
@@ -80,9 +80,7 @@ export class NukeExecution implements Execution {
|
||||
const mp = this.mg.player(owner.id())
|
||||
mp.relinquish(tile)
|
||||
mp.removeTroops(ratio[mp.id()])
|
||||
if (owner != this.player) {
|
||||
others.add(mp)
|
||||
}
|
||||
others.add(mp)
|
||||
}
|
||||
}
|
||||
for (const other of others) {
|
||||
|
||||
@@ -152,6 +152,9 @@ export class PlayerImpl implements MutablePlayer {
|
||||
}
|
||||
|
||||
allianceWith(other: Player): MutableAlliance | null {
|
||||
if (other == this) {
|
||||
return null
|
||||
}
|
||||
return this.alliances().find(a => a.recipient() == other || a.requestor() == other)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user