@firestone-hs/simulate-bgs-battle 1.1.548 → 1.1.550
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.
- package/dist/board-entity.d.ts +4 -0
- package/dist/board-entity.js.map +1 -1
- package/dist/cards/impl/anomaly/anomalous-twin.js +1 -1
- package/dist/cards/impl/anomaly/anomalous-twin.js.map +1 -1
- package/dist/cards/impl/bg-spell/toxic-tumbleweed.js +1 -1
- package/dist/cards/impl/bg-spell/toxic-tumbleweed.js.map +1 -1
- package/dist/cards/impl/hero-power/embrace-your-rage.js +1 -1
- package/dist/cards/impl/hero-power/embrace-your-rage.js.map +1 -1
- package/dist/cards/impl/minion/battlecruiser.js +6 -7
- package/dist/cards/impl/minion/battlecruiser.js.map +1 -1
- package/dist/cards/impl/minion/captain-bonerender.js +1 -1
- package/dist/cards/impl/minion/captain-bonerender.js.map +1 -1
- package/dist/cards/impl/minion/carbonic-copy.js +1 -1
- package/dist/cards/impl/minion/carbonic-copy.js.map +1 -1
- package/dist/cards/impl/minion/carrier.js +3 -1
- package/dist/cards/impl/minion/carrier.js.map +1 -1
- package/dist/cards/impl/minion/diremuck-forager.js +1 -1
- package/dist/cards/impl/minion/diremuck-forager.js.map +1 -1
- package/dist/cards/impl/minion/salty-hog.js +2 -1
- package/dist/cards/impl/minion/salty-hog.js.map +1 -1
- package/dist/cards/impl/minion/stitched-salvager.js +14 -3
- package/dist/cards/impl/minion/stitched-salvager.js.map +1 -1
- package/dist/cards/impl/minion/zergling.js +1 -1
- package/dist/cards/impl/minion/zergling.js.map +1 -1
- package/dist/cards/impl/quest-reward/evil-twin.js +1 -1
- package/dist/cards/impl/quest-reward/evil-twin.js.map +1 -1
- package/dist/cards/impl/trinket/automaton-portrait.js +1 -1
- package/dist/cards/impl/trinket/automaton-portrait.js.map +1 -1
- package/dist/cards/impl/trinket/fishy-sticker.js +1 -1
- package/dist/cards/impl/trinket/fishy-sticker.js.map +1 -1
- package/dist/cards/impl/trinket/karazhan-chess-set.js +1 -1
- package/dist/cards/impl/trinket/karazhan-chess-set.js.map +1 -1
- package/dist/cards/impl/trinket/ship-in-a-bottle.js +1 -1
- package/dist/cards/impl/trinket/ship-in-a-bottle.js.map +1 -1
- package/dist/cards/impl/trinket/summoning-sphere.js +1 -1
- package/dist/cards/impl/trinket/summoning-sphere.js.map +1 -1
- package/dist/keywords/divine-shield.js +4 -4
- package/dist/keywords/divine-shield.js.map +1 -1
- package/dist/simulation/after-attack.js +2 -0
- package/dist/simulation/after-attack.js.map +1 -1
- package/dist/simulation/attack.js +2 -2
- package/dist/simulation/attack.js.map +1 -1
- package/dist/simulation/avenge.js +2 -2
- package/dist/simulation/avenge.js.map +1 -1
- package/dist/simulation/battlecries.js +2 -2
- package/dist/simulation/battlecries.js.map +1 -1
- package/dist/simulation/damage-effects.js +1 -1
- package/dist/simulation/damage-effects.js.map +1 -1
- package/dist/simulation/death-effects.js +2 -2
- package/dist/simulation/death-effects.js.map +1 -1
- package/dist/simulation/deathrattle-effects.js +8 -4
- package/dist/simulation/deathrattle-effects.js.map +1 -1
- package/dist/simulation/deathrattle-orchestration.js +6 -1
- package/dist/simulation/deathrattle-orchestration.js.map +1 -1
- package/dist/simulation/deathrattle-spawns.d.ts +1 -5
- package/dist/simulation/deathrattle-spawns.js +75 -75
- package/dist/simulation/deathrattle-spawns.js.map +1 -1
- package/dist/simulation/minion-death.js +1 -1
- package/dist/simulation/minion-death.js.map +1 -1
- package/dist/simulation/on-attack.js +0 -2
- package/dist/simulation/on-attack.js.map +1 -1
- package/dist/simulation/reborn.js +1 -1
- package/dist/simulation/reborn.js.map +1 -1
- package/dist/simulation/secrets.js +4 -4
- package/dist/simulation/secrets.js.map +1 -1
- package/dist/simulation/start-of-combat/soc-illidan-hero-power.js +0 -1
- package/dist/simulation/start-of-combat/soc-illidan-hero-power.js.map +1 -1
- package/dist/simulation/stats.js +2 -4
- package/dist/simulation/stats.js.map +1 -1
- package/dist/simulation/summon-when-space.js +3 -3
- package/dist/simulation/summon-when-space.js.map +1 -1
- package/package.json +1 -1
package/dist/board-entity.d.ts
CHANGED
|
@@ -32,10 +32,14 @@ export interface BoardEntity {
|
|
|
32
32
|
scriptDataNum2?: number;
|
|
33
33
|
inInitialState?: boolean;
|
|
34
34
|
additionalCards?: readonly string[] | null;
|
|
35
|
+
tags?: {
|
|
36
|
+
[tag: number]: number;
|
|
37
|
+
};
|
|
35
38
|
rememberedDeathrattles?: {
|
|
36
39
|
cardId: string;
|
|
37
40
|
timing: number;
|
|
38
41
|
repeats: number;
|
|
42
|
+
memory?: any;
|
|
39
43
|
}[];
|
|
40
44
|
deathrattleRepeats?: number;
|
|
41
45
|
damageMultiplier?: number;
|
package/dist/board-entity.js.map
CHANGED
|
@@ -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\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?: {\r\n\t\tcardId: string;\r\n\t\toriginEntityId?: number;\r\n\t\ttagScriptDataNum1?: number;\r\n\t\ttagScriptDataNum2?: number;\r\n\t\ttiming: number;\r\n\t\trepeats?: number;\r\n\t\tvalue?: number;\r\n\t}[];\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\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?: { cardId: string; timing: number; repeats: number }[];\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\r\n\t// permanentAttack?: number;\r\n\t// permanentHealth?: number;\r\n\ttavernTier?: number;\r\n\r\n\tmemory?: any;\r\n\r\n\tonCanceledSummon?: () => void;\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\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?: {\r\n\t\tcardId: string;\r\n\t\toriginEntityId?: number;\r\n\t\ttagScriptDataNum1?: number;\r\n\t\ttagScriptDataNum2?: number;\r\n\t\ttiming: number;\r\n\t\trepeats?: number;\r\n\t\tvalue?: number;\r\n\t}[];\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// 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?: { cardId: string; timing: number; repeats: number; memory?: any }[];\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\r\n\t// permanentAttack?: number;\r\n\t// permanentHealth?: number;\r\n\ttavernTier?: number;\r\n\r\n\tmemory?: any;\r\n\r\n\tonCanceledSummon?: () => void;\r\n}\r\n"]}
|
|
@@ -11,7 +11,7 @@ exports.AnomalousTwin = {
|
|
|
11
11
|
...highestHealthMinion,
|
|
12
12
|
lastAffectedByEntity: null,
|
|
13
13
|
};
|
|
14
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
14
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, highestHealthMinion.friendly, true, false, false, copy);
|
|
15
15
|
const indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(highestHealthMinion) + 1);
|
|
16
16
|
const spawns = (0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, highestHealthMinion, indexFromRight, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
17
17
|
if (spawns.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anomalous-twin.js","sourceRoot":"","sources":["../../../../src/cards/impl/anomaly/anomalous-twin.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,aAAa,GAAG;IAC5B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/D,MAAM,mBAAmB,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1F,MAAM,IAAI,GAAgB;gBACzB,GAAG,mBAAmB;gBACtB,oBAAoB,EAAE,IAAI;aAC1B,CAAC;YACF,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,IAAI,CAAC,MAAM,EACX,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"anomalous-twin.js","sourceRoot":"","sources":["../../../../src/cards/impl/anomaly/anomalous-twin.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,aAAa,GAAG;IAC5B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,CAAC,CAAC,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BAA8B,EAAE,IAAI,EAAE,CAAC;aACpE;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const AnomalousTwin = {\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tif (!!input.playerBoard.length && input.playerBoard.length < 7) {\r\n\t\t\tconst highestHealthMinion = [...input.playerBoard].sort((a, b) => b.health - a.health)[0];\r\n\t\t\tconst copy: BoardEntity = {\r\n\t\t\t\t...highestHealthMinion,\r\n\t\t\t\tlastAffectedByEntity: null,\r\n\t\t\t};\r\n\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\tcopy.cardId,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\thighestHealthMinion.friendly,\r\n\t\t\t\ttrue,\r\n\t\t\t\tfalse,\r\n\t\t\t\tfalse,\r\n\t\t\t\tcopy,\r\n\t\t\t);\r\n\t\t\tconst indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(highestHealthMinion) + 1);\r\n\t\t\tconst spawns = performEntitySpawns(\r\n\t\t\t\tnewMinions,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\thighestHealthMinion,\r\n\t\t\t\tindexFromRight,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\tif (spawns.length > 0) {\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(input.playerEntity, copy, input.playerBoard, null, null);\r\n\t\t\t\t// Recompute first attacker\r\n\t\t\t\t// See https://replays.firestoneapp.com/?reviewId=93229c4a-d864-4196-83dd-2fea2a5bf70a&turn=29&action=0\r\n\t\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -6,7 +6,7 @@ const spawns_1 = require("../../../simulation/spawns");
|
|
|
6
6
|
exports.ToxicTumbleweed = {
|
|
7
7
|
startOfCombat: (trinket, input) => {
|
|
8
8
|
if (input.playerBoard.length < 7) {
|
|
9
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)("BG28_641t", 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
9
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)("BG28_641t", 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, input.playerEntity.friendly, true, false, false);
|
|
10
10
|
newMinions[0].attackImmediately = true;
|
|
11
11
|
(0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, null, 0, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
12
12
|
return { hasTriggered: true, shouldRecomputeCurrentAttacker: true };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toxic-tumbleweed.js","sourceRoot":"","sources":["../../../../src/cards/impl/bg-spell/toxic-tumbleweed.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,eAAe,GAAG;IAC9B,aAAa,EAAE,CAAC,OAAoB,EAAE,KAAe,EAAE,EAAE;QACxD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,MAAM,UAAU,GAAG,IAAA,kCAAa,eAE/B,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"toxic-tumbleweed.js","sourceRoot":"","sources":["../../../../src/cards/impl/bg-spell/toxic-tumbleweed.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,eAAe,GAAG;IAC9B,aAAa,EAAE,CAAC,OAAoB,EAAE,KAAe,EAAE,EAAE;QACxD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,MAAM,UAAU,GAAG,IAAA,kCAAa,eAE/B,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,CAAC,QAAQ,EAC3B,IAAI,EACJ,KAAK,EACL,KAAK,CACL,CAAC;YACF,UAAU,CAAC,CAAC,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC;YACvC,IAAA,4BAAmB,EAClB,UAAU,EACV,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,IAAI,EACJ,CAAC,EACD,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;YACF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;SACpE;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardSecret } from '../../../board-secret';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const ToxicTumbleweed = {\r\n\tstartOfCombat: (trinket: BoardSecret, input: SoCInput) => {\r\n\t\tif (input.playerBoard.length < 7) {\r\n\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\tCardIds.ToxicTumbleweed_TumblingAssassinToken_BG28_641t,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\ttrue,\r\n\t\t\t\tfalse,\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\t\t\tnewMinions[0].attackImmediately = true;\r\n\t\t\tperformEntitySpawns(\r\n\t\t\t\tnewMinions,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tnull,\r\n\t\t\t\t0,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -14,7 +14,7 @@ exports.EmbraceYourRage = {
|
|
|
14
14
|
if (!(createdCardId === null || createdCardId === void 0 ? void 0 : createdCardId.length)) {
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
|
-
const spawns = (0, deathrattle_spawns_1.spawnEntities)(createdCardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
17
|
+
const spawns = (0, deathrattle_spawns_1.spawnEntities)(createdCardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, input.playerEntity.friendly, false, false, false);
|
|
18
18
|
const indexFromRight = 0;
|
|
19
19
|
const spawned = (0, spawns_1.performEntitySpawns)(spawns, input.playerBoard, input.playerEntity, input.playerEntity, indexFromRight, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
20
20
|
if (spawned === null || spawned === void 0 ? void 0 : spawned.length) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embrace-your-rage.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/embrace-your-rage.ts"],"names":[],"mappings":";;;AAEA,qEAAmE;AACnE,+EAAuE;AACvE,uDAAiE;AAIpD,QAAA,eAAe,GAAsB;IACjD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,uBAAyB;IAClC,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,uBAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACzE,MAAM,aAAa,GAAG,SAAS,CAAC,IAAc,CAAC;gBAC/C,IAAI,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAA,EAAE;oBAC3B,OAAO,KAAK,CAAC;iBACb;gBAED,MAAM,MAAM,GAAG,IAAA,kCAAa,EAC3B,aAAa,EACb,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"embrace-your-rage.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/embrace-your-rage.ts"],"names":[],"mappings":";;;AAEA,qEAAmE;AACnE,+EAAuE;AACvE,uDAAiE;AAIpD,QAAA,eAAe,GAAsB;IACjD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,uBAAyB;IAClC,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,uBAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACzE,MAAM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AAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;iBACpE;aACD;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const EmbraceYourRage: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.EmbraceYourRage],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (EmbraceYourRage.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst createdCardId = heroPower.info as string;\r\n\t\t\t\tif (!createdCardId?.length) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst spawns = spawnEntities(\r\n\t\t\t\t\tcreatedCardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t);\r\n\t\t\t\tconst indexFromRight = 0;\r\n\t\t\t\tconst spawned = performEntitySpawns(\r\n\t\t\t\t\tspawns,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tindexFromRight,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tif (spawned?.length) {\r\n\t\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tspawns[0],\r\n\t\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\t);\r\n\t\t\t\t\taddCardsInHand(input.playerEntity, input.playerBoard, spawns, input.gameState);\r\n\t\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tspawns[0],\r\n\t\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Battlecruiser = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
4
5
|
const attack_1 = require("../../../simulation/attack");
|
|
5
6
|
const stats_1 = require("../../../simulation/stats");
|
|
6
7
|
const utils_1 = require("../../../utils");
|
|
7
8
|
exports.Battlecruiser = {
|
|
8
9
|
cardIds: ["BG31_HERO_801pt", "BG31_HERO_801pt_G"],
|
|
9
10
|
startOfCombat: (minion, input) => {
|
|
10
|
-
var _a;
|
|
11
|
+
var _a, _b;
|
|
11
12
|
const yamatoCannon = [...((_a = minion.enchantments) !== null && _a !== void 0 ? _a : [])]
|
|
12
13
|
.reverse()
|
|
13
14
|
.find((e) => e.cardId === "BG31_HERO_801ptce");
|
|
@@ -15,12 +16,10 @@ exports.Battlecruiser = {
|
|
|
15
16
|
return false;
|
|
16
17
|
}
|
|
17
18
|
const damage = yamatoCannon.tagScriptDataNum1;
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
: 1;
|
|
23
|
-
for (let i = 0; i < loops; i++) {
|
|
19
|
+
const loops = ((_b = minion.tags) === null || _b === void 0 ? void 0 : _b[reference_data_1.GameTag.BACON_YAMATO_CANNON]) === 1 ? 2 : 1;
|
|
20
|
+
for (let i = 0; i < loops; i++) {
|
|
21
|
+
const target = (0, utils_1.getRandomMinionWithHighestHealth)(input.opponentBoard);
|
|
22
|
+
if (!!target) {
|
|
24
23
|
(0, attack_1.dealDamageToMinion)(target, input.opponentBoard, input.opponentEntity, minion, damage, input.playerBoard, input.playerEntity, input.gameState);
|
|
25
24
|
input.gameState.spectator.registerPowerTarget(minion, target, input.opponentBoard, input.playerEntity, input.opponentEntity);
|
|
26
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battlecruiser.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/battlecruiser.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"battlecruiser.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/battlecruiser.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAEhE,uDAAgE;AAKhE,qDAAwD;AACxD,0CAAkE;AAGrD,QAAA,aAAa,GAAgF;IACzG,OAAO,EAAE,wCAA6F;IACtG,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QAEvD,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,MAAA,MAAM,CAAC,YAAY,mCAAI,EAAE,CAAC,CAAC;aACnD,OAAO,EAAE;aACT,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,wBAAmE,CAAC,CAAC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ntity } from '../../../board-entity';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { RebornEffectInput } from '../../../simulation/reborn';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { getRandomMinionWithHighestHealth } from '../../../utils';\r\nimport { DeathrattleEffectCard, OnAttackCard, RebornEffectCard, StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const Battlecruiser: StartOfCombatCard & RebornEffectCard & OnAttackCard & DeathrattleEffectCard = {\r\n\tcardIds: [CardIds.LiftOff_BattlecruiserToken_BG31_HERO_801pt, CardIds.Battlecruiser_BG31_HERO_801pt_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\t// Enchantments can appear multiple times???\r\n\t\tconst yamatoCannon = [...(minion.enchantments ?? [])]\r\n\t\t\t.reverse()\r\n\t\t\t.find((e) => e.cardId === CardIds.YamatoCannon_YamatoCannonEnchantment_BG31_HERO_801ptce);\r\n\t\tif (!yamatoCannon) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst damage = yamatoCannon.tagScriptDataNum1;\r\n\t\tconst loops = minion.tags?.[GameTag.BACON_YAMATO_CANNON] === 1 ? 2 : 1;\r\n\t\tfor (let i = 0; i < loops; i++) {\r\n\t\t\tconst target = getRandomMinionWithHighestHealth(input.opponentBoard);\r\n\t\t\tif (!!target) {\r\n\t\t\t\tdealDamageToMinion(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tdamage,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\trebornEffect: (minion: BoardEntity, input: RebornEffectInput) => {\r\n\t\tconst ultraCapacitor = [...(input.initialEntity.enchantments ?? [])]\r\n\t\t\t.reverse()\r\n\t\t\t.find((e) => e.cardId === CardIds.UltraCapacitor_UltraCapacitorEnchantment_BG31_HERO_801ptje);\r\n\t\tif (!ultraCapacitor) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tminion.enchantments = input.initialEntity.enchantments;\r\n\t\tminion.attack = input.initialEntity.maxAttack;\r\n\t\tminion.maxAttack = input.initialEntity.maxAttack;\r\n\t\tminion.health = input.initialEntity.maxHealth;\r\n\t\tminion.maxHealth = input.initialEntity.maxHealth;\r\n\t\tminion.divineShield = input.initialEntity.hadDivineShield;\r\n\t\tminion.taunt = input.initialEntity.taunt;\r\n\t\tminion.windfury = input.initialEntity.windfury;\r\n\t\tminion.poisonous = input.initialEntity.poisonous;\r\n\t},\r\n\tonAnyMinionAttack: (\r\n\t\tminion: BoardEntity,\r\n\t\tinput: OnAttackInput,\r\n\t): {\r\n\t\tdmgDoneByAttacker: number;\r\n\t\tdmgDoneByDefender: number;\r\n\t} => {\r\n\t\tif (minion !== input.attacker) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\r\n\t\tconst advancedBallistics = [...(minion.enchantments ?? [])]\r\n\t\t\t.reverse()\r\n\t\t\t.find((e) => e.cardId === CardIds.AdvancedBallistics_AdvancedBallisticsEnchantment_BG31_HERO_801ptde);\r\n\t\tif (!advancedBallistics) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\r\n\t\tconst buff = advancedBallistics.tagScriptDataNum1;\r\n\t\tconst targets = input.attackingBoard.filter((entity) => entity !== minion);\r\n\t\tfor (const target of targets) {\r\n\t\t\tmodifyStats(target, buff, 0, input.attackingBoard, input.attackingHero, input.gameState);\r\n\t\t}\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst caduceusReactor = [...(minion.enchantments ?? [])]\r\n\t\t\t.reverse()\r\n\t\t\t.find((e) => e.cardId === CardIds.CaduceusReactor_CaduceusReactorEnchantment_BG31_HERO_801ptee);\r\n\t\tif (!caduceusReactor) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst target = input.boardWithDeadEntity.filter((e) => e.health > 0 && !e.definitelyDead)[0];\r\n\t\tif (!target) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst buff = caduceusReactor.tagScriptDataNum1;\r\n\t\tmodifyStats(target, buff, buff, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);\r\n\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\tminion,\r\n\t\t\ttarget,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tinput.otherBoardHero,\r\n\t\t);\r\n\t},\r\n};\r\n"]}
|
|
@@ -18,7 +18,7 @@ exports.CaptainBonerender = {
|
|
|
18
18
|
}
|
|
19
19
|
const copy = (0, utils_1.copyEntity)(input.spawned);
|
|
20
20
|
(0, add_minion_to_board_1.removeAurasFromSelf)(copy, input.board, input.hero, input.gameState);
|
|
21
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.board, input.hero, input.otherBoard, input.otherHero, input.gameState
|
|
21
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.board, input.hero, input.otherBoard, input.otherHero, input.gameState, input.hero.friendly, false, false, false, copy);
|
|
22
22
|
const indexFromRight = input.board.length - input.board.indexOf(minion) - 1;
|
|
23
23
|
const spawns = (0, spawns_1.performEntitySpawns)(newMinions, input.board, input.hero, minion, indexFromRight, input.otherBoard, input.otherHero, input.gameState);
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captain-bonerender.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/captain-bonerender.ts"],"names":[],"mappings":";;;AAEA,iFAAiG;AACjG,+EAAuE;AACvE,uDAAiE;AACjE,0CAA4C;AAG/B,QAAA,iBAAiB,GAA0B;IACvD,OAAO,EAAE,0BAA0E;IACnF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAwB,EAAE,EAAE;QACpE,IAAI,yBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,MAAiB,CAAC,EAAE;YACxE,OAAO;SACP;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,eAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE;gBAC5B,MAAM;aACN;YACD,MAAM,IAAI,GAAG,IAAA,kBAAU,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACvC,IAAA,yCAAmB,EAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;YACpE,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,IAAI,CAAC,MAAM,EACX,CAAC,EACD,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"captain-bonerender.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/captain-bonerender.ts"],"names":[],"mappings":";;;AAEA,iFAAiG;AACjG,+EAAuE;AACvE,uDAAiE;AACjE,0CAA4C;AAG/B,QAAA,iBAAiB,GAA0B;IACvD,OAAO,EAAE,0BAA0E;IACnF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAwB,EAAE,EAAE;QACpE,IAAI,yBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,MAAiB,CAAC,EAAE;YACxE,OAAO;SACP;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,eAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE;gBAC5B,MAAM;aACN;YACD,MAAM,IAAI,GAAG,IAAA,kBAAU,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACvC,IAAA,yCAAmB,EAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;YACpE,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,IAAI,CAAC,MAAM,EACX,CAAC,EACD,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,IAAI,CAAC,QAAQ,EACnB,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,CACJ,CAAC;YACF,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC5E,MAAM,MAAM,GAAG,IAAA,4BAAmB,EACjC,UAAU,EACV,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,MAAM,EACN,cAAc,EACd,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnOtherSpawnInput, removeAurasFromSelf } from '../../../simulation/add-minion-to-board';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { copyEntity } from '../../../utils';\r\nimport { AfterOtherSpawnedCard } from '../../card.interface';\r\n\r\nexport const CaptainBonerender: AfterOtherSpawnedCard = {\r\n\tcardIds: [CardIds.CaptainBonerender_BG31_840, CardIds.CaptainBonerender_BG31_840_G],\r\n\tafterOtherSpawned: (minion: BoardEntity, input: OnOtherSpawnInput) => {\r\n\t\tif (CaptainBonerender.cardIds.includes(input.spawned.cardId as CardIds)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst mult = minion.cardId === CardIds.CaptainBonerender_BG31_840 ? 1 : 2;\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tif (input.board.length >= 7) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst copy = copyEntity(input.spawned);\r\n\t\t\tremoveAurasFromSelf(copy, input.board, input.hero, input.gameState);\r\n\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\tcopy.cardId,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.otherBoard,\r\n\t\t\t\tinput.otherHero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\tinput.hero.friendly,\r\n\t\t\t\tfalse,\r\n\t\t\t\tfalse,\r\n\t\t\t\tfalse,\r\n\t\t\t\tcopy,\r\n\t\t\t);\r\n\t\t\tconst indexFromRight = input.board.length - input.board.indexOf(minion) - 1;\r\n\t\t\tconst spawns = performEntitySpawns(\r\n\t\t\t\tnewMinions,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tminion,\r\n\t\t\t\tindexFromRight,\r\n\t\t\t\tinput.otherBoard,\r\n\t\t\t\tinput.otherHero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -13,7 +13,7 @@ exports.CarbonicCopy = {
|
|
|
13
13
|
...minion,
|
|
14
14
|
lastAffectedByEntity: null,
|
|
15
15
|
};
|
|
16
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
16
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, minion.friendly, true, false, false, copy);
|
|
17
17
|
const indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(minion) + 1);
|
|
18
18
|
const actualSpawns = (0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, minion, indexFromRight, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
19
19
|
totalSpawned += actualSpawns.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carbonic-copy.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/carbonic-copy.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,YAAY,GAAG;IAC3B,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,iBAAoC,CAAC,CAAC,CAAC,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WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,QAAQ,EACf,IAAI,EACJ,KAAK,EACL,KAAK,EACL,IAAI,CACJ,CAAC;gBACF,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC1F,MAAM,YAAY,GAAG,IAAA,4BAAmB,EACvC,UAAU,EACV,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,MAAM,EACN,cAAc,EACd,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,YAAY,IAAI,YAAY,CAAC,MAAM,CAAC;gBACpC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,IAAI,EACJ,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;aACF;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const CarbonicCopy = {\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tlet totalSpawned = 0;\r\n\t\tconst numberOfCopies = minion.cardId === CardIds.CarbonicCopy_BG27_503_G ? 2 : 1;\r\n\t\tfor (let i = 0; i < numberOfCopies; i++) {\r\n\t\t\tif (!!input.playerBoard.length && input.playerBoard.length < 7) {\r\n\t\t\t\tconst copy: BoardEntity = {\r\n\t\t\t\t\t...minion,\r\n\t\t\t\t\tlastAffectedByEntity: null,\r\n\t\t\t\t};\r\n\t\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\t\tcopy.cardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tminion.friendly,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tcopy,\r\n\t\t\t\t);\r\n\t\t\t\tconst indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(minion) + 1);\r\n\t\t\t\tconst actualSpawns = performEntitySpawns(\r\n\t\t\t\t\tnewMinions,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tindexFromRight,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\ttotalSpawned += actualSpawns.length;\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tcopy,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -7,6 +7,7 @@ exports.Carrier = {
|
|
|
7
7
|
cardIds: ["BG31_HERO_802pt1", "BG31_HERO_802pt1_G"],
|
|
8
8
|
baseAvengeValue: (cardId) => 4,
|
|
9
9
|
avenge: (minion, input) => {
|
|
10
|
+
var _a;
|
|
10
11
|
const spawnInput = {
|
|
11
12
|
boardWithDeadEntity: input.board,
|
|
12
13
|
boardWithDeadEntityHero: input.hero,
|
|
@@ -15,12 +16,13 @@ exports.Carrier = {
|
|
|
15
16
|
otherBoard: input.otherBoard,
|
|
16
17
|
otherBoardHero: input.otherHero,
|
|
17
18
|
};
|
|
18
|
-
const statBuff = minion.scriptDataNum1;
|
|
19
|
+
const statBuff = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : 0;
|
|
19
20
|
const numberOfSummons = minion.cardId === "BG31_HERO_802pt1_G" ? 2 : 1;
|
|
20
21
|
const spawned = (0, deathrattle_spawns_1.simplifiedSpawnEntities)("BG31_HERO_802pt1t", numberOfSummons, spawnInput);
|
|
21
22
|
spawned.forEach((e) => {
|
|
22
23
|
(0, stats_1.modifyStats)(e, statBuff, statBuff, input.board, input.hero, input.gameState);
|
|
23
24
|
});
|
|
25
|
+
minion.scriptDataNum1 = statBuff + 3;
|
|
24
26
|
return spawned;
|
|
25
27
|
},
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/carrier.ts"],"names":[],"mappings":";;;AAIA,+EAAiF;AACjF,qDAAwD;AAG3C,QAAA,OAAO,GAAe;IAClC,OAAO,EAAE,0CAAoF;IAC7F,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,CAAC,MAAmB,EAAE,KAAkB,EAA0B,EAAE
|
|
1
|
+
{"version":3,"file":"carrier.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/carrier.ts"],"names":[],"mappings":";;;AAIA,+EAAiF;AACjF,qDAAwD;AAG3C,QAAA,OAAO,GAAe;IAClC,OAAO,EAAE,0CAAoF;IAC7F,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,CAAC,MAAmB,EAAE,KAAkB,EAA0B,EAAE;;QAC3E,MAAM,UAAU,GAA8B;YAC7C,mBAAmB,EAAE,KAAK,CAAC,KAAK;YAChC,uBAAuB,EAAE,KAAK,CAAC,IAAI;YACnC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,cAAc,EAAE,KAAK,CAAC,SAAS;SAC/B,CAAC;QACF,MAAM,QAAQ,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,CAAC;QAC5C,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,yBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,MAAM,OAAO,GAAG,IAAA,4CAAuB,uBAEtC,eAAe,EACf,UAAU,CACV,CAAC;QACF,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACrB,IAAA,mBAAW,EAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,CAAC,CAAC;QACrC,OAAO,OAAO,CAAC;IAChB,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { AvengeInput } from '../../../simulation/avenge';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { AvengeCard } from '../../card.interface';\r\n\r\nexport const Carrier: AvengeCard = {\r\n\tcardIds: [CardIds.WarpGate_CarrierToken_BG31_HERO_802pt1, CardIds.Carrier_BG31_HERO_802pt1_G],\r\n\tbaseAvengeValue: (cardId: string) => 4,\r\n\tavenge: (minion: BoardEntity, input: AvengeInput): readonly BoardEntity[] => {\r\n\t\tconst spawnInput: DeathrattleTriggeredInput = {\r\n\t\t\tboardWithDeadEntity: input.board,\r\n\t\t\tboardWithDeadEntityHero: input.hero,\r\n\t\t\tgameState: input.gameState,\r\n\t\t\tdeadEntity: minion, // weird\r\n\t\t\totherBoard: input.otherBoard,\r\n\t\t\totherBoardHero: input.otherHero,\r\n\t\t};\r\n\t\tconst statBuff = minion.scriptDataNum1 ?? 0;\r\n\t\tconst numberOfSummons = minion.cardId === CardIds.Carrier_BG31_HERO_802pt1_G ? 2 : 1;\r\n\t\tconst spawned = simplifiedSpawnEntities(\r\n\t\t\tCardIds.Carrier_InterceptorToken_BG31_HERO_802pt1t,\r\n\t\t\tnumberOfSummons,\r\n\t\t\tspawnInput,\r\n\t\t);\r\n\t\tspawned.forEach((e) => {\r\n\t\t\tmodifyStats(e, statBuff, statBuff, input.board, input.hero, input.gameState);\r\n\t\t});\r\n\t\tminion.scriptDataNum1 = statBuff + 3;\r\n\t\treturn spawned;\r\n\t},\r\n};\r\n"]}
|
|
@@ -19,7 +19,7 @@ exports.DiremuckForager = {
|
|
|
19
19
|
input.gameState.spectator.registerPowerTarget(minion, target, input.playerBoard, input.playerEntity, input.opponentEntity);
|
|
20
20
|
if (input.playerBoard.length < 7) {
|
|
21
21
|
target.locked = true;
|
|
22
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(target.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
22
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(target.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, minion.friendly, false, false, true, { ...target });
|
|
23
23
|
for (const s of newMinions) {
|
|
24
24
|
s.onCanceledSummon = () => (target.locked = false);
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diremuck-forager.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/diremuck-forager.ts"],"names":[],"mapp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AAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;YACxG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;YAEF,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;gBACrB,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,MAAM,CAAC,MAAM,EACb,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,QAAQ,EACf,KAAK,EACL,KAAK,EACL,IAAI,EACJ,EAAE,GAAG,MAAM,EAAiB,CAC5B,CAAC;gBACF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE;oBAC3B,CAAC,CAAC,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;iBACnD;gBACD,IAAA,4BAAmB,EAClB,UAAU,EACV,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,MAAM,EACN,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAClE,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;aACF;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, CardType } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\n\r\nexport const DiremuckForager = {\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst potentialTargets = input.playerEntity.hand\r\n\t\t\t.filter((e) => !!e.cardId)\r\n\t\t\t.filter((e) => input.gameState.allCards.getCard(e.cardId).type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((e) => !e.locked);\r\n\t\tif (potentialTargets.length > 0) {\r\n\t\t\tconst target = pickRandom(potentialTargets);\r\n\t\t\t// When it's the opponent, the game state already contains all the buffs\r\n\t\t\t// It can happen that, for the opponent, a card is first added to their hand (eg with Embrace Your Rage)\r\n\t\t\t// and then summoned by Diremuck. In that case, the stats need to be buffed\r\n\t\t\t// Update 29.2 18/04/2024: this is no longer the case, and the minions passed in the initial state should\r\n\t\t\t// reflect the values they have in hand\r\n\t\t\t// if (target?.friendly || !target?.inInitialState) {\r\n\t\t\tconst diremuckBuff = minion.cardId === CardIds.DiremuckForager_BG27_556_G ? 4 : 2;\r\n\t\t\tmodifyStats(target, diremuckBuff, diremuckBuff, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\tminion,\r\n\t\t\t\ttarget,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t);\r\n\t\t\t// }\r\n\t\t\tif (input.playerBoard.length < 7) {\r\n\t\t\t\ttarget.locked = true;\r\n\t\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\t\ttarget.cardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\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{ ...target } as BoardEntity,\r\n\t\t\t\t);\r\n\t\t\t\tfor (const s of newMinions) {\r\n\t\t\t\t\ts.onCanceledSummon = () => (target.locked = false);\r\n\t\t\t\t}\r\n\t\t\t\tperformEntitySpawns(\r\n\t\t\t\t\tnewMinions,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tinput.playerBoard.length - (input.playerBoard.indexOf(minion) + 1),\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -11,7 +11,8 @@ exports.SaltyHog = {
|
|
|
11
11
|
const mult = entity.cardId === "BG31_332_G" ? 2 : 1;
|
|
12
12
|
const targets = input.board.filter((e) => e.entityId !== entity.entityId);
|
|
13
13
|
for (const target of targets) {
|
|
14
|
-
(0, stats_1.modifyStats)(target,
|
|
14
|
+
(0, stats_1.modifyStats)(target, 1 * mult, 1 * mult, input.board, input.hero, input.gameState);
|
|
15
|
+
input.gameState.spectator.registerPowerTarget(entity, target, input.board, input.hero, null);
|
|
15
16
|
}
|
|
16
17
|
entity.abiityChargesLeft = 3;
|
|
17
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salty-hog.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/salty-hog.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,QAAQ,GAA+C;IACnE,OAAO,EAAE,0BAAwD;IACjE,cAAc,EAAE,CAAC,MAAmB,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;IAC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C,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1E,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC7B,IAAA,mBAAW,EAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBAClF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aAC7F;YACD,MAAM,CAAC,iBAAiB,GAAG,CAAC,CAAC;SAC7B;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnCardAddedToHandInput } from '../../../simulation/cards-in-hand';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { DefaultChargesCard, OnCardAddedToHandCard } from '../../card.interface';\r\n\r\nexport const SaltyHog: OnCardAddedToHandCard & DefaultChargesCard = {\r\n\tcardIds: [CardIds.SaltyHog_BG31_332, CardIds.SaltyHog_BG31_332_G],\r\n\tdefaultCharges: (entity: BoardEntity) => entity.scriptDataNum1 || 3,\r\n\tonCardAddedToHand: (entity: BoardEntity, input: OnCardAddedToHandInput) => {\r\n\t\tentity.abiityChargesLeft = entity.abiityChargesLeft - 1;\r\n\t\tif (entity.abiityChargesLeft <= 0) {\r\n\t\t\tconst mult = entity.cardId === CardIds.SaltyHog_BG31_332_G ? 2 : 1;\r\n\t\t\tconst targets = input.board.filter((e) => e.entityId !== entity.entityId);\r\n\t\t\tfor (const target of targets) {\r\n\t\t\t\tmodifyStats(target, 1 * mult, 1 * mult, input.board, input.hero, input.gameState);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(entity, target, input.board, input.hero, null);\r\n\t\t\t}\r\n\t\t\tentity.abiityChargesLeft = 3;\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StitchedSalvager = void 0;
|
|
4
|
+
const add_minion_to_board_1 = require("../../../simulation/add-minion-to-board");
|
|
4
5
|
const utils_1 = require("../../../utils");
|
|
5
6
|
exports.StitchedSalvager = {
|
|
6
7
|
cardIds: ["BG31_999", "BG31_999_G"],
|
|
@@ -16,16 +17,26 @@ exports.StitchedSalvager = {
|
|
|
16
17
|
if (!targets.length) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
minion.memory = targets.map((t) =>
|
|
20
|
+
minion.memory = targets.map((t) => {
|
|
21
|
+
const copy = (0, utils_1.copyEntity)(t);
|
|
22
|
+
(0, add_minion_to_board_1.removeAurasFromSelf)(copy, input.playerBoard, input.playerEntity, input.gameState);
|
|
23
|
+
return copy;
|
|
24
|
+
});
|
|
20
25
|
for (const target of targets) {
|
|
21
26
|
target.definitelyDead = true;
|
|
22
|
-
input.gameState.spectator.registerPowerTarget(
|
|
27
|
+
input.gameState.spectator.registerPowerTarget(minion, target, input.playerBoard, input.playerEntity, input.opponentEntity);
|
|
23
28
|
}
|
|
24
29
|
return { hasTriggered: true, shouldRecomputeCurrentAttacker: true };
|
|
25
30
|
},
|
|
26
31
|
deathrattleSpawn: (minion, input) => {
|
|
27
32
|
var _a;
|
|
28
|
-
|
|
33
|
+
const spawns = ((_a = minion.memory) !== null && _a !== void 0 ? _a : []).map((e) => {
|
|
34
|
+
return (0, utils_1.copyEntity)({
|
|
35
|
+
...e,
|
|
36
|
+
entityId: input.gameState.sharedState.currentEntityId++,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
return spawns;
|
|
29
40
|
},
|
|
30
41
|
};
|
|
31
42
|
//# sourceMappingURL=stitched-salvager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stitched-salvager.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/stitched-salvager.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"stitched-salvager.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/stitched-salvager.ts"],"names":[],"mappings":";;;AAEA,iFAA8E;AAG9E,0CAA4C;AAG/B,QAAA,gBAAgB,GAA6C;IACzE,OAAO,EAAE,0BAAwE;IACjF,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,IAAI,WAAW,GAAG,CAAC,EAAE;YACpB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;SACjD;QACD,IAAI,MAAM,CAAC,MAAM,iBAAwC,IAAI,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACxG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;SACjD;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACpB,OAAO;SACP;QAED,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACjC,MAAM,IAAI,GAAG,IAAA,kBAAU,EAAC,CAAC,CAAC,CAAC;YAC3B,IAAA,yCAAmB,EAAC,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;YAClF,OAAO,IAAI,CAAC;QACb,CAAC,CAA2B,CAAC;QAC7B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC7B,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;YAC7B,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;SACF;QACD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;IACrE,CAAC;IACD,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAA0B,EAAE;;QACnG,MAAM,MAAM,GAAkB,CAAC,MAAA,MAAM,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAC7D,OAAO,IAAA,kBAAU,EAAC;gBACjB,GAAG,CAAC;gBACJ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,EAAE;aACvD,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IACf,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { removeAurasFromSelf } from '../../../simulation/add-minion-to-board';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { copyEntity } from '../../../utils';\r\nimport { DeathrattleSpawnCard, StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const StitchedSalvager: StartOfCombatCard & DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.StitchedSalvager_BG31_999, CardIds.StitchedSalvager_BG31_999_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst minionIndex = input.playerBoard.indexOf(minion);\r\n\t\tconst targets = [];\r\n\t\tif (minionIndex > 0) {\r\n\t\t\ttargets.push(input.playerBoard[minionIndex - 1]);\r\n\t\t}\r\n\t\tif (minion.cardId === CardIds.StitchedSalvager_BG31_999_G && minionIndex < input.playerBoard.length - 1) {\r\n\t\t\ttargets.push(input.playerBoard[minionIndex + 1]);\r\n\t\t}\r\n\t\tif (!targets.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tminion.memory = targets.map((t) => {\r\n\t\t\tconst copy = copyEntity(t);\r\n\t\t\tremoveAurasFromSelf(copy, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t\treturn copy;\r\n\t\t}) as readonly BoardEntity[];\r\n\t\tfor (const target of targets) {\r\n\t\t\ttarget.definitelyDead = true;\r\n\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\tminion,\r\n\t\t\t\ttarget,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t},\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput): readonly BoardEntity[] => {\r\n\t\tconst spawns: BoardEntity[] = (minion.memory ?? []).map((e) => {\r\n\t\t\treturn copyEntity({\r\n\t\t\t\t...e,\r\n\t\t\t\tentityId: input.gameState.sharedState.currentEntityId++,\r\n\t\t\t});\r\n\t\t});\r\n\t\treturn spawns;\r\n\t},\r\n};\r\n"]}
|
|
@@ -14,7 +14,7 @@ exports.Zergling = {
|
|
|
14
14
|
if (input.playerBoard.length < 7) {
|
|
15
15
|
const copy = (0, utils_1.copyEntity)(minion);
|
|
16
16
|
(0, add_minion_to_board_1.removeAurasFromSelf)(copy, input.playerBoard, input.playerEntity, input.gameState);
|
|
17
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
17
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, input.playerEntity.friendly, false, false, false, copy);
|
|
18
18
|
const indexFromRight = input.playerBoard.length - input.playerBoard.indexOf(minion) - 1;
|
|
19
19
|
const spawns = (0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, input.playerEntity, indexFromRight, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
20
20
|
hasTriggered = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zergling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/zergling.ts"],"names":[],"mappings":";;;AAEA,iFAA8E;AAC9E,+EAAuE;AACvE,uDAAiE;AAEjE,0CAA4C;AAG/B,QAAA,QAAQ,GAAsB;IAC1C,OAAO,EAAE,wCAAiG;IAC1G,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,wBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,MAAM,IAAI,GAAG,IAAA,kBAAU,EAAC,MAAM,CAAC,CAAC;gBAChC,IAAA,yCAAmB,EAAC,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBAClF,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,IAAI,CAAC,MAAM,EACX,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,
|
|
1
|
+
{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ClB,KAAK,CAAC,YAAY,EAClB,cAAc,EACd,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,YAAY,GAAG,IAAI,CAAC;aACpB;SACD;QACD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,8BAA8B,EAAE,YAAY,EAAE,CAAC;IACrF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { removeAurasFromSelf } from '../../../simulation/add-minion-to-board';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { copyEntity } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const Zergling: StartOfCombatCard = {\r\n\tcardIds: [CardIds.KerriganQueenOfBlades_ZerglingToken_BG31_HERO_811t2, CardIds.Zergling_BG31_HERO_811t2_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tlet hasTriggered = false;\r\n\t\tconst loops = minion.cardId === CardIds.Zergling_BG31_HERO_811t2_G ? 2 : 1;\r\n\t\tfor (let i = 0; i < loops; i++) {\r\n\t\t\tif (input.playerBoard.length < 7) {\r\n\t\t\t\tconst copy = copyEntity(minion);\r\n\t\t\t\tremoveAurasFromSelf(copy, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\t\tcopy.cardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tcopy,\r\n\t\t\t\t);\r\n\t\t\t\tconst indexFromRight = input.playerBoard.length - input.playerBoard.indexOf(minion) - 1;\r\n\t\t\t\tconst spawns = performEntitySpawns(\r\n\t\t\t\t\tnewMinions,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tindexFromRight,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\thasTriggered = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn { hasTriggered: hasTriggered, shouldRecomputeCurrentAttacker: hasTriggered };\r\n\t},\r\n};\r\n"]}
|
|
@@ -11,7 +11,7 @@ exports.EvilTwin = {
|
|
|
11
11
|
...highestHealthMinion,
|
|
12
12
|
lastAffectedByEntity: null,
|
|
13
13
|
};
|
|
14
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
14
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, highestHealthMinion.friendly, true, false, false, copy);
|
|
15
15
|
const indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(highestHealthMinion) + 1);
|
|
16
16
|
const actualSpawns = (0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, highestHealthMinion, indexFromRight, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
17
17
|
input.gameState.spectator.registerPowerTarget(input.playerEntity, copy, input.playerBoard, null, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evil-twin.js","sourceRoot":"","sources":["../../../../src/cards/impl/quest-reward/evil-twin.ts"],"names":[],"mappings":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KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YAC9B,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SACtG;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const EvilTwin = {\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tif (!!input.playerBoard.length && input.playerBoard.length < 7) {\r\n\t\t\tconst highestHealthMinion = [...input.playerBoard].sort((a, b) => b.health - a.health)[0];\r\n\t\t\tconst copy: BoardEntity = {\r\n\t\t\t\t...highestHealthMinion,\r\n\t\t\t\tlastAffectedByEntity: null,\r\n\t\t\t};\r\n\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\tcopy.cardId,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\thighestHealthMinion.friendly,\r\n\t\t\t\ttrue,\r\n\t\t\t\tfalse,\r\n\t\t\t\tfalse,\r\n\t\t\t\tcopy,\r\n\t\t\t);\r\n\t\t\tconst indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(highestHealthMinion) + 1);\r\n\t\t\tconst actualSpawns = performEntitySpawns(\r\n\t\t\t\tnewMinions,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\thighestHealthMinion,\r\n\t\t\t\tindexFromRight,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\tinput.gameState.spectator.registerPowerTarget(input.playerEntity, copy, input.playerBoard, null, null);\r\n\t\t\t// Recompute first attacker\r\n\t\t\t// See https://replays.firestoneapp.com/?reviewId=93229c4a-d864-4196-83dd-2fea2a5bf70a&turn=29&action=0\r\n\t\t\tinput.currentAttacker =\r\n\t\t\t\tinput.playerBoard.length > input.opponentBoard.length\r\n\t\t\t\t\t? input.playerIsFriendly\r\n\t\t\t\t\t\t? 0\r\n\t\t\t\t\t\t: 1\r\n\t\t\t\t\t: input.opponentBoard.length > input.playerBoard.length\r\n\t\t\t\t\t? input.playerIsFriendly\r\n\t\t\t\t\t\t? 1\r\n\t\t\t\t\t\t: 0\r\n\t\t\t\t\t: Math.round(Math.random());\r\n\t\t\treturn actualSpawns.length > 0 ? { hasTriggered: true, shouldRecomputeCurrentAttacker: true } : false;\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -7,7 +7,7 @@ exports.AutomatonPortrait = {
|
|
|
7
7
|
cardIds: ["BG30_MagicItem_303"],
|
|
8
8
|
startOfCombat: (trinket, input) => {
|
|
9
9
|
if (input.playerBoard.length < 7) {
|
|
10
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)("BG_TTN_401", 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
10
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)("BG_TTN_401", 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, input.playerEntity.friendly, false);
|
|
11
11
|
(0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, input.playerEntity, 0, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
12
12
|
return { hasTriggered: true, shouldRecomputeCurrentAttacker: true };
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automaton-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/automaton-portrait.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAIpD,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,sBAA8C;IACvD,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,MAAM,UAAU,GAAG,IAAA,kCAAa,gBAE/B,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"automaton-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/automaton-portrait.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAIpD,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,sBAA8C;IACvD,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,MAAM,UAAU,GAAG,IAAA,kCAAa,gBAE/B,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,CAAC,QAAQ,EAC3B,KAAK,CACL,CAAC;YACF,IAAA,4BAAmB,EAClB,UAAU,EACV,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,YAAY,EAClB,CAAC,EACD,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;YACF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;SACpE;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const AutomatonPortrait: StartOfCombatCard = {\r\n\tcardIds: [CardIds.AutomatonPortrait_BG30_MagicItem_303],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tif (input.playerBoard.length < 7) {\r\n\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\tCardIds.AstralAutomaton_BG_TTN_401,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\t\t\tperformEntitySpawns(\r\n\t\t\t\tnewMinions,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\t0,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -9,7 +9,7 @@ exports.FishySticker = {
|
|
|
9
9
|
const spawnId = trinket.cardId === "BG30_MagicItem_821"
|
|
10
10
|
? "TB_BaconShop_HP_105t"
|
|
11
11
|
: "TB_BaconUps_307";
|
|
12
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(spawnId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
12
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(spawnId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, input.playerEntity.friendly, false);
|
|
13
13
|
const spawns = (0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, input.playerEntity, 0, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
14
14
|
return { hasTriggered: true, shouldRecomputeCurrentAttacker: true };
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fishy-sticker.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/fishy-sticker.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,YAAY,GAAG;IAC3B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,MAAM,OAAO,GACZ,OAAO,CAAC,MAAM,yBAA4C;gBACzD,CAAC;gBACD,CAAC,kBAAoB,CAAC;YACxB,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,OAAO,EACP,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"fishy-sticker.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/fishy-sticker.ts"],"names":[],"mappings":";;;AAEA,+EAAuE;AACvE,uDAAiE;AAGpD,QAAA,YAAY,GAAG;IAC3B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,MAAM,OAAO,GACZ,OAAO,CAAC,MAAM,yBAA4C;gBACzD,CAAC;gBACD,CAAC,kBAAoB,CAAC;YACxB,MAAM,UAAU,GAAG,IAAA,kCAAa,EAC/B,OAAO,EACP,CAAC,EACD,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,CAAC,QAAQ,EAC3B,KAAK,CACL,CAAC;YACF,MAAM,MAAM,GAAG,IAAA,4BAAmB,EACjC,UAAU,EACV,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,YAAY,EAClB,CAAC,EACD,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;YACF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;SACpE;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const FishySticker = {\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tif (input.playerBoard.length < 7) {\r\n\t\t\tconst spawnId =\r\n\t\t\t\ttrinket.cardId === CardIds.FishySticker_BG30_MagicItem_821\r\n\t\t\t\t\t? CardIds.AvatarOfNzoth_FishOfNzothToken\r\n\t\t\t\t\t: CardIds.FishOfNzoth;\r\n\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\tspawnId,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\t\t\tconst spawns = performEntitySpawns(\r\n\t\t\t\tnewMinions,\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\t0,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -18,7 +18,7 @@ exports.KarazhanChessSet = {
|
|
|
18
18
|
const entityToCoy = input.playerBoard[i];
|
|
19
19
|
const copy = (0, utils_1.copyEntity)(entityToCoy);
|
|
20
20
|
(0, add_minion_to_board_1.removeAurasFromSelf)(copy, input.playerBoard, input.playerEntity, input.gameState);
|
|
21
|
-
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState
|
|
21
|
+
const newMinions = (0, deathrattle_spawns_1.spawnEntities)(copy.cardId, 1, input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState, input.playerEntity.friendly, false, false, false, copy);
|
|
22
22
|
const spawns = (0, spawns_1.performEntitySpawns)(newMinions, input.playerBoard, input.playerEntity, input.playerEntity, input.playerBoard.length - i - 1, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
23
23
|
i += spawns.length;
|
|
24
24
|
minionsToCopy--;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"karazhan-chess-set.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/karazhan-chess-set.ts"],"names":[],"mappings":";;;AAGA,iFAA8E;AAC9E,+EAAuE;AACvE,uDAAiE;AAEjE,0CAA4C;AAG/B,QAAA,gBAAgB,GAAsB;IAClD,OAAO,EAAE,sBAA6C;IACtD,aAAa,EA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ds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { removeAurasFromSelf } from '../../../simulation/add-minion-to-board';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { copyEntity } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const KarazhanChessSet: StartOfCombatCard = {\r\n\tcardIds: [CardIds.KarazhanChessSet_BG30_MagicItem_972],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tlet hasTriggered = false;\r\n\t\tif (input.playerBoard.length > 0) {\r\n\t\t\tlet minionsToCopy = 1;\r\n\t\t\tfor (let i = 0; i < Math.min(input.playerBoard.length, 7); i++) {\r\n\t\t\t\tif (minionsToCopy <= 0) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst entityToCoy = input.playerBoard[i];\r\n\t\t\t\tconst copy: BoardEntity = copyEntity(entityToCoy);\r\n\t\t\t\tremoveAurasFromSelf(copy, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t\t\tconst newMinions = spawnEntities(\r\n\t\t\t\t\tcopy.cardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tcopy,\r\n\t\t\t\t);\r\n\t\t\t\tconst spawns = performEntitySpawns(\r\n\t\t\t\t\tnewMinions,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.playerBoard.length - i - 1,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\t// TODO: according to http://replays.firestoneapp.com/?reviewId=576aa3bb-caa1-4e46-9d16-08a001fdd941&turn=23&action=3\r\n\t\t\t\t// it looks like the stats are simply copied from the original entity to the copy, instead\r\n\t\t\t\t// of summoning a copy and applying all the auras stuff\r\n\t\t\t\t// I've asked on Discord (2024-08-21) for clarification\r\n\t\t\t\ti += spawns.length;\r\n\t\t\t\tminionsToCopy--;\r\n\t\t\t\thasTriggered = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn { hasTriggered: hasTriggered, shouldRecomputeCurrentAttacker: hasTriggered };\r\n\t},\r\n};\r\n"]}
|