@firestone-hs/simulate-bgs-battle 1.1.742 → 1.1.743

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.
@@ -5,17 +5,13 @@ const reference_data_1 = require("@firestone-hs/reference-data");
5
5
  const utils_1 = require("../../../utils");
6
6
  exports.ShowyCyclist = {
7
7
  cardIds: ["BG31_925", "BG31_925_G"],
8
- rebornSelfAttributeTransfer: ['scriptDataNum1', 'scriptDataNum2'],
8
+ rebornSelfAttributeTransfer: ['scriptDataNum2', 'scriptDataNum4'],
9
9
  deathrattleSpawn: (minion, input) => {
10
- var _a, _b, _c;
11
10
  const golden = minion.cardId === "BG31_925_G";
12
11
  const defaultAtk = golden ? 4 : 2;
13
12
  const defaultHp = golden ? 2 : 1;
14
- const hasSplitAtk = Number.isFinite(minion.scriptDataNum1);
15
- const atk = hasSplitAtk ? minion.scriptDataNum1 : ((_a = minion.scriptDataNum2) !== null && _a !== void 0 ? _a : defaultAtk);
16
- const hp = hasSplitAtk
17
- ? ((_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : defaultHp)
18
- : Math.max(defaultHp, Math.floor(((_c = minion.scriptDataNum2) !== null && _c !== void 0 ? _c : defaultAtk) / 2));
13
+ const atk = minion.scriptDataNum2 || defaultAtk;
14
+ const hp = minion.scriptDataNum4 || defaultHp;
19
15
  (0, utils_1.addStatsToBoard)(minion, input.boardWithDeadEntity, input.boardWithDeadEntityHero, atk, hp, input.gameState, reference_data_1.Race[reference_data_1.Race.NAGA]);
20
16
  return [];
21
17
  },
@@ -1 +1 @@
1
- {"version":3,"file":"showy-cyclist.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/showy-cyclist.ts"],"names":[],"mappings":";;;AAWA,iEAAoD;AAIpD,0CAAiD;AAGpC,QAAA,YAAY,GAA2D;IACnF,OAAO,EAAE,0BAAgE;IAEzE,2BAA2B,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACjE,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC3E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,iBAAoC,CAAC;QACjE,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC3D,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAE,MAAM,CAAC,cAAyB,CAAC,CAAC,CAAC,CAAC,MAAA,MAAM,CAAC,cAAc,mCAAI,UAAU,CAAC,CAAC;QACpG,MAAM,EAAE,GAAG,WAAW;YACrB,CAAC,CAAC,CAAC,MAAA,MAAM,CAAC,cAAc,mCAAI,SAAS,CAAC;YACtC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,MAAA,MAAM,CAAC,cAAc,mCAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9E,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,GAAG,EACH,EAAE,EACF,KAAK,CAAC,SAAS,EACf,qBAAI,CAAC,qBAAI,CAAC,IAAI,CAAC,CACf,CAAC;QACF,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Showy Cyclist\r\n * Deathrattle: Give all your Naga +2/+1. (Improved by every 3 spells you've cast this game!)\r\n *\r\n * Golden Showy Cyclist\r\n * Deathrattle: Give all your Naga +4/+2. (Improved by every 3 spells you've cast this game!)\r\n *\r\n * Current buff is usually on `scriptDataNum1` (attack) and `scriptDataNum2` (health).\r\n * If the client still sends a single combined value in `scriptDataNum2`, that is treated as\r\n * attack and health is half of it.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { DeathrattleSpawnCard, RebornSelfAttributeTransferCard } from '../../card.interface';\r\n\r\nexport const ShowyCyclist: DeathrattleSpawnCard & RebornSelfAttributeTransferCard = {\r\n\tcardIds: [CardIds.ShowyCyclist_BG31_925, CardIds.ShowyCyclist_BG31_925_G],\r\n\t// https://replays.firestoneapp.com/?reviewId=58840660-bc38-41f3-8aee-9986e145c1aa&turn=23&action=14\r\n\trebornSelfAttributeTransfer: ['scriptDataNum1', 'scriptDataNum2'],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst golden = minion.cardId === CardIds.ShowyCyclist_BG31_925_G;\r\n\t\tconst defaultAtk = golden ? 4 : 2;\r\n\t\tconst defaultHp = golden ? 2 : 1;\r\n\t\tconst hasSplitAtk = Number.isFinite(minion.scriptDataNum1);\r\n\t\tconst atk = hasSplitAtk ? (minion.scriptDataNum1 as number) : (minion.scriptDataNum2 ?? defaultAtk);\r\n\t\tconst hp = hasSplitAtk\r\n\t\t\t? (minion.scriptDataNum2 ?? defaultHp)\r\n\t\t\t: Math.max(defaultHp, Math.floor((minion.scriptDataNum2 ?? defaultAtk) / 2));\r\n\t\taddStatsToBoard(\r\n\t\t\tminion,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tatk,\r\n\t\t\thp,\r\n\t\t\tinput.gameState,\r\n\t\t\tRace[Race.NAGA],\r\n\t\t);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"showy-cyclist.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/showy-cyclist.ts"],"names":[],"mappings":";;;AAWA,iEAAoD;AAIpD,0CAAiD;AAGpC,QAAA,YAAY,GAA2D;IACnF,OAAO,EAAE,0BAAgE;IAEzE,2BAA2B,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACjE,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,iBAAoC,CAAC;QACjE,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,GAAG,GAAG,MAAM,CAAC,cAAc,IAAI,UAAU,CAAC;QAChD,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,IAAI,SAAS,CAAC;QAC9C,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,GAAG,EACH,EAAE,EACF,KAAK,CAAC,SAAS,EACf,qBAAI,CAAC,qBAAI,CAAC,IAAI,CAAC,CACf,CAAC;QACF,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Showy Cyclist\r\n * Deathrattle: Give all your Naga +2/+1. (Improved by every 3 spells you've cast this game!)\r\n *\r\n * Golden Showy Cyclist\r\n * Deathrattle: Give all your Naga +4/+2. (Improved by every 3 spells you've cast this game!)\r\n *\r\n * Current buff is usually on `scriptDataNum1` (attack) and `scriptDataNum2` (health).\r\n * If the client still sends a single combined value in `scriptDataNum2`, that is treated as\r\n * attack and health is half of it.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { DeathrattleSpawnCard, RebornSelfAttributeTransferCard } from '../../card.interface';\r\n\r\nexport const ShowyCyclist: DeathrattleSpawnCard & RebornSelfAttributeTransferCard = {\r\n\tcardIds: [CardIds.ShowyCyclist_BG31_925, CardIds.ShowyCyclist_BG31_925_G],\r\n\t// https://replays.firestoneapp.com/?reviewId=58840660-bc38-41f3-8aee-9986e145c1aa&turn=23&action=14\r\n\trebornSelfAttributeTransfer: ['scriptDataNum2', 'scriptDataNum4'],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst golden = minion.cardId === CardIds.ShowyCyclist_BG31_925_G;\r\n\t\tconst defaultAtk = golden ? 4 : 2;\r\n\t\tconst defaultHp = golden ? 2 : 1;\r\n\t\tconst atk = minion.scriptDataNum2 || defaultAtk;\r\n\t\tconst hp = minion.scriptDataNum4 || defaultHp;\r\n\t\taddStatsToBoard(\r\n\t\t\tminion,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tatk,\r\n\t\t\thp,\r\n\t\t\tinput.gameState,\r\n\t\t\tRace[Race.NAGA],\r\n\t\t);\r\n\t\treturn [];\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.742",
3
+ "version": "1.1.743",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",