@firestone-hs/simulate-bgs-battle 1.1.662 → 1.1.663

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.
@@ -25,6 +25,7 @@ export interface BoardEntity {
25
25
  scriptDataNum2?: number;
26
26
  inInitialState?: boolean;
27
27
  additionalCards?: readonly string[] | null;
28
+ dynamicInfo?: readonly any[] | null;
28
29
  tags?: {
29
30
  [tag: number]: number;
30
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"board-entity.js","sourceRoot":"","sources":["../src/board-entity.ts"],"names":[],"mappings":"","sourcesContent":["export interface BoardEntity {\r\n\tentityId: number;\r\n\tcardId: string;\r\n\tattack: number;\r\n\thealth: number;\r\n\r\n\tmaxHealth?: number;\r\n\tmaxAttack?: number;\r\n\tavengeCurrent?: number;\r\n\tavengeDefault?: number;\r\n\tfrenzyChargesLeft?: number;\r\n\tdefinitelyDead?: boolean;\r\n\ttaunt?: boolean;\r\n\tdivineShield?: boolean;\r\n\tstrongDivineShield?: boolean;\r\n\tpoisonous?: boolean;\r\n\tvenomous?: boolean;\r\n\treborn?: boolean;\r\n\trebornFromEntityId?: number;\r\n\tcleave?: boolean;\r\n\twindfury?: boolean;\r\n\tstealth?: boolean;\r\n\tenchantments?: BoardEnchantment[];\r\n\tpendingAttackBuffs?: number[];\r\n\tscriptDataNum1?: number;\r\n\tscriptDataNum2?: number;\r\n\tinInitialState?: boolean;\r\n\t// For Build-An-Undead and Zilliax\r\n\tadditionalCards?: readonly string[] | null;\r\n\ttags?: { [tag: number]: number };\r\n\r\n\t// When using this as a remembered deathrattle\r\n\toriginalCardId?: string;\r\n\r\n\t// We only store the card id, because we want all the attack and other data to be computed at runtime, based on the\r\n\t// current stats of the Fish\r\n\trememberedDeathrattles?: {\r\n\t\tcardId: string;\r\n\t\ttiming: number;\r\n\t\trepeats: number;\r\n\t\tmemory?: any;\r\n\t\tscriptDataNum1?: number;\r\n\t\tscriptDataNum2?: number;\r\n\t}[];\r\n\tdeathrattleRepeats?: number;\r\n\tdamageMultiplier?: number;\r\n\tlocked?: boolean;\r\n\tfriendly?: boolean;\r\n\tcantAttack?: boolean;\r\n\thasAttacked?: number;\r\n\timmuneWhenAttackCharges?: number;\r\n\tattackImmediately?: boolean;\r\n\t// Used only to handle murkeye aura?\r\n\tpreviousAttack?: number;\r\n\tlastAffectedByEntity?: BoardEntity;\r\n\t// attacking?: boolean;\r\n\t// Did it have divine shield at least once? (for Sinrunner Blanchy)\r\n\thadDivineShield?: boolean;\r\n\tabiityChargesLeft?: number;\r\n\tindexFromLeftAtTimeOfDeath?: number;\r\n\tspawnIndexFromRight?: number;\r\n\r\n\t// permanentAttack?: number;\r\n\t// permanentHealth?: number;\r\n\ttavernTier?: number;\r\n\r\n\tmemory?: any;\r\n\tgildedInCombat?: boolean;\r\n\r\n\tonCanceledSummon?: () => void;\r\n}\r\n\r\nexport interface BoardEnchantment {\r\n\tcardId: string;\r\n\toriginEntityId?: number;\r\n\ttagScriptDataNum1?: number;\r\n\ttagScriptDataNum2?: number;\r\n\ttiming: number;\r\n\trepeats?: number;\r\n\tvalue?: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"board-entity.js","sourceRoot":"","sources":["../src/board-entity.ts"],"names":[],"mappings":"","sourcesContent":["export interface BoardEntity {\r\n\tentityId: number;\r\n\tcardId: string;\r\n\tattack: number;\r\n\thealth: number;\r\n\r\n\tmaxHealth?: number;\r\n\tmaxAttack?: number;\r\n\tavengeCurrent?: number;\r\n\tavengeDefault?: number;\r\n\tfrenzyChargesLeft?: number;\r\n\tdefinitelyDead?: boolean;\r\n\ttaunt?: boolean;\r\n\tdivineShield?: boolean;\r\n\tstrongDivineShield?: boolean;\r\n\tpoisonous?: boolean;\r\n\tvenomous?: boolean;\r\n\treborn?: boolean;\r\n\trebornFromEntityId?: number;\r\n\tcleave?: boolean;\r\n\twindfury?: boolean;\r\n\tstealth?: boolean;\r\n\tenchantments?: BoardEnchantment[];\r\n\tpendingAttackBuffs?: number[];\r\n\tscriptDataNum1?: number;\r\n\tscriptDataNum2?: number;\r\n\tinInitialState?: boolean;\r\n\t// For Build-An-Undead and Zilliax\r\n\tadditionalCards?: readonly string[] | null;\r\n\tdynamicInfo?: readonly any[] | null;\r\n\ttags?: { [tag: number]: number };\r\n\r\n\t// When using this as a remembered deathrattle\r\n\toriginalCardId?: string;\r\n\r\n\t// We only store the card id, because we want all the attack and other data to be computed at runtime, based on the\r\n\t// current stats of the Fish\r\n\trememberedDeathrattles?: {\r\n\t\tcardId: string;\r\n\t\ttiming: number;\r\n\t\trepeats: number;\r\n\t\tmemory?: any;\r\n\t\tscriptDataNum1?: number;\r\n\t\tscriptDataNum2?: number;\r\n\t}[];\r\n\tdeathrattleRepeats?: number;\r\n\tdamageMultiplier?: number;\r\n\tlocked?: boolean;\r\n\tfriendly?: boolean;\r\n\tcantAttack?: boolean;\r\n\thasAttacked?: number;\r\n\timmuneWhenAttackCharges?: number;\r\n\tattackImmediately?: boolean;\r\n\t// Used only to handle murkeye aura?\r\n\tpreviousAttack?: number;\r\n\tlastAffectedByEntity?: BoardEntity;\r\n\t// attacking?: boolean;\r\n\t// Did it have divine shield at least once? (for Sinrunner Blanchy)\r\n\thadDivineShield?: boolean;\r\n\tabiityChargesLeft?: number;\r\n\tindexFromLeftAtTimeOfDeath?: number;\r\n\tspawnIndexFromRight?: number;\r\n\r\n\t// permanentAttack?: number;\r\n\t// permanentHealth?: number;\r\n\ttavernTier?: number;\r\n\r\n\tmemory?: any;\r\n\tgildedInCombat?: boolean;\r\n\r\n\tonCanceledSummon?: () => void;\r\n}\r\n\r\nexport interface BoardEnchantment {\r\n\tcardId: string;\r\n\toriginEntityId?: number;\r\n\ttagScriptDataNum1?: number;\r\n\ttagScriptDataNum2?: number;\r\n\ttiming: number;\r\n\trepeats?: number;\r\n\tvalue?: number;\r\n}\r\n"]}
@@ -1,2 +1,2 @@
1
- import { DefaultChargesCard, OnWheneverAnotherMinionAttacksCard } from '../../card.interface';
2
- export declare const BluesySiren: OnWheneverAnotherMinionAttacksCard & DefaultChargesCard;
1
+ import { DefaultChargesCard, OnWheneverAnotherMinionAttacksCard, RallyCard } from '../../card.interface';
2
+ export declare const BluesySiren: OnWheneverAnotherMinionAttacksCard & RallyCard & DefaultChargesCard;
@@ -8,24 +8,30 @@ exports.BluesySiren = {
8
8
  cardIds: ["BG34_931", "BG34_931_G"],
9
9
  defaultCharges: (entity) => 3,
10
10
  onWheneverAnotherMinionAttacks: (minion, input) => {
11
- if (!(0, utils_1.hasCorrectTribe)(input.attacker, input.attackingHero, reference_data_1.Race.NAGA, input.gameState.anomalies, input.gameState.allCards)) {
12
- return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
13
- }
14
- minion.abiityChargesLeft = minion.abiityChargesLeft - 1;
15
- const spellCast = minion.cardId === "BG34_931_G"
16
- ? "BG26_502_Gt"
17
- : "BG26_502t";
18
- (0, cast_tavern_spell_1.castTavernSpell)(spellCast, {
19
- spellCardId: spellCast,
20
- source: input.attackingHero,
21
- target: input.attacker,
22
- board: input.attackingBoard,
23
- hero: input.attackingHero,
24
- otherBoard: input.defendingBoard,
25
- otherHero: input.defendingHero,
26
- gameState: input.gameState,
27
- });
28
- return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
11
+ return process(minion, input);
12
+ },
13
+ rally: (minion, input) => {
14
+ return process(minion, input);
29
15
  },
30
16
  };
17
+ const process = (minion, input) => {
18
+ if (!(0, utils_1.hasCorrectTribe)(input.attacker, input.attackingHero, reference_data_1.Race.NAGA, input.gameState.anomalies, input.gameState.allCards)) {
19
+ return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
20
+ }
21
+ minion.abiityChargesLeft = minion.abiityChargesLeft - 1;
22
+ const spellCast = minion.cardId === "BG34_931_G"
23
+ ? "BG26_502_Gt"
24
+ : "BG26_502t";
25
+ (0, cast_tavern_spell_1.castTavernSpell)(spellCast, {
26
+ spellCardId: spellCast,
27
+ source: input.attackingHero,
28
+ target: input.attacker,
29
+ board: input.attackingBoard,
30
+ hero: input.attackingHero,
31
+ otherBoard: input.defendingBoard,
32
+ otherHero: input.defendingHero,
33
+ gameState: input.gameState,
34
+ });
35
+ return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
36
+ };
31
37
  //# sourceMappingURL=bluesy-siren.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluesy-siren.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/bluesy-siren.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAEpD,4EAAuE;AAGvE,0CAAiD;AAGpC,QAAA,WAAW,GAA4D;IACnF,OAAO,EAAE,0BAA8D;IACvE,cAAc,EAAE,CAAC,MAAmB,EAAE,EAAE,CAAC,CAAC;IAC1C,8BAA8B,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QAC7E,IACC,CAAC,IAAA,uBAAe,EACf,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,aAAa,EACnB,qBAAI,CAAC,IAAI,EACT,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;YACD,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;SACtD;QAED,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,GAAG,CAAC,CAAC;QACxD,MAAM,SAAS,GACd,MAAM,CAAC,MAAM,iBAAmC;YAC/C,CAAC;YACD,CAAC,YAAiD,CAAC;QACrD,IAAA,mCAAe,EAAC,SAAS,EAAE;YAC1B,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,KAAK,CAAC,aAAa;YAC3B,MAAM,EAAE,KAAK,CAAC,QAAQ;YACtB,KAAK,EAAE,KAAK,CAAC,cAAc;YAC3B,IAAI,EAAE,KAAK,CAAC,aAAa;YACzB,UAAU,EAAE,KAAK,CAAC,cAAc;YAChC,SAAS,EAAE,KAAK,CAAC,aAAa;YAC9B,SAAS,EAAE,KAAK,CAAC,SAAS;SAC1B,CAAC,CAAC;QAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["import { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { castTavernSpell } from '../../../mechanics/cast-tavern-spell';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { DefaultChargesCard, OnWheneverAnotherMinionAttacksCard } from '../../card.interface';\r\n\r\nexport const BluesySiren: OnWheneverAnotherMinionAttacksCard & DefaultChargesCard = {\r\n\tcardIds: [CardIds.BluesySiren_BG34_931, CardIds.BluesySiren_BG34_931_G],\r\n\tdefaultCharges: (entity: BoardEntity) => 3,\r\n\tonWheneverAnotherMinionAttacks: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tif (\r\n\t\t\t!hasCorrectTribe(\r\n\t\t\t\tinput.attacker,\r\n\t\t\t\tinput.attackingHero,\r\n\t\t\t\tRace.NAGA,\r\n\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\tinput.gameState.allCards,\r\n\t\t\t)\r\n\t\t) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\r\n\t\tminion.abiityChargesLeft = minion.abiityChargesLeft - 1;\r\n\t\tconst spellCast =\r\n\t\t\tminion.cardId === CardIds.BluesySiren_BG34_931_G\r\n\t\t\t\t? CardIds.DeepBlueCrooner_DeepBluesToken_BG26_502_Gt\r\n\t\t\t\t: CardIds.DeepBlueCrooner_DeepBluesToken_BG26_502t;\r\n\t\tcastTavernSpell(spellCast, {\r\n\t\t\tspellCardId: spellCast,\r\n\t\t\tsource: input.attackingHero,\r\n\t\t\ttarget: input.attacker,\r\n\t\t\tboard: input.attackingBoard,\r\n\t\t\thero: input.attackingHero,\r\n\t\t\totherBoard: input.defendingBoard,\r\n\t\t\totherHero: input.defendingHero,\r\n\t\t\tgameState: input.gameState,\r\n\t\t});\r\n\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"bluesy-siren.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/bluesy-siren.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAEpD,4EAAuE;AAGvE,0CAAiD;AAGpC,QAAA,WAAW,GAAwE;IAC/F,OAAO,EAAE,0BAA8D;IACvE,cAAc,EAAE,CAAC,MAAmB,EAAE,EAAE,CAAC,CAAC;IAC1C,8BAA8B,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QAC7E,OAAO,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,KAAK,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QACpD,OAAO,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;CACD,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;IAC7D,IACC,CAAC,IAAA,uBAAe,EACf,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,aAAa,EACnB,qBAAI,CAAC,IAAI,EACT,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;QACD,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;KACtD;IAED,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,GAAG,CAAC,CAAC;IACxD,MAAM,SAAS,GACd,MAAM,CAAC,MAAM,iBAAmC;QAC/C,CAAC;QACD,CAAC,YAAiD,CAAC;IACrD,IAAA,mCAAe,EAAC,SAAS,EAAE;QAC1B,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,KAAK,CAAC,aAAa;QAC3B,MAAM,EAAE,KAAK,CAAC,QAAQ;QACtB,KAAK,EAAE,KAAK,CAAC,cAAc;QAC3B,IAAI,EAAE,KAAK,CAAC,aAAa;QACzB,UAAU,EAAE,KAAK,CAAC,cAAc;QAChC,SAAS,EAAE,KAAK,CAAC,aAAa;QAC9B,SAAS,EAAE,KAAK,CAAC,SAAS;KAC1B,CAAC,CAAC;IAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;AACvD,CAAC,CAAC","sourcesContent":["import { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { castTavernSpell } from '../../../mechanics/cast-tavern-spell';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { DefaultChargesCard, OnWheneverAnotherMinionAttacksCard, RallyCard } from '../../card.interface';\r\n\r\nexport const BluesySiren: OnWheneverAnotherMinionAttacksCard & RallyCard & DefaultChargesCard = {\r\n\tcardIds: [CardIds.BluesySiren_BG34_931, CardIds.BluesySiren_BG34_931_G],\r\n\tdefaultCharges: (entity: BoardEntity) => 3,\r\n\tonWheneverAnotherMinionAttacks: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\treturn process(minion, input);\r\n\t},\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\treturn process(minion, input);\r\n\t},\r\n};\r\n\r\nconst process = (minion: BoardEntity, input: OnAttackInput) => {\r\n\tif (\r\n\t\t!hasCorrectTribe(\r\n\t\t\tinput.attacker,\r\n\t\t\tinput.attackingHero,\r\n\t\t\tRace.NAGA,\r\n\t\t\tinput.gameState.anomalies,\r\n\t\t\tinput.gameState.allCards,\r\n\t\t)\r\n\t) {\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t}\r\n\r\n\tminion.abiityChargesLeft = minion.abiityChargesLeft - 1;\r\n\tconst spellCast =\r\n\t\tminion.cardId === CardIds.BluesySiren_BG34_931_G\r\n\t\t\t? CardIds.DeepBlueCrooner_DeepBluesToken_BG26_502_Gt\r\n\t\t\t: CardIds.DeepBlueCrooner_DeepBluesToken_BG26_502t;\r\n\tcastTavernSpell(spellCast, {\r\n\t\tspellCardId: spellCast,\r\n\t\tsource: input.attackingHero,\r\n\t\ttarget: input.attacker,\r\n\t\tboard: input.attackingBoard,\r\n\t\thero: input.attackingHero,\r\n\t\totherBoard: input.defendingBoard,\r\n\t\totherHero: input.defendingHero,\r\n\t\tgameState: input.gameState,\r\n\t});\r\n\r\n\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n};\r\n"]}
@@ -11,7 +11,9 @@ exports.PilotTheShredder = {
11
11
  const mult = minion.cardId === "BG21_HERO_030t_G" ? 2 : 1;
12
12
  const allSpawns = [];
13
13
  for (let i = 0; i < mult; i++) {
14
- const hand = (_a = input.boardWithDeadEntityHero.hand.filter((e) => !!(e === null || e === void 0 ? void 0 : e.cardId)).filter((e) => !e.locked)) !== null && _a !== void 0 ? _a : [];
14
+ const hand = (_a = input.boardWithDeadEntityHero.hand
15
+ .filter((e) => !!(e === null || e === void 0 ? void 0 : e.cardId))
16
+ .filter((e) => !e.locked)) !== null && _a !== void 0 ? _a : [];
15
17
  const highestHealth = Math.max(...hand.filter((c) => c.health).map((c) => c.health));
16
18
  const highestHealthMinions = highestHealth ? hand.filter((c) => c.health === highestHealth) : null;
17
19
  const spawn = !!(highestHealthMinions === null || highestHealthMinions === void 0 ? void 0 : highestHealthMinions.length)
@@ -1 +1 @@
1
- {"version":3,"file":"pilot-the-shredder.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/pilot-the-shredder.ts"],"names":[],"mappings":";;;AACA,mEAAqE;AAErE,mDAAqD;AAErD,+EAAuE;AAG1D,QAAA,gBAAgB,GAAyB;IACrD,OAAO,EAAE,sCAAiG;IAC1G,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,uBAA+C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClF,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,IAAI,GAAG,MAAA,KAAK,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,MAAM,CAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;YAC1G,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACrF,MAAM,oBAAoB,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACnG,MAAM,KAAK,GAAG,CAAC,CAAC,CAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,MAAM,CAAA;gBAC3C,CAAC,CAAC,IAAA,kBAAU,EAAC,oBAAoB,CAAC;gBAClC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM;oBACrC,CAAC,CAAC,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;oBAC1C,CAAC,CAAC,IAAI,CAAC;YACR,IAAI,KAAK,EAAE;gBACV,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;gBAKpB,MAAM,MAAM,GAAG,IAAA,kCAAa,EAC3B,KAAK,CAAC,MAAM,EACZ,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,QAAQ,EACf,KAAK,EACL,KAAK,EACL,IAAI,EACJ,EAAE,GAAG,KAAK,EAAiB,CAC3B,CAAC;gBACF,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;oBACvB,IAAA,kCAAkB,EACjB,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,KAAK,CAAC,SAAS,CACf,CAAC;oBACF,CAAC,CAAC,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;iBAElD;gBACD,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;aAC1B;SACD;QACD,OAAO,SAAS,CAAC;IAClB,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 { pickRandom } from '../../../services/utils';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const PilotTheShredder: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.Sneed_SneedsNewShredderToken_BG21_HERO_030t, CardIds.SneedsNewShredder_BG21_HERO_030t_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.SneedsNewShredder_BG21_HERO_030t_G ? 2 : 1;\r\n\t\tconst allSpawns = [];\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tconst hand = input.boardWithDeadEntityHero.hand.filter((e) => !!e?.cardId).filter((e) => !e.locked) ?? [];\r\n\t\t\tconst highestHealth = Math.max(...hand.filter((c) => c.health).map((c) => c.health));\r\n\t\t\tconst highestHealthMinions = highestHealth ? hand.filter((c) => c.health === highestHealth) : null;\r\n\t\t\tconst spawn = !!highestHealthMinions?.length\r\n\t\t\t\t? pickRandom(highestHealthMinions)\r\n\t\t\t\t: hand.filter((c) => c.cardId).length\r\n\t\t\t\t? pickRandom(hand.filter((c) => c.cardId))\r\n\t\t\t\t: null;\r\n\t\t\tif (spawn) {\r\n\t\t\t\tspawn.locked = true;\r\n\t\t\t\t// Technically it should not be removed from hand, but rather flagged\r\n\t\t\t\t// Probably very low impact doing it like this\r\n\t\t\t\t// spawn.locked = true;\r\n\t\t\t\t// removeCardFromHand(boardWithDeadEntityHero, spawn);\r\n\t\t\t\tconst spawns = spawnEntities(\r\n\t\t\t\t\tspawn.cardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tinput.otherBoard,\r\n\t\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tminion.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\t{ ...spawn } as BoardEntity,\r\n\t\t\t\t);\r\n\t\t\t\tfor (const s of spawns) {\r\n\t\t\t\t\tupdateDivineShield(\r\n\t\t\t\t\t\ts,\r\n\t\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\t\t\ttrue,\r\n\t\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\t);\r\n\t\t\t\t\ts.onCanceledSummon = () => (spawn.locked = false);\r\n\t\t\t\t\t// s.backRef = spawn;\r\n\t\t\t\t}\r\n\t\t\t\tallSpawns.push(...spawns);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn allSpawns;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"pilot-the-shredder.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/pilot-the-shredder.ts"],"names":[],"mappings":";;;AACA,mEAAqE;AAErE,mDAAqD;AAErD,+EAAuE;AAG1D,QAAA,gBAAgB,GAAyB;IACrD,OAAO,EAAE,sCAAiG;IAC1G,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,uBAA+C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClF,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,IAAI,GACT,MAAA,KAAK,CAAC,uBAAuB,CAAC,IAAI;iBAChC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,MAAM,CAAA,CAAC;iBAG1B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;YAClC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACrF,MAAM,oBAAoB,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACnG,MAAM,KAAK,GAAG,CAAC,CAAC,CAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,MAAM,CAAA;gBAC3C,CAAC,CAAC,IAAA,kBAAU,EAAC,oBAAoB,CAAC;gBAClC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM;oBACrC,CAAC,CAAC,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;oBAC1C,CAAC,CAAC,IAAI,CAAC;YACR,IAAI,KAAK,EAAE;gBAEV,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;gBACpB,MAAM,MAAM,GAAG,IAAA,kCAAa,EAC3B,KAAK,CAAC,MAAM,EACZ,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,QAAQ,EACf,KAAK,EACL,KAAK,EACL,IAAI,EACJ,EAAE,GAAG,KAAK,EAAiB,CAC3B,CAAC;gBACF,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;oBACvB,IAAA,kCAAkB,EACjB,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,KAAK,CAAC,SAAS,CACf,CAAC;oBACF,CAAC,CAAC,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;iBAElD;gBACD,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;aAC1B;SACD;QACD,OAAO,SAAS,CAAC;IAClB,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 { pickRandom } from '../../../services/utils';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const PilotTheShredder: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.Sneed_SneedsNewShredderToken_BG21_HERO_030t, CardIds.SneedsNewShredder_BG21_HERO_030t_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.SneedsNewShredder_BG21_HERO_030t_G ? 2 : 1;\r\n\t\tconst allSpawns = [];\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tconst hand =\r\n\t\t\t\tinput.boardWithDeadEntityHero.hand\r\n\t\t\t\t\t.filter((e) => !!e?.cardId)\r\n\t\t\t\t\t// 2025-12-04: it can summon a minion that is locked by another way, like Flighty scout\r\n\t\t\t\t\t// BUT: if it was summoned by Bassgill, then it won't work\r\n\t\t\t\t\t.filter((e) => !e.locked) ?? [];\r\n\t\t\tconst highestHealth = Math.max(...hand.filter((c) => c.health).map((c) => c.health));\r\n\t\t\tconst highestHealthMinions = highestHealth ? hand.filter((c) => c.health === highestHealth) : null;\r\n\t\t\tconst spawn = !!highestHealthMinions?.length\r\n\t\t\t\t? pickRandom(highestHealthMinions)\r\n\t\t\t\t: hand.filter((c) => c.cardId).length\r\n\t\t\t\t? pickRandom(hand.filter((c) => c.cardId))\r\n\t\t\t\t: null;\r\n\t\t\tif (spawn) {\r\n\t\t\t\t// 2025-12-04: actually doesn't look like it gets locked\r\n\t\t\t\tspawn.locked = true;\r\n\t\t\t\tconst spawns = spawnEntities(\r\n\t\t\t\t\tspawn.cardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tinput.otherBoard,\r\n\t\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tminion.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\t{ ...spawn } as BoardEntity,\r\n\t\t\t\t);\r\n\t\t\t\tfor (const s of spawns) {\r\n\t\t\t\t\tupdateDivineShield(\r\n\t\t\t\t\t\ts,\r\n\t\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\t\t\ttrue,\r\n\t\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\t);\r\n\t\t\t\t\ts.onCanceledSummon = () => (spawn.locked = false);\r\n\t\t\t\t\t// s.backRef = spawn;\r\n\t\t\t\t}\r\n\t\t\t\tallSpawns.push(...spawns);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn allSpawns;\r\n\t},\r\n};\r\n"]}
@@ -5,13 +5,13 @@ exports.SpellboundSoul = {
5
5
  cardIds: ["BG34_110", "BG34_110_G"],
6
6
  onSpawned: (minion, input) => {
7
7
  const mult = minion.cardId === "BG34_110_G" ? 2 : 1;
8
- const totalSpellsCast = input.hero.globalInfo.SpellsCastThisGame;
8
+ const totalSpellsCast = input.hero.globalInfo.TavernSpellsCastThisGame;
9
9
  minion.attack += 2 * totalSpellsCast * mult;
10
10
  minion.health += 1 * totalSpellsCast * mult;
11
11
  },
12
12
  onDespawned: (minion, input) => {
13
13
  const mult = minion.cardId === "BG34_110_G" ? 2 : 1;
14
- const totalSpellsCast = input.hero.globalInfo.SpellsCastThisGame;
14
+ const totalSpellsCast = input.hero.globalInfo.TavernSpellsCastThisGame;
15
15
  minion.attack = Math.max(0, minion.attack - 2 * totalSpellsCast * mult);
16
16
  minion.health = Math.max(1, minion.health - 1 * totalSpellsCast * mult);
17
17
  },
@@ -1 +1 @@
1
- {"version":3,"file":"spellbound-soul.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/spellbound-soul.ts"],"names":[],"mappings":";;;AAKa,QAAA,cAAc,GAAoC;IAC9D,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,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;QACjE,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;QAC5C,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;IAC7C,CAAC;IACD,WAAW,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;QACjE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC,CAAC;QACxE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC,CAAC;IACzE,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\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 SpellboundSoul: OnDespawnedCard & OnSpawnedCard = {\r\n\tcardIds: [CardIds.SpellboundSoul_BG34_110, CardIds.SpellboundSoul_BG34_110_G],\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.SpellboundSoul_BG34_110_G ? 2 : 1;\r\n\t\tconst totalSpellsCast = input.hero.globalInfo.SpellsCastThisGame;\r\n\t\tminion.attack += 2 * totalSpellsCast * mult;\r\n\t\tminion.health += 1 * totalSpellsCast * mult;\r\n\t},\r\n\tonDespawned: (minion: BoardEntity, input: OnDespawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.SpellboundSoul_BG34_110_G ? 2 : 1;\r\n\t\tconst totalSpellsCast = input.hero.globalInfo.SpellsCastThisGame;\r\n\t\tminion.attack = Math.max(0, minion.attack - 2 * totalSpellsCast * mult);\r\n\t\tminion.health = Math.max(1, minion.health - 1 * totalSpellsCast * mult);\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"spellbound-soul.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/spellbound-soul.ts"],"names":[],"mappings":";;;AAKa,QAAA,cAAc,GAAoC;IAC9D,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,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;QACvE,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;QAC5C,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;IAC7C,CAAC;IACD,WAAW,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;QACvE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC,CAAC;QACxE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC,CAAC;IACzE,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\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 SpellboundSoul: OnDespawnedCard & OnSpawnedCard = {\r\n\tcardIds: [CardIds.SpellboundSoul_BG34_110, CardIds.SpellboundSoul_BG34_110_G],\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.SpellboundSoul_BG34_110_G ? 2 : 1;\r\n\t\tconst totalSpellsCast = input.hero.globalInfo.TavernSpellsCastThisGame;\r\n\t\tminion.attack += 2 * totalSpellsCast * mult;\r\n\t\tminion.health += 1 * totalSpellsCast * mult;\r\n\t},\r\n\tonDespawned: (minion: BoardEntity, input: OnDespawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.SpellboundSoul_BG34_110_G ? 2 : 1;\r\n\t\tconst totalSpellsCast = input.hero.globalInfo.TavernSpellsCastThisGame;\r\n\t\tminion.attack = Math.max(0, minion.attack - 2 * totalSpellsCast * mult);\r\n\t\tminion.health = Math.max(1, minion.health - 1 * totalSpellsCast * mult);\r\n\t},\r\n};\r\n"]}
@@ -6,13 +6,13 @@ const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
6
6
  exports.TimewarpedNelliesShip = {
7
7
  cardIds: ["BG34_Giant_074t", "BG34_Giant_074t_G"],
8
8
  deathrattleSpawn: (minion, input) => {
9
+ var _a, _b;
9
10
  const cardsToAdd = [];
10
- cardsToAdd.push(input.gameState.allCards.getCard(minion.scriptDataNum1).id);
11
- if (minion.cardId === "BG34_Giant_074t_G") {
12
- cardsToAdd.push(input.gameState.allCards.getCard(minion.scriptDataNum2).id);
11
+ for (const info of (_a = minion.dynamicInfo) !== null && _a !== void 0 ? _a : []) {
12
+ cardsToAdd.push(info);
13
13
  }
14
14
  for (const cardToAdd of cardsToAdd) {
15
- const indexFromRight = input.boardWithDeadEntity.length - input.boardWithDeadEntity.indexOf(minion) - 1;
15
+ const indexFromRight = (_b = input.deadEntityIndexFromRight) !== null && _b !== void 0 ? _b : input.boardWithDeadEntity.length - input.boardWithDeadEntity.indexOf(minion) - 1;
16
16
  (0, deathrattle_spawns_1.simplifiedSpawnEntitiesWithAddToBoard)(cardToAdd, 1, input, minion, indexFromRight);
17
17
  }
18
18
  (0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);
@@ -1 +1 @@
1
- {"version":3,"file":"timewarped-nellies-ship.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/timewarped-nellies-ship.ts"],"names":[],"mappings":";;;AAEA,qEAAmE;AAEnE,+EAA+F;AAGlF,QAAA,qBAAqB,GAAyB;IAC1D,OAAO,EAAE,wCAAqG;IAC9G,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAI,MAAM,CAAC,MAAM,wBAAoD,EAAE;YACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;SAC5E;QAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YACnC,MAAM,cAAc,GAAG,KAAK,CAAC,mBAAmB,CAAC,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACxG,IAAA,0DAAqC,EAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;SACnF;QACD,IAAA,8BAAc,EAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,mBAAmB,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACtG,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntitiesWithAddToBoard } from '../../../simulation/deathrattle-spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const TimewarpedNelliesShip: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.TimewarpedNelliesShipToken_BG34_Giant_074t, CardIds.TimewarpedNelliesShip_BG34_Giant_074t_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst cardsToAdd = [];\r\n\t\tcardsToAdd.push(input.gameState.allCards.getCard(minion.scriptDataNum1).id);\r\n\t\tif (minion.cardId === CardIds.TimewarpedNelliesShip_BG34_Giant_074t_G) {\r\n\t\t\tcardsToAdd.push(input.gameState.allCards.getCard(minion.scriptDataNum2).id);\r\n\t\t}\r\n\r\n\t\tfor (const cardToAdd of cardsToAdd) {\r\n\t\t\tconst indexFromRight = input.boardWithDeadEntity.length - input.boardWithDeadEntity.indexOf(minion) - 1;\r\n\t\t\tsimplifiedSpawnEntitiesWithAddToBoard(cardToAdd, 1, input, minion, indexFromRight);\r\n\t\t}\r\n\t\taddCardsInHand(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"timewarped-nellies-ship.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/timewarped-nellies-ship.ts"],"names":[],"mappings":";;;AAEA,qEAAmE;AAEnE,+EAA+F;AAGlF,QAAA,qBAAqB,GAAyB;IAC1D,OAAO,EAAE,wCAAqG;IAC9G,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC3E,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,KAAK,MAAM,IAAI,IAAI,MAAA,MAAM,CAAC,WAAW,mCAAI,EAAE,EAAE;YAC5C,UAAU,CAAC,IAAI,CAAC,IAAc,CAAC,CAAC;SAChC;QAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YACnC,MAAM,cAAc,GACnB,MAAA,KAAK,CAAC,wBAAwB,mCAC9B,KAAK,CAAC,mBAAmB,CAAC,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAClF,IAAA,0DAAqC,EAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;SACnF;QACD,IAAA,8BAAc,EAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,mBAAmB,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACtG,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntitiesWithAddToBoard } from '../../../simulation/deathrattle-spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const TimewarpedNelliesShip: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.TimewarpedNelliesShipToken_BG34_Giant_074t, CardIds.TimewarpedNelliesShip_BG34_Giant_074t_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst cardsToAdd = [];\r\n\t\tfor (const info of minion.dynamicInfo ?? []) {\r\n\t\t\tcardsToAdd.push(info as string);\r\n\t\t}\r\n\r\n\t\tfor (const cardToAdd of cardsToAdd) {\r\n\t\t\tconst indexFromRight =\r\n\t\t\t\tinput.deadEntityIndexFromRight ??\r\n\t\t\t\tinput.boardWithDeadEntity.length - input.boardWithDeadEntity.indexOf(minion) - 1;\r\n\t\t\tsimplifiedSpawnEntitiesWithAddToBoard(cardToAdd, 1, input, minion, indexFromRight);\r\n\t\t}\r\n\t\taddCardsInHand(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
@@ -8,7 +8,7 @@ exports.TimewarpedPromoDrake = {
8
8
  startOfCombat: (minion, input) => {
9
9
  var _a;
10
10
  const mult = minion.cardId === "BG34_Giant_088_G" ? 2 : 1;
11
- const buff = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : 2 * mult;
11
+ const buff = ((_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : 1) * 2 * mult;
12
12
  const targets = input.playerBoard;
13
13
  for (const entity of targets) {
14
14
  (0, stats_1.modifyStats)(entity, minion, buff, buff, input.playerBoard, input.playerEntity, input.gameState);
@@ -1 +1 @@
1
- {"version":3,"file":"timewarped-promo-drake.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/timewarped-promo-drake.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,oBAAoB,GAAsB;IACtD,OAAO,EAAE,sCAA4F;IACrG,mBAAmB,EAAE,iBAAiB;IACtC,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,uBAAkD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,MAAM,IAAI,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,GAAG,IAAI,CAAC;QAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC;QAClC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC7B,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAChG;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const TimewarpedPromoDrake: StartOfCombatCard = {\r\n\tcardIds: [CardIds.TimewarpedPromoDrake_BG34_Giant_088, CardIds.TimewarpedPromoDrake_BG34_Giant_088_G],\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.TimewarpedPromoDrake_BG34_Giant_088_G ? 2 : 1;\r\n\t\tconst buff = minion.scriptDataNum1 ?? 2 * mult;\r\n\t\tconst targets = input.playerBoard;\r\n\t\tfor (const entity of targets) {\r\n\t\t\tmodifyStats(entity, minion, buff, buff, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"timewarped-promo-drake.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/timewarped-promo-drake.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,oBAAoB,GAAsB;IACtD,OAAO,EAAE,sCAA4F;IACrG,mBAAmB,EAAE,iBAAiB;IACtC,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,uBAAkD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,MAAM,IAAI,GAAG,CAAC,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACrD,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC;QAClC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC7B,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAChG;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const TimewarpedPromoDrake: StartOfCombatCard = {\r\n\tcardIds: [CardIds.TimewarpedPromoDrake_BG34_Giant_088, CardIds.TimewarpedPromoDrake_BG34_Giant_088_G],\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.TimewarpedPromoDrake_BG34_Giant_088_G ? 2 : 1;\r\n\t\tconst buff = (minion.scriptDataNum1 ?? 1) * 2 * mult;\r\n\t\tconst targets = input.playerBoard;\r\n\t\tfor (const entity of targets) {\r\n\t\t\tmodifyStats(entity, minion, buff, buff, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t}\r\n\t\treturn true;\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.662",
3
+ "version": "1.1.663",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",