@firestone-hs/simulate-bgs-battle 1.1.764 → 1.1.765

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.
@@ -1,2 +1,2 @@
1
- import { OnTavernSpellCastCard } from '../../card.interface';
2
- export declare const MysteriousKthir: OnTavernSpellCastCard;
1
+ import { EndOfTurnCard } from '../../card.interface';
2
+ export declare const MysteriousKthir: EndOfTurnCard;
@@ -1,19 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MysteriousKthir = void 0;
4
- const deity_1 = require("../../../simulation/deity");
4
+ const discard_1 = require("../../../simulation/discard");
5
+ const stats_1 = require("../../../simulation/stats");
5
6
  const utils_1 = require("../../../utils");
6
7
  exports.MysteriousKthir = {
7
8
  cardIds: ["BG36_320", "BG36_320_G"],
8
- onTavernSpellCast: (minion, input) => {
9
- if (input.source !== input.hero) {
10
- return;
9
+ endOfTurn: (minion, input) => {
10
+ var _a, _b;
11
+ const count = (_a = minion.scriptDataNum3) !== null && _a !== void 0 ? _a : 3;
12
+ const atk = minion.scriptDataNum1 || (minion.cardId === "BG36_320_G" ? 14 : 7);
13
+ const hp = minion.scriptDataNum2 || atk;
14
+ const toDiscard = ((_b = input.hero.hand) !== null && _b !== void 0 ? _b : [])
15
+ .filter((card) => (0, utils_1.isBattlegroundsSpell)(card.cardId, input.gameState.allCards))
16
+ .slice(0, count);
17
+ const discarded = (0, discard_1.discardCards)(toDiscard, input.hero, input.board, input.otherBoard, input.otherHero, input.gameState);
18
+ if (discarded > 0) {
19
+ for (let i = 0; i < discarded; i++) {
20
+ (0, stats_1.modifyStats)(minion, minion, atk, hp, input.board, input.hero, input.gameState);
21
+ }
11
22
  }
12
- const mult = minion.cardId === "BG36_320_G" ? 2 : 1;
13
- const atk = 3 * mult;
14
- const hp = 3 * mult;
15
- (0, utils_1.addStatsToBoard)(minion, input.board, input.hero, atk, hp, input.gameState);
16
- (0, deity_1.buffYourDeity)(input.hero, input.board, minion, atk, hp, input.gameState);
17
23
  },
18
24
  };
19
25
  //# sourceMappingURL=mysterious-kthir.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mysterious-kthir.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mysterious-kthir.ts"],"names":[],"mappings":";;;AAWA,qDAA0D;AAC1D,0CAAiD;AAGpC,QAAA,eAAe,GAA0B;IACrD,OAAO,EAAE,0BAAsE;IAC/E,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,EAAE;YAChC,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;QACrB,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;QACpB,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3E,IAAA,qBAAa,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1E,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Mysterious K'Thir (Tier 5, 8/8)\r\n * At the end of your turn, discard your 3 left-most Tavern spells.\r\n * Gain +8/+8 for each discarded.\r\n *\r\n * Golden Mysterious K'Thir (Tier 5, 16/16)\r\n * At the end of your turn, discard your 3 left-most Tavern spells.\r\n * Gain +16/+16 for each discarded.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const MysteriousKthir: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.MysteriousKthir_BG36_320, CardIds.MysteriousKthir_BG36_320_G],\r\n\tonTavernSpellCast: (minion: 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 = minion.cardId === CardIds.MysteriousKthir_BG36_320_G ? 2 : 1;\r\n\t\tconst atk = 3 * mult;\r\n\t\tconst hp = 3 * mult;\r\n\t\taddStatsToBoard(minion, input.board, input.hero, atk, hp, input.gameState);\r\n\t\tbuffYourDeity(input.hero, input.board, minion, atk, hp, input.gameState);\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"mysterious-kthir.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mysterious-kthir.ts"],"names":[],"mappings":";;;AAWA,yDAA2D;AAC3D,qDAAwD;AACxD,0CAAsD;AAGzC,QAAA,eAAe,GAAkB;IAC7C,OAAO,EAAE,0BAAsE;IAC/E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACzD,MAAM,KAAK,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,MAAM,iBAAuC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrG,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,IAAI,GAAG,CAAC;QACxC,MAAM,SAAS,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;aACvC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4BAAoB,EAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7E,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAClB,MAAM,SAAS,GAAG,IAAA,sBAAY,EAC7B,SAAS,EACT,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,CACf,CAAC;QACF,IAAI,SAAS,GAAG,CAAC,EAAE;YAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;gBACnC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAC/E;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Mysterious K'Thir (Tier 5, 8/8)\r\n * At the end of your turn, discard your 3 left-most Tavern spells.\r\n * Gain +8/+8 for each discarded.\r\n *\r\n * Golden Mysterious K'Thir (Tier 5, 16/16)\r\n * At the end of your turn, discard your 3 left-most Tavern spells.\r\n * Gain +16/+16 for each discarded.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { discardCards } from '../../../simulation/discard';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { isBattlegroundsSpell } from '../../../utils';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const MysteriousKthir: EndOfTurnCard = {\r\n\tcardIds: [CardIds.MysteriousKthir_BG36_320, CardIds.MysteriousKthir_BG36_320_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst count = minion.scriptDataNum3 ?? 3;\r\n\t\tconst atk = minion.scriptDataNum1 || (minion.cardId === CardIds.MysteriousKthir_BG36_320_G ? 14 : 7);\r\n\t\tconst hp = minion.scriptDataNum2 || atk;\r\n\t\tconst toDiscard = (input.hero.hand ?? [])\r\n\t\t\t.filter((card) => isBattlegroundsSpell(card.cardId, input.gameState.allCards))\r\n\t\t\t.slice(0, count);\r\n\t\tconst discarded = discardCards(\r\n\t\t\ttoDiscard,\r\n\t\t\tinput.hero,\r\n\t\t\tinput.board,\r\n\t\t\tinput.otherBoard,\r\n\t\t\tinput.otherHero,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\tif (discarded > 0) {\r\n\t\t\tfor (let i = 0; i < discarded; i++) {\r\n\t\t\t\tmodifyStats(minion, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -6,7 +6,7 @@ const stats_1 = require("../../../simulation/stats");
6
6
  exports.ShaOfFear = {
7
7
  cardIds: ["BG36_111", "BG36_111_G"],
8
8
  onTavernSpellCast: (minion, input) => {
9
- const atk = minion.scriptDataNum1 || (minion.cardId === "BG36_111_G" ? 8 : 4);
9
+ const atk = minion.scriptDataNum1 || (minion.cardId === "BG36_111_G" ? 6 : 3);
10
10
  const hp = minion.scriptDataNum2 || (minion.cardId === "BG36_111_G" ? 6 : 3);
11
11
  for (const target of input.board) {
12
12
  (0, stats_1.modifyStats)(target, minion, atk, hp, input.board, input.hero, input.gameState);
@@ -1 +1 @@
1
- {"version":3,"file":"sha-of-fear.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/sha-of-fear.ts"],"names":[],"mappings":";;;AASA,qDAAsE;AACtE,qDAAwD;AAG3C,QAAA,SAAS,GAA0B;IAC/C,OAAO,EAAE,0BAA0D;IACnE,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,MAAM,GAAG,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9F,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC/E;QACD,IAAA,iCAAyB,EAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Sha of Fear (Tier 7, 9/12)\r\n * Whenever you cast a Tavern spell, give your minions and Deity +4/+3.\r\n *\r\n * Golden Sha of Fear (Tier 7, 18/24)\r\n * Whenever you cast a Tavern spell, give your minions and Deity +8/+6.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { incrementDeitySecretStats } from '../../../simulation/deity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const ShaOfFear: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.ShaOfFear_BG36_111, CardIds.ShaOfFear_BG36_111_G],\r\n\tonTavernSpellCast: (minion: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 || (minion.cardId === CardIds.ShaOfFear_BG36_111_G ? 8 : 4);\r\n\t\tconst hp = minion.scriptDataNum2 || (minion.cardId === CardIds.ShaOfFear_BG36_111_G ? 6 : 3);\r\n\t\tfor (const target of input.board) {\r\n\t\t\tmodifyStats(target, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t\tincrementDeitySecretStats(input.hero, atk, hp);\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"sha-of-fear.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/sha-of-fear.ts"],"names":[],"mappings":";;;AASA,qDAAsE;AACtE,qDAAwD;AAG3C,QAAA,SAAS,GAA0B;IAC/C,OAAO,EAAE,0BAA0D;IACnE,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,MAAM,GAAG,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9F,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC/E;QACD,IAAA,iCAAyB,EAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Sha of Fear (Tier 7, 9/12)\r\n * Whenever you cast a Tavern spell, give your minions and Deity +4/+3.\r\n *\r\n * Golden Sha of Fear (Tier 7, 18/24)\r\n * Whenever you cast a Tavern spell, give your minions and Deity +8/+6.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { incrementDeitySecretStats } from '../../../simulation/deity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const ShaOfFear: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.ShaOfFear_BG36_111, CardIds.ShaOfFear_BG36_111_G],\r\n\tonTavernSpellCast: (minion: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 || (minion.cardId === CardIds.ShaOfFear_BG36_111_G ? 6 : 3);\r\n\t\tconst hp = minion.scriptDataNum2 || (minion.cardId === CardIds.ShaOfFear_BG36_111_G ? 6 : 3);\r\n\t\tfor (const target of input.board) {\r\n\t\t\tmodifyStats(target, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t\tincrementDeitySecretStats(input.hero, atk, hp);\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.764",
3
+ "version": "1.1.765",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",