diff --git a/agot-bg-game-server/public/images/house-cards/AeronDamphairDwD-nerved.png b/agot-bg-game-server/public/images/house-cards/AeronDamphairDwD-nerfed.png similarity index 100% rename from agot-bg-game-server/public/images/house-cards/AeronDamphairDwD-nerved.png rename to agot-bg-game-server/public/images/house-cards/AeronDamphairDwD-nerfed.png diff --git a/agot-bg-game-server/public/images/house-cards/Balon-nerved.png b/agot-bg-game-server/public/images/house-cards/Balon-nerfed.png similarity index 100% rename from agot-bg-game-server/public/images/house-cards/Balon-nerved.png rename to agot-bg-game-server/public/images/house-cards/Balon-nerfed.png diff --git a/agot-bg-game-server/src/client/GameLogListComponent.tsx b/agot-bg-game-server/src/client/GameLogListComponent.tsx index 87cc677ee..f7673e744 100644 --- a/agot-bg-game-server/src/client/GameLogListComponent.tsx +++ b/agot-bg-game-server/src/client/GameLogListComponent.tsx @@ -98,13 +98,13 @@ export default class GameLogListComponent extends Component<GameLogListComponent }); } - createNervedHouseCards(): [string, HouseCard][] { - const balonNerved = createHouseCard("balon-greyjoy-nerved", { name: "Balon Greyjoy", combatStrength: 2, ability: "jaqen-h-ghar" }, "greyjoy"); - const aeronDwdNerved = createHouseCard("aeron-damphair-dwd-nerved", { name: "Aeron Damphair", ability: "aeron-damphair" }, "greyjoy"); + createNerfedHouseCards(): [string, HouseCard][] { + const balonNerfed = createHouseCard("balon-greyjoy-nerfed", { name: "Balon Greyjoy", combatStrength: 2, ability: "jaqen-h-ghar" }, "greyjoy"); + const aeronDwdNerfed = createHouseCard("aeron-damphair-dwd-nerfed", { name: "Aeron Damphair", ability: "quentyn-martell" }, "greyjoy"); return [ - [balonNerved.id, balonNerved], - [aeronDwdNerved.id, aeronDwdNerved] + [balonNerfed.id, balonNerfed], + [aeronDwdNerfed.id, aeronDwdNerfed] ]; } @@ -116,7 +116,7 @@ export default class GameLogListComponent extends Component<GameLogListComponent this.createHouseCards(modBHouseCardsData), this.createHouseCards(asosHouseCardsData), this.game.vassalHouseCards.entries, - this.createNervedHouseCards()); + this.createNerfedHouseCards()); } render(): ReactNode { diff --git a/agot-bg-game-server/src/client/houseCardImages.ts b/agot-bg-game-server/src/client/houseCardImages.ts index 5bdc96022..5d98ff004 100644 --- a/agot-bg-game-server/src/client/houseCardImages.ts +++ b/agot-bg-game-server/src/client/houseCardImages.ts @@ -5,7 +5,7 @@ import aeroImage from "../../public/images/house-cards/Areo.png"; import arianneImage from "../../public/images/house-cards/Arianne.png"; import ashaImage from "../../public/images/house-cards/Asha.png"; import balonImage from "../../public/images/house-cards/Balon.png"; -import balonNervedImage from "../../public/images/house-cards/Balon-nerved.png"; +import balonNerfedImage from "../../public/images/house-cards/Balon-nerfed.png"; import blackfishImage from "../../public/images/house-cards/Blackfish.png"; import brienneImage from "../../public/images/house-cards/Brienne.png"; import catelynImage from "../../public/images/house-cards/Catelyn.png"; @@ -48,7 +48,7 @@ import melisandreDwDImage from "../../public/images/house-cards/Melisandre_DwD.p import jonSnow from "../../public/images/house-cards/JonSnow.png"; import stannisDwDImage from "../../public/images/house-cards/StannisBaratheonDwD.png"; import aeronDwDImage from "../../public/images/house-cards/AeronDamphairDwD.png"; -import aeronDwDNervedImage from "../../public/images/house-cards/AeronDamphairDwD-nerved.png"; +import aeronDwDNerfedImage from "../../public/images/house-cards/AeronDamphairDwD-nerfed.png"; import qarlTheMaidImage from "../../public/images/house-cards/QarlTheMaid.png"; import rodrikTheReaderImage from "../../public/images/house-cards/RodrikTheReader.png"; import euronDwDImage from "../../public/images/house-cards/EuronCrowsEye.png"; @@ -175,7 +175,7 @@ const houseCardImages = new BetterMap([ ["areo-hotah", aeroImage], ["asha-greyjoy", ashaImage], ["balon-greyjoy", balonImage], - ["balon-greyjoy-nerved", balonNervedImage], + ["balon-greyjoy-nerfed", balonNerfedImage], ["the-blackfish", blackfishImage], ["brienne-of-tarth", brienneImage], ["catelyn-stark", catelynImage], @@ -217,7 +217,7 @@ const houseCardImages = new BetterMap([ ["jon-snow", jonSnow], ["stannis-baratheon-dwd", stannisDwDImage], ["aeron-damphair-dwd", aeronDwDImage], - ["aeron-damphair-dwd-nerved", aeronDwDNervedImage], + ["aeron-damphair-dwd-nerfed", aeronDwDNerfedImage], ["qarl-the-maid", qarlTheMaidImage], ["rodrik-the-reader", rodrikTheReaderImage], ["euron-crows-eye-dwd", euronDwDImage], diff --git a/agot-bg-game-server/src/common/ingame-game-state/game-data-structure/createGame.ts b/agot-bg-game-server/src/common/ingame-game-state/game-data-structure/createGame.ts index 0715c392f..b7fdb17d1 100644 --- a/agot-bg-game-server/src/common/ingame-game-state/game-data-structure/createGame.ts +++ b/agot-bg-game-server/src/common/ingame-game-state/game-data-structure/createGame.ts @@ -621,8 +621,8 @@ export function applyChangesForDragonWar(ingame: IngameGameState): void { ensureDragonStrengthTokensArePresent(ingame); - nervHouseCard(game, "balon-greyjoy", "jaqen-h-ghar"); - nervHouseCard(game, "aeron-damphair-dwd", "quentyn-martell"); + nerfHouseCard(game, "balon-greyjoy", "jaqen-h-ghar"); + nerfHouseCard(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); @@ -647,25 +647,24 @@ function findUnitToReplace(ingame: IngameGameState, house: House, unitType: stri : pickRandom(ingame.world.getUnitsOfHouse(house).filter(u => u.type.id == unitType)); } -function nervHouseCard(game: Game, hcId: string, newAbilityId: string): void { +function nerfHouseCard(game: Game, hcId: string, newAbilityId: string): void { const houseCard = game.draftableHouseCards.has(hcId) ? game.draftableHouseCards.get(hcId) : _.flatMap(game.houses.values.map(h => h.houseCards.values)).find(hc => hc.id == hcId); if (houseCard) { - const originalId = houseCard.id; - houseCard.id = hcId + "-nerved"; + houseCard.id = hcId + "-nerfed"; houseCard.ability = houseCardAbilities.get(newAbilityId); - const house = game.houses.values.find(h => h.houseCards.has(originalId)); + const house = game.houses.values.find(h => h.houseCards.has(hcId)); if (house) { - house.houseCards.delete(originalId); + house.houseCards.delete(hcId); house.houseCards.set(houseCard.id, houseCard); } if (game.draftableHouseCards.has(hcId)) { game.draftableHouseCards.delete(hcId); - game.draftableHouseCards.set(hcId + "-nerved", houseCard); + game.draftableHouseCards.set(houseCard.id, houseCard); } } } \ No newline at end of file diff --git a/agot-bg-game-server/src/server/serializedGameMigrations.ts b/agot-bg-game-server/src/server/serializedGameMigrations.ts index 446a22646..f1a1f154d 100644 --- a/agot-bg-game-server/src/server/serializedGameMigrations.ts +++ b/agot-bg-game-server/src/server/serializedGameMigrations.ts @@ -2271,6 +2271,12 @@ const serializedGameMigrations: {version: string; migrate: (serializeGamed: any) if (aeronDwdNerfed) { aeronDwdNerfed[1].abilityId = "quentyn-martell"; } + + // Fix typo in nerved: + houseCards.filter(([id, _shc]: any) => id.endsWith("-nerved")).forEach((item: any) => { + item[0] = item[0].replace("-nerved", "-nerfed"); + item[1].id = item[0]; + }); } return serializedGame; }