@firestone-hs/simulate-bgs-battle 1.1.705 → 1.1.706

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,9 @@ exports.AzeriteEmpowerment = {
9
9
  const baseAttack = input.gameState.allCards.getCard(spellCardId).tags[reference_data_1.GameTag[reference_data_1.GameTag.TAG_SCRIPT_DATA_NUM_1]];
10
10
  const baseHealth = input.gameState.allCards.getCard(spellCardId).tags[reference_data_1.GameTag[reference_data_1.GameTag.TAG_SCRIPT_DATA_NUM_2]];
11
11
  const { attack, health } = (0, utils_1.withTavernSpellStatBuff)(input.hero, baseAttack, baseHealth, input.gameState.allCards, input.spellCardId);
12
- (0, utils_1.addStatsToBoard)(input.source, input.board, input.hero, attack, health, input.gameState);
12
+ for (let i = 0; i < 2; i++) {
13
+ (0, utils_1.addStatsToBoard)(input.source, input.board, input.hero, attack, health, input.gameState);
14
+ }
13
15
  },
14
16
  };
15
17
  //# sourceMappingURL=azerite-empowerment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"azerite-empowerment.js","sourceRoot":"","sources":["../../../../src/cards/impl/bg-spell/azerite-empowerment.ts"],"names":[],"mappings":";;;AAAA,iEAAuD;AAEvD,0CAA0E;AAG7D,QAAA,kBAAkB,GAAoB;IAClD,OAAO,EAAE,YAAqC;IAC9C,eAAe,EAAE,CAAC,WAAmB,EAAE,KAAqB,EAAE,EAAE;QAC/D,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAO,CAAC,wBAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC9G,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAO,CAAC,wBAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC9G,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAuB,EACjD,KAAK,CAAC,IAAI,EACV,UAAU,EACV,UAAU,EACV,KAAK,CAAC,SAAS,CAAC,QAAQ,EACxB,KAAK,CAAC,WAAW,CACjB,CAAC;QACF,IAAA,uBAAe,EAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACzF,CAAC;CACD,CAAC","sourcesContent":["import { GameTag } from '@firestone-hs/reference-data';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { addStatsToBoard, withTavernSpellStatBuff } from '../../../utils';\r\nimport { CastSpellInput, TavernSpellCard } from '../../card.interface';\r\n\r\nexport const AzeriteEmpowerment: TavernSpellCard = {\r\n\tcardIds: [CardIds.AzeriteEmpowerment_BG28_169],\r\n\tcastTavernSpell: (spellCardId: string, input: CastSpellInput) => {\r\n\t\tconst baseAttack = input.gameState.allCards.getCard(spellCardId).tags[GameTag[GameTag.TAG_SCRIPT_DATA_NUM_1]];\r\n\t\tconst baseHealth = input.gameState.allCards.getCard(spellCardId).tags[GameTag[GameTag.TAG_SCRIPT_DATA_NUM_2]];\r\n\t\tconst { attack, health } = withTavernSpellStatBuff(\r\n\t\t\tinput.hero,\r\n\t\t\tbaseAttack,\r\n\t\t\tbaseHealth,\r\n\t\t\tinput.gameState.allCards,\r\n\t\t\tinput.spellCardId,\r\n\t\t);\r\n\t\taddStatsToBoard(input.source, input.board, input.hero, attack, health, input.gameState);\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"azerite-empowerment.js","sourceRoot":"","sources":["../../../../src/cards/impl/bg-spell/azerite-empowerment.ts"],"names":[],"mappings":";;;AAAA,iEAAuD;AAEvD,0CAA0E;AAG7D,QAAA,kBAAkB,GAAoB;IAClD,OAAO,EAAE,YAAqC;IAC9C,eAAe,EAAE,CAAC,WAAmB,EAAE,KAAqB,EAAE,EAAE;QAC/D,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAO,CAAC,wBAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC9G,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAO,CAAC,wBAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC9G,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAuB,EACjD,KAAK,CAAC,IAAI,EACV,UAAU,EACV,UAAU,EACV,KAAK,CAAC,SAAS,CAAC,QAAQ,EACxB,KAAK,CAAC,WAAW,CACjB,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3B,IAAA,uBAAe,EAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SACxF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { GameTag } from '@firestone-hs/reference-data';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { addStatsToBoard, withTavernSpellStatBuff } from '../../../utils';\r\nimport { CastSpellInput, TavernSpellCard } from '../../card.interface';\r\n\r\nexport const AzeriteEmpowerment: TavernSpellCard = {\r\n\tcardIds: [CardIds.AzeriteEmpowerment_BG28_169],\r\n\tcastTavernSpell: (spellCardId: string, input: CastSpellInput) => {\r\n\t\tconst baseAttack = input.gameState.allCards.getCard(spellCardId).tags[GameTag[GameTag.TAG_SCRIPT_DATA_NUM_1]];\r\n\t\tconst baseHealth = input.gameState.allCards.getCard(spellCardId).tags[GameTag[GameTag.TAG_SCRIPT_DATA_NUM_2]];\r\n\t\tconst { attack, health } = withTavernSpellStatBuff(\r\n\t\t\tinput.hero,\r\n\t\t\tbaseAttack,\r\n\t\t\tbaseHealth,\r\n\t\t\tinput.gameState.allCards,\r\n\t\t\tinput.spellCardId,\r\n\t\t);\r\n\t\tfor (let i = 0; i < 2; i++) {\r\n\t\t\taddStatsToBoard(input.source, input.board, input.hero, attack, health, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -1,2 +1,2 @@
1
- import { OnDespawnedCard, OnSpawnedCard } from '../../card.interface';
2
- export declare const AbyssalBruiser: OnDespawnedCard & OnSpawnedCard;
1
+ import { OnDespawnedCard, OnSpawnedCard, OnTavernSpellCastCard } from '../../card.interface';
2
+ export declare const AbyssalBruiser: OnDespawnedCard & OnSpawnedCard & OnTavernSpellCastCard;
@@ -27,10 +27,22 @@ exports.AbyssalBruiser = {
27
27
  const n = (_a = input.hero.globalInfo.TavernSpellsCastThisGame) !== null && _a !== void 0 ? _a : 0;
28
28
  if (input.applyAttackAuras) {
29
29
  minion.attack = Math.max(0, minion.attack - n * mult);
30
+ minion.maxAttack = Math.max(minion.maxAttack, minion.attack);
30
31
  }
31
32
  if (input.applyHealthAuras) {
32
33
  minion.health = Math.max(1, minion.health - n * mult);
34
+ minion.maxHealth = Math.max(minion.maxHealth, minion.health);
35
+ }
36
+ },
37
+ onTavernSpellCast: (entity, input) => {
38
+ if (input.source !== input.hero) {
39
+ return;
33
40
  }
41
+ const mult = entity.cardId === "BG35_921_G" ? 2 : 1;
42
+ entity.attack += mult;
43
+ entity.attack = Math.max(entity.attack, entity.maxAttack);
44
+ entity.health += mult;
45
+ entity.maxHealth = Math.max(entity.maxHealth, entity.health);
34
46
  },
