mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-24 23:02:16 +00:00
feat: cancel attack
Canceling attack takes time and incurs a malus (loose some troops). Also prettier fixed a file HostLobbyModal.
This commit is contained in:
@@ -35,6 +35,7 @@ import { ConstructionExecution } from "./ConstructionExecution";
|
||||
import { fixProfaneUsername, isProfaneUsername } from "../validations/username";
|
||||
import { NoOpExecution } from "./NoOpExecution";
|
||||
import { EmbargoExecution } from "./EmbargoExecution";
|
||||
import { RetreatExecution } from "./RetreatExecution";
|
||||
|
||||
export class Executor {
|
||||
// private random = new PseudoRandom(999)
|
||||
@@ -80,6 +81,8 @@ export class Executor {
|
||||
null,
|
||||
);
|
||||
}
|
||||
case "cancel_attack":
|
||||
return new RetreatExecution(intent.playerID, intent.attackID);
|
||||
case "spawn":
|
||||
return new SpawnExecution(
|
||||
new PlayerInfo(
|
||||
|
||||
Reference in New Issue
Block a user