@firestone-hs/simulate-bgs-battle 1.1.501 → 1.1.503
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 +114 -1
- package/dist/cards/card.interface.js +47 -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 +154 -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/blazing-skyfin.d.ts +2 -0
- package/dist/cards/impl/minion/blazing-skyfin.js +12 -0
- package/dist/cards/impl/minion/blazing-skyfin.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/clunker-junker.d.ts +2 -0
- package/dist/cards/impl/minion/clunker-junker.js +24 -0
- package/dist/cards/impl/minion/clunker-junker.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/deflecto-bot.d.ts +2 -0
- package/dist/cards/impl/minion/deflecto-bot.js +21 -0
- package/dist/cards/impl/minion/deflecto-bot.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/general-drakkisath.d.ts +2 -0
- package/dist/cards/impl/minion/general-drakkisath.js +17 -0
- package/dist/cards/impl/minion/general-drakkisath.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/grease-bot.d.ts +2 -0
- package/dist/cards/impl/minion/grease-bot.js +13 -0
- package/dist/cards/impl/minion/grease-bot.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/hunter-of-gatherers.d.ts +2 -0
- package/dist/cards/impl/minion/hunter-of-gatherers.js +13 -0
- package/dist/cards/impl/minion/hunter-of-gatherers.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/impulsive-trickster.d.ts +2 -0
- package/dist/cards/impl/minion/impulsive-trickster.js +14 -0
- package/dist/cards/impl/minion/impulsive-trickster.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/kalecgos-arcane-aspect.d.ts +2 -0
- package/dist/cards/impl/minion/kalecgos-arcane-aspect.js +13 -0
- package/dist/cards/impl/minion/kalecgos-arcane-aspect.js.map +1 -0
- package/dist/cards/impl/minion/kangors-apprentice.d.ts +2 -0
- package/dist/cards/impl/minion/kangors-apprentice.js +21 -0
- package/dist/cards/impl/minion/kangors-apprentice.js.map +1 -0
- 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/mecha-jaraxxus.d.ts +2 -0
- package/dist/cards/impl/minion/mecha-jaraxxus.js +12 -0
- package/dist/cards/impl/minion/mecha-jaraxxus.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/misfit-dragonling.d.ts +2 -5
- package/dist/cards/impl/minion/misfit-dragonling.js.map +1 -1
- 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/murky.d.ts +2 -0
- package/dist/cards/impl/minion/murky.js +20 -0
- package/dist/cards/impl/minion/murky.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/operatic-belcher.d.ts +2 -0
- package/dist/cards/impl/minion/operatic-belcher.js +26 -0
- package/dist/cards/impl/minion/operatic-belcher.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/parched-wanderer.d.ts +2 -0
- package/dist/cards/impl/minion/parched-wanderer.js +20 -0
- package/dist/cards/impl/minion/parched-wanderer.js.map +1 -0
- package/dist/cards/impl/minion/prized-promo-drake.d.ts +2 -5
- package/dist/cards/impl/minion/prized-promo-drake.js.map +1 -1
- 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/smolderwing.d.ts +2 -0
- package/dist/cards/impl/minion/smolderwing.js +25 -0
- package/dist/cards/impl/minion/smolderwing.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/swampstriker.d.ts +2 -0
- package/dist/cards/impl/minion/swampstriker.js +21 -0
- package/dist/cards/impl/minion/swampstriker.js.map +1 -0
- 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/whelp-smuggler.d.ts +2 -0
- package/dist/cards/impl/minion/whelp-smuggler.js +17 -0
- package/dist/cards/impl/minion/whelp-smuggler.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} +11 -3
- package/dist/{divine-shield.js → keywords/divine-shield.js} +19 -14
- 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 +20 -5
- package/dist/simulate-bgs-battle.js.map +1 -1
- package/dist/simulation/add-minion-to-board.d.ts +23 -0
- package/dist/simulation/add-minion-to-board.js +50 -33
- 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 +574 -623
- 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 +468 -517
- 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 +308 -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 -12
- package/dist/simulation/start-of-combat/soc-action-processor.js.map +1 -1
- package/dist/simulation/stats.d.ts +9 -0
- package/dist/simulation/stats.js +23 -14
- 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
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.spawnEntitiesFromEnchantments = exports.spawnEntitiesFromDeathrattle = exports.spawnEntities = void 0;
|
|
3
|
+
exports.spawnEntitiesFromEnchantments = exports.spawnEntitiesFromDeathrattle = exports.spawnEntities = exports.simplifiedSpawnEntities = void 0;
|
|
4
4
|
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
6
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
5
7
|
const utils_1 = require("../services/utils");
|
|
6
8
|
const utils_2 = require("../utils");
|
|
7
9
|
const cards_in_hand_1 = require("./cards-in-hand");
|
|
8
10
|
const deathrattle_effects_1 = require("./deathrattle-effects");
|
|
9
11
|
const deathrattle_on_trigger_1 = require("./deathrattle-on-trigger");
|
|
12
|
+
const simplifiedSpawnEntities = (cardId, quantity, input, boardEntityToSpawn = null) => {
|
|
13
|
+
return (0, exports.spawnEntities)(cardId, quantity, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.otherBoard, input.otherBoardHero, input.gameState.allCards, input.gameState.cardsData, input.gameState.sharedState, input.gameState.spectator, input.deadEntity.friendly, false, false, false, boardEntityToSpawn);
|
|
14
|
+
};
|
|
15
|
+
exports.simplifiedSpawnEntities = simplifiedSpawnEntities;
|
|
10
16
|
const spawnEntities = (cardId, quantity, boardToSpawnInto, boardToSpawnIntoHero, otherBoard, otherHero, allCards, cardsData, sharedState, spectator, friendly, limitSpawns, spawnReborn = false, useKhadgar = true, boardEntityToSpawn = null, originalEntity = null) => {
|
|
11
17
|
if (!cardId) {
|
|
12
18
|
console.error('Cannot spawn a minion without any cardId defined', (0, utils_2.stringifySimple)(boardToSpawnInto, allCards), new Error().stack);
|
|
@@ -47,397 +53,315 @@ const spawnEntitiesFromDeathrattle = (deadEntity, boardWithDeadEntity, boardWith
|
|
|
47
53
|
const cardIds = [deadEntity.cardId, ...((_a = deadEntity.additionalCards) !== null && _a !== void 0 ? _a : [])];
|
|
48
54
|
for (const deadEntityCardId of cardIds) {
|
|
49
55
|
let hasTriggered = true;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
break;
|
|
179
|
-
case "TB_BaconUps_309":
|
|
180
|
-
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_309t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
181
|
-
break;
|
|
182
|
-
case "UNG_010":
|
|
183
|
-
spawnedEntities.push(...(0, exports.spawnEntities)("UNG_201t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
184
|
-
break;
|
|
185
|
-
case "TB_BaconUps_052":
|
|
186
|
-
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_052t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
187
|
-
break;
|
|
188
|
-
case "BGS_008":
|
|
189
|
-
spawnedEntities.push(...[
|
|
190
|
-
...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
191
|
-
...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
192
|
-
]);
|
|
193
|
-
break;
|
|
194
|
-
case "BGS_121":
|
|
195
|
-
case "TB_BaconUps_165":
|
|
196
|
-
const djinniSpawns = [];
|
|
197
|
-
const djinniToSpawnQuandtity = deadEntity.cardId === "TB_BaconUps_165" ? 2 : 1;
|
|
198
|
-
for (let i = 0; i < djinniToSpawnQuandtity; i++) {
|
|
199
|
-
djinniSpawns.push((0, utils_1.pickRandom)(gameState.cardsData.gentleDjinniSpawns));
|
|
200
|
-
}
|
|
201
|
-
for (const djinniSpawn of djinniSpawns) {
|
|
202
|
-
spawnedEntities.push(...(0, exports.spawnEntities)(djinniSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
203
|
-
}
|
|
204
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, djinniSpawns, gameState);
|
|
205
|
-
break;
|
|
206
|
-
case "TB_BaconShop_HERO_37_Buddy":
|
|
207
|
-
case "TB_BaconShop_HERO_37_Buddy_G":
|
|
208
|
-
const kilrekCardsToAddQuantity = deadEntity.cardId === "TB_BaconShop_HERO_37_Buddy_G" ? 2 : 1;
|
|
209
|
-
const kilrekCardsToAdd = [];
|
|
210
|
-
for (let i = 0; i < kilrekCardsToAddQuantity; i++) {
|
|
211
|
-
kilrekCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.demonSpawns));
|
|
212
|
-
}
|
|
213
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, kilrekCardsToAdd, gameState);
|
|
214
|
-
break;
|
|
215
|
-
case "TB_BaconShop_HERO_43_Buddy":
|
|
216
|
-
case "TB_BaconShop_HERO_43_Buddy_G":
|
|
217
|
-
const brannSpawns = [];
|
|
218
|
-
const brannToSpawnQuandtity = deadEntity.cardId === "TB_BaconShop_HERO_43_Buddy_G" ? 2 : 1;
|
|
219
|
-
for (let i = 0; i < brannToSpawnQuandtity; i++) {
|
|
220
|
-
brannSpawns.push((0, utils_1.pickRandom)(gameState.cardsData.battlecryMinions));
|
|
221
|
-
}
|
|
222
|
-
for (const brannSpawn of brannSpawns) {
|
|
223
|
-
spawnedEntities.push(...(0, exports.spawnEntities)(brannSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
224
|
-
}
|
|
225
|
-
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, brannSpawns, gameState);
|
|
226
|
-
break;
|
|
227
|
-
case "TRLA_149":
|
|
228
|
-
case "TB_BaconUps_057":
|
|
229
|
-
const ghastcoilerLoop = deadEntity.cardId === "TB_BaconUps_057" ? 4 : 2;
|
|
230
|
-
for (let i = 0; i < ghastcoilerLoop; i++) {
|
|
56
|
+
const spawnEntityImpl = _card_mappings_1.cardMappings[deadEntityCardId];
|
|
57
|
+
if ((0, card_interface_1.hasDeathrattleSpawn)(spawnEntityImpl)) {
|
|
58
|
+
const spawned = spawnEntityImpl.deathrattleSpawn(deadEntity, deathrattleTriggeredInput);
|
|
59
|
+
if (spawned === null || spawned === void 0 ? void 0 : spawned.length) {
|
|
60
|
+
spawnedEntities.push(...spawned);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
switch (deadEntityCardId) {
|
|
65
|
+
case "BOT_445":
|
|
66
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BOT_445t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
67
|
+
break;
|
|
68
|
+
case "TB_BaconUps_002":
|
|
69
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_002t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
70
|
+
break;
|
|
71
|
+
case "BG29_611":
|
|
72
|
+
case "BG29_611_G":
|
|
73
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG29_611"
|
|
74
|
+
? "BG_BOT_312t"
|
|
75
|
+
: "TB_BaconUps_032t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
76
|
+
break;
|
|
77
|
+
case "BG_AV_309":
|
|
78
|
+
case "BG_AV_309_G":
|
|
79
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG_AV_309_G"
|
|
80
|
+
? "BG_AV_309t"
|
|
81
|
+
: "AV_309t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
82
|
+
break;
|
|
83
|
+
case "BG25_009":
|
|
84
|
+
case "BG25_009_G":
|
|
85
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG25_009_G"
|
|
86
|
+
? "BG25_008_G"
|
|
87
|
+
: "BG25_008", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
88
|
+
break;
|
|
89
|
+
case "BGS_061":
|
|
90
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BGS_061t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
91
|
+
break;
|
|
92
|
+
case "TB_BaconUps_141":
|
|
93
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_141t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
94
|
+
break;
|
|
95
|
+
case "BG21_029":
|
|
96
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BRM_006t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
97
|
+
break;
|
|
98
|
+
case "BG21_029_G":
|
|
99
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_030t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
100
|
+
break;
|
|
101
|
+
case "BG_EX1_556":
|
|
102
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("skele21", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
103
|
+
break;
|
|
104
|
+
case "TB_BaconUps_006":
|
|
105
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_006t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
106
|
+
break;
|
|
107
|
+
case "BG19_010":
|
|
108
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG19_010t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
109
|
+
break;
|
|
110
|
+
case "BG19_010_G":
|
|
111
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG19_010_Gt", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
112
|
+
break;
|
|
113
|
+
case "TB_BaconShop_HERO_702_Buddy":
|
|
114
|
+
case "TB_BaconShop_HERO_702_Buddy_G":
|
|
115
|
+
const minionsToSpawnMawsworn = deadEntityCardId === "TB_BaconShop_HERO_702_Buddy_G" ? 6 : 3;
|
|
116
|
+
for (let i = 0; i < minionsToSpawnMawsworn; i++) {
|
|
117
|
+
const minionCardId = gameState.cardsData.getRandomMinionForTavernTier(1);
|
|
118
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(minionCardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
case "BG25_HERO_100_Buddy":
|
|
122
|
+
case "BG25_HERO_100_Buddy_G":
|
|
123
|
+
const minionsToSpawnFestergut = deadEntityCardId === "BG25_HERO_100_Buddy_G" ? 2 : 1;
|
|
124
|
+
for (let i = 0; i < minionsToSpawnFestergut; i++) {
|
|
125
|
+
const randomUndeadCreation = (0, utils_2.buildRandomUndeadCreation)(boardWithDeadEntityHero, boardWithDeadEntity, gameState.allCards, deadEntity.friendly, gameState.cardsData, gameState.sharedState);
|
|
126
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(randomUndeadCreation.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, randomUndeadCreation));
|
|
127
|
+
}
|
|
128
|
+
break;
|
|
129
|
+
case "BG_KAR_005":
|
|
130
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG_KAR_005a", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
131
|
+
break;
|
|
132
|
+
case "TB_BaconUps_004":
|
|
133
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_004t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
134
|
+
break;
|
|
135
|
+
case "BG_CFM_316":
|
|
136
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG_CFM_316t", Math.min(7, deadEntity.attack), boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
137
|
+
break;
|
|
138
|
+
case "TB_BaconUps_027":
|
|
139
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_027t", Math.min(7, deadEntity.attack), boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
140
|
+
break;
|
|
141
|
+
case "BGS_014":
|
|
142
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BRM_006t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
143
|
+
break;
|
|
144
|
+
case "TB_BaconUps_113":
|
|
145
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_030t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
146
|
+
break;
|
|
147
|
+
case "OG_216":
|
|
148
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("OG_216a", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
149
|
+
break;
|
|
150
|
+
case "TB_BaconUps_026":
|
|
151
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_026t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
152
|
+
break;
|
|
153
|
+
case "BG_BOT_312":
|
|
154
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG_BOT_312t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
155
|
+
break;
|
|
156
|
+
case "TB_BaconUps_032":
|
|
157
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_032t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
158
|
+
break;
|
|
159
|
+
case "BOT_537":
|
|
160
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BOT_537t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
161
|
+
break;
|
|
162
|
+
case "TB_BaconUps_039":
|
|
163
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_039t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
164
|
+
break;
|
|
165
|
+
case "BG_EX1_534":
|
|
166
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG_EX1_534t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
167
|
+
break;
|
|
168
|
+
case "TB_BaconUps_049":
|
|
169
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_049t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
170
|
+
break;
|
|
171
|
+
case "BG_DMF_533":
|
|
172
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG_DMF_533t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
173
|
+
break;
|
|
174
|
+
case "TB_BaconUps_309":
|
|
175
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_309t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
176
|
+
break;
|
|
177
|
+
case "UNG_010":
|
|
178
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("UNG_201t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
179
|
+
break;
|
|
180
|
+
case "TB_BaconUps_052":
|
|
181
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_052t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
182
|
+
break;
|
|
183
|
+
case "BGS_008":
|
|
231
184
|
spawnedEntities.push(...[
|
|
232
185
|
...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
186
|
+
...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
233
187
|
]);
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
: hand.filter((c) => c.cardId).length
|
|
330
|
-
? (0, utils_1.pickRandom)(hand.filter((c) => c.cardId))
|
|
188
|
+
break;
|
|
189
|
+
case "TB_BaconShop_HERO_37_Buddy":
|
|
190
|
+
case "TB_BaconShop_HERO_37_Buddy_G":
|
|
191
|
+
const kilrekCardsToAddQuantity = deadEntity.cardId === "TB_BaconShop_HERO_37_Buddy_G" ? 2 : 1;
|
|
192
|
+
const kilrekCardsToAdd = [];
|
|
193
|
+
for (let i = 0; i < kilrekCardsToAddQuantity; i++) {
|
|
194
|
+
kilrekCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.demonSpawns));
|
|
195
|
+
}
|
|
196
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, kilrekCardsToAdd, gameState);
|
|
197
|
+
break;
|
|
198
|
+
case "TB_BaconShop_HERO_43_Buddy":
|
|
199
|
+
case "TB_BaconShop_HERO_43_Buddy_G":
|
|
200
|
+
const brannSpawns = [];
|
|
201
|
+
const brannToSpawnQuandtity = deadEntity.cardId === "TB_BaconShop_HERO_43_Buddy_G" ? 2 : 1;
|
|
202
|
+
for (let i = 0; i < brannToSpawnQuandtity; i++) {
|
|
203
|
+
brannSpawns.push((0, utils_1.pickRandom)(gameState.cardsData.battlecryMinions));
|
|
204
|
+
}
|
|
205
|
+
for (const brannSpawn of brannSpawns) {
|
|
206
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(brannSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
207
|
+
}
|
|
208
|
+
(0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, brannSpawns, gameState);
|
|
209
|
+
break;
|
|
210
|
+
case "TRLA_149":
|
|
211
|
+
case "TB_BaconUps_057":
|
|
212
|
+
const ghastcoilerLoop = deadEntity.cardId === "TB_BaconUps_057" ? 4 : 2;
|
|
213
|
+
for (let i = 0; i < ghastcoilerLoop; i++) {
|
|
214
|
+
spawnedEntities.push(...[
|
|
215
|
+
...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
216
|
+
]);
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case "BG_LOOT_368":
|
|
220
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("BG_CS2_065", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
221
|
+
break;
|
|
222
|
+
case "TB_BaconUps_059":
|
|
223
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_059t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
224
|
+
break;
|
|
225
|
+
case "BG26_ETC_321":
|
|
226
|
+
case "BG26_ETC_321_G":
|
|
227
|
+
const annoyOTroupeSpawns = deadEntity.cardId === "BG26_ETC_321_G"
|
|
228
|
+
? "BG_GVG_085_G"
|
|
229
|
+
: "BG_GVG_085";
|
|
230
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(annoyOTroupeSpawns, 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
231
|
+
break;
|
|
232
|
+
case "BG21_025":
|
|
233
|
+
case "BG21_025_G":
|
|
234
|
+
const cardParam = 6;
|
|
235
|
+
const entitiesToSpawn = Math.max(0, Math.min(cardParam, 7 - boardWithDeadEntity.length - spawnedEntities.length));
|
|
236
|
+
const buffAmount = (deadEntityCardId === "BG21_025_G" ? 2 : 1) *
|
|
237
|
+
(cardParam - entitiesToSpawn);
|
|
238
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG21_025_G"
|
|
239
|
+
? "TB_BaconUps_032t"
|
|
240
|
+
: "BG_BOT_312t", entitiesToSpawn, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, true));
|
|
241
|
+
(0, utils_2.addStatsToBoard)(deadEntity, boardWithDeadEntity, boardWithDeadEntityHero, buffAmount, buffAmount, gameState, reference_data_1.Race[reference_data_1.Race.MECH]);
|
|
242
|
+
(0, utils_2.addStatsToBoard)(deadEntity, spawnedEntities, boardWithDeadEntityHero, buffAmount, buffAmount, gameState, reference_data_1.Race[reference_data_1.Race.MECH]);
|
|
243
|
+
break;
|
|
244
|
+
case "BGS_079":
|
|
245
|
+
spawnedEntities.push(...[
|
|
246
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
247
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
248
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
249
|
+
]);
|
|
250
|
+
break;
|
|
251
|
+
case "TB_BaconUps_137":
|
|
252
|
+
spawnedEntities.push(...[
|
|
253
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
254
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
255
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
256
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
257
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
258
|
+
...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
|
|
259
|
+
]);
|
|
260
|
+
break;
|
|
261
|
+
case "BG26_804":
|
|
262
|
+
case "BG26_804_G":
|
|
263
|
+
const stats = deadEntity.scriptDataNum1 ||
|
|
264
|
+
((_b = gameState.sharedState.deaths.find((e) => e.friendly === deadEntity.friendly && e.cardId === deadEntity.cardId)) === null || _b === void 0 ? void 0 : _b.scriptDataNum1);
|
|
265
|
+
const octosariSpawn = deadEntity.cardId === "BG26_804_G"
|
|
266
|
+
? "BG26_803_Gt"
|
|
267
|
+
: "BG26_803t";
|
|
268
|
+
const octoSpawns = (0, exports.spawnEntities)(octosariSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false);
|
|
269
|
+
octoSpawns.forEach((b) => {
|
|
270
|
+
b.attack = stats;
|
|
271
|
+
b.health = stats;
|
|
272
|
+
});
|
|
273
|
+
spawnedEntities.push(...octoSpawns);
|
|
274
|
+
break;
|
|
275
|
+
case "BG26_350":
|
|
276
|
+
case "BG26_350_G":
|
|
277
|
+
const bassgillIterations = deadEntity.cardId === "BG26_350_G" ? 2 : 1;
|
|
278
|
+
for (let i = 0; i < bassgillIterations; i++) {
|
|
279
|
+
const hand = (_d = (_c = boardWithDeadEntityHero.hand) === null || _c === void 0 ? void 0 : _c.filter((e) => (0, utils_2.hasCorrectTribe)(e, boardWithDeadEntityHero, reference_data_1.Race.MURLOC, gameState.allCards)).filter((e) => !!(e === null || e === void 0 ? void 0 : e.cardId)).filter((e) => !e.locked)) !== null && _d !== void 0 ? _d : [];
|
|
280
|
+
const highestHealth = Math.max(...hand.filter((c) => c.health).map((c) => c.health));
|
|
281
|
+
const highestHealthMinions = highestHealth
|
|
282
|
+
? hand.filter((c) => c.health === highestHealth)
|
|
331
283
|
: null;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
284
|
+
const spawn = !!(highestHealthMinions === null || highestHealthMinions === void 0 ? void 0 : highestHealthMinions.length)
|
|
285
|
+
? (0, utils_1.pickRandom)(highestHealthMinions)
|
|
286
|
+
: hand.filter((c) => c.cardId).length
|
|
287
|
+
? (0, utils_1.pickRandom)(hand.filter((c) => c.cardId))
|
|
288
|
+
: null;
|
|
289
|
+
if (spawn) {
|
|
290
|
+
spawn.locked = true;
|
|
291
|
+
const bassgillSpawns = (0, exports.spawnEntities)(spawn.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, { ...spawn });
|
|
292
|
+
for (const s of bassgillSpawns) {
|
|
293
|
+
s.onCanceledSummon = () => (spawn.locked = false);
|
|
294
|
+
}
|
|
295
|
+
spawnedEntities.push(...bassgillSpawns);
|
|
337
296
|
}
|
|
338
|
-
spawnedEntities.push(...bassgillSpawns);
|
|
339
297
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const cultistStharaSpawnCandidates = gameState.sharedState.deaths
|
|
364
|
-
.filter((entity) => entity.friendly === deadEntity.friendly)
|
|
365
|
-
.filter((entity) => (0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.DEMON, gameState.allCards))
|
|
366
|
-
.slice(0, cultistStharaSpawnNumber);
|
|
367
|
-
cultistStharaSpawnCandidates.forEach((candidate) => {
|
|
368
|
-
const spawns = (0, exports.spawnEntities)(candidate.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true);
|
|
369
|
-
spawns.forEach((spawn) => {
|
|
370
|
-
var _a, _b;
|
|
371
|
-
spawn.attack = (_a = candidate.maxAttack) !== null && _a !== void 0 ? _a : candidate.attack;
|
|
372
|
-
spawn.health = (_b = candidate.maxHealth) !== null && _b !== void 0 ? _b : candidate.health;
|
|
373
|
-
spawn.maxHealth = spawn.health;
|
|
298
|
+
break;
|
|
299
|
+
case "BG26_018":
|
|
300
|
+
case "BG26_018_G":
|
|
301
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG26_018_G"
|
|
302
|
+
? "TB_BaconUps_141"
|
|
303
|
+
: "BGS_061", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
304
|
+
break;
|
|
305
|
+
case "BG27_081":
|
|
306
|
+
case "BG27_081_G":
|
|
307
|
+
const cultistStharaSpawnNumber = deadEntity.cardId === "BG27_081_G" ? 2 : 1;
|
|
308
|
+
const cultistStharaSpawnCandidates = gameState.sharedState.deaths
|
|
309
|
+
.filter((entity) => entity.friendly === deadEntity.friendly)
|
|
310
|
+
.filter((entity) => (0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.DEMON, gameState.allCards))
|
|
311
|
+
.slice(0, cultistStharaSpawnNumber);
|
|
312
|
+
cultistStharaSpawnCandidates.forEach((candidate) => {
|
|
313
|
+
const spawns = (0, exports.spawnEntities)(candidate.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true);
|
|
314
|
+
spawns.forEach((spawn) => {
|
|
315
|
+
var _a, _b;
|
|
316
|
+
spawn.attack = (_a = candidate.maxAttack) !== null && _a !== void 0 ? _a : candidate.attack;
|
|
317
|
+
spawn.health = (_b = candidate.maxHealth) !== null && _b !== void 0 ? _b : candidate.health;
|
|
318
|
+
spawn.maxHealth = spawn.health;
|
|
319
|
+
});
|
|
320
|
+
spawnedEntities.push(...spawns);
|
|
374
321
|
});
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
...
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
if (minionToCopy) {
|
|
410
|
-
const copy = {
|
|
411
|
-
...minionToCopy,
|
|
412
|
-
health: 1,
|
|
413
|
-
maxHealth: 1,
|
|
414
|
-
enchantments: [...minionToCopy.enchantments],
|
|
415
|
-
pendingAttackBuffs: [],
|
|
416
|
-
};
|
|
417
|
-
spawnedEntities.push(...(0, exports.spawnEntities)(copy.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, copy));
|
|
418
|
-
copied.push(copy.entityId);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
break;
|
|
422
|
-
case "BG30_105":
|
|
423
|
-
case "BG30_105_G":
|
|
424
|
-
const tiersToSummon = [3, 4, 5];
|
|
425
|
-
for (const tier of tiersToSummon) {
|
|
426
|
-
const candidates = gameState.cardsData.beastSpawns.filter((id) => gameState.allCards.getCard(id).techLevel === tier);
|
|
427
|
-
let spawnId = (0, utils_1.pickRandom)(candidates);
|
|
428
|
-
if (deadEntity.cardId === "BG30_105_G") {
|
|
429
|
-
const premiumDbfId = gameState.allCards.getCard(spawnId).battlegroundsPremiumDbfId;
|
|
430
|
-
spawnId = gameState.allCards.getCard(premiumDbfId).id;
|
|
322
|
+
break;
|
|
323
|
+
case "BG29_864":
|
|
324
|
+
case "BG29_864_G":
|
|
325
|
+
const aridAtrocityStatsMultiplier = deadEntity.cardId === "BG29_864_G" ? 2 : 1;
|
|
326
|
+
const friendlyDeadEntities = gameState.sharedState.deaths.filter((e) => e.friendly === deadEntity.friendly);
|
|
327
|
+
const types = (0, utils_2.getMinionsOfDifferentTypes)(friendlyDeadEntities, boardWithDeadEntityHero, gameState);
|
|
328
|
+
const constaridAtrocityStats = aridAtrocityStatsMultiplier * 7 * types.length;
|
|
329
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG29_864_G"
|
|
330
|
+
? "BG29_864_Gt"
|
|
331
|
+
: "BG29_864t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true).map((e) => ({
|
|
332
|
+
...e,
|
|
333
|
+
attack: e.attack + constaridAtrocityStats,
|
|
334
|
+
health: e.health + constaridAtrocityStats,
|
|
335
|
+
})));
|
|
336
|
+
break;
|
|
337
|
+
case "BGDUO_105":
|
|
338
|
+
case "BGDUO_105_G":
|
|
339
|
+
const magnanimooseCopies = deadEntity.cardId === "BGDUO_105_G" ? 2 : 1;
|
|
340
|
+
for (let i = 0; i < magnanimooseCopies; i++) {
|
|
341
|
+
const teammateState = (0, utils_2.getTeammateInitialState)(gameState.gameState, boardWithDeadEntityHero);
|
|
342
|
+
const teammateBoard = (_e = teammateState === null || teammateState === void 0 ? void 0 : teammateState.board) !== null && _e !== void 0 ? _e : [];
|
|
343
|
+
const copied = [];
|
|
344
|
+
const minionToCopy = (0, utils_1.pickRandom)(teammateBoard.filter((e) => !copied.includes(e.entityId)));
|
|
345
|
+
if (minionToCopy) {
|
|
346
|
+
const copy = {
|
|
347
|
+
...minionToCopy,
|
|
348
|
+
health: 1,
|
|
349
|
+
maxHealth: 1,
|
|
350
|
+
enchantments: [...minionToCopy.enchantments],
|
|
351
|
+
pendingAttackBuffs: [],
|
|
352
|
+
};
|
|
353
|
+
spawnedEntities.push(...(0, exports.spawnEntities)(copy.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, copy));
|
|
354
|
+
copied.push(copy.entityId);
|
|
355
|
+
}
|
|
431
356
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
break;
|
|
357
|
+
break;
|
|
358
|
+
case "BG26_RLK_833":
|
|
359
|
+
spawnedEntities.push(...(0, exports.spawnEntities)("RLK_833t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
|
|
360
|
+
break;
|
|
361
|
+
default:
|
|
362
|
+
hasTriggered = false;
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
441
365
|
}
|
|
442
366
|
if (hasTriggered) {
|
|
443
367
|
(0, deathrattle_on_trigger_1.onDeathrattleTriggered)(deathrattleTriggeredInput);
|