35
47
  };
36
48
  //# sourceMappingURL=abyssal-bruiser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abyssal-bruiser.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/abyssal-bruiser.ts"],"names":[],"mappings":";;;AACA,mEAAqE;AAKxD,QAAA,cAAc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E,MAAM,CAAC,GAAG,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,wBAAwB,mCAAI,CAAC,CAAC;QAC9D,IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC3B,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;SACtD;QACD,IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC3B,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;SACtD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnDespawnInput, OnSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { OnDespawnedCard, OnSpawnedCard } from '../../card.interface';\r\n\r\nexport const AbyssalBruiser: OnDespawnedCard & OnSpawnedCard = {\r\n\tcardIds: [CardIds.AbyssalBruiser_BG35_921, CardIds.AbyssalBruiser_BG35_921_G],\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.AbyssalBruiser_BG35_921_G ? 2 : 1;\r\n\t\tconst n = input.hero.globalInfo.TavernSpellsCastThisGame ?? 0;\r\n\t\tif (input.applyAttackAuras) {\r\n\t\t\tminion.attack += n * mult;\r\n\t\t\tminion.maxAttack = minion.attack;\r\n\t\t}\r\n\t\tif (input.applyHealthAuras) {\r\n\t\t\tminion.health += n * mult;\r\n\t\t\tminion.maxHealth = Math.max(minion.maxHealth, minion.health);\r\n\t\t}\r\n\t\tconst otherHero =\r\n\t\t\tinput.gameState.gameState.player.player === input.hero\r\n\t\t\t\t? input.gameState.gameState.opponent.player\r\n\t\t\t\t: input.gameState.gameState.player.player;\r\n\t\tupdateDivineShield(minion, input.board, input.hero, otherHero, true, input.gameState);\r\n\t},\r\n\tonDespawned: (minion: BoardEntity, input: OnDespawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.AbyssalBruiser_BG35_921_G ? 2 : 1;\r\n\t\tconst n = input.hero.globalInfo.TavernSpellsCastThisGame ?? 0;\r\n\t\tif (input.applyAttackAuras) {\r\n\t\t\tminion.attack = Math.max(0, minion.attack - n * mult);\r\n\t\t}\r\n\t\tif (input.applyHealthAuras) {\r\n\t\t\tminion.health = Math.max(1, minion.health - n * mult);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"abyssal-bruiser.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/abyssal-bruiser.ts"],"names":[],"mappings":";;;AACA,mEAAqE;AAKxD,QAAA,cAAc,GAA4D;IACtF,OAAO,EAAE,0BAAoE;IAC7E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAmB,EAAE,EAAE;;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,CAAC,GAAG,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,wBAAwB,mCAAI,CAAC,CAAC;QAC9D,IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC3B,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;YAC1B,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;SACjC;QACD,IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC3B,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;YAC1B,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;SAC7D;QACD,MAAM,SAAS,GACd,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC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IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,EAAE;YAChC,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC;QACtB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1D,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC;QACtB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnDespawnInput, OnSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { CastSpellInput, OnDespawnedCard, OnSpawnedCard, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const AbyssalBruiser: OnDespawnedCard & OnSpawnedCard & OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.AbyssalBruiser_BG35_921, CardIds.AbyssalBruiser_BG35_921_G],\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.AbyssalBruiser_BG35_921_G ? 2 : 1;\r\n\t\tconst n = input.hero.globalInfo.TavernSpellsCastThisGame ?? 0;\r\n\t\tif (input.applyAttackAuras) {\r\n\t\t\tminion.attack += n * mult;\r\n\t\t\tminion.maxAttack = minion.attack;\r\n\t\t}\r\n\t\tif (input.applyHealthAuras) {\r\n\t\t\tminion.health += n * mult;\r\n\t\t\tminion.maxHealth = Math.max(minion.maxHealth, minion.health);\r\n\t\t}\r\n\t\tconst otherHero =\r\n\t\t\tinput.gameState.gameState.player.player === input.hero\r\n\t\t\t\t? input.gameState.gameState.opponent.player\r\n\t\t\t\t: input.gameState.gameState.player.player;\r\n\t\tupdateDivineShield(minion, input.board, input.hero, otherHero, true, input.gameState);\r\n\t},\r\n\tonDespawned: (minion: BoardEntity, input: OnDespawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.AbyssalBruiser_BG35_921_G ? 2 : 1;\r\n\t\tconst n = input.hero.globalInfo.TavernSpellsCastThisGame ?? 0;\r\n\t\tif (input.applyAttackAuras) {\r\n\t\t\tminion.attack = Math.max(0, minion.attack - n * mult);\r\n\t\t\tminion.maxAttack = Math.max(minion.maxAttack, minion.attack);\r\n\t\t}\r\n\t\tif (input.applyHealthAuras) {\r\n\t\t\tminion.health = Math.max(1, minion.health - n * mult);\r\n\t\t\tminion.maxHealth = Math.max(minion.maxHealth, minion.health);\r\n\t\t}\r\n\t},\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tif (input.source !== input.hero) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mult = entity.cardId === CardIds.AbyssalBruiser_BG35_921_G ? 2 : 1;\r\n\t\tentity.attack += mult;\r\n\t\tentity.attack = Math.max(entity.attack, entity.maxAttack);\r\n\t\tentity.health += mult;\r\n\t\tentity.maxHealth = Math.max(entity.maxHealth, entity.health);\r\n\t},\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"scarlet-survivor.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/scarlet-survivor.ts"],"names":[],"mappings":";;;AAEA,mEAAqE;AAOrE,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,MAAM,wBAAwB,GAAG,CAChC,MAAmB,EACnB,KAAoB,EACpB,IAAqB,EACrB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;IACT,IACC,MAAM,CAAC,iBAAiB,IAAI,CAAC;QAC7B,MAAM,CAAC,MAAM,GAAG,SAAS;QACzB,MAA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,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7F,CAAC;CACD,CAAC","sourcesContent":["import { BgsPlayerEntity } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { FullGameState } from '../../../simulation/internal-game-state';\r\nimport { OnStatsChangedInput } from '../../../simulation/stats';\r\nimport { DefaultChargesCard, OnSpawnedCard, OnStatsChangedCard } from '../../card.interface';\r\n\r\nconst THRESHOLD = 6;\r\n\r\nconst tryGrantDivineShieldOnce = (\r\n\tminion: BoardEntity,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tif (\r\n\t\tminion.abiityChargesLeft <= 0 ||\r\n\t\tminion.attack < THRESHOLD ||\r\n\t\tminion.enchantments.some((e) => e.cardId === CardIds.ScarletSurvivor_SurvivedEnchantment_BG35_814e)\r\n\t) {\r\n\t\treturn;\r\n\t}\r\n\tminion.abiityChargesLeft = 0;\r\n\r\n\t// 35.2: even without an update I'm see the Survivor get the DS before the \"attack immediately\" from a\r\n\t// Twilight Hatchling spawn. So the timing is somewhere in-between at the moment (after attacking, but\r\n\t// before a deathrattle) so I'll just pretend the bug doesn't exist for now\r\n\tupdateDivineShield(minion, board, hero, otherHero, true, gameState);\r\n\tminion.enchantments.push({\r\n\t\tcardId: CardIds.ScarletSurvivor_SurvivedEnchantment_BG35_814e,\r\n\t\toriginEntityId: minion.entityId,\r\n\t\ttiming: gameState.sharedState.currentEntityId++,\r\n\t\ttagScriptDataNum1: -1,\r\n\t\ttagScriptDataNum2: -1,\r\n\t});\r\n\t// This is a bug, and once it's fixed we should change the timing so the divine shield is immediately\r\n\t// granted\r\n\t// minion.onResolve = minion.onResolve ?? [];\r\n\t// minion.onResolve.push(() => {\r\n\t// });\r\n};\r\n\r\nexport const ScarletSurvivor: OnSpawnedCard & OnStatsChangedCard & DefaultChargesCard = {\r\n\tcardIds: [CardIds.ScarletSurvivor_BG35_814, CardIds.ScarletSurvivor_BG35_814_G],\r\n\tdefaultCharges: (entity: BoardEntity) => 1,\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst otherHero =\r\n\t\t\tinput.gameState.gameState.player.player === input.hero\r\n\t\t\t\t? input.gameState.gameState.opponent.player\r\n\t\t\t\t: input.gameState.gameState.player.player;\r\n\t\ttryGrantDivineShieldOnce(minion, input.board, input.hero, otherHero, input.gameState);\r\n\t},\r\n\tonStatsChanged: (minion: BoardEntity, input: OnStatsChangedInput) => {\r\n\t\tif (input.target.entityId !== minion.entityId) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttryGrantDivineShieldOnce(minion, input.board, input.hero, input.otherHero, input.gameState);\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"scarlet-survivor.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/scarlet-survivor.ts"],"names":[],"mappings":";;;AAEA,mEAAqE;AAOrE,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,MAAM,wBAAwB,GAAG,CAChC,MAAmB,EACnB,KAAoB,EACpB,IAAqB,EACrB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;IACT,IACC,MAAM,CAAC,iBAAiB,IAAI,CAAC;QAC7B,MAAM,CAAC,MAAM,GAAG,SAAS;QACzB,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,gBAA0D,CAAC,EAClG;QACD,OAAO;KACP;IACD,MAAM,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAO7B,IAAA,kCAAkB,EAAC,MAAM,EAA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r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { FullGameState } from '../../../simulation/internal-game-state';\r\nimport { OnStatsChangedInput } from '../../../simulation/stats';\r\nimport { DefaultChargesCard, OnSpawnedCard, OnStatsChangedCard } from '../../card.interface';\r\n\r\nconst THRESHOLD = 6;\r\n\r\nconst tryGrantDivineShieldOnce = (\r\n\tminion: BoardEntity,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tif (\r\n\t\tminion.abiityChargesLeft <= 0 ||\r\n\t\tminion.attack < THRESHOLD ||\r\n\t\tminion.enchantments.some((e) => e.cardId === CardIds.ScarletSurvivor_SurvivedEnchantment_BG35_814e)\r\n\t) {\r\n\t\treturn;\r\n\t}\r\n\tminion.abiityChargesLeft = 0;\r\n\r\n\t// 35.2: even without an update I'm see the Survivor get the DS before the \"attack immediately\" from a\r\n\t// Twilight Hatchling spawn. So the timing is somewhere in-between at the moment (after attacking, but\r\n\t// before a deathrattle) so I'll just pretend the bug doesn't exist for now\r\n\t// UPDATE 2026-04-17: apparently that's not consistent, sometimes it doesn't grand the divine shield\r\n\t// https://replays.firestoneapp.com/?reviewId=b342665e-7667-4095-b4f0-b42e1eaec457&turn=5&action=0\r\n\tupdateDivineShield(minion, board, hero, otherHero, true, gameState);\r\n\tminion.enchantments.push({\r\n\t\tcardId: CardIds.ScarletSurvivor_SurvivedEnchantment_BG35_814e,\r\n\t\toriginEntityId: minion.entityId,\r\n\t\ttiming: gameState.sharedState.currentEntityId++,\r\n\t\ttagScriptDataNum1: -1,\r\n\t\ttagScriptDataNum2: -1,\r\n\t});\r\n\t// This is a bug, and once it's fixed we should change the timing so the divine shield is immediately\r\n\t// granted\r\n\t// minion.onResolve = minion.onResolve ?? [];\r\n\t// minion.onResolve.push(() => {\r\n\t// });\r\n};\r\n\r\nexport const ScarletSurvivor: OnSpawnedCard & OnStatsChangedCard & DefaultChargesCard = {\r\n\tcardIds: [CardIds.ScarletSurvivor_BG35_814, CardIds.ScarletSurvivor_BG35_814_G],\r\n\tdefaultCharges: (entity: BoardEntity) => 1,\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst otherHero =\r\n\t\t\tinput.gameState.gameState.player.player === input.hero\r\n\t\t\t\t? input.gameState.gameState.opponent.player\r\n\t\t\t\t: input.gameState.gameState.player.player;\r\n\t\ttryGrantDivineShieldOnce(minion, input.board, input.hero, otherHero, input.gameState);\r\n\t},\r\n\tonStatsChanged: (minion: BoardEntity, input: OnStatsChangedInput) => {\r\n\t\tif (input.target.entityId !== minion.entityId) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttryGrantDivineShieldOnce(minion, input.board, input.hero, input.otherHero, input.gameState);\r\n\t},\r\n};\r\n"]}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TwilightHatchling = void 0;
