mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-26 09:54:36 +00:00
can create alliance between humans
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {AllianceRequest, Execution, MutableGame, MutablePlayer, Player, PlayerID} from "../game/Game";
|
||||
|
||||
export class AllianceRequestExecutionReply implements Execution {
|
||||
export class AllianceRequestReplyExecution implements Execution {
|
||||
private active = true
|
||||
private mg: MutableGame = null
|
||||
private requestor: MutablePlayer;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Cell, Execution, MutableGame, Game, MutablePlayer, PlayerInfo, TerraNullius, Tile, PlayerType, Alliance} from "../game/Game";
|
||||
import {Cell, Execution, MutableGame, Game, MutablePlayer, PlayerInfo, TerraNullius, Tile, PlayerType, Alliance, AllianceRequestReplyEvent} from "../game/Game";
|
||||
import {AttackIntent, BoatAttackIntentSchema, GameID, Intent, Turn} from "../Schemas";
|
||||
import {AttackExecution} from "./AttackExecution";
|
||||
import {SpawnExecution} from "./SpawnExecution";
|
||||
@@ -10,6 +10,7 @@ import {FakeHumanExecution} from "./FakeHumanExecution";
|
||||
import Usernames from '../../../resources/Usernames.txt'
|
||||
import {simpleHash} from "../Util";
|
||||
import {AllianceRequestExecution} from "./AllianceRequestExecution";
|
||||
import {AllianceRequestReplyExecution} from "./AllianceRequestReplyExecution";
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +59,10 @@ export class Executor {
|
||||
)
|
||||
} else if (intent.type == "allianceRequest") {
|
||||
return new AllianceRequestExecution(intent.requestor, intent.recipient)
|
||||
} else {
|
||||
} else if (intent.type == "allianceRequestReply") {
|
||||
return new AllianceRequestReplyExecution(intent.requestor, intent.recipient, intent.accept)
|
||||
}
|
||||
else {
|
||||
throw new Error(`intent type ${intent} not found`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user