@firestone-hs/simulate-bgs-battle 1.1.709 → 1.1.710

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.
@@ -17,10 +17,10 @@ exports.BackToBack = {
17
17
  return;
18
18
  const previousCasts = (_a = input.hero.globalInfo.BackToBackCastThisGame) !== null && _a !== void 0 ? _a : 0;
19
19
  const mult = 1 + previousCasts;
20
- const { attack, health } = (0, utils_2.withTavernSpellStatBuff)(input.hero, 4 * mult, 4 * mult, input.gameState.allCards, input.spellCardId);
20
+ const { attack, health } = (0, utils_2.withTavernSpellStatBuff)(input.hero, 4, 4, input.gameState.allCards, input.spellCardId);
21
21
  const hero = input.board.includes(target) ? input.hero : input.otherHero;
22
22
  const board = input.board.includes(target) ? input.board : input.otherBoard;
23
- (0, stats_1.modifyStats)(target, input.source, attack, health, board, hero, input.gameState);
23
+ (0, stats_1.modifyStats)(target, input.source, attack * mult, health * mult, board, hero, input.gameState);
24
24
  input.hero.globalInfo.BackToBackCastThisGame = previousCasts + 1;
25
25
  },
26
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"back-to-back.js","sourceRoot":"","sources":["../../../../src/cards/impl/bg-spell/back-to-back.ts"],"names":[],"mappings":";;;AACA,mDAAqD;AACrD,qDAAwD;AACxD,0CAAyD;AAG5C,QAAA,UAAU,GAAoB;IAC1C,OAAO,EAAE,YAA6B;IACtC,eAAe,EAAE,CAAC,YAAoB,EAAE,KAAqB,EAAE,EAAE;;QAChE,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;YAC1G,MAAM,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;SAChC;QACD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,aAAa,GAAG,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,mCAAI,CAAC,CAAC;QACxE,MAAM,IAAI,GAAG,CAAC,GAAG,aAAa,CAAC;QAC/B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAuB,EACjD,KAAK,CAAC,IAAI,EACV,CAAC,GAAG,IAAI,EACR,CAAC,GAAG,IAAI,EACR,KAAK,CAAC,SAAS,CAAC,QAAQ,EACxB,KAAK,CAAC,WAAW,CACjB,CAAC;QACF,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;QACzE,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;QAC5E,IAAA,mBAAW,EAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAChF,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,GAAG,aAAa,GAAG,CAAC,CAAC;IAClE,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '../../../services/card-ids';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { withTavernSpellStatBuff } from '../../../utils';\r\nimport { CastSpellInput, TavernSpellCard } from '../../card.interface';\r\n\r\nexport const BackToBack: TavernSpellCard = {\r\n\tcardIds: [CardIds.BackToBack_BG35_952],\r\n\tcastTavernSpell: (_spellCardId: string, input: CastSpellInput) => {\r\n\t\tlet target = input.target;\r\n\t\tif (!target) {\r\n\t\t\tconst candidates = [...input.board, ...input.otherBoard].filter((e) => e.health > 0 && !e.definitelyDead);\r\n\t\t\ttarget = pickRandom(candidates);\r\n\t\t}\r\n\t\tif (!target) return;\r\n\r\n\t\tconst previousCasts = input.hero.globalInfo.BackToBackCastThisGame ?? 0;\r\n\t\tconst mult = 1 + previousCasts;\r\n\t\tconst { attack, health } = withTavernSpellStatBuff(\r\n\t\t\tinput.hero,\r\n\t\t\t4 * mult,\r\n\t\t\t4 * mult,\r\n\t\t\tinput.gameState.allCards,\r\n\t\t\tinput.spellCardId,\r\n\t\t);\r\n\t\tconst hero = input.board.includes(target) ? input.hero : input.otherHero;\r\n\t\tconst board = input.board.includes(target) ? input.board : input.otherBoard;\r\n\t\tmodifyStats(target, input.source, attack, health, board, hero, input.gameState);\r\n\t\tinput.hero.globalInfo.BackToBackCastThisGame = previousCasts + 1;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"back-to-back.js","sourceRoot":"","sources":["../../../../src/cards/impl/bg-spell/back-to-back.ts"],"names":[],"mappings":";;;AACA,mDAAqD;AACrD,qDAAwD;AACxD,0CAAyD;AAG5C,QAAA,UAAU,GAAoB;IAC1C,OAAO,EAAE,YAA6B;IACtC,eAAe,EAAE,CAAC,YAAoB,EAAE,KAAqB,EAAE,EAAE;;QAChE,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;YAC1G,MAAM,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;SAChC;QACD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,aAAa,GAAG,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,mCAAI,CAAC,CAAC;QACxE,MAAM,IAAI,GAAG,CAAC,GAAG,aAAa,CAAC;QAC/B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAuB,EACjD,KAAK,CAAC,IAAI,EACV,CAAC,EACD,CAAC,EACD,KAAK,CAAC,SAAS,CAAC,QAAQ,EACxB,KAAK,CAAC,WAAW,CACjB,CAAC;QACF,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;QACzE,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;QAC5E,IAAA,mBAAW,EAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC9F,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,GAAG,aAAa,GAAG,CAAC,CAAC;IAClE,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '../../../services/card-ids';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { withTavernSpellStatBuff } from '../../../utils';\r\nimport { CastSpellInput, TavernSpellCard } from '../../card.interface';\r\n\r\nexport const BackToBack: TavernSpellCard = {\r\n\tcardIds: [CardIds.BackToBack_BG35_952],\r\n\tcastTavernSpell: (_spellCardId: string, input: CastSpellInput) => {\r\n\t\tlet target = input.target;\r\n\t\tif (!target) {\r\n\t\t\tconst candidates = [...input.board, ...input.otherBoard].filter((e) => e.health > 0 && !e.definitelyDead);\r\n\t\t\ttarget = pickRandom(candidates);\r\n\t\t}\r\n\t\tif (!target) return;\r\n\r\n\t\tconst previousCasts = input.hero.globalInfo.BackToBackCastThisGame ?? 0;\r\n\t\tconst mult = 1 + previousCasts;\r\n\t\tconst { attack, health } = withTavernSpellStatBuff(\r\n\t\t\tinput.hero,\r\n\t\t\t4,\r\n\t\t\t4,\r\n\t\t\tinput.gameState.allCards,\r\n\t\t\tinput.spellCardId,\r\n\t\t);\r\n\t\tconst hero = input.board.includes(target) ? input.hero : input.otherHero;\r\n\t\tconst board = input.board.includes(target) ? input.board : input.otherBoard;\r\n\t\tmodifyStats(target, input.source, attack * mult, health * mult, board, hero, input.gameState);\r\n\t\tinput.hero.globalInfo.BackToBackCastThisGame = previousCasts + 1;\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.709",
3
+ "version": "1.1.710",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",