4
4
  const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
5
+ const spawns_1 = require("../../../simulation/spawns");
5
6
  exports.TwilightHatchling = {
6
7
  cardIds: ["BG34_630", "BG34_630_G"],
7
8
  deathrattleSpawn: (minion, input) => {
@@ -10,7 +11,12 @@ exports.TwilightHatchling = {
10
11
  spawns.forEach((e) => {
11
12
  e.attackImmediately = true;
12
13
  });
13
- return spawns;
14
+ const indexFromRight = input.deadEntityIndexFromRight;
15
+ const spawned = (0, spawns_1.performEntitySpawns)(spawns, input.boardWithDeadEntity, input.boardWithDeadEntityHero, minion, indexFromRight, input.otherBoard, input.otherBoardHero, input.gameState, true);
16
+ spawned.forEach((e) => {
17
+ e.hasAttacked = undefined;
18
+ });
19
+ return [];
14
20
  },
15
21
  };
16
22
  //# sourceMappingURL=twilight-hatchling.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"twilight-hatchling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-hatchling.ts"],"names":[],"mappings":";;;AAGA,+EAAiF;AAGpE,QAAA,iBAAiB,GAAyB;IACtD,OAAO,EAAE,0BAA0E;IACnF,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAA0B,EAAE;QACnG,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAA,4CAAuB,eAAyD,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5G,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IACf,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const TwilightHatchling: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.TwilightHatchling_BG34_630, CardIds.TwilightHatchling_BG34_630_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput): readonly BoardEntity[] => {\r\n\t\tconst mult = minion.cardId === CardIds.TwilightHatchling_BG34_630_G ? 2 : 1;\r\n\t\tconst spawns = simplifiedSpawnEntities(CardIds.TwilightHatchling_TwilightWhelpToken_BG34_630t, mult, input);\r\n\t\tspawns.forEach((e) => {\r\n\t\t\te.attackImmediately = true;\r\n\t\t});\r\n\t\treturn spawns;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"twilight-hatchling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-hatchling.ts"],"names":[],"mappings":";;;AAGA,+EAAiF;AACjF,uDAAiE;AAGpD,QAAA,iBAAiB,GAAyB;IACtD,OAAO,EAAE,0BAA0E;IACnF,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAA0B,EAAE;QACnG,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5E,MAAM,MAAM,GAAG,IAAA,4CAAuB,eAAyD,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5G,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,MAAM,cAAc,GAAG,KAAK,CAAC,wBAAwB,CAAC;QACtD,MAAM,OAAO,GAAG,IAAA,4BAAmB,EAClC,MAAM,EACN,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,MAAM,EACN,cAAc,EACd,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,IAAI,CACJ,CAAC;QAGF,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACrB,CAAC,CAAC,WAAW,GAAG,SAAS,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const TwilightHatchling: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.TwilightHatchling_BG34_630, CardIds.TwilightHatchling_BG34_630_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput): readonly BoardEntity[] => {\r\n\t\tconst mult = minion.cardId === CardIds.TwilightHatchling_BG34_630_G ? 2 : 1;\r\n\r\n\t\tconst spawns = simplifiedSpawnEntities(CardIds.TwilightHatchling_TwilightWhelpToken_BG34_630t, mult, input);\r\n\t\tspawns.forEach((e) => {\r\n\t\t\te.attackImmediately = true;\r\n\t\t});\r\n\t\tconst indexFromRight = input.deadEntityIndexFromRight;\r\n\t\tconst spawned = performEntitySpawns(\r\n\t\t\tspawns,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tminion,\r\n\t\t\tindexFromRight,\r\n\t\t\tinput.otherBoard,\r\n\t\t\tinput.otherBoardHero,\r\n\t\t\tinput.gameState,\r\n\t\t\ttrue,\r\n\t\t);\r\n\t\t// We do it this way because it can then re-attack\r\n\t\t// https://replays.firestoneapp.com/?reviewId=7c838df7-992b-4dae-ad96-c0f8a0d7872a&turn=7&action=0\r\n\t\tspawned.forEach((e) => {\r\n\t\t\te.hasAttacked = undefined;\r\n\t\t});\r\n\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
@@ -24,6 +24,11 @@ const getTavernSpellEffectRepeatCount = (input) => {
24
24
  2 * input.board.filter((e) => e.cardId === "BG33_825_G").length;
25
25
  repeats += proudPrivateerExtra;
26
26
  }
27
+ const cathedrals = input.hero.trinkets.filter((t) => t.cardId === "BG30_MagicItem_434" && t.scriptDataNum1 > 0);
28
+ repeats += cathedrals.length;
29
+ for (const cathedral of cathedrals) {
30
+ cathedral.scriptDataNum1--;
31
+ }
27
32
  return repeats;
28
33
  };
