@firestone-hs/simulate-bgs-battle 1.1.501 → 1.1.502
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/bgs-player-entity.d.ts +6 -0
- package/dist/bgs-player-entity.js.map +1 -1
- package/dist/cards/card.interface.d.ts +110 -1
- package/dist/cards/card.interface.js +45 -0
- package/dist/cards/card.interface.js.map +1 -1
- package/dist/cards/cards-data.d.ts +5 -1
- package/dist/cards/cards-data.js +39 -6
- package/dist/cards/cards-data.js.map +1 -1
- package/dist/cards/impl/_card-mappings.d.ts +4 -0
- package/dist/cards/impl/_card-mappings.js +120 -0
- package/dist/cards/impl/_card-mappings.js.map +1 -0
- package/dist/cards/impl/anomaly/blessed-or-blighted.js +3 -2
- package/dist/cards/impl/anomaly/blessed-or-blighted.js.map +1 -1
- package/dist/cards/impl/bg-spell/boon-of-beetles.js +1 -1
- package/dist/cards/impl/bg-spell/boon-of-beetles.js.map +1 -1
- package/dist/cards/impl/enchantments/crystal-infuser-enchantment.d.ts +2 -0
- package/dist/cards/impl/enchantments/crystal-infuser-enchantment.js +16 -0
- package/dist/cards/impl/enchantments/crystal-infuser-enchantment.js.map +1 -0
- package/dist/cards/impl/hero-power/reborn-rites.js +2 -1
- package/dist/cards/impl/hero-power/reborn-rites.js.map +1 -1
- package/dist/cards/impl/hero-power/swatting-insects.js +5 -3
- package/dist/cards/impl/hero-power/swatting-insects.js.map +1 -1
- package/dist/cards/impl/hero-power/water-invocation.js +1 -1
- package/dist/cards/impl/hero-power/water-invocation.js.map +1 -1
- package/dist/cards/impl/minion/amber-guardian.js +1 -1
- package/dist/cards/impl/minion/amber-guardian.js.map +1 -1
- package/dist/cards/impl/minion/arcane-cannoneer.d.ts +2 -0
- package/dist/cards/impl/minion/arcane-cannoneer.js +15 -0
- package/dist/cards/impl/minion/arcane-cannoneer.js.map +1 -0
- package/dist/cards/impl/minion/bannerboar.d.ts +2 -0
- package/dist/cards/impl/minion/bannerboar.js +16 -0
- package/dist/cards/impl/minion/bannerboar.js.map +1 -0
- package/dist/cards/impl/minion/beetle.d.ts +2 -0
- package/dist/cards/impl/minion/beetle.js +16 -0
- package/dist/cards/impl/minion/beetle.js.map +1 -0
- package/dist/cards/impl/minion/bird-buddy.d.ts +2 -0
- package/dist/cards/impl/minion/bird-buddy.js +14 -0
- package/dist/cards/impl/minion/bird-buddy.js.map +1 -0
- package/dist/cards/impl/minion/boar-gamer.d.ts +2 -0
- package/dist/cards/impl/minion/boar-gamer.js +12 -0
- package/dist/cards/impl/minion/boar-gamer.js.map +1 -0
- package/dist/cards/impl/minion/bubble-gunner.d.ts +2 -0
- package/dist/cards/impl/minion/bubble-gunner.js +44 -0
- package/dist/cards/impl/minion/bubble-gunner.js.map +1 -0
- package/dist/cards/impl/minion/buzzing-vermin.d.ts +2 -0
- package/dist/cards/impl/minion/buzzing-vermin.js +12 -0
- package/dist/cards/impl/minion/buzzing-vermin.js.map +1 -0
- package/dist/cards/impl/minion/cadaver-caretaker.d.ts +2 -0
- package/dist/cards/impl/minion/cadaver-caretaker.js +12 -0
- package/dist/cards/impl/minion/cadaver-caretaker.js.map +1 -0
- package/dist/cards/impl/minion/deathly-striker.d.ts +2 -0
- package/dist/cards/impl/minion/deathly-striker.js +32 -0
- package/dist/cards/impl/minion/deathly-striker.js.map +1 -0
- package/dist/cards/impl/minion/efficient-engineer.d.ts +2 -0
- package/dist/cards/impl/minion/efficient-engineer.js +24 -0
- package/dist/cards/impl/minion/efficient-engineer.js.map +1 -0
- package/dist/cards/impl/minion/electric-synthesizer.d.ts +2 -0
- package/dist/cards/impl/minion/electric-synthesizer.js +24 -0
- package/dist/cards/impl/minion/electric-synthesizer.js.map +1 -0
- package/dist/cards/impl/minion/fairy-gillmother.d.ts +2 -0
- package/dist/cards/impl/minion/fairy-gillmother.js +18 -0
- package/dist/cards/impl/minion/fairy-gillmother.js.map +1 -0
- package/dist/cards/impl/minion/forest-rover.d.ts +2 -0
- package/dist/cards/impl/minion/forest-rover.js +23 -0
- package/dist/cards/impl/minion/forest-rover.js.map +1 -0
- package/dist/cards/impl/minion/fountain-chiller.d.ts +2 -0
- package/dist/cards/impl/minion/fountain-chiller.js +27 -0
- package/dist/cards/impl/minion/fountain-chiller.js.map +1 -0
- package/dist/cards/impl/minion/gem-rat.d.ts +2 -0
- package/dist/cards/impl/minion/gem-rat.js +12 -0
- package/dist/cards/impl/minion/gem-rat.js.map +1 -0
- package/dist/cards/impl/minion/gentle-djinni.d.ts +2 -0
- package/dist/cards/impl/minion/gentle-djinni.js +25 -0
- package/dist/cards/impl/minion/gentle-djinni.js.map +1 -0
- package/dist/cards/impl/minion/goldrinn-the-great-wolf.d.ts +2 -0
- package/dist/cards/impl/minion/goldrinn-the-great-wolf.js +15 -0
- package/dist/cards/impl/minion/goldrinn-the-great-wolf.js.map +1 -0
- package/dist/cards/impl/minion/gritty-headhunter.d.ts +2 -0
- package/dist/cards/impl/minion/gritty-headhunter.js +14 -0
- package/dist/cards/impl/minion/gritty-headhunter.js.map +1 -0
- package/dist/cards/impl/minion/hackerfin.d.ts +2 -0
- package/dist/cards/impl/minion/hackerfin.js +21 -0
- package/dist/cards/impl/minion/hackerfin.js.map +1 -0
- package/dist/cards/impl/minion/handless-forsaken.d.ts +2 -0
- package/dist/cards/impl/minion/handless-forsaken.js +12 -0
- package/dist/cards/impl/minion/handless-forsaken.js.map +1 -0
- package/dist/cards/impl/minion/harmless-bonehead.d.ts +2 -0
- package/dist/cards/impl/minion/harmless-bonehead.js +12 -0
- package/dist/cards/impl/minion/harmless-bonehead.js.map +1 -0
- package/dist/cards/impl/minion/holo-rover.d.ts +2 -0
- package/dist/cards/impl/minion/holo-rover.js +16 -0
- package/dist/cards/impl/minion/holo-rover.js.map +1 -0
- package/dist/cards/impl/minion/humming-bird.d.ts +2 -5
- package/dist/cards/impl/minion/humming-bird.js +1 -0
- package/dist/cards/impl/minion/humming-bird.js.map +1 -1
- package/dist/cards/impl/minion/hungry-snapjaw.d.ts +2 -0
- package/dist/cards/impl/minion/hungry-snapjaw.js +17 -0
- package/dist/cards/impl/minion/hungry-snapjaw.js.map +1 -0
- package/dist/cards/impl/minion/implant-subject.d.ts +2 -0
- package/dist/cards/impl/minion/implant-subject.js +42 -0
- package/dist/cards/impl/minion/implant-subject.js.map +1 -0
- package/dist/cards/impl/minion/indomitable-mount.d.ts +2 -0
- package/dist/cards/impl/minion/indomitable-mount.js +23 -0
- package/dist/cards/impl/minion/indomitable-mount.js.map +1 -0
- package/dist/cards/impl/minion/interrogator-whitemane.js +5 -4
- package/dist/cards/impl/minion/interrogator-whitemane.js.map +1 -1
- package/dist/cards/impl/minion/karmic-chameleon.d.ts +2 -0
- package/dist/cards/impl/minion/karmic-chameleon.js +27 -0
- package/dist/cards/impl/minion/karmic-chameleon.js.map +1 -0
- package/dist/cards/impl/minion/manasaber.d.ts +2 -0
- package/dist/cards/impl/minion/manasaber.js +14 -0
- package/dist/cards/impl/minion/manasaber.js.map +1 -0
- package/dist/cards/impl/minion/mantid-queen.js +6 -3
- package/dist/cards/impl/minion/mantid-queen.js.map +1 -1
- package/dist/cards/impl/minion/marquee-ticker.d.ts +2 -0
- package/dist/cards/impl/minion/marquee-ticker.js +12 -0
- package/dist/cards/impl/minion/marquee-ticker.js.map +1 -0
- package/dist/cards/impl/minion/mechanized-gift-horse.d.ts +2 -0
- package/dist/cards/impl/minion/mechanized-gift-horse.js +13 -0
- package/dist/cards/impl/minion/mechanized-gift-horse.js.map +1 -0
- package/dist/cards/impl/minion/mechorse.d.ts +2 -0
- package/dist/cards/impl/minion/mechorse.js +16 -0
- package/dist/cards/impl/minion/mechorse.js.map +1 -0
- package/dist/cards/impl/minion/moonsteel-juggernaut.d.ts +2 -0
- package/dist/cards/impl/minion/moonsteel-juggernaut.js +15 -0
- package/dist/cards/impl/minion/moonsteel-juggernaut.js.map +1 -0
- package/dist/cards/impl/minion/mutated-lasher.d.ts +2 -0
- package/dist/cards/impl/minion/mutated-lasher.js +26 -0
- package/dist/cards/impl/minion/mutated-lasher.js.map +1 -0
- package/dist/cards/impl/minion/neon-agent.d.ts +2 -0
- package/dist/cards/impl/minion/neon-agent.js +18 -0
- package/dist/cards/impl/minion/neon-agent.js.map +1 -0
- package/dist/cards/impl/minion/nest-swarmer.d.ts +2 -0
- package/dist/cards/impl/minion/nest-swarmer.js +12 -0
- package/dist/cards/impl/minion/nest-swarmer.js.map +1 -0
- package/dist/cards/impl/minion/nether-drake.d.ts +2 -0
- package/dist/cards/impl/minion/nether-drake.js +15 -0
- package/dist/cards/impl/minion/nether-drake.js.map +1 -0
- package/dist/cards/impl/minion/niuzao.d.ts +2 -0
- package/dist/cards/impl/minion/niuzao.js +21 -0
- package/dist/cards/impl/minion/niuzao.js.map +1 -0
- package/dist/cards/impl/minion/outback-smolderer.d.ts +2 -0
- package/dist/cards/impl/minion/outback-smolderer.js +17 -0
- package/dist/cards/impl/minion/outback-smolderer.js.map +1 -0
- package/dist/cards/impl/minion/razorgore-the-untamed.d.ts +2 -0
- package/dist/cards/impl/minion/razorgore-the-untamed.js +20 -0
- package/dist/cards/impl/minion/razorgore-the-untamed.js.map +1 -0
- package/dist/cards/impl/minion/reckless-cliffdiver.d.ts +2 -0
- package/dist/cards/impl/minion/reckless-cliffdiver.js +19 -0
- package/dist/cards/impl/minion/reckless-cliffdiver.js.map +1 -0
- package/dist/cards/impl/minion/runed-progenitor.d.ts +2 -0
- package/dist/cards/impl/minion/runed-progenitor.js +24 -0
- package/dist/cards/impl/minion/runed-progenitor.js.map +1 -0
- package/dist/cards/impl/minion/rylak-metalhead.d.ts +2 -0
- package/dist/cards/impl/minion/rylak-metalhead.js +22 -0
- package/dist/cards/impl/minion/rylak-metalhead.js.map +1 -0
- package/dist/cards/impl/minion/salty-hog.d.ts +2 -0
- package/dist/cards/impl/minion/salty-hog.js +17 -0
- package/dist/cards/impl/minion/salty-hog.js.map +1 -0
- package/dist/cards/impl/minion/showy-cyclist.d.ts +2 -0
- package/dist/cards/impl/minion/showy-cyclist.js +14 -0
- package/dist/cards/impl/minion/showy-cyclist.js.map +1 -0
- package/dist/cards/impl/minion/silver-handed-recruit.d.ts +2 -0
- package/dist/cards/impl/minion/silver-handed-recruit.js +17 -0
- package/dist/cards/impl/minion/silver-handed-recruit.js.map +1 -0
- package/dist/cards/impl/minion/sly-raptor.d.ts +2 -0
- package/dist/cards/impl/minion/sly-raptor.js +18 -0
- package/dist/cards/impl/minion/sly-raptor.js.map +1 -0
- package/dist/cards/impl/minion/soulsplitter.js +2 -1
- package/dist/cards/impl/minion/soulsplitter.js.map +1 -1
- package/dist/cards/impl/minion/spacefarer.d.ts +2 -0
- package/dist/cards/impl/minion/spacefarer.js +20 -0
- package/dist/cards/impl/minion/spacefarer.js.map +1 -0
- package/dist/cards/impl/minion/sun-screener.js +1 -1
- package/dist/cards/impl/minion/sun-screener.js.map +1 -1
- package/dist/cards/impl/minion/thousandth-paper-drake.js +2 -1
- package/dist/cards/impl/minion/thousandth-paper-drake.js.map +1 -1
- package/dist/cards/impl/minion/turquoise-skitterer.d.ts +2 -0
- package/dist/cards/impl/minion/turquoise-skitterer.js +25 -0
- package/dist/cards/impl/minion/turquoise-skitterer.js.map +1 -0
- package/dist/cards/impl/minion/twilight-primordium.d.ts +2 -0
- package/dist/cards/impl/minion/twilight-primordium.js +24 -0
- package/dist/cards/impl/minion/twilight-primordium.js.map +1 -0
- package/dist/cards/impl/minion/ultraviolet-ascendant.d.ts +2 -0
- package/dist/cards/impl/minion/ultraviolet-ascendant.js +14 -0
- package/dist/cards/impl/minion/ultraviolet-ascendant.js.map +1 -0
- package/dist/cards/impl/minion/wandering-wight.d.ts +2 -0
- package/dist/cards/impl/minion/wandering-wight.js +12 -0
- package/dist/cards/impl/minion/wandering-wight.js.map +1 -0
- package/dist/cards/impl/minion/wisp-in-the-shell.d.ts +2 -0
- package/dist/cards/impl/minion/wisp-in-the-shell.js +19 -0
- package/dist/cards/impl/minion/wisp-in-the-shell.js.map +1 -0
- package/dist/cards/impl/trinket/eternal-portrait.js +4 -2
- package/dist/cards/impl/trinket/eternal-portrait.js.map +1 -1
- package/dist/cards/impl/trinket/holly-mallet.js +1 -1
- package/dist/cards/impl/trinket/holly-mallet.js.map +1 -1
- package/dist/{divine-shield.d.ts → keywords/divine-shield.d.ts} +9 -3
- package/dist/{divine-shield.js → keywords/divine-shield.js} +17 -4
- package/dist/keywords/divine-shield.js.map +1 -0
- package/dist/keywords/reborn.d.ts +10 -0
- package/dist/keywords/reborn.js +22 -0
- package/dist/keywords/reborn.js.map +1 -0
- package/dist/keywords/stealth.d.ts +10 -0
- package/dist/keywords/stealth.js +22 -0
- package/dist/keywords/stealth.js.map +1 -0
- package/dist/keywords/taunt.d.ts +10 -0
- package/dist/keywords/taunt.js +22 -0
- package/dist/keywords/taunt.js.map +1 -0
- package/dist/keywords/venomous.d.ts +10 -0
- package/dist/keywords/venomous.js +33 -0
- package/dist/keywords/venomous.js.map +1 -0
- package/dist/keywords/windfury.d.ts +10 -0
- package/dist/keywords/windfury.js +22 -0
- package/dist/keywords/windfury.js.map +1 -0
- package/dist/simulate-bgs-battle.d.ts +2 -2
- package/dist/simulate-bgs-battle.js +19 -2
- package/dist/simulate-bgs-battle.js.map +1 -1
- package/dist/simulation/add-minion-to-board.d.ts +16 -0
- package/dist/simulation/add-minion-to-board.js +40 -11
- package/dist/simulation/add-minion-to-board.js.map +1 -1
- package/dist/simulation/after-attack.js +2 -1
- package/dist/simulation/after-attack.js.map +1 -1
- package/dist/simulation/attack.js +7 -24
- package/dist/simulation/attack.js.map +1 -1
- package/dist/simulation/auras.d.ts +1 -1
- package/dist/simulation/auras.js +21 -15
- package/dist/simulation/auras.js.map +1 -1
- package/dist/simulation/avenge.d.ts +7 -0
- package/dist/simulation/avenge.js +223 -229
- package/dist/simulation/avenge.js.map +1 -1
- package/dist/simulation/battlecries.d.ts +8 -0
- package/dist/simulation/battlecries.js +634 -609
- package/dist/simulation/battlecries.js.map +1 -1
- package/dist/simulation/blood-gems.js +1 -1
- package/dist/simulation/blood-gems.js.map +1 -1
- package/dist/simulation/cards-in-hand.d.ts +7 -1
- package/dist/simulation/cards-in-hand.js +14 -0
- package/dist/simulation/cards-in-hand.js.map +1 -1
- package/dist/simulation/damage-effects.js +1 -1
- package/dist/simulation/damage-effects.js.map +1 -1
- package/dist/simulation/deathrattle-effects.d.ts +1 -1
- package/dist/simulation/deathrattle-effects.js +498 -516
- package/dist/simulation/deathrattle-effects.js.map +1 -1
- package/dist/simulation/deathrattle-on-trigger.d.ts +1 -0
- package/dist/simulation/deathrattle-on-trigger.js.map +1 -1
- package/dist/simulation/deathrattle-spawns.d.ts +2 -0
- package/dist/simulation/deathrattle-spawns.js +324 -384
- package/dist/simulation/deathrattle-spawns.js.map +1 -1
- package/dist/simulation/deathrattle-utils.js +1 -1
- package/dist/simulation/deathrattle-utils.js.map +1 -1
- package/dist/simulation/frenzy.js +1 -1
- package/dist/simulation/frenzy.js.map +1 -1
- package/dist/simulation/magnetize.js.map +1 -1
- package/dist/simulation/on-attack.d.ts +13 -1
- package/dist/simulation/on-attack.js +21 -1
- package/dist/simulation/on-attack.js.map +1 -1
- package/dist/simulation/on-being-attacked.js +7 -4
- package/dist/simulation/on-being-attacked.js.map +1 -1
- package/dist/simulation/simulator.js +1 -1
- package/dist/simulation/simulator.js.map +1 -1
- package/dist/simulation/start-of-combat/soc-action-processor.js +6 -4
- package/dist/simulation/start-of-combat/soc-action-processor.js.map +1 -1
- package/dist/simulation/stats.d.ts +8 -0
- package/dist/simulation/stats.js +21 -4
- package/dist/simulation/stats.js.map +1 -1
- package/dist/temp-card-ids.d.ts +70 -0
- package/dist/temp-card-ids.js.map +1 -1
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +30 -36
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
- package/dist/divine-shield.js.map +0 -1
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateAvengeCounters = exports.applyAvengeEffects = void 0;
|
|
4
4
|
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
-
const
|
|
5
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
6
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
7
|
+
const divine_shield_1 = require("../keywords/divine-shield");
|
|
8
|
+
const reborn_1 = require("../keywords/reborn");
|
|
9
|
+
const taunt_1 = require("../keywords/taunt");
|
|
10
|
+
const venomous_1 = require("../keywords/venomous");
|
|
6
11
|
const utils_1 = require("../services/utils");
|
|
7
12
|
const simulate_bgs_battle_1 = require("../simulate-bgs-battle");
|
|
8
13
|
const utils_2 = require("../utils");
|
|
@@ -43,7 +48,7 @@ const applyAvengeEffects = (deadEntity, deadEntityIndexFromRight, boardWithDeadE
|
|
|
43
48
|
}
|
|
44
49
|
(0, spawns_1.performEntitySpawns)(candidatesEntitiesSpawnedFromAvenge, boardWithDeadEntity, boardWithDeadEntityHero, deadEntity, deadEntityIndexFromRight, otherBoard, otherBoardHero, gameState);
|
|
45
50
|
const hasDeathrattle = (0, utils_2.hasMechanic)(gameState.allCards.getCard(deadEntity.cardId), reference_data_1.GameTag[reference_data_1.GameTag.DEATHRATTLE]) ||
|
|
46
|
-
deadEntity.enchantments.some((e) => simulate_bgs_battle_1.
|
|
51
|
+
deadEntity.enchantments.some((e) => (0, simulate_bgs_battle_1.isValidDeathrattleEnchantment)(e.cardId));
|
|
47
52
|
if (hasDeathrattle) {
|
|
48
53
|
boardWithDeadEntity
|
|
49
54
|
.filter((e) => e.cardId === "BG29_863" || e.cardId === "BG29_863_G")
|
|
@@ -77,246 +82,235 @@ const updateAvengeCounters = (board, boardWithDeadEntityHero) => {
|
|
|
77
82
|
exports.updateAvengeCounters = updateAvengeCounters;
|
|
78
83
|
const handleAvenge = (boardWithDeadEntity, boardWithDeadEntityHero, deadEntity, deadEntityIndexFromRight, avenger, candidatesEntitiesSpawnedFromAvenge, otherBoard, otherBoardHero, gameState) => {
|
|
79
84
|
var _a, _b;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
gameState.spectator.registerPowerTarget(avenger, target2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case "BG21_007":
|
|
111
|
-
case "BG21_007_G":
|
|
112
|
-
const doomsayerCardsToAddQuantity = avenger.cardId === "BG21_007_G" ? 2 : 1;
|
|
113
|
-
const doomsayerCardsToAdd = [];
|
|
114
|
-
for (let i = 0; i < doomsayerCardsToAddQuantity; i++) {
|
|
115
|
-
doomsayerCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.demonSpawns));
|
|
116
|
-
}
|
|
117
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, doomsayerCardsToAdd, gameState);
|
|
118
|
-
break;
|
|
119
|
-
case "BG23_014":
|
|
120
|
-
case "BG23_014_G":
|
|
121
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [null], gameState);
|
|
122
|
-
break;
|
|
123
|
-
case "BG28_967":
|
|
124
|
-
case "BG28_967_G":
|
|
125
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [null], gameState);
|
|
126
|
-
break;
|
|
127
|
-
case "BG21_038":
|
|
128
|
-
case "BG21_038_G":
|
|
129
|
-
const nestmatronToAddQuantity = avenger.cardId === "BG21_038_G" ? 2 : 1;
|
|
130
|
-
const nestmatronCardsToAdd = [];
|
|
131
|
-
for (let i = 0; i < nestmatronToAddQuantity; i++) {
|
|
132
|
-
nestmatronCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.battlecryMinions));
|
|
133
|
-
}
|
|
134
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, nestmatronCardsToAdd, gameState);
|
|
135
|
-
break;
|
|
136
|
-
case "BG20_105":
|
|
137
|
-
case "BG20_105_G":
|
|
138
|
-
const thorncallerToAddQuantity = avenger.cardId === "BG20_105_G" ? 2 : 1;
|
|
139
|
-
const thorncallerCardsToAdd = Array(thorncallerToAddQuantity).fill("BG20_GEM");
|
|
140
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, thorncallerCardsToAdd, gameState);
|
|
141
|
-
break;
|
|
142
|
-
case "BG21_009":
|
|
143
|
-
case "BG21_009_G":
|
|
144
|
-
const poisonousIterations = avenger.cardId === "BG21_009_G" ? 2 : 1;
|
|
145
|
-
for (let i = 0; i < poisonousIterations; i++) {
|
|
146
|
-
const validTargets = boardWithDeadEntity.filter((e) => !e.poisonous && !e.venomous);
|
|
147
|
-
const murloc = (0, utils_2.getRandomAliveMinion)(validTargets, boardWithDeadEntityHero, reference_data_1.Race.MURLOC, gameState.allCards);
|
|
148
|
-
if (murloc) {
|
|
149
|
-
murloc.venomous = true;
|
|
150
|
-
gameState.spectator.registerPowerTarget(avenger, murloc, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
85
|
+
const avengeImpl = _card_mappings_1.cardMappings[avenger.cardId];
|
|
86
|
+
if ((0, card_interface_1.hasAvenge)(avengeImpl)) {
|
|
87
|
+
avengeImpl.avenge(avenger, {
|
|
88
|
+
board: boardWithDeadEntity,
|
|
89
|
+
hero: boardWithDeadEntityHero,
|
|
90
|
+
otherBoard: otherBoard,
|
|
91
|
+
otherHero: otherBoardHero,
|
|
92
|
+
gameState,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
switch (avenger.cardId) {
|
|
97
|
+
case "BG21_030":
|
|
98
|
+
case "BG21_030_G":
|
|
99
|
+
const neighbours = (0, attack_1.getNeighbours)(boardWithDeadEntity, avenger);
|
|
100
|
+
neighbours.forEach((entity) => {
|
|
101
|
+
(0, stats_1.modifyStats)(entity, avenger.cardId === "BG21_030_G" ? 4 : 2, avenger.cardId === "BG21_030_G" ? 2 : 1, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
102
|
+
gameState.spectator.registerPowerTarget(avenger, entity, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
103
|
+
});
|
|
104
|
+
break;
|
|
105
|
+
case "BG22_HERO_003_Buddy":
|
|
106
|
+
case "BG22_HERO_003_Buddy_G":
|
|
107
|
+
break;
|
|
108
|
+
case "BG21_001":
|
|
109
|
+
const target1 = (0, utils_2.grantRandomStats)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, 6, 6, reference_data_1.Race.BEAST, true, gameState);
|
|
110
|
+
if (!!target1) {
|
|
111
|
+
gameState.spectator.registerPowerTarget(avenger, target1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
151
112
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
113
|
+
break;
|
|
114
|
+
case "BG21_001_G":
|
|
115
|
+
const target2 = (0, utils_2.grantRandomStats)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, 12, 12, reference_data_1.Race.BEAST, true, gameState);
|
|
116
|
+
if (!!target2) {
|
|
117
|
+
gameState.spectator.registerPowerTarget(avenger, target2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
case "BG21_007":
|
|
121
|
+
case "BG21_007_G":
|
|
122
|
+
const doomsayerCardsToAddQuantity = avenger.cardId === "BG21_007_G" ? 2 : 1;
|
|
123
|
+
const doomsayerCardsToAdd = [];
|
|
124
|
+
for (let i = 0; i < doomsayerCardsToAddQuantity; i++) {
|
|
125
|
+
doomsayerCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.demonSpawns));
|
|
126
|
+
}
|
|
127
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, doomsayerCardsToAdd, gameState);
|
|
128
|
+
break;
|
|
129
|
+
case "BG23_014":
|
|
130
|
+
case "BG23_014_G":
|
|
131
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [null], gameState);
|
|
132
|
+
break;
|
|
133
|
+
case "BG28_967":
|
|
134
|
+
case "BG28_967_G":
|
|
135
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [null], gameState);
|
|
136
|
+
break;
|
|
137
|
+
case "BG21_038":
|
|
138
|
+
case "BG21_038_G":
|
|
139
|
+
const nestmatronToAddQuantity = avenger.cardId === "BG21_038_G" ? 2 : 1;
|
|
140
|
+
const nestmatronCardsToAdd = [];
|
|
141
|
+
for (let i = 0; i < nestmatronToAddQuantity; i++) {
|
|
142
|
+
nestmatronCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.battlecryMinions));
|
|
143
|
+
}
|
|
144
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, nestmatronCardsToAdd, gameState);
|
|
145
|
+
break;
|
|
146
|
+
case "BG20_105":
|
|
147
|
+
case "BG20_105_G":
|
|
148
|
+
const thorncallerToAddQuantity = avenger.cardId === "BG20_105_G" ? 2 : 1;
|
|
149
|
+
const thorncallerCardsToAdd = Array(thorncallerToAddQuantity).fill("BG20_GEM");
|
|
150
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, thorncallerCardsToAdd, gameState);
|
|
151
|
+
break;
|
|
152
|
+
case "BG21_009":
|
|
153
|
+
case "BG21_009_G":
|
|
154
|
+
const poisonousIterations = avenger.cardId === "BG21_009_G" ? 2 : 1;
|
|
155
|
+
for (let i = 0; i < poisonousIterations; i++) {
|
|
156
|
+
const validTargets = boardWithDeadEntity.filter((e) => !e.poisonous && !e.venomous);
|
|
157
|
+
const murloc = (0, utils_2.getRandomAliveMinion)(validTargets, boardWithDeadEntityHero, reference_data_1.Race.MURLOC, gameState.allCards);
|
|
158
|
+
if (murloc) {
|
|
159
|
+
(0, venomous_1.updateVenomous)(murloc, true, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
160
|
+
gameState.spectator.registerPowerTarget(avenger, murloc, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
case "BG21_023":
|
|
161
165
|
const target = (0, utils_2.getRandomMinionWithHighestHealth)(otherBoard);
|
|
162
166
|
gameState.spectator.registerPowerTarget(avenger, target, otherBoard, boardWithDeadEntityHero, otherBoardHero);
|
|
163
167
|
(0, attack_1.dealDamageToMinion)(target, otherBoard, otherBoardHero, avenger, 5, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
for (let i = 0; i < 2; i++) {
|
|
181
|
-
const nonGoldenMinions = boardWithDeadEntity.filter((e) => !(0, golden_1.isMinionGolden)(e, gameState.allCards));
|
|
168
|
+
break;
|
|
169
|
+
case "BG21_023_G":
|
|
170
|
+
for (let i = 0; i < 2; i++) {
|
|
171
|
+
const target = (0, utils_2.getRandomMinionWithHighestHealth)(otherBoard);
|
|
172
|
+
gameState.spectator.registerPowerTarget(avenger, target, otherBoard, boardWithDeadEntityHero, otherBoardHero);
|
|
173
|
+
(0, attack_1.dealDamageToMinion)(target, otherBoard, otherBoardHero, avenger, 5, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case "BG21_031":
|
|
177
|
+
const nonGoldenMinions = boardWithDeadEntity
|
|
178
|
+
.filter((e) => e.entityId !== avenger.entityId)
|
|
179
|
+
.filter((e) => {
|
|
180
|
+
const ref = gameState.allCards.getCard(e.cardId);
|
|
181
|
+
return (!!ref.battlegroundsPremiumDbfId &&
|
|
182
|
+
!!gameState.allCards.getCardFromDbfId(ref.battlegroundsPremiumDbfId).id);
|
|
183
|
+
});
|
|
182
184
|
const pirate = (0, utils_2.getRandomAliveMinion)(nonGoldenMinions, boardWithDeadEntityHero, reference_data_1.Race.PIRATE, gameState.allCards);
|
|
183
185
|
if (pirate) {
|
|
184
186
|
(0, golden_1.makeMinionGolden)(pirate, avenger, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
185
187
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
case "BG26_157":
|
|
194
|
-
case "BG26_157_G":
|
|
195
|
-
const bristlebachMultiplier = avenger.cardId === "BG26_157_G" ? 4 : 2;
|
|
196
|
-
for (let i = 0; i < bristlebachMultiplier; i++) {
|
|
197
|
-
for (const entity of boardWithDeadEntity) {
|
|
198
|
-
if ((0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.QUILBOAR, gameState.allCards)) {
|
|
199
|
-
(0, blood_gems_1.playBloodGemsOn)(avenger, entity, 1, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
200
|
-
gameState.spectator.registerPowerTarget(avenger, entity, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
188
|
+
break;
|
|
189
|
+
case "BG21_031_G":
|
|
190
|
+
for (let i = 0; i < 2; i++) {
|
|
191
|
+
const nonGoldenMinions = boardWithDeadEntity.filter((e) => !(0, golden_1.isMinionGolden)(e, gameState.allCards));
|
|
192
|
+
const pirate = (0, utils_2.getRandomAliveMinion)(nonGoldenMinions, boardWithDeadEntityHero, reference_data_1.Race.PIRATE, gameState.allCards);
|
|
193
|
+
if (pirate) {
|
|
194
|
+
(0, golden_1.makeMinionGolden)(pirate, avenger, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
201
195
|
}
|
|
202
196
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
(0,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
197
|
+
break;
|
|
198
|
+
case "BG25_002":
|
|
199
|
+
case "BG25_002_G":
|
|
200
|
+
const ghoulMultiplier = avenger.cardId === "BG25_002_G" ? 2 : 1;
|
|
201
|
+
(0, utils_2.grantStatsToMinionsOfEachType)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, ghoulMultiplier * 3, 0, gameState);
|
|
202
|
+
break;
|
|
203
|
+
case "BG26_157":
|
|
204
|
+
case "BG26_157_G":
|
|
205
|
+
const bristlebachMultiplier = avenger.cardId === "BG26_157_G" ? 4 : 2;
|
|
206
|
+
for (let i = 0; i < bristlebachMultiplier; i++) {
|
|
207
|
+
for (const entity of boardWithDeadEntity) {
|
|
208
|
+
if ((0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.QUILBOAR, gameState.allCards)) {
|
|
209
|
+
(0, blood_gems_1.playBloodGemsOn)(avenger, entity, 1, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
210
|
+
gameState.spectator.registerPowerTarget(avenger, entity, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
break;
|
|
215
|
+
case "BG25_014":
|
|
216
|
+
case "BG25_014_G":
|
|
217
|
+
const abominationMultiplier = avenger.cardId === "BG25_014_G" ? 2 : 1;
|
|
218
|
+
(0, stats_1.modifyStats)(avenger, abominationMultiplier * 1, abominationMultiplier * 2, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
219
|
+
gameState.spectator.registerPowerTarget(avenger, avenger, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
220
|
+
break;
|
|
221
|
+
case "BG27_Reward_800":
|
|
222
|
+
(0, utils_2.grantRandomStats)(avenger, boardWithDeadEntityHero.hand.filter((e) => { var _a; return ((_a = gameState.allCards.getCard(e.cardId).type) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === reference_data_1.CardType[reference_data_1.CardType.MINION]; }), boardWithDeadEntityHero, 4, 0, null, true, gameState);
|
|
223
|
+
break;
|
|
224
|
+
case "BG27_Reward_502":
|
|
225
|
+
const highestHealthMinion = [...otherBoard].sort((a, b) => b.health - a.health)[0];
|
|
226
|
+
(0, attack_1.dealDamageToMinion)(highestHealthMinion, otherBoard, otherBoardHero, avenger, 10, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
|
|
227
|
+
gameState.spectator.registerPowerTarget(avenger, highestHealthMinion, otherBoard, boardWithDeadEntityHero, otherBoardHero);
|
|
228
|
+
break;
|
|
229
|
+
case "BG25_003":
|
|
230
|
+
case "BG25_003_G":
|
|
231
|
+
(0, reborn_1.updateReborn)(avenger, true, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
232
|
+
(0, taunt_1.updateTaunt)(avenger, true, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
233
|
+
break;
|
|
234
|
+
case "BG27_010":
|
|
235
|
+
case "BG27_010_G":
|
|
236
|
+
(0, reborn_1.updateReborn)(avenger, true, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
237
|
+
(0, taunt_1.updateTaunt)(avenger, true, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
238
|
+
break;
|
|
239
|
+
case "BG27_029":
|
|
240
|
+
case "BG27_029_G":
|
|
241
|
+
const championPrimusStat = avenger.cardId === "BG27_029_G" ? 2 : 1;
|
|
242
|
+
boardWithDeadEntityHero.globalInfo.UndeadAttackBonus += championPrimusStat;
|
|
243
|
+
(0, utils_2.addStatsToBoard)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, championPrimusStat, 0, gameState, reference_data_1.Race[reference_data_1.Race.UNDEAD]);
|
|
244
|
+
break;
|
|
245
|
+
case "BG28_403":
|
|
246
|
+
case "BG28_403_G":
|
|
247
|
+
const phaerixLoops = avenger.cardId === "BG28_403_G" ? 2 : 1;
|
|
248
|
+
for (let i = 0; i < phaerixLoops; i++) {
|
|
249
|
+
(0, divine_shield_1.grantRandomDivineShield)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
250
|
+
}
|
|
251
|
+
break;
|
|
252
|
+
case "BG28_740":
|
|
253
|
+
case "BG28_740_G":
|
|
254
|
+
const AugmentedLaborerLoops = avenger.cardId === "BG28_740_G" ? 2 : 1;
|
|
255
|
+
for (let i = 0; i < AugmentedLaborerLoops; i++) {
|
|
256
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [null], gameState);
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
case "BG28_Reward_505":
|
|
260
|
+
const tumblingDisasterEntity = (_a = boardWithDeadEntityHero.questRewardEntities) === null || _a === void 0 ? void 0 : _a.find((e) => e.cardId === "BG28_Reward_505");
|
|
261
|
+
if (tumblingDisasterEntity) {
|
|
262
|
+
tumblingDisasterEntity.scriptDataNum1++;
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
case "BG28_Reward_504":
|
|
245
266
|
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [null], gameState);
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
avenger.scriptDataNum1++;
|
|
259
|
-
break;
|
|
260
|
-
case "BG29_991":
|
|
261
|
-
case "BG29_991_G":
|
|
262
|
-
const murglMkStats = avenger.cardId === "BG29_991_G" ? 2 : 1;
|
|
263
|
-
(0, utils_2.addStatsToBoard)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, murglMkStats, murglMkStats, gameState);
|
|
264
|
-
for (const e of (_b = boardWithDeadEntityHero.hand) !== null && _b !== void 0 ? _b : []) {
|
|
265
|
-
e.attack += murglMkStats;
|
|
266
|
-
e.health += murglMkStats;
|
|
267
|
-
e.maxHealth += murglMkStats;
|
|
268
|
-
}
|
|
269
|
-
break;
|
|
270
|
-
case "BG30_MagicItem_545":
|
|
271
|
-
const randomMagnetic = gameState.cardsData.getRandomMechToMagnetize(boardWithDeadEntityHero.tavernTier);
|
|
272
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [randomMagnetic], gameState);
|
|
273
|
-
break;
|
|
274
|
-
case "BG30_MagicItem_410":
|
|
275
|
-
boardWithDeadEntityHero.globalInfo.BloodGemHealthBonus += 1;
|
|
276
|
-
break;
|
|
277
|
-
case "BG30_MagicItem_410t2":
|
|
278
|
-
boardWithDeadEntityHero.globalInfo.BloodGemAttackBonus += 1;
|
|
279
|
-
boardWithDeadEntityHero.globalInfo.BloodGemHealthBonus += 1;
|
|
280
|
-
break;
|
|
281
|
-
case "BG30_MagicItem_864":
|
|
282
|
-
(0, utils_2.addStatsToBoard)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, 3, 3, gameState);
|
|
283
|
-
for (const minion of boardWithDeadEntity) {
|
|
284
|
-
(0, attack_1.dealDamageToMinion)(minion, boardWithDeadEntity, boardWithDeadEntityHero, avenger, 1, otherBoard, otherBoardHero, gameState);
|
|
285
|
-
gameState.spectator.registerPowerTarget(avenger, minion, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
286
|
-
}
|
|
287
|
-
break;
|
|
288
|
-
case "BG30_MagicItem_437":
|
|
289
|
-
if (boardWithDeadEntity.length > 0) {
|
|
290
|
-
const target = (0, utils_1.pickRandom)(boardWithDeadEntity.filter((e) => !e.reborn));
|
|
291
|
-
if (!!target) {
|
|
292
|
-
target.reborn = true;
|
|
293
|
-
gameState.spectator.registerPowerTarget(avenger, target, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
267
|
+
break;
|
|
268
|
+
case "BG28_Reward_518":
|
|
269
|
+
avenger.scriptDataNum1++;
|
|
270
|
+
break;
|
|
271
|
+
case "BG29_991":
|
|
272
|
+
case "BG29_991_G":
|
|
273
|
+
const murglMkStats = avenger.cardId === "BG29_991_G" ? 2 : 1;
|
|
274
|
+
(0, utils_2.addStatsToBoard)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, murglMkStats, murglMkStats, gameState);
|
|
275
|
+
for (const e of (_b = boardWithDeadEntityHero.hand) !== null && _b !== void 0 ? _b : []) {
|
|
276
|
+
e.attack += murglMkStats;
|
|
277
|
+
e.health += murglMkStats;
|
|
278
|
+
e.maxHealth += murglMkStats;
|
|
294
279
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}, gameState.cardsData);
|
|
313
|
-
if (avenger.cardId === "BG31_802_G") {
|
|
314
|
-
(0, golden_1.makeMinionGolden)(clone, avenger, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
280
|
+
break;
|
|
281
|
+
case "BG30_MagicItem_545":
|
|
282
|
+
const randomMagnetic = gameState.cardsData.getRandomMechToMagnetize(boardWithDeadEntityHero.tavernTier);
|
|
283
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [randomMagnetic], gameState);
|
|
284
|
+
break;
|
|
285
|
+
case "BG30_MagicItem_410":
|
|
286
|
+
boardWithDeadEntityHero.globalInfo.BloodGemHealthBonus += 1;
|
|
287
|
+
break;
|
|
288
|
+
case "BG30_MagicItem_410t2":
|
|
289
|
+
boardWithDeadEntityHero.globalInfo.BloodGemAttackBonus += 1;
|
|
290
|
+
boardWithDeadEntityHero.globalInfo.BloodGemHealthBonus += 1;
|
|
291
|
+
break;
|
|
292
|
+
case "BG30_MagicItem_864":
|
|
293
|
+
(0, utils_2.addStatsToBoard)(avenger, boardWithDeadEntity, boardWithDeadEntityHero, 3, 3, gameState);
|
|
294
|
+
for (const minion of boardWithDeadEntity) {
|
|
295
|
+
(0, attack_1.dealDamageToMinion)(minion, boardWithDeadEntity, boardWithDeadEntityHero, avenger, 1, otherBoard, otherBoardHero, gameState);
|
|
296
|
+
gameState.spectator.registerPowerTarget(avenger, minion, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
315
297
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
298
|
+
break;
|
|
299
|
+
case "BG30_MagicItem_437":
|
|
300
|
+
if (boardWithDeadEntity.length > 0) {
|
|
301
|
+
const target = (0, utils_1.pickRandom)(boardWithDeadEntity.filter((e) => !e.reborn));
|
|
302
|
+
if (!!target) {
|
|
303
|
+
(0, reborn_1.updateReborn)(target, true, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero, gameState);
|
|
304
|
+
gameState.spectator.registerPowerTarget(avenger, target, boardWithDeadEntity, boardWithDeadEntityHero, otherBoardHero);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
break;
|
|
308
|
+
case "BG30_MagicItem_713":
|
|
309
|
+
const randomUndead = gameState.cardsData.getRandomMinionForTribe(reference_data_1.Race.UNDEAD, boardWithDeadEntityHero.tavernTier);
|
|
310
|
+
candidatesEntitiesSpawnedFromAvenge.push(...(0, deathrattle_spawns_1.spawnEntities)(randomUndead, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, false));
|
|
311
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, [randomUndead], gameState);
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
320
314
|
}
|
|
321
315
|
avenger.avengeCurrent += avenger.avengeDefault;
|
|
322
316
|
};
|