mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-04 13:32:33 +00:00
gameimpl store alliances
This commit is contained in:
@@ -6,7 +6,6 @@ export class AllianceRequestExecution implements Execution {
|
||||
private requestor: Player;
|
||||
private recipient: Player
|
||||
|
||||
|
||||
constructor(private requestorID: PlayerID, private recipientID: PlayerID) { }
|
||||
|
||||
init(mg: MutableGame, ticks: number): void {
|
||||
@@ -16,8 +15,7 @@ export class AllianceRequestExecution implements Execution {
|
||||
}
|
||||
|
||||
tick(ticks: number): void {
|
||||
alert('recied request')
|
||||
|
||||
this.mg.createAllianceRequest(this.requestor, this.recipient)
|
||||
this.active = false
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,10 @@ export class BotExecution implements Execution {
|
||||
return
|
||||
}
|
||||
|
||||
this.bot.incomingAllianceRequests().forEach(ar => {
|
||||
ar.accept()
|
||||
})
|
||||
|
||||
if (this.neighborsTerraNullius) {
|
||||
for (const b of this.bot.borderTiles()) {
|
||||
for (const n of b.neighbors()) {
|
||||
@@ -66,11 +70,6 @@ export class BotExecution implements Execution {
|
||||
return
|
||||
}
|
||||
}
|
||||
// if (owner.type() == PlayerType.Human) {
|
||||
// if (this.random.chance(2)) {
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
}
|
||||
this.sendAttack(owner)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user