@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Swampstriker = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
exports.Swampstriker = {
|
|
8
|
+
cardIds: ["BG22_401", "BG22_401_G"],
|
|
9
|
+
afterOtherSpawned: (minion, input) => {
|
|
10
|
+
if (minion.entityId !== input.spawned.entityId) {
|
|
11
|
+
const multiplier2 = minion.cardId === "BG22_401_G" ? 2 : 1;
|
|
12
|
+
const buffAmount2 = multiplier2 *
|
|
13
|
+
((0, utils_1.hasCorrectTribe)(input.spawned, input.hero, reference_data_1.Race.MURLOC, input.gameState.allCards) ? 1 : 0);
|
|
14
|
+
if (buffAmount2 > 0) {
|
|
15
|
+
(0, stats_1.modifyStats)(minion, buffAmount2, 0, input.board, input.hero, input.gameState);
|
|
16
|
+
input.gameState.spectator.registerPowerTarget(minion, minion, input.board, null, null);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=swampstriker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swampstriker.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/swampstriker.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,YAAY,GAA0B;IAClD,OAAO,EAAE,0BAAgE;IACzE,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAA4B,EAAE,EAAE;QACxE,IAAI,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE;YAC/C,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,iBAAoC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9E,MAAM,WAAW,GAChB,WAAW;gBACX,CAAC,IAAA,uBAAe,EAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7F,IAAI,WAAW,GAAG,CAAC,EAAE;gBACpB,IAAA,mBAAW,EAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC9E,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;aACvF;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnOtherSpawnAuraInput } from '../../../simulation/add-minion-to-board';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { AfterOtherSpawnedCard } from '../../card.interface';\r\n\r\nexport const Swampstriker: AfterOtherSpawnedCard = {\r\n\tcardIds: [CardIds.Swampstriker_BG22_401, CardIds.Swampstriker_BG22_401_G],\r\n\tafterOtherSpawned: (minion: BoardEntity, input: OnOtherSpawnAuraInput) => {\r\n\t\tif (minion.entityId !== input.spawned.entityId) {\r\n\t\t\tconst multiplier2 = minion.cardId === CardIds.Swampstriker_BG22_401_G ? 2 : 1;\r\n\t\t\tconst buffAmount2 =\r\n\t\t\t\tmultiplier2 *\r\n\t\t\t\t(hasCorrectTribe(input.spawned, input.hero, Race.MURLOC, input.gameState.allCards) ? 1 : 0);\r\n\t\t\tif (buffAmount2 > 0) {\r\n\t\t\t\tmodifyStats(minion, buffAmount2, 0, input.board, input.hero, input.gameState);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(minion, minion, input.board, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ThousandthPaperDrake = void 0;
|
|
4
4
|
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const windfury_1 = require("../../../keywords/windfury");
|
|
5
6
|
const stats_1 = require("../../../simulation/stats");
|
|
6
7
|
const utils_1 = require("../../../utils");
|
|
7
8
|
exports.ThousandthPaperDrake = {
|
|
@@ -13,7 +14,7 @@ exports.ThousandthPaperDrake = {
|
|
|
13
14
|
const target = dragons.filter((e) => !pickedTargets.includes(e))[0];
|
|
14
15
|
if (!!target) {
|
|
15
16
|
(0, stats_1.modifyStats)(target, 1, 2, input.playerBoard, input.playerEntity, input.gameState);
|
|
16
|
-
|
|
17
|
+
(0, windfury_1.updateWindfury)(minion, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);
|
|
17
18
|
input.gameState.spectator.registerPowerTarget(minion, target, input.playerBoard, input.playerEntity, input.opponentEntity);
|
|
18
19
|
pickedTargets.push(target);
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thousandth-paper-drake.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/thousandth-paper-drake.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;
|
|
1
|
+
{"version":3,"file":"thousandth-paper-drake.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/thousandth-paper-drake.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAE7D,yDAA4D;AAE5D,qDAAwD;AACxD,0CAAiD;AAEpC,QAAA,oBAAoB,GAAG;IACnC,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,iBAA4C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChF,MAAM,aAAa,GAAG,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC9C,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,YAAY,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAC7E,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACpE,IAAI,CAAC,CAAC,MAAM,EAAE;gBACb,IAAA,mBAAW,EAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBAClF,IAAA,yBAAc,EACb,MAAM,EACN,IAAI,EACJ,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC3B;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { updateWindfury } from '../../../keywords/windfury';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\n\r\nexport const ThousandthPaperDrake = {\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst loops = minion.cardId === CardIds.ThousandthPaperDrake_BG29_810_G ? 2 : 1;\r\n\t\tconst pickedTargets = [];\r\n\t\tconst dragons = input.playerBoard.filter((e) =>\r\n\t\t\thasCorrectTribe(e, input.playerEntity, Race.DRAGON, input.gameState.allCards),\r\n\t\t);\r\n\t\tfor (let i = 0; i < loops; i++) {\r\n\t\t\tconst target = dragons.filter((e) => !pickedTargets.includes(e))[0];\r\n\t\t\tif (!!target) {\r\n\t\t\t\tmodifyStats(target, 1, 2, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t\t\tupdateWindfury(\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t);\r\n\t\t\t\tpickedTargets.push(target);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TurquoiseSkitterer = void 0;
|
|
4
|
+
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
exports.TurquoiseSkitterer = {
|
|
7
|
+
cardIds: ["TurquoiseSkitterer", "TurquoiseSkitterer_G"],
|
|
8
|
+
deathrattleSpawn: (deadEntity, input) => {
|
|
9
|
+
const numberOfSpawns = deadEntity.cardId === "TurquoiseSkitterer_G" ? 2 : 1;
|
|
10
|
+
return (0, deathrattle_spawns_1.simplifiedSpawnEntities)("BeetleToken", numberOfSpawns, input);
|
|
11
|
+
},
|
|
12
|
+
deathrattleEffect: (minion, input) => {
|
|
13
|
+
const mult = minion.cardId === "TurquoiseSkitterer_G" ? 2 : 1;
|
|
14
|
+
input.boardWithDeadEntityHero.globalInfo.BeetleAttackBuff =
|
|
15
|
+
input.boardWithDeadEntityHero.globalInfo.BeetleAttackBuff + 1 * mult;
|
|
16
|
+
input.boardWithDeadEntityHero.globalInfo.BeetleHealthBuff =
|
|
17
|
+
input.boardWithDeadEntityHero.globalInfo.BeetleHealthBuff + 2 * mult;
|
|
18
|
+
input.boardWithDeadEntity
|
|
19
|
+
.filter((e) => ["BeetleToken", "BeetleToken_G"].includes(e.cardId))
|
|
20
|
+
.forEach((e) => {
|
|
21
|
+
(0, stats_1.modifyStats)(e, 1 * mult, 2 * mult, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=turquoise-skitterer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turquoise-skitterer.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/turquoise-skitterer.ts"],"names":[],"mappings":";;;AAEA,+EAAiF;AACjF,qDAAwD;AAI3C,QAAA,kBAAkB,GAAiD;IAC/E,OAAO,EAAE,8CAAkE;IAC3E,gBAAgB,EAAE,CAAC,UAAuB,EAAE,KAAgC,EAA0B,EAAE;QACvG,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,2BAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtF,OAAO,IAAA,4CAAuB,iBAA0B,cAAc,EAAE,KAAK,CAAC,CAAC;IAChF,CAAC;IACD,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC5E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,2BAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAAgB;YACxD,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAAgB,GAAG,CAAC,GAAG,IAAI,CAAC;QACtE,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAAgB;YACxD,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAAgB,GAAG,CAAC,GAAG,IAAI,CAAC;QACtE,KAAK,CAAC,mBAAmB;aACvB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAoD,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAqB,CAAC,CAAC;aACrG,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACd,IAAA,mBAAW,EACV,CAAC,EACD,CAAC,GAAG,IAAI,EACR,CAAC,GAAG,IAAI,EACR,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,SAAS,CACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { TempCardIds } from '../../../temp-card-ids';\r\nimport { DeathrattleEffectCard, DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const TurquoiseSkitterer: DeathrattleSpawnCard & DeathrattleEffectCard = {\r\n\tcardIds: [TempCardIds.TurquoiseSkitterer, TempCardIds.TurquoiseSkitterer_G],\r\n\tdeathrattleSpawn: (deadEntity: BoardEntity, input: DeathrattleTriggeredInput): readonly BoardEntity[] => {\r\n\t\tconst numberOfSpawns = deadEntity.cardId === TempCardIds.TurquoiseSkitterer_G ? 2 : 1;\r\n\t\treturn simplifiedSpawnEntities(TempCardIds.BeetleToken, numberOfSpawns, input);\r\n\t},\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === TempCardIds.TurquoiseSkitterer_G ? 2 : 1;\r\n\t\tinput.boardWithDeadEntityHero.globalInfo.BeetleAttackBuff =\r\n\t\t\tinput.boardWithDeadEntityHero.globalInfo.BeetleAttackBuff + 1 * mult;\r\n\t\tinput.boardWithDeadEntityHero.globalInfo.BeetleHealthBuff =\r\n\t\t\tinput.boardWithDeadEntityHero.globalInfo.BeetleHealthBuff + 2 * mult;\r\n\t\tinput.boardWithDeadEntity\r\n\t\t\t.filter((e) => [TempCardIds.BeetleToken, TempCardIds.BeetleToken_G].includes(e.cardId as TempCardIds))\r\n\t\t\t.forEach((e) => {\r\n\t\t\t\tmodifyStats(\r\n\t\t\t\t\te,\r\n\t\t\t\t\t1 * mult,\r\n\t\t\t\t\t2 * mult,\r\n\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwilightPrimordium = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const utils_1 = require("../../../services/utils");
|
|
6
|
+
const stats_1 = require("../../../simulation/stats");
|
|
7
|
+
const utils_2 = require("../../../utils");
|
|
8
|
+
exports.TwilightPrimordium = {
|
|
9
|
+
cardIds: ["TwilightPrimordium", "TwilightPrimordium_G"],
|
|
10
|
+
battlecry: (minion, input) => {
|
|
11
|
+
const currentBuffValue = minion.scriptDataNum1;
|
|
12
|
+
const mult = minion.cardId === "TwilightPrimordium_G" ? 2 : 1;
|
|
13
|
+
const candidates = [
|
|
14
|
+
...input.board.filter((e) => (0, utils_2.hasCorrectTribe)(e, input.hero, reference_data_1.Race.ELEMENTAL, input.gameState.allCards)),
|
|
15
|
+
...input.otherBoard.filter((e) => (0, utils_2.hasCorrectTribe)(e, input.hero, reference_data_1.Race.ELEMENTAL, input.gameState.allCards)),
|
|
16
|
+
];
|
|
17
|
+
const target = (0, utils_1.pickRandom)(candidates);
|
|
18
|
+
if (!!target) {
|
|
19
|
+
(0, stats_1.modifyStats)(target, 2 * mult * currentBuffValue, 2 * mult * currentBuffValue, input.board, input.hero, input.gameState);
|
|
20
|
+
input.gameState.spectator.registerPowerTarget(minion, target, input.board, input.hero, input.otherHero);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=twilight-primordium.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilight-primordium.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-primordium.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAEpD,mDAAqD;AAErD,qDAAwD;AAExD,0CAAiD;AAGpC,QAAA,kBAAkB,GAAkB;IAChD,OAAO,EAAE,8CAAkE;IAC3E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC;QAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,2BAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,UAAU,GAAG;YAClB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACtG,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;SAC3G,CAAC;QACF,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,CAAC,MAAM,EAAE;YACb,IAAA,mBAAW,EACV,MAAM,EACN,CAAC,GAAG,IAAI,GAAG,gBAAgB,EAC3B,CAAC,GAAG,IAAI,GAAG,gBAAgB,EAC3B,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;YACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SACxG;IACF,CAAC;CACD,CAAC","sourcesContent":["import { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { TempCardIds } from '../../../temp-card-ids';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { BattlecryCard } from '../../card.interface';\r\n\r\nexport const TwilightPrimordium: BattlecryCard = {\r\n\tcardIds: [TempCardIds.TwilightPrimordium, TempCardIds.TwilightPrimordium_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst currentBuffValue = minion.scriptDataNum1;\r\n\t\tconst mult = minion.cardId === TempCardIds.TwilightPrimordium_G ? 2 : 1;\r\n\t\tconst candidates = [\r\n\t\t\t...input.board.filter((e) => hasCorrectTribe(e, input.hero, Race.ELEMENTAL, input.gameState.allCards)),\r\n\t\t\t...input.otherBoard.filter((e) => hasCorrectTribe(e, input.hero, Race.ELEMENTAL, input.gameState.allCards)),\r\n\t\t];\r\n\t\tconst target = pickRandom(candidates);\r\n\t\tif (!!target) {\r\n\t\t\tmodifyStats(\r\n\t\t\t\ttarget,\r\n\t\t\t\t2 * mult * currentBuffValue,\r\n\t\t\t\t2 * mult * currentBuffValue,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\tinput.gameState.spectator.registerPowerTarget(minion, target, input.board, input.hero, input.otherHero);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UltravioletAscendant = void 0;
|
|
4
|
+
const utils_1 = require("../../../utils");
|
|
5
|
+
exports.UltravioletAscendant = {
|
|
6
|
+
cardIds: ["UltravioletAscendant", "UltravioletAscendant_G"],
|
|
7
|
+
startOfCombat: (minion, input) => {
|
|
8
|
+
const currentBuffValue = minion.scriptDataNum1;
|
|
9
|
+
const mult = minion.cardId === "UltravioletAscendant_G" ? 2 : 1;
|
|
10
|
+
(0, utils_1.addStatsToBoard)(minion, input.playerBoard, input.playerEntity, 2 * mult * currentBuffValue, 1 * mult * currentBuffValue, input.gameState);
|
|
11
|
+
return true;
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=ultraviolet-ascendant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ultraviolet-ascendant.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/ultraviolet-ascendant.ts"],"names":[],"mappings":";;;AAGA,0CAAiD;AAGpC,QAAA,oBAAoB,GAAsB;IACtD,OAAO,EAAE,kDAAsE;IAC/E,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC;QAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,6BAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,CAAC,GAAG,IAAI,GAAG,gBAAgB,EAC3B,CAAC,GAAG,IAAI,GAAG,gBAAgB,EAC3B,KAAK,CAAC,SAAS,CACf,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { TempCardIds } from '../../../temp-card-ids';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const UltravioletAscendant: StartOfCombatCard = {\r\n\tcardIds: [TempCardIds.UltravioletAscendant, TempCardIds.UltravioletAscendant_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst currentBuffValue = minion.scriptDataNum1;\r\n\t\tconst mult = minion.cardId === TempCardIds.UltravioletAscendant_G ? 2 : 1;\r\n\t\taddStatsToBoard(\r\n\t\t\tminion,\r\n\t\t\tinput.playerBoard,\r\n\t\t\tinput.playerEntity,\r\n\t\t\t2 * mult * currentBuffValue,\r\n\t\t\t1 * mult * currentBuffValue,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WanderingWight = void 0;
|
|
4
|
+
const stats_1 = require("../../../simulation/stats");
|
|
5
|
+
exports.WanderingWight = {
|
|
6
|
+
cardIds: ["", ""],
|
|
7
|
+
afterOtherSpawned: (minion, input) => {
|
|
8
|
+
const mult = minion.cardId === "" ? 1 : 2;
|
|
9
|
+
(0, stats_1.modifyStats)(minion, 0, minion.attack * mult, input.board, input.hero, input.gameState);
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=wandering-wight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wandering-wight.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/wandering-wight.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AAI3C,QAAA,cAAc,GAA0B;IACpD,OAAO,EAAE,QAA0D;IACnE,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAA4B,EAAE,EAAE;QACxE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,OAA+B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClE,IAAA,mBAAW,EAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACxF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { OnOtherSpawnAuraInput } from '../../../simulation/add-minion-to-board';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { TempCardIds } from '../../../temp-card-ids';\r\nimport { AfterOtherSpawnedCard } from '../../card.interface';\r\n\r\nexport const WanderingWight: AfterOtherSpawnedCard = {\r\n\tcardIds: [TempCardIds.WanderingWight, TempCardIds.WanderingWight_G],\r\n\tafterOtherSpawned: (minion: BoardEntity, input: OnOtherSpawnAuraInput) => {\r\n\t\tconst mult = minion.cardId === TempCardIds.WanderingWight ? 1 : 2;\r\n\t\tmodifyStats(minion, 0, minion.attack * mult, input.board, input.hero, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WhelpSmuggler = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
exports.WhelpSmuggler = {
|
|
8
|
+
cardIds: ["BG21_013", "BG21_013_G"],
|
|
9
|
+
onStatsChanged: (minion, input) => {
|
|
10
|
+
if ((0, utils_1.hasCorrectTribe)(input.target, input.hero, reference_data_1.Race.DRAGON, input.gameState.allCards)) {
|
|
11
|
+
const buff = minion.cardId === "BG21_013_G" ? 2 : 1;
|
|
12
|
+
(0, stats_1.modifyStats)(input.target, 0, buff, input.board, input.hero, input.gameState);
|
|
13
|
+
input.gameState.spectator.registerPowerTarget(minion, input.target, input.board, input.hero, input.otherHero);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=whelp-smuggler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whelp-smuggler.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/whelp-smuggler.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAE7D,qDAA6E;AAC7E,0CAAiD;AAGpC,QAAA,aAAa,GAAuB;IAChD,OAAO,EAAE,0BAAkE;IAC3E,cAAc,EAAE,CAAC,MAAmB,EAAE,KAA0B,EAAE,EAAE;QACnE,IAAI,IAAA,uBAAe,EAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YACrF,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,IAAA,mBAAW,EAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;YAC7E,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats, OnStatsChangedInput } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { OnStatsChangedCard } from '../../card.interface';\r\n\r\nexport const WhelpSmuggler: OnStatsChangedCard = {\r\n\tcardIds: [CardIds.WhelpSmuggler_BG21_013, CardIds.WhelpSmuggler_BG21_013_G],\r\n\tonStatsChanged: (minion: BoardEntity, input: OnStatsChangedInput) => {\r\n\t\tif (hasCorrectTribe(input.target, input.hero, Race.DRAGON, input.gameState.allCards)) {\r\n\t\t\tconst buff = minion.cardId === CardIds.WhelpSmuggler_BG21_013_G ? 2 : 1;\r\n\t\t\tmodifyStats(input.target, 0, buff, input.board, input.hero, input.gameState);\r\n\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\tminion,\r\n\t\t\t\tinput.target,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.otherHero,\r\n\t\t\t);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WispInTheShell = void 0;
|
|
4
|
+
const utils_1 = require("../../../services/utils");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
exports.WispInTheShell = {
|
|
7
|
+
cardIds: ["", ""],
|
|
8
|
+
battlecry: (minion, input) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const target = (0, utils_1.pickRandomAlive)(input.board);
|
|
11
|
+
if (!!target) {
|
|
12
|
+
const mult = minion.cardId === "" ? 1 : 2;
|
|
13
|
+
const baseValue = 1 + ((_a = input.hero.globalInfo.FriendlyMinionsDeadLastCombat) !== null && _a !== void 0 ? _a : 0);
|
|
14
|
+
const buff = 2 * mult * baseValue;
|
|
15
|
+
(0, stats_1.modifyStats)(target, buff, buff, input.board, input.hero, input.gameState);
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=wisp-in-the-shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wisp-in-the-shell.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/wisp-in-the-shell.ts"],"names":[],"mappings":";;;AACA,mDAA0D;AAE1D,qDAAwD;AAI3C,QAAA,cAAc,GAAkB;IAC5C,OAAO,EAAE,QAA0D;IACnE,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACzD,MAAM,MAAM,GAAG,IAAA,uBAAe,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,CAAC,MAAM,EAAE;YACb,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,OAA+B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAClE,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,6BAA6B,mCAAI,CAAC,CAAC,CAAC;YACjF,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;YAClC,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC1E;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { pickRandomAlive } from '../../../services/utils';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { TempCardIds } from '../../../temp-card-ids';\r\nimport { BattlecryCard } from '../../card.interface';\r\n\r\nexport const WispInTheShell: BattlecryCard = {\r\n\tcardIds: [TempCardIds.WispInTheShell, TempCardIds.WispInTheShell_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst target = pickRandomAlive(input.board);\r\n\t\tif (!!target) {\r\n\t\t\tconst mult = minion.cardId === TempCardIds.WispInTheShell ? 1 : 2;\r\n\t\t\tconst baseValue = 1 + (input.hero.globalInfo.FriendlyMinionsDeadLastCombat ?? 0);\r\n\t\t\tconst buff = 2 * mult * baseValue;\r\n\t\t\tmodifyStats(target, buff, buff, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EternalPortrait = void 0;
|
|
4
|
+
const reborn_1 = require("../../../keywords/reborn");
|
|
5
|
+
const taunt_1 = require("../../../keywords/taunt");
|
|
4
6
|
exports.EternalPortrait = {
|
|
5
7
|
startOfCombat: (trinket, input) => {
|
|
6
8
|
const candidates = input.playerBoard
|
|
@@ -8,8 +10,8 @@ exports.EternalPortrait = {
|
|
|
8
10
|
.filter((e) => !e.taunt || !e.reborn);
|
|
9
11
|
if (candidates === null || candidates === void 0 ? void 0 : candidates.length) {
|
|
10
12
|
candidates.forEach((knight) => {
|
|
11
|
-
knight.
|
|
12
|
-
knight.
|
|
13
|
+
(0, taunt_1.updateTaunt)(knight, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);
|
|
14
|
+
(0, reborn_1.updateReborn)(knight, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);
|
|
13
15
|
input.gameState.spectator.registerPowerTarget(input.playerEntity, knight, input.playerBoard, null, null);
|
|
14
16
|
});
|
|
15
17
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eternal-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/eternal-portrait.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"eternal-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/eternal-portrait.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AACxD,mDAAsD;AAGzC,QAAA,eAAe,GAAG;IAC9B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW;aAClC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,eAAmC,IAAI,CAAC,CAAC,MAAM,iBAAqC,CAAC;aAC3G,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAE;YACvB,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBAC7B,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBACxG,IAAA,qBAAY,EACX,MAAM,EACN,IAAI,EACJ,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,IAAI,EACJ,IAAI,CACJ,CAAC;YACH,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;SACZ;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { updateReborn } from '../../../keywords/reborn';\r\nimport { updateTaunt } from '../../../keywords/taunt';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const EternalPortrait = {\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tconst candidates = input.playerBoard\r\n\t\t\t.filter((e) => e.cardId === CardIds.EternalKnight_BG25_008 || e.cardId === CardIds.EternalKnight_BG25_008_G)\r\n\t\t\t.filter((e) => !e.taunt || !e.reborn);\r\n\t\tif (candidates?.length) {\r\n\t\t\tcandidates.forEach((knight) => {\r\n\t\t\t\tupdateTaunt(knight, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);\r\n\t\t\t\tupdateReborn(\r\n\t\t\t\t\tknight,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tknight,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HollyMallet = void 0;
|
|
4
|
-
const divine_shield_1 = require("../../../divine-shield");
|
|
4
|
+
const divine_shield_1 = require("../../../keywords/divine-shield");
|
|
5
5
|
exports.HollyMallet = {
|
|
6
6
|
startOfCombat: (trinket, input) => {
|
|
7
7
|
if (input.playerBoard.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holly-mallet.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/holly-mallet.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"holly-mallet.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/holly-mallet.ts"],"names":[],"mappings":";;;AACA,mEAAqE;AAGxD,QAAA,WAAW,GAAG;IAC1B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,IAAA,kCAAkB,EACjB,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EACpB,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,KAAK,CAAC,SAAS,CACf,CAAC;YACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EACpB,KAAK,CAAC,WAAW,EACjB,IAAI,EACJ,IAAI,CACJ,CAAC;YACF,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,IAAA,kCAAkB,EACjB,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,EAC/C,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,EAC/C,KAAK,CAAC,WAAW,EACjB,IAAI,EACJ,IAAI,CACJ,CAAC;aACF;YACD,OAAO,IAAI,CAAC;SACZ;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\n\r\nexport const HollyMallet = {\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tif (input.playerBoard.length > 0) {\r\n\t\t\tupdateDivineShield(\r\n\t\t\t\tinput.playerBoard[0],\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\ttrue,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.playerBoard[0],\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tnull,\r\n\t\t\t\tnull,\r\n\t\t\t);\r\n\t\t\tif (input.playerBoard.length > 1) {\r\n\t\t\t\tupdateDivineShield(\r\n\t\t\t\t\tinput.playerBoard[input.playerBoard.length - 1],\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.playerBoard[input.playerBoard.length - 1],\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { BgsPlayerEntity } from '
|
|
2
|
-
import { BoardEntity } from '
|
|
3
|
-
import { FullGameState } from '
|
|
1
|
+
import { BgsPlayerEntity } from '../bgs-player-entity';
|
|
2
|
+
import { BoardEntity } from '../board-entity';
|
|
3
|
+
import { FullGameState } from '../simulation/internal-game-state';
|
|
4
4
|
export declare const updateDivineShield: (entity: BoardEntity, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, newValue: boolean, gameState: FullGameState) => void;
|
|
5
5
|
export declare const grantRandomDivineShield: (source: BoardEntity, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
|
|
6
6
|
export declare const grantDivineShieldToLeftmostMinions: (source: BoardEntity, board: BoardEntity[], hero: BgsPlayerEntity, quantity: number, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
|
|
7
|
+
export interface OnDivineShieldUpdatedInput {
|
|
8
|
+
board: BoardEntity[];
|
|
9
|
+
hero: BgsPlayerEntity;
|
|
10
|
+
otherHero: BgsPlayerEntity;
|
|
11
|
+
gameState: FullGameState;
|
|
12
|
+
target: BoardEntity;
|
|
13
|
+
previousValue: boolean;
|
|
14
|
+
}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.grantDivineShieldToLeftmostMinions = exports.grantRandomDivineShield = exports.updateDivineShield = void 0;
|
|
4
4
|
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
6
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
7
|
+
const utils_1 = require("../services/utils");
|
|
8
|
+
const cards_in_hand_1 = require("../simulation/cards-in-hand");
|
|
9
|
+
const stats_1 = require("../simulation/stats");
|
|
10
|
+
const utils_2 = require("../utils");
|
|
9
11
|
const updateDivineShield = (entity, board, hero, otherHero, newValue, gameState) => {
|
|
10
12
|
var _a;
|
|
11
13
|
entity.hadDivineShield = newValue || entity.divineShield || entity.hadDivineShield;
|
|
@@ -30,6 +32,19 @@ const updateDivineShield = (entity, board, hero, otherHero, newValue, gameState)
|
|
|
30
32
|
(0, exports.updateDivineShield)(entity, board, hero, otherHero, true, gameState);
|
|
31
33
|
adapter.scriptDataNum1--;
|
|
32
34
|
}
|
|
35
|
+
for (const boardEntity of board) {
|
|
36
|
+
const onDivineShieldUpdatedImpl = _card_mappings_1.cardMappings[boardEntity.cardId];
|
|
37
|
+
if ((0, card_interface_1.hasOnDivineShieldUpdated)(onDivineShieldUpdatedImpl)) {
|
|
38
|
+
onDivineShieldUpdatedImpl.onDivineShieldUpdated(boardEntity, {
|
|
39
|
+
board: board,
|
|
40
|
+
hero: hero,
|
|
41
|
+
otherHero: otherHero,
|
|
42
|
+
gameState: gameState,
|
|
43
|
+
target: entity,
|
|
44
|
+
previousValue: entity.hadDivineShield,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
33
48
|
for (let i = 0; i < board.length; i++) {
|
|
34
49
|
if (board[i].cardId === "ICC_858") {
|
|
35
50
|
(0, stats_1.modifyStats)(board[i], 2, 0, board, hero, gameState);
|
|
@@ -66,16 +81,6 @@ const updateDivineShield = (entity, board, hero, otherHero, newValue, gameState)
|
|
|
66
81
|
}
|
|
67
82
|
}
|
|
68
83
|
}
|
|
69
|
-
const greaseBots = board.filter((entity) => entity.cardId === "BG21_024");
|
|
70
|
-
const greaseBotBattlegrounds = board.filter((entity) => entity.cardId === "BG21_024_G");
|
|
71
|
-
greaseBots.forEach((bot) => {
|
|
72
|
-
(0, stats_1.modifyStats)(entity, 2, 1, board, hero, gameState);
|
|
73
|
-
gameState.spectator.registerPowerTarget(bot, entity, board, hero, otherHero);
|
|
74
|
-
});
|
|
75
|
-
greaseBotBattlegrounds.forEach((bot) => {
|
|
76
|
-
(0, stats_1.modifyStats)(entity, 4, 2, board, hero, gameState);
|
|
77
|
-
gameState.spectator.registerPowerTarget(bot, entity, board, hero, otherHero);
|
|
78
|
-
});
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
86
|
exports.updateDivineShield = updateDivineShield;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divine-shield.js","sourceRoot":"","sources":["../../src/keywords/divine-shield.ts"],"names":[],"mappings":"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","sourcesContent":["import { CardIds, CardType, Race } from '@firestone-hs/reference-data';\r\nimport { BgsPlayerEntity } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnDivineShieldUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { pickRandom } from '../services/utils';\r\nimport { addCardsInHand } from '../simulation/cards-in-hand';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\nimport { modifyStats } from '../simulation/stats';\r\nimport { grantRandomStats, hasCorrectTribe } from '../utils';\r\n\r\nexport const updateDivineShield = (\r\n\tentity: BoardEntity,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tnewValue: boolean,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\t// if ((entity.divineShield ?? false) === newValue) {\r\n\t// \treturn;\r\n\t// }\r\n\tentity.hadDivineShield = newValue || entity.divineShield || entity.hadDivineShield;\r\n\tentity.divineShield = newValue;\r\n\tif (entity.divineShield) {\r\n\t\tconst boardForDrake = board;\r\n\t\tconst statsBonus =\r\n\t\t\t8 * boardForDrake.filter((e) => e.cardId === CardIds.CyborgDrake_BG25_043).length +\r\n\t\t\t16 * boardForDrake.filter((e) => e.cardId === CardIds.CyborgDrake_BG25_043_G).length;\r\n\t\t// Don't trigger all \"on attack changed\" effects, since it's an aura\r\n\t\tentity.attack += statsBonus;\r\n\t} else {\r\n\t\t// Also consider itself\r\n\t\tconst boardForDrake = board;\r\n\t\tconst statsBonus =\r\n\t\t\t8 * boardForDrake.filter((e) => e.cardId === CardIds.CyborgDrake_BG25_043).length +\r\n\t\t\t16 * boardForDrake.filter((e) => e.cardId === CardIds.CyborgDrake_BG25_043_G).length;\r\n\t\tentity.attack -= statsBonus;\r\n\t}\r\n\r\n\t// Lost divine shield\r\n\tif (entity.hadDivineShield && !entity.divineShield) {\r\n\t\tconst adapter = hero.trinkets\r\n\t\t\t.filter((t) => t.cardId === CardIds.MechagonAdapter_BG30_MagicItem_910)\r\n\t\t\t.filter((t) => t.scriptDataNum1 > 0)[0];\r\n\t\tif (!!adapter && hasCorrectTribe(entity, hero, Race.MECH, gameState.allCards)) {\r\n\t\t\tupdateDivineShield(entity, board, hero, otherHero, true, gameState);\r\n\t\t\tadapter.scriptDataNum1--;\r\n\t\t}\r\n\r\n\t\tfor (const boardEntity of board) {\r\n\t\t\tconst onDivineShieldUpdatedImpl = cardMappings[boardEntity.cardId];\r\n\t\t\tif (hasOnDivineShieldUpdated(onDivineShieldUpdatedImpl)) {\r\n\t\t\t\tonDivineShieldUpdatedImpl.onDivineShieldUpdated(boardEntity, {\r\n\t\t\t\t\tboard: board,\r\n\t\t\t\t\thero: hero,\r\n\t\t\t\t\totherHero: otherHero,\r\n\t\t\t\t\tgameState: gameState,\r\n\t\t\t\t\ttarget: entity,\r\n\t\t\t\t\tpreviousValue: entity.hadDivineShield,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < board.length; i++) {\r\n\t\t\tif (board[i].cardId === CardIds.BolvarFireblood_ICC_858) {\r\n\t\t\t\tmodifyStats(board[i], 2, 0, board, hero, gameState);\r\n\t\t\t\tgameState.spectator.registerPowerTarget(board[i], board[i], board, hero, otherHero);\r\n\t\t\t} else if (board[i].cardId === CardIds.BolvarFireblood_TB_BaconUps_047) {\r\n\t\t\t\tmodifyStats(board[i], 4, 0, board, hero, gameState);\r\n\t\t\t\tgameState.spectator.registerPowerTarget(board[i], board[i], board, hero, otherHero);\r\n\t\t\t} else if (board[i].cardId === CardIds.DrakonidEnforcer_BGS_067) {\r\n\t\t\t\tmodifyStats(board[i], 2, 2, board, hero, gameState);\r\n\t\t\t\tgameState.spectator.registerPowerTarget(board[i], board[i], board, hero, otherHero);\r\n\t\t\t} else if (board[i].cardId === CardIds.DrakonidEnforcer_TB_BaconUps_117) {\r\n\t\t\t\tmodifyStats(board[i], 4, 4, board, hero, gameState);\r\n\t\t\t\tgameState.spectator.registerPowerTarget(board[i], board[i], board, hero, otherHero);\r\n\t\t\t} else if (\r\n\t\t\t\tboard[i].entityId !== entity.entityId &&\r\n\t\t\t\t(board[i].cardId === CardIds.HolyMecherel_BG20_401 ||\r\n\t\t\t\t\tboard[i].cardId === CardIds.HolyMecherel_BG20_401_G)\r\n\t\t\t) {\r\n\t\t\t\tupdateDivineShield(board[i], board, hero, otherHero, true, gameState);\r\n\t\t\t} else if (board[i].cardId === CardIds.Gemsplitter_BG21_037) {\r\n\t\t\t\taddCardsInHand(hero, board, [CardIds.BloodGem], gameState);\r\n\t\t\t} else if (board[i].cardId === CardIds.Gemsplitter_BG21_037_G) {\r\n\t\t\t\taddCardsInHand(hero, board, [CardIds.BloodGem, CardIds.BloodGem], gameState);\r\n\t\t\t} else if (\r\n\t\t\t\tboard[i].cardId === CardIds.CogworkCopter_BG24_008 ||\r\n\t\t\t\tboard[i].cardId === CardIds.CogworkCopter_BG24_008_G\r\n\t\t\t) {\r\n\t\t\t\t// When it's the opponent, the game state already contains all the buffs\r\n\t\t\t\tif (board[i]?.friendly) {\r\n\t\t\t\t\tconst buff = board[i].cardId === CardIds.CogworkCopter_BG24_008_G ? 2 : 1;\r\n\t\t\t\t\tgrantRandomStats(\r\n\t\t\t\t\t\tboard[i],\r\n\t\t\t\t\t\thero.hand.filter(\r\n\t\t\t\t\t\t\t(e) =>\r\n\t\t\t\t\t\t\t\tgameState.allCards.getCard(e.cardId).type?.toUpperCase() === CardType[CardType.MINION],\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\thero,\r\n\t\t\t\t\t\tbuff,\r\n\t\t\t\t\t\tbuff,\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\ttrue,\r\n\t\t\t\t\t\tgameState,\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport const grantRandomDivineShield = (\r\n\tsource: BoardEntity,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tconst elligibleEntities = board\r\n\t\t.filter((entity) => !entity.divineShield)\r\n\t\t.filter((entity) => entity.health > 0 && !entity.definitelyDead);\r\n\tif (elligibleEntities.length > 0) {\r\n\t\tconst chosen = pickRandom(elligibleEntities);\r\n\t\tupdateDivineShield(chosen, board, hero, otherHero, true, gameState);\r\n\t\tgameState.spectator.registerPowerTarget(source, chosen, board, null, null);\r\n\t}\r\n};\r\n\r\nexport const grantDivineShieldToLeftmostMinions = (\r\n\tsource: BoardEntity,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\tquantity: number,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tfor (let i = 0; i < Math.min(quantity, board.length); i++) {\r\n\t\tupdateDivineShield(board[i], board, hero, otherHero, true, gameState);\r\n\t\tgameState.spectator.registerPowerTarget(source, board[i], board, null, null);\r\n\t}\r\n};\r\n\r\nexport interface OnDivineShieldUpdatedInput {\r\n\tboard: BoardEntity[];\r\n\thero: BgsPlayerEntity;\r\n\totherHero: BgsPlayerEntity;\r\n\tgameState: FullGameState;\r\n\ttarget: BoardEntity;\r\n\tpreviousValue: boolean;\r\n}\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BgsPlayerEntity } from '../bgs-player-entity';
|
|
2
|
+
import { BoardEntity } from '../board-entity';
|
|
3
|
+
import { FullGameState } from '../simulation/internal-game-state';
|
|
4
|
+
export declare const updateReborn: (entity: BoardEntity, newValue: boolean, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
|
|
5
|
+
export interface OnRebornUpdatedInput {
|
|
6
|
+
board: BoardEntity[];
|
|
7
|
+
hero: BgsPlayerEntity;
|
|
8
|
+
otherHero: BgsPlayerEntity;
|
|
9
|
+
gameState: FullGameState;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateReborn = void 0;
|
|
4
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
5
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
6
|
+
const updateReborn = (entity, newValue, board, hero, otherHero, gameState) => {
|
|
7
|
+
const previousValue = entity.reborn;
|
|
8
|
+
entity.reborn = newValue;
|
|
9
|
+
for (const boardEntity of board) {
|
|
10
|
+
const onRebornUpdatedImpl = _card_mappings_1.cardMappings[boardEntity.cardId];
|
|
11
|
+
if ((0, card_interface_1.hasOnRebornUpdated)(onRebornUpdatedImpl)) {
|
|
12
|
+
onRebornUpdatedImpl.onRebornUpdated(boardEntity, entity, previousValue, {
|
|
13
|
+
board: board,
|
|
14
|
+
hero: hero,
|
|
15
|
+
otherHero: otherHero,
|
|
16
|
+
gameState: gameState,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.updateReborn = updateReborn;
|
|
22
|
+
//# sourceMappingURL=reborn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reborn.js","sourceRoot":"","sources":["../../src/keywords/reborn.ts"],"names":[],"mappings":";;;AAEA,4DAA6D;AAC7D,iEAA4D;AAGrD,MAAM,YAAY,GAAG,CAC3B,MAAmB,EACnB,QAAiB,EACjB,KAAoB,EACpB,IAAqB,EACrB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;IACT,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC;IAEzB,KAAK,MAAM,WAAW,IAAI,KAAK,EAAE;QAChC,MAAM,mBAAmB,GAAG,6BAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC7D,IAAI,IAAA,mCAAkB,EAAC,mBAAmB,CAAC,EAAE;YAC5C,mBAAmB,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE;gBACvE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,SAAS;gBACpB,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAtBW,QAAA,YAAY,gBAsBvB","sourcesContent":["import { BgsPlayerEntity } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnRebornUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\n\r\nexport const updateReborn = (\r\n\tentity: BoardEntity,\r\n\tnewValue: boolean,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tconst previousValue = entity.reborn;\r\n\tentity.reborn = newValue;\r\n\r\n\tfor (const boardEntity of board) {\r\n\t\tconst onRebornUpdatedImpl = cardMappings[boardEntity.cardId];\r\n\t\tif (hasOnRebornUpdated(onRebornUpdatedImpl)) {\r\n\t\t\tonRebornUpdatedImpl.onRebornUpdated(boardEntity, entity, previousValue, {\r\n\t\t\t\tboard: board,\r\n\t\t\t\thero: hero,\r\n\t\t\t\totherHero: otherHero,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport interface OnRebornUpdatedInput {\r\n\tboard: BoardEntity[];\r\n\thero: BgsPlayerEntity;\r\n\totherHero: BgsPlayerEntity;\r\n\tgameState: FullGameState;\r\n}\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BgsPlayerEntity } from '../bgs-player-entity';
|
|
2
|
+
import { BoardEntity } from '../board-entity';
|
|
3
|
+
import { FullGameState } from '../simulation/internal-game-state';
|
|
4
|
+
export declare const updateStealth: (entity: BoardEntity, newValue: boolean, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
|
|
5
|
+
export interface OnStealthUpdatedInput {
|
|
6
|
+
board: BoardEntity[];
|
|
7
|
+
hero: BgsPlayerEntity;
|
|
8
|
+
otherHero: BgsPlayerEntity;
|
|
9
|
+
gameState: FullGameState;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateStealth = void 0;
|
|
4
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
5
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
6
|
+
const updateStealth = (entity, newValue, board, hero, otherHero, gameState) => {
|
|
7
|
+
const previousValue = entity.stealth;
|
|
8
|
+
entity.stealth = newValue;
|
|
9
|
+
for (const boardEntity of board) {
|
|
10
|
+
const onStealthUpdatedImpl = _card_mappings_1.cardMappings[boardEntity.cardId];
|
|
11
|
+
if ((0, card_interface_1.hasOnStealthUpdated)(onStealthUpdatedImpl)) {
|
|
12
|
+
onStealthUpdatedImpl.onStealthUpdated(boardEntity, entity, previousValue, {
|
|
13
|
+
board: board,
|
|
14
|
+
hero: hero,
|
|
15
|
+
otherHero: otherHero,
|
|
16
|
+
gameState: gameState,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.updateStealth = updateStealth;
|
|
22
|
+
//# sourceMappingURL=stealth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stealth.js","sourceRoot":"","sources":["../../src/keywords/stealth.ts"],"names":[],"mappings":";;;AAEA,4DAA8D;AAC9D,iEAA4D;AAGrD,MAAM,aAAa,GAAG,CAC5B,MAAmB,EACnB,QAAiB,EACjB,KAAoB,EACpB,IAAqB,EACrB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;IACT,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;IACrC,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC;IAE1B,KAAK,MAAM,WAAW,IAAI,KAAK,EAAE;QAChC,MAAM,oBAAoB,GAAG,6BAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,IAAA,oCAAmB,EAAC,oBAAoB,CAAC,EAAE;YAC9C,oBAAoB,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE;gBACzE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,SAAS;gBACpB,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAtBW,QAAA,aAAa,iBAsBxB","sourcesContent":["import { BgsPlayerEntity } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnStealthUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\n\r\nexport const updateStealth = (\r\n\tentity: BoardEntity,\r\n\tnewValue: boolean,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tconst previousValue = entity.stealth;\r\n\tentity.stealth = newValue;\r\n\r\n\tfor (const boardEntity of board) {\r\n\t\tconst onStealthUpdatedImpl = cardMappings[boardEntity.cardId];\r\n\t\tif (hasOnStealthUpdated(onStealthUpdatedImpl)) {\r\n\t\t\tonStealthUpdatedImpl.onStealthUpdated(boardEntity, entity, previousValue, {\r\n\t\t\t\tboard: board,\r\n\t\t\t\thero: hero,\r\n\t\t\t\totherHero: otherHero,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport interface OnStealthUpdatedInput {\r\n\tboard: BoardEntity[];\r\n\thero: BgsPlayerEntity;\r\n\totherHero: BgsPlayerEntity;\r\n\tgameState: FullGameState;\r\n}\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BgsPlayerEntity } from '../bgs-player-entity';
|
|
2
|
+
import { BoardEntity } from '../board-entity';
|
|
3
|
+
import { FullGameState } from '../simulation/internal-game-state';
|
|
4
|
+
export declare const updateTaunt: (entity: BoardEntity, newValue: boolean, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
|
|
5
|
+
export interface OnTauntUpdatedInput {
|
|
6
|
+
board: BoardEntity[];
|
|
7
|
+
hero: BgsPlayerEntity;
|
|
8
|
+
otherHero: BgsPlayerEntity;
|
|
9
|
+
gameState: FullGameState;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTaunt = void 0;
|
|
4
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
5
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
6
|
+
const updateTaunt = (entity, newValue, board, hero, otherHero, gameState) => {
|
|
7
|
+
const previousValue = entity.taunt;
|
|
8
|
+
entity.taunt = newValue;
|
|
9
|
+
for (const boardEntity of board) {
|
|
10
|
+
const onTauntUpdatedImpl = _card_mappings_1.cardMappings[boardEntity.cardId];
|
|
11
|
+
if ((0, card_interface_1.hasOnTauntUpdated)(onTauntUpdatedImpl)) {
|
|
12
|
+
onTauntUpdatedImpl.onTauntUpdated(boardEntity, entity, previousValue, {
|
|
13
|
+
board: board,
|
|
14
|
+
hero: hero,
|
|
15
|
+
otherHero: otherHero,
|
|
16
|
+
gameState: gameState,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.updateTaunt = updateTaunt;
|
|
22
|
+
//# sourceMappingURL=taunt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taunt.js","sourceRoot":"","sources":["../../src/keywords/taunt.ts"],"names":[],"mappings":";;;AAEA,4DAA4D;AAC5D,iEAA4D;AAGrD,MAAM,WAAW,GAAG,CAC1B,MAAmB,EACnB,QAAiB,EACjB,KAAoB,EACpB,IAAqB,EACrB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;IACT,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;IACnC,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC;IAExB,KAAK,MAAM,WAAW,IAAI,KAAK,EAAE;QAChC,MAAM,kBAAkB,GAAG,6BAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,IAAA,kCAAiB,EAAC,kBAAkB,CAAC,EAAE;YAC1C,kBAAkB,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE;gBACrE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,SAAS;gBACpB,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAtBW,QAAA,WAAW,eAsBtB","sourcesContent":["import { BgsPlayerEntity } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnTauntUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\n\r\nexport const updateTaunt = (\r\n\tentity: BoardEntity,\r\n\tnewValue: boolean,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tconst previousValue = entity.taunt;\r\n\tentity.taunt = newValue;\r\n\r\n\tfor (const boardEntity of board) {\r\n\t\tconst onTauntUpdatedImpl = cardMappings[boardEntity.cardId];\r\n\t\tif (hasOnTauntUpdated(onTauntUpdatedImpl)) {\r\n\t\t\tonTauntUpdatedImpl.onTauntUpdated(boardEntity, entity, previousValue, {\r\n\t\t\t\tboard: board,\r\n\t\t\t\thero: hero,\r\n\t\t\t\totherHero: otherHero,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport interface OnTauntUpdatedInput {\r\n\tboard: BoardEntity[];\r\n\thero: BgsPlayerEntity;\r\n\totherHero: BgsPlayerEntity;\r\n\tgameState: FullGameState;\r\n}\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BgsPlayerEntity } from '../bgs-player-entity';
|
|
2
|
+
import { BoardEntity } from '../board-entity';
|
|
3
|
+
import { FullGameState } from '../simulation/internal-game-state';
|
|
4
|
+
export declare const updateVenomous: (entity: BoardEntity, newValue: boolean, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
|
|
5
|
+
export interface OnVenomousUpdatedInput {
|
|
6
|
+
board: BoardEntity[];
|
|
7
|
+
hero: BgsPlayerEntity;
|
|
8
|
+
otherHero: BgsPlayerEntity;
|
|
9
|
+
gameState: FullGameState;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateVenomous = void 0;
|
|
4
|
+
const card_interface_1 = require("../cards/card.interface");
|
|
5
|
+
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
6
|
+
const stats_1 = require("../simulation/stats");
|
|
7
|
+
const updateVenomous = (entity, newValue, board, hero, otherHero, gameState) => {
|
|
8
|
+
const previousValue = entity.venomous;
|
|
9
|
+
const lostVenomous = entity.venomous && !newValue;
|
|
10
|
+
entity.venomous = newValue;
|
|
11
|
+
if (lostVenomous) {
|
|
12
|
+
const belcherPortraits = hero.trinkets.filter((t) => t.cardId === "BG30_MagicItem_432" ||
|
|
13
|
+
t.cardId === "BG30_MagicItem_432t");
|
|
14
|
+
belcherPortraits.forEach((p) => {
|
|
15
|
+
const buff = p.cardId === "BG30_MagicItem_432t" ? 14 : 4;
|
|
16
|
+
(0, stats_1.modifyStats)(entity, buff, buff, board, hero, gameState);
|
|
17
|
+
gameState.spectator.registerPowerTarget(p, entity, board, null, null);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
for (const boardEntity of board) {
|
|
21
|
+
const onVenomousUpdatedImpl = _card_mappings_1.cardMappings[boardEntity.cardId];
|
|
22
|
+
if ((0, card_interface_1.hasOnVenomousUpdated)(onVenomousUpdatedImpl)) {
|
|
23
|
+
onVenomousUpdatedImpl.onVenomousUpdated(boardEntity, entity, previousValue, {
|
|
24
|
+
board: board,
|
|
25
|
+
hero: hero,
|
|
26
|
+
otherHero: otherHero,
|
|
27
|
+
gameState: gameState,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.updateVenomous = updateVenomous;
|
|
33
|
+
//# sourceMappingURL=venomous.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venomous.js","sourceRoot":"","sources":["../../src/keywords/venomous.ts"],"names":[],"mappings":";;;AAGA,4DAA+D;AAC/D,iEAA4D;AAE5D,+CAAkD;AAE3C,MAAM,cAAc,GAAG,CAC7B,MAAmB,EACnB,QAAiB,EACjB,KAAoB,EACpB,IAAqB,EACrB,SAA0B,EAC1B,SAAwB,EACjB,EAAE;IACT,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC;IACtC,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC;IAClD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,IAAI,YAAY,EAAE;QACjB,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAC5C,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,CAAC,MAAM,yBAA+C;YACvD,CAAC,CAAC,MAAM,0BAAqE,CAC9E,CAAC;QACF,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC9B,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,0BAAqE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACpG,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;YACxD,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;KACH;IAED,KAAK,MAAM,WAAW,IAAI,KAAK,EAAE;QAChC,MAAM,qBAAqB,GAAG,6BAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,IAAA,qCAAoB,EAAC,qBAAqB,CAAC,EAAE;YAChD,qBAAqB,CAAC,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE;gBAC3E,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,SAAS;gBACpB,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAnCW,QAAA,cAAc,kBAmCzB","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BgsPlayerEntity } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnVenomousUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\nimport { modifyStats } from '../simulation/stats';\r\n\r\nexport const updateVenomous = (\r\n\tentity: BoardEntity,\r\n\tnewValue: boolean,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tconst previousValue = entity.venomous;\r\n\tconst lostVenomous = entity.venomous && !newValue;\r\n\tentity.venomous = newValue;\r\n\tif (lostVenomous) {\r\n\t\tconst belcherPortraits = hero.trinkets.filter(\r\n\t\t\t(t) =>\r\n\t\t\t\tt.cardId === CardIds.BelcherPortrait_BG30_MagicItem_432 ||\r\n\t\t\t\tt.cardId === CardIds.BelcherPortrait_BelcherPortraitToken_BG30_MagicItem_432t,\r\n\t\t);\r\n\t\tbelcherPortraits.forEach((p) => {\r\n\t\t\tconst buff = p.cardId === CardIds.BelcherPortrait_BelcherPortraitToken_BG30_MagicItem_432t ? 14 : 4;\r\n\t\t\tmodifyStats(entity, buff, buff, board, hero, gameState);\r\n\t\t\tgameState.spectator.registerPowerTarget(p, entity, board, null, null);\r\n\t\t});\r\n\t}\r\n\r\n\tfor (const boardEntity of board) {\r\n\t\tconst onVenomousUpdatedImpl = cardMappings[boardEntity.cardId];\r\n\t\tif (hasOnVenomousUpdated(onVenomousUpdatedImpl)) {\r\n\t\t\tonVenomousUpdatedImpl.onVenomousUpdated(boardEntity, entity, previousValue, {\r\n\t\t\t\tboard: board,\r\n\t\t\t\thero: hero,\r\n\t\t\t\totherHero: otherHero,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport interface OnVenomousUpdatedInput {\r\n\tboard: BoardEntity[];\r\n\thero: BgsPlayerEntity;\r\n\totherHero: BgsPlayerEntity;\r\n\tgameState: FullGameState;\r\n}\r\n"]}
|