Skip to content

Commit

Permalink
Change nerfed Dwd Aerons ability to Quenty Martells ability
Browse files Browse the repository at this point in the history
  • Loading branch information
gereon77 committed Jun 15, 2024
1 parent 9875368 commit e676792
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export function applyChangesForDragonWar(ingame: IngameGameState): void {
ensureDragonStrengthTokensArePresent(ingame);

nervHouseCard(game, "balon-greyjoy", "jaqen-h-ghar");
nervHouseCard(game, "aeron-damphair-dwd", "aeron-damphair");
nervHouseCard(game, "aeron-damphair-dwd", "quentyn-martell");

game.world.regions.values.filter(r => r.superControlPowerToken != null && r.garrison == 4).forEach(r => r.garrison = 6);
game.world.regions.values.filter(r => r.superControlPowerToken != null && r.garrison == 2).forEach(r => r.garrison = 4);
Expand Down
19 changes: 18 additions & 1 deletion agot-bg-game-server/src/server/serializedGameMigrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@ const serializedGameMigrations: {version: string; migrate: (serializeGamed: any)
ingame.game.removedDragonStrengthTokens.push(10);
}

// Fix wrong id for players house cards map with nerved cards
// Fix wrong id for players house cards map with nerfed cards
if (serializedGame.gameSettings.dragonWar) {
ingame.game.houses.forEach((h: any) => {
const balon = h.houseCards.find(([id, shc]: any) => id == "balon-greyjoy" && shc.id == "balon-greyjoy-nerved");
Expand All @@ -2257,6 +2257,23 @@ const serializedGameMigrations: {version: string; migrate: (serializeGamed: any)
}
return serializedGame;
}
},
{
version: "117",
migrate: (serializedGame: any) => {
if (serializedGame.childGameState.type == "ingame") {
const ingame = serializedGame.childGameState;

const houseCards = _.flatMap(ingame.game.houses.map((h: any) => h.houseCards));
houseCards.push(...ingame.game.draftableHouseCards);

const aeronDwdNerfed: any = houseCards.find(([id, _shc]: any) => id == "aeron-damphair-dwd-nerved");
if (aeronDwdNerfed) {
aeronDwdNerfed[1].abilityId = "quentyn-martell";
}
}
return serializedGame;
}
}
];

Expand Down

0 comments on commit e676792

Please sign in to comment.