From fc59dfd10e06a97f999ee29d32dd2ab19d6ed698 Mon Sep 17 00:00:00 2001 From: Alec Jones Date: Sat, 26 Aug 2023 15:01:03 +0800 Subject: [PATCH] feat: add option to change round when house cards evolve --- .../src/client/EntireGameComponent.tsx | 2 +- .../src/client/GameSettingsComponent.tsx | 37 +++++++++++++++++++ agot-bg-game-server/src/common/EntireGame.ts | 3 +- .../PostCombatGameState.ts | 2 +- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/agot-bg-game-server/src/client/EntireGameComponent.tsx b/agot-bg-game-server/src/client/EntireGameComponent.tsx index c61a7b4fe..c321a92c4 100644 --- a/agot-bg-game-server/src/client/EntireGameComponent.tsx +++ b/agot-bg-game-server/src/client/EntireGameComponent.tsx @@ -199,7 +199,7 @@ export default class EntireGameComponent extends Component - From round 5 onwards, each house returns its alternative deck when the last house card has been played. + From round {this.settings.houseCardsEvolutionRound} onwards, each house returns its alternative deck when the last house card has been played. } popperConfig={{ modifiers: [preventOverflow] }} > diff --git a/agot-bg-game-server/src/client/GameSettingsComponent.tsx b/agot-bg-game-server/src/client/GameSettingsComponent.tsx index 23ecf00c6..f08ac59ce 100644 --- a/agot-bg-game-server/src/client/GameSettingsComponent.tsx +++ b/agot-bg-game-server/src/client/GameSettingsComponent.tsx @@ -364,6 +364,29 @@ export default class GameSettingsComponent extends Component this.changeGameSettings(() => this.gameSettings.houseCardsEvolution = !this.gameSettings.houseCardsEvolution)} /> + { + this.gameSettings.houseCardsEvolution && ( + +
+  House Card Evolution Round +
+ + ) + } {this.props.entireGame.isCustomBalancingOptionAvailable(this.gameSettings) && hc.state == HouseCardState.USED)) { if (this.entireGame.gameSettings.houseCardsEvolution && house.laterHouseCards != null - && this.combat.ingameGameState.game.turn >= 5) { + && this.combat.ingameGameState.game.turn >= this.entireGame.gameSettings.houseCardsEvolutionRound) { // We need to swap to the new deck now this.game.previousPlayerHouseCards.set(house, new BetterMap());