29
34
  exports.getTavernSpellEffectRepeatCount = getTavernSpellEffectRepeatCount;
@@ -1 +1 @@
1
- {"version":3,"file":"tavern-spell-repeat.js","sourceRoot":"","sources":["../../src/mechanics/tavern-spell-repeat.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CAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAErE,IAAI,aAAa,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,EAAE;QACjD,MAAM,mBAAmB,GACxB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,eAAoC,CAAC,CAAC,MAAM;YAC9E,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,iBAAsC,CAAC,CAAC,MAAM,CAAC;QACtF,OAAO,IAAI,mBAAmB,CAAC;KAC/B;IAED,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AA9BW,QAAA,+BAA+B,mCA8B1C","sourcesContent":["import { CastSpellInput } from '../cards/card.interface';\r\nimport { CardIds } from '../services/card-ids';\r\n\r\n/**\r\n * Balinda Stonehearth: extra spell effect resolutions for spells you cast that target a friendly board minion.\r\n * Maelstrom Emergent: each copy adds +1 extra resolution (golden +2) for tavern spells you cast; stacks additively with Balinda.\r\n */\r\nexport const getTavernSpellEffectRepeatCount = (input: CastSpellInput): number => {\r\n\tif (input.source !== input.hero) {\r\n\t\treturn 1;\r\n\t}\r\n\tlet repeats = 1;\r\n\tconst hasGoldenBalinda = input.board.some((e) => e.cardId === CardIds.BalindaStonehearth_BG35_883_G);\r\n\tconst hasNormalBalinda = input.board.some((e) => e.cardId === CardIds.BalindaStonehearth_BG35_883);\r\n\tif (\r\n\t\t(hasGoldenBalinda || hasNormalBalinda) &&\r\n\t\tinput.target &&\r\n\t\tinput.board.some((e) => e.entityId === input.target.entityId)\r\n\t) {\r\n\t\trepeats = hasGoldenBalinda ? 3 : 2;\r\n\t}\r\n\tconst maelstromExtra =\r\n\t\tinput.board.filter((e) => e.cardId === CardIds.MaelstromEmergent_BG34_922).length +\r\n\t\t2 * input.board.filter((e) => e.cardId === CardIds.MaelstromEmergent_BG34_922_G).length;\r\n\trepeats += maelstromExtra;\r\n\r\n\tconst spellCard = input.gameState.allCards.getCard(input.spellCardId);\r\n\tconst isBountySpell = spellCard?.mechanics?.includes('BACON_BOUNTY');\r\n\t// Proud Privateer only affects bounties *you* (the hero) cast — same as Balinda / onTavernSpellCast.\r\n\tif (isBountySpell && input.source === input.hero) {\r\n\t\tconst proudPrivateerExtra =\r\n\t\t\tinput.board.filter((e) => e.cardId === CardIds.ProudPrivateer_BG33_825).length +\r\n\t\t\t2 * input.board.filter((e) => e.cardId === CardIds.ProudPrivateer_BG33_825_G).length;\r\n\t\trepeats += proudPrivateerExtra;\r\n\t}\r\n\r\n\treturn repeats;\r\n};\r\n"]}
1
+ {"version":3,"file":"tavern-spell-repeat.js","sourceRoot":"","sources":["../../src/mechanics/tavern-spell-repeat.ts"],"names":[],"mappings":";;;AAOO,MAAM,+BAA+B,GAAG,CAAC,KAAqB,EAAU,EAAE;;IAChF,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,EAAE;QAChC,OAAO,CAAC,CAAC;KACT;IACD,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,iBAA0C,CAAC,CAAC;IACrG,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,eAAwC,CAAC,CAAC;IACnG,IACC,CAAC,gBAAgB,IAAI,gBAAgB,CAAC;QACtC,KAAK,CAAC,MAAM;QACZ,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAC5D;QACD,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CA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AO,OAAO,CAAC;AAChB,CAAC,CAAC;AAtCW,QAAA,+BAA+B,mCAsC1C","sourcesContent":["import { CastSpellInput } from '../cards/card.interface';\r\nimport { CardIds } from '../services/card-ids';\r\n\r\n/**\r\n * Balinda Stonehearth: extra spell effect resolutions for spells you cast that target a friendly board minion.\r\n * Maelstrom Emergent: each copy adds +1 extra resolution (golden +2) for tavern spells you cast; stacks additively with Balinda.\r\n */\r\nexport const getTavernSpellEffectRepeatCount = (input: CastSpellInput): number => {\r\n\tif (input.source !== input.hero) {\r\n\t\treturn 1;\r\n\t}\r\n\tlet repeats = 1;\r\n\tconst hasGoldenBalinda = input.board.some((e) => e.cardId === CardIds.BalindaStonehearth_BG35_883_G);\r\n\tconst hasNormalBalinda = input.board.some((e) => e.cardId === CardIds.BalindaStonehearth_BG35_883);\r\n\tif (\r\n\t\t(hasGoldenBalinda || hasNormalBalinda) &&\r\n\t\tinput.target &&\r\n\t\tinput.board.some((e) => e.entityId === input.target.entityId)\r\n\t) {\r\n\t\trepeats = hasGoldenBalinda ? 3 : 2;\r\n\t}\r\n\tconst maelstromExtra =\r\n\t\tinput.board.filter((e) => e.cardId === CardIds.MaelstromEmergent_BG34_922).length +\r\n\t\t2 * input.board.filter((e) => e.cardId === CardIds.MaelstromEmergent_BG34_922_G).length;\r\n\trepeats += maelstromExtra;\r\n\r\n\tconst spellCard = input.gameState.allCards.getCard(input.spellCardId);\r\n\tconst isBountySpell = spellCard?.mechanics?.includes('BACON_BOUNTY');\r\n\t// Proud Privateer only affects bounties *you* (the hero) cast — same as Balinda / onTavernSpellCast.\r\n\tif (isBountySpell && input.source === input.hero) {\r\n\t\tconst proudPrivateerExtra =\r\n\t\t\tinput.board.filter((e) => e.cardId === CardIds.ProudPrivateer_BG33_825).length +\r\n\t\t\t2 * input.board.filter((e) => e.cardId === CardIds.ProudPrivateer_BG33_825_G).length;\r\n\t\trepeats += proudPrivateerExtra;\r\n\t}\r\n\r\n\tconst cathedrals = input.hero.trinkets.filter(\r\n\t\t(t) => t.cardId === CardIds.ReplicaCathedral_BG30_MagicItem_434 && t.scriptDataNum1 > 0,\r\n\t);\r\n\trepeats += cathedrals.length;\r\n\tfor (const cathedral of cathedrals) {\r\n\t\tcathedral.scriptDataNum1--;\r\n\t}\r\n\r\n\treturn repeats;\r\n};\r\n"]}
@@ -8,7 +8,7 @@ const add_minion_to_board_1 = require("../add-minion-to-board");
8
8
  const remove_minion_from_board_1 = require("../remove-minion-from-board");
9
9
  const stats_1 = require("../stats");
10
10
  const makeMinionGolden = (target, source, targetBoard, targetBoardHero, otherBoard, otherHero, gameState) => {
11
- var _a;
11
+ var _a, _b;
12
12
  if ((0, exports.isMinionGolden)(target, gameState.allCards)) {
13
13
  return;
14
14
  }
@@ -29,7 +29,10 @@ const makeMinionGolden = (target, source, targetBoard, targetBoardHero, otherBoa
29
29
  const avengeCurrent = target.avengeCurrent;
30
30
  (0, utils_1.addImpliedMechanics)(target, gameState.cardsData);
31
31
  target.divineShield = hasDivineShield;
32
- target.reborn = hasReborn || ((_a = goldenCard.mechanics) === null || _a === void 0 ? void 0 : _a.includes(reference_data_1.GameTag[reference_data_1.GameTag.REBORN]));
32
+ target.reborn =
33
+ hasReborn ||
34
+ (((_a = goldenCard.mechanics) === null || _a === void 0 ? void 0 : _a.includes(reference_data_1.GameTag[reference_data_1.GameTag.REBORN])) &&
35
+ !((_b = refCard.mechanics) === null || _b === void 0 ? void 0 : _b.includes(reference_data_1.GameTag[reference_data_1.GameTag.REBORN])));
33
36
  target.avengeCurrent = avengeCurrent;
34
37
  target.gildedInCombat = true;
35
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"golden.js","sourceRoot":"","sources":["../../../src/simulation/utils/golden.ts"],"names":[],"mappings":";;;AAAA,iEAAwE;AAGxE,gFAAqG;AAErG,uCAAkD;AAClD,gEAAqE;AAErE,0EAA4E;AAC5E,oCAAuC;AAEhC,MAAM,gBAAgB,GAAG,CAC/B,MAAmB,EACnB,MAAoD,EACpD,WAA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B,CAAC,CAAC;YACvG,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,CAAC;YACvG,MAAM;KACP;AACF,CAAC,CAAC","sourcesContent":["import { AllCardsService, GameTag } from '@firestone-hs/reference-data';\r\nimport { BgsPlayerEntity, BoardTrinket } from '../../bgs-player-entity';\r\nimport { BoardEntity } from '../../board-entity';\r\nimport { eternalKnightAttack, eternalKnightHealth } from '../../cards/impl/trinket/eternal-portrait';\r\nimport { CardIds } from '../../services/card-ids';\r\nimport { addImpliedMechanics } from '../../utils';\r\nimport { handleAddedMinionAuraEffect } from '../add-minion-to-board';\r\nimport { FullGameState } from '../internal-game-state';\r\nimport { handleMinionRemovedAuraEffect } from '../remove-minion-from-board';\r\nimport { modifyStats } from '../stats';\r\n\r\nexport const makeMinionGolden = (\r\n\ttarget: BoardEntity,\r\n\tsource: BoardEntity | BgsPlayerEntity | BoardTrinket,\r\n\ttargetBoard: BoardEntity[],\r\n\ttargetBoardHero: BgsPlayerEntity,\r\n\totherBoard: BoardEntity[],\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\t// Typically, we are already golden\r\n\tif (isMinionGolden(target, gameState.allCards)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tgameState.spectator.registerPowerTarget(source, target, targetBoard, null, null);\r\n\r\n\t// console.log('before transforming minion', stringifySimple(targetBoard, allCards));\r\n\thandleMinionRemovedAuraEffect(targetBoard, target, targetBoardHero, gameState);\r\n\t// Specific for making a minion golden\r\n\t// This is not handled in handleMinionRemovedAuraEffect, though I'm not entirely sure why. Maybe because it's a self-effect only?\r\n\t// Also, because of how I implemented auras and such, it's probably good to have something specific for golden\r\n\tremoveMinionAuraEffectsForGolden(target, targetBoardHero);\r\n\t// console.log('after removed effect', stringifySimple(targetBoard, allCards));\r\n\tconst refCard = gameState.allCards.getCard(target.cardId);\r\n\tlet goldenCard = gameState.allCards.getCardFromDbfId(refCard.battlegroundsPremiumDbfId);\r\n\t// Happens when there is no dedicated golden card, like for the Bettle token from Boon of Beetles\r\n\tif (!goldenCard?.id) {\r\n\t\tgoldenCard = refCard;\r\n\t}\r\n\r\n\t// A minion becoming golden ignore the current death.\r\n\t// This way of handling it is not ideal, since it will still trigger if both avenges trigger at the same time, but\r\n\t// should solve the other cases\r\n\t// Update 2024-06-21: I'm not sure what this is about exactly. See\r\n\t// http://replays.firestoneapp.com/?reviewId=5d94ebeb-3691-4509-88de-5d5418b20597&turn=11&action=2\r\n\t// The Sr. Tomb Diver dies, thus gilding the Phaerix. Two other deaths later, the avenge procs\r\n\t// This means the death of the diver counted normally\r\n\t// target.avengeCurrent = Math.min(target.avengeDefault, target.avengeCurrent + 1);\r\n\r\n\t// Only change the card ID after modifying the stats, so that some effects (like Tarecgosa) won't trigger\r\n\t// too early\r\n\t// TODO: add a replay with Tarec to illustrate the difference with Defiant Shipwright, and\r\n\t// check if there is something different with Tarec\r\n\ttarget.cardId = goldenCard.id;\r\n\t// 33.6.2 (https://replays.firestoneapp.com/?reviewId=3b025701-01f5-4527-9d53-d8d67f78c5c8&turn=7&action=0)\r\n\t// The Phylactery enchantment exists before the Golden Deathrattle power so it goes first.\r\n\t// This most likely means that we need to create a new entityId when gilding a minion, so that it\r\n\t// is processed in the correct order.\r\n\ttarget.entityId = gameState.sharedState.currentEntityId++;\r\n\r\n\t// The rule for golden minions is to add the base stats\r\n\t// TO CHECK: not sure that this is what actually happens (i.e. do minions that trigger on stats modifications\r\n\t// trigger?)\r\n\t// UPDATE 2024-06-20: Defiant Shipwright (2/5) going golden (4/10) actually ends up at 4/12 because\r\n\t// of the +2 health bonus\r\n\t// http://replays.firestoneapp.com/?reviewId=283dc44c-5fc8-40fb-af89-7d752a39f9b9&turn=7&action=1\r\n\t// BUT (2025-05-10) Tarecgosa going golden just becomes a 10/10, it doesn't get the x2 from the buff\r\n\t// Maybe that's because it's not an enchantment, so let's just hard-code this here\r\n\t// (bug: it won't work with Poets)\r\n\t// Update 2025-05-05: Whelp Smuggler going golden doesn't not trigger the other whelp smuggler stat buff\r\n\t// https://replays.firestoneapp.com/?reviewId=253ddf7c-be1b-44f4-aa78-9a23442d3687&turn=15&action=0\r\n\t// So I'm just modifying the stats here without triggering any side-effects\r\n\t// target.attack += refCard.attack;\r\n\t// target.health += refCard.health;\r\n\t// UPDATE 33.6: Defiant Shipwright going golden triggers its effect. Not sure how this should behave\r\n\t// https://replays.firestoneapp.com/?reviewId=52ae764d-6dc8-43cc-bd00-035a121e2388&turn=11&action=0\r\n\tmodifyStats(target, null, refCard.attack, refCard.health, targetBoard, targetBoardHero, gameState, true, false);\r\n\r\n\t// console.log('before adding new effect', stringifySimple(targetBoard, allCards));\r\n\thandleAddedMinionAuraEffect(targetBoard, targetBoardHero, otherBoard, otherHero, target, gameState, true, false);\r\n\tconst hasDivineShield = target.divineShield;\r\n\tconst hasReborn = target.reborn;\r\n\tconst avengeCurrent = target.avengeCurrent;\r\n\taddImpliedMechanics(target, gameState.cardsData);\r\n\r\n\t// addImpliedMechanics grants divine shield if the card has divine shield, or if the entity had\r\n\t// it at some point. That means that when we gild Zilliax: Defense Module (with Divine Shield) into\r\n\t// Zilliaw: Assembled, we restore the divine shield, while we shouldn't\r\n\ttarget.divineShield = hasDivineShield;\r\n\t// Update 2024-06-19: Hat tested on one of their build, and gilding a zilliax module should NOT\r\n\t// remove its divine shield / reborn status\r\n\t// Gilding a reborn Risen Rider results into a golden Risen Rider with reborn\r\n\t// http://replays.firestoneapp.com/?reviewId=c553c3e7-01e2-494d-80f8-69f33c08fb39&turn=7&action=4\r\n\ttarget.reborn = hasReborn || goldenCard.mechanics?.includes(GameTag[GameTag.REBORN]);\r\n\t// target.windfury = refGoldenCard.mechanics?.includes(GameTag[GameTag.WINDFURY]);\r\n\t// target.taunt = refGoldenCard.mechanics?.includes(GameTag[GameTag.TAUNT]);\r\n\t// target.stealth = refGoldenCard.mechanics?.includes(GameTag[GameTag.STEALTH]);\r\n\ttarget.avengeCurrent = avengeCurrent;\r\n\ttarget.gildedInCombat = true;\r\n\r\n\t// console.log('after adding new effect', stringifySimple(targetBoard, allCards));\r\n};\r\n\r\nexport const isMinionGolden = (entity: BoardEntity, allCards: AllCardsService): boolean => {\r\n\tconst ref = allCards.getCard(entity.cardId);\r\n\t// Some cards (like the Bettle token from Boon of Beetles) don't have a premium dbf id. However, we can still\r\n\t// gild it\r\n\treturn ref.premium;\r\n};\r\n\r\n// This feels wrong, and is probably an indicator that auras are not applied at the right time\r\nconst removeMinionAuraEffectsForGolden = (entity: BoardEntity, hero: BgsPlayerEntity) => {\r\n\tswitch (entity.cardId) {\r\n\t\tcase CardIds.EternalKnight_BG25_008:\r\n\t\tcase CardIds.EternalKnight_BG25_008_G:\r\n\t\t\tconst eternalKnightBuffToRemove = hero.globalInfo.EternalKnightsDeadThisGame;\r\n\t\t\tconst eternalKnighMultiplier = entity.cardId === CardIds.EternalKnight_BG25_008_G ? 2 : 1;\r\n\t\t\tentity.health = Math.max(\r\n\t\t\t\t1,\r\n\t\t\t\tentity.health - eternalKnightHealth * eternalKnighMultiplier * eternalKnightBuffToRemove,\r\n\t\t\t);\r\n\t\t\tentity.attack = Math.max(\r\n\t\t\t\t0,\r\n\t\t\t\tentity.attack - eternalKnightAttack * eternalKnighMultiplier * eternalKnightBuffToRemove,\r\n\t\t\t);\r\n\t\t\tbreak;\r\n\t\tcase CardIds.SanlaynScribe_BGDUO31_208:\r\n\t\tcase CardIds.SanlaynScribe_BGDUO31_208_G:\r\n\t\t\tconst sanlaynBuffToRemove = hero.globalInfo.SanlaynScribesDeadThisGame;\r\n\t\t\tconst sanlaynMultiplier = entity.cardId === CardIds.SanlaynScribe_BGDUO31_208_G ? 2 : 1;\r\n\t\t\tentity.health = Math.max(1, entity.health - sanlaynMultiplier * sanlaynBuffToRemove);\r\n\t\t\tentity.attack = Math.max(0, entity.attack - sanlaynMultiplier * sanlaynBuffToRemove);\r\n\t\t\tbreak;\r\n\t\tcase CardIds.AstralAutomaton_BG_TTN_401:\r\n\t\tcase CardIds.AstralAutomaton_BG_TTN_401_G:\r\n\t\t\tconst multiplierAstral = entity.cardId === CardIds.AstralAutomaton_BG_TTN_401_G ? 2 : 1;\r\n\t\t\t// Doesn't count self\r\n\t\t\tconst statsBonusAstralToRemove = hero.globalInfo.AstralAutomatonsSummonedThisGame - 1;\r\n\t\t\tentity.health = Math.max(1, entity.health - 3 * multiplierAstral * statsBonusAstralToRemove);\r\n\t\t\tentity.attack = Math.max(0, entity.attack - 2 * multiplierAstral * statsBonusAstralToRemove);\r\n\t\t\tbreak;\r\n\t\tcase CardIds.DrBoomsMonster_BG31_176:\r\n\t\tcase CardIds.DrBoomsMonster_BG31_176_G:\r\n\t\t\tconst multiplierDrBoom = entity.cardId === CardIds.DrBoomsMonster_BG31_176_G ? 2 : 1;\r\n\t\t\tentity.health = Math.max(1, entity.health - 2 * hero.globalInfo.MagnetizedThisGame * multiplierDrBoom);\r\n\t\t\tentity.attack = Math.max(0, entity.attack - 2 * hero.globalInfo.MagnetizedThisGame * multiplierDrBoom);\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n"]}
1
+ {"version":3,"file":"golden.js","sourceRoot":"","sources":["../../../src/simulation/utils/golden.ts"],"names":[],"mappings":";;;AAAA,iEAAwE;AAGxE,gFAAqG;AAErG,uCAAkD;AAClD,gEAAqE;AAErE,0EAA4E;AAC5E,oCAAuC;AAEhC,MAAM,gBAAgB,GAAG,CAC/B,MAAmB,EACnB,MAAoD,EACpD,WAA0B,EAC1B,eAAgC,EAChC,UAAyB,EACzB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;;IAET,IAAI,IAAA,sBAAc,EAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;QAC/C,OAAO;KACP;IAED,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,E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AC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,CAAC;YACvG,MAAM;KACP;AACF,CAAC,CAAC","sourcesContent":["import { AllCardsService, GameTag } from '@firestone-hs/reference-data';\r\nimport { BgsPlayerEntity, BoardTrinket } from '../../bgs-player-entity';\r\nimport { BoardEntity } from '../../board-entity';\r\nimport { eternalKnightAttack, eternalKnightHealth } from '../../cards/impl/trinket/eternal-portrait';\r\nimport { CardIds } from '../../services/card-ids';\r\nimport { addImpliedMechanics } from '../../utils';\r\nimport { handleAddedMinionAuraEffect } from '../add-minion-to-board';\r\nimport { FullGameState } from '../internal-game-state';\r\nimport { handleMinionRemovedAuraEffect } from '../remove-minion-from-board';\r\nimport { modifyStats } from '../stats';\r\n\r\nexport const makeMinionGolden = (\r\n\ttarget: BoardEntity,\r\n\tsource: BoardEntity | BgsPlayerEntity | BoardTrinket,\r\n\ttargetBoard: BoardEntity[],\r\n\ttargetBoardHero: BgsPlayerEntity,\r\n\totherBoard: BoardEntity[],\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\t// Typically, we are already golden\r\n\tif (isMinionGolden(target, gameState.allCards)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tgameState.spectator.registerPowerTarget(source, target, targetBoard, null, null);\r\n\r\n\t// console.log('before transforming minion', stringifySimple(targetBoard, allCards));\r\n\thandleMinionRemovedAuraEffect(targetBoard, target, targetBoardHero, gameState);\r\n\t// Specific for making a minion golden\r\n\t// This is not handled in handleMinionRemovedAuraEffect, though I'm not entirely sure why. Maybe because it's a self-effect only?\r\n\t// Also, because of how I implemented auras and such, it's probably good to have something specific for golden\r\n\tremoveMinionAuraEffectsForGolden(target, targetBoardHero);\r\n\t// console.log('after removed effect', stringifySimple(targetBoard, allCards));\r\n\tconst refCard = gameState.allCards.getCard(target.cardId);\r\n\tlet goldenCard = gameState.allCards.getCardFromDbfId(refCard.battlegroundsPremiumDbfId);\r\n\t// Happens when there is no dedicated golden card, like for the Bettle token from Boon of Beetles\r\n\tif (!goldenCard?.id) {\r\n\t\tgoldenCard = refCard;\r\n\t}\r\n\r\n\t// A minion becoming golden ignore the current death.\r\n\t// This way of handling it is not ideal, since it will still trigger if both avenges trigger at the same time, but\r\n\t// should solve the other cases\r\n\t// Update 2024-06-21: I'm not sure what this is about exactly. See\r\n\t// http://replays.firestoneapp.com/?reviewId=5d94ebeb-3691-4509-88de-5d5418b20597&turn=11&action=2\r\n\t// The Sr. Tomb Diver dies, thus gilding the Phaerix. Two other deaths later, the avenge procs\r\n\t// This means the death of the diver counted normally\r\n\t// target.avengeCurrent = Math.min(target.avengeDefault, target.avengeCurrent + 1);\r\n\r\n\t// Only change the card ID after modifying the stats, so that some effects (like Tarecgosa) won't trigger\r\n\t// too early\r\n\t// TODO: add a replay with Tarec to illustrate the difference with Defiant Shipwright, and\r\n\t// check if there is something different with Tarec\r\n\ttarget.cardId = goldenCard.id;\r\n\t// 33.6.2 (https://replays.firestoneapp.com/?reviewId=3b025701-01f5-4527-9d53-d8d67f78c5c8&turn=7&action=0)\r\n\t// The Phylactery enchantment exists before the Golden Deathrattle power so it goes first.\r\n\t// This most likely means that we need to create a new entityId when gilding a minion, so that it\r\n\t// is processed in the correct order.\r\n\ttarget.entityId = gameState.sharedState.currentEntityId++;\r\n\r\n\t// The rule for golden minions is to add the base stats\r\n\t// TO CHECK: not sure that this is what actually happens (i.e. do minions that trigger on stats modifications\r\n\t// trigger?)\r\n\t// UPDATE 2024-06-20: Defiant Shipwright (2/5) going golden (4/10) actually ends up at 4/12 because\r\n\t// of the +2 health bonus\r\n\t// http://replays.firestoneapp.com/?reviewId=283dc44c-5fc8-40fb-af89-7d752a39f9b9&turn=7&action=1\r\n\t// BUT (2025-05-10) Tarecgosa going golden just becomes a 10/10, it doesn't get the x2 from the buff\r\n\t// Maybe that's because it's not an enchantment, so let's just hard-code this here\r\n\t// (bug: it won't work with Poets)\r\n\t// Update 2025-05-05: Whelp Smuggler going golden doesn't not trigger the other whelp smuggler stat buff\r\n\t// https://replays.firestoneapp.com/?reviewId=253ddf7c-be1b-44f4-aa78-9a23442d3687&turn=15&action=0\r\n\t// So I'm just modifying the stats here without triggering any side-effects\r\n\t// target.attack += refCard.attack;\r\n\t// target.health += refCard.health;\r\n\t// UPDATE 33.6: Defiant Shipwright going golden triggers its effect. Not sure how this should behave\r\n\t// https://replays.firestoneapp.com/?reviewId=52ae764d-6dc8-43cc-bd00-035a121e2388&turn=11&action=0\r\n\tmodifyStats(target, null, refCard.attack, refCard.health, targetBoard, targetBoardHero, gameState, true, false);\r\n\r\n\t// console.log('before adding new effect', stringifySimple(targetBoard, allCards));\r\n\thandleAddedMinionAuraEffect(targetBoard, targetBoardHero, otherBoard, otherHero, target, gameState, true, false);\r\n\tconst hasDivineShield = target.divineShield;\r\n\tconst hasReborn = target.reborn;\r\n\tconst avengeCurrent = target.avengeCurrent;\r\n\taddImpliedMechanics(target, gameState.cardsData);\r\n\r\n\t// addImpliedMechanics grants divine shield if the card has divine shield, or if the entity had\r\n\t// it at some point. That means that when we gild Zilliax: Defense Module (with Divine Shield) into\r\n\t// Zilliaw: Assembled, we restore the divine shield, while we shouldn't\r\n\ttarget.divineShield = hasDivineShield;\r\n\t// Update 2024-06-19: Hat tested on one of their build, and gilding a zilliax module should NOT\r\n\t// remove its divine shield / reborn status\r\n\t// Gilding a reborn Risen Rider results into a golden Risen Rider with reborn\r\n\t// http://replays.firestoneapp.com/?reviewId=c553c3e7-01e2-494d-80f8-69f33c08fb39&turn=7&action=4\r\n\t// UPDATE 2026-04-17: Looks like this has been fixed / changed\r\n\t// https://replays.firestoneapp.com/?reviewId=5365a382-9c28-4cd8-8760-e7666cb701f3&turn=7&action=0\r\n\ttarget.reborn =\r\n\t\thasReborn ||\r\n\t\t(goldenCard.mechanics?.includes(GameTag[GameTag.REBORN]) &&\r\n\t\t\t!refCard.mechanics?.includes(GameTag[GameTag.REBORN]));\r\n\t// target.windfury = refGoldenCard.mechanics?.includes(GameTag[GameTag.WINDFURY]);\r\n\t// target.taunt = refGoldenCard.mechanics?.includes(GameTag[GameTag.TAUNT]);\r\n\t// target.stealth = refGoldenCard.mechanics?.includes(GameTag[GameTag.STEALTH]);\r\n\ttarget.avengeCurrent = avengeCurrent;\r\n\ttarget.gildedInCombat = true;\r\n};\r\n\r\nexport const isMinionGolden = (entity: BoardEntity, allCards: AllCardsService): boolean => {\r\n\tconst ref = allCards.getCard(entity.cardId);\r\n\t// Some cards (like the Bettle token from Boon of Beetles) don't have a premium dbf id. However, we can still\r\n\t// gild it\r\n\treturn ref.premium;\r\n};\r\n\r\n// This feels wrong, and is probably an indicator that auras are not applied at the right time\r\nconst removeMinionAuraEffectsForGolden = (entity: BoardEntity, hero: BgsPlayerEntity) => {\r\n\tswitch (entity.cardId) {\r\n\t\tcase CardIds.EternalKnight_BG25_008:\r\n\t\tcase CardIds.EternalKnight_BG25_008_G:\r\n\t\t\tconst eternalKnightBuffToRemove = hero.globalInfo.EternalKnightsDeadThisGame;\r\n\t\t\tconst eternalKnighMultiplier = entity.cardId === CardIds.EternalKnight_BG25_008_G ? 2 : 1;\r\n\t\t\tentity.health = Math.max(\r\n\t\t\t\t1,\r\n\t\t\t\tentity.health - eternalKnightHealth * eternalKnighMultiplier * eternalKnightBuffToRemove,\r\n\t\t\t);\r\n\t\t\tentity.attack = Math.max(\r\n\t\t\t\t0,\r\n\t\t\t\tentity.attack - eternalKnightAttack * eternalKnighMultiplier * eternalKnightBuffToRemove,\r\n\t\t\t);\r\n\t\t\tbreak;\r\n\t\tcase CardIds.SanlaynScribe_BGDUO31_208:\r\n\t\tcase CardIds.SanlaynScribe_BGDUO31_208_G:\r\n\t\t\tconst sanlaynBuffToRemove = hero.globalInfo.SanlaynScribesDeadThisGame;\r\n\t\t\tconst sanlaynMultiplier = entity.cardId === CardIds.SanlaynScribe_BGDUO31_208_G ? 2 : 1;\r\n\t\t\tentity.health = Math.max(1, entity.health - sanlaynMultiplier * sanlaynBuffToRemove);\r\n\t\t\tentity.attack = Math.max(0, entity.attack - sanlaynMultiplier * sanlaynBuffToRemove);\r\n\t\t\tbreak;\r\n\t\tcase CardIds.AstralAutomaton_BG_TTN_401:\r\n\t\tcase CardIds.AstralAutomaton_BG_TTN_401_G:\r\n\t\t\tconst multiplierAstral = entity.cardId === CardIds.AstralAutomaton_BG_TTN_401_G ? 2 : 1;\r\n\t\t\t// Doesn't count self\r\n\t\t\tconst statsBonusAstralToRemove = hero.globalInfo.AstralAutomatonsSummonedThisGame - 1;\r\n\t\t\tentity.health = Math.max(1, entity.health - 3 * multiplierAstral * statsBonusAstralToRemove);\r\n\t\t\tentity.attack = Math.max(0, entity.attack - 2 * multiplierAstral * statsBonusAstralToRemove);\r\n\t\t\tbreak;\r\n\t\tcase CardIds.DrBoomsMonster_BG31_176:\r\n\t\tcase CardIds.DrBoomsMonster_BG31_176_G:\r\n\t\t\tconst multiplierDrBoom = entity.cardId === CardIds.DrBoomsMonster_BG31_176_G ? 2 : 1;\r\n\t\t\tentity.health = Math.max(1, entity.health - 2 * hero.globalInfo.MagnetizedThisGame * multiplierDrBoom);\r\n\t\t\tentity.attack = Math.max(0, entity.attack - 2 * hero.globalInfo.MagnetizedThisGame * multiplierDrBoom);\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestone-hs/simulate-bgs-battle",
3
- "version": "1.1.705",
3
+ "version": "1.1.706",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",