@firestone-hs/simulate-bgs-battle 1.1.586 → 1.1.588
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/board-entity.d.ts +3 -0
- package/dist/board-entity.js.map +1 -1
- package/dist/cards/impl/minion/anubarak-nerubian-king.js +1 -1
- package/dist/cards/impl/minion/anubarak-nerubian-king.js.map +1 -1
- package/dist/cards/impl/minion/champion-of-the-primus.js +1 -1
- package/dist/cards/impl/minion/champion-of-the-primus.js.map +1 -1
- package/dist/cards/impl/minion/interrogator-whitemane.js +1 -3
- package/dist/cards/impl/minion/interrogator-whitemane.js.map +1 -1
- package/dist/cards/impl/minion/nerubian-deathswarmer.js +1 -1
- package/dist/cards/impl/minion/nerubian-deathswarmer.js.map +1 -1
- package/dist/cards/impl/trinket/battle-horn.js +2 -2
- package/dist/cards/impl/trinket/battle-horn.js.map +1 -1
- package/dist/cards/impl/trinket/beetle-band.js +2 -3
- package/dist/cards/impl/trinket/beetle-band.js.map +1 -1
- package/dist/cards/impl/trinket/eclectic-shrine.js +1 -1
- package/dist/cards/impl/trinket/eclectic-shrine.js.map +1 -1
- package/dist/simulation/after-attack.d.ts +1 -0
- package/dist/simulation/after-attack.js +30 -26
- package/dist/simulation/after-attack.js.map +1 -1
- package/dist/simulation/attack.js +2 -1
- package/dist/simulation/attack.js.map +1 -1
- package/dist/simulation/avenge.d.ts +1 -1
- package/dist/simulation/avenge.js +1 -0
- package/dist/simulation/avenge.js.map +1 -1
- package/dist/simulation/deathrattle-effects.js +2 -0
- package/dist/simulation/deathrattle-effects.js.map +1 -1
- package/dist/simulation/deathrattle-orchestration.js +34 -19
- package/dist/simulation/deathrattle-orchestration.js.map +1 -1
- package/dist/simulation/deathrattle-spawns.js +5 -2
- package/dist/simulation/deathrattle-spawns.js.map +1 -1
- package/dist/simulation/spawns.js +2 -0
- package/dist/simulation/spawns.js.map +1 -1
- package/dist/simulation/stats.js +1 -0
- package/dist/simulation/stats.js.map +1 -1
- package/dist/simulation/summon-when-space.js +2 -0
- package/dist/simulation/summon-when-space.js.map +1 -1
- package/dist/simulation/utils/golden.js +2 -2
- package/dist/simulation/utils/golden.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +8 -2
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -58,6 +58,7 @@ const spawnEntities = (cardId, quantity, boardToSpawnInto, boardToSpawnIntoHero,
|
|
|
58
58
|
exports.spawnEntities = spawnEntities;
|
|
59
59
|
const spawnEntitiesFromDeathrattle = (deadEntity, deadEntityIndexFromRight, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, entitiesDeadThisAttack, gameState) => {
|
|
60
60
|
var _a, _b, _c, _d, _e, _f;
|
|
61
|
+
const finalSpawns = [];
|
|
61
62
|
const multiplier = (0, deathrattle_effects_1.computeDeathrattleMultiplier)([...boardWithDeadEntity], boardWithDeadEntityHero, deadEntity, gameState.sharedState);
|
|
62
63
|
const deathrattleTriggeredInput = {
|
|
63
64
|
boardWithDeadEntity,
|
|
@@ -68,12 +69,12 @@ const spawnEntitiesFromDeathrattle = (deadEntity, deadEntityIndexFromRight, boar
|
|
|
68
69
|
otherBoardHero,
|
|
69
70
|
gameState,
|
|
70
71
|
};
|
|
71
|
-
const spawnedEntities = [];
|
|
72
72
|
const enchantments = [
|
|
73
73
|
...((_a = deadEntity.enchantments) !== null && _a !== void 0 ? _a : []),
|
|
74
74
|
].sort((a, b) => a.timing - b.timing);
|
|
75
75
|
const cardIds = [deadEntity.cardId, ...((_b = deadEntity.additionalCards) !== null && _b !== void 0 ? _b : []), ...enchantments.map((e) => e.cardId)];
|
|
76
76
|
for (const deadEntityCardId of cardIds) {
|
|
77
|
+
const spawnedEntities = [];
|
|
77
78
|
for (let i = 0; i < multiplier; i++) {
|
|
78
79
|
let hasTriggered = true;
|
|
79
80
|
const spawnEntityImpl = _card_mappings_1.cardMappings[deadEntityCardId];
|
|
@@ -663,12 +664,14 @@ const spawnEntitiesFromDeathrattle = (deadEntity, deadEntityIndexFromRight, boar
|
|
|
663
664
|
break;
|
|
664
665
|
}
|
|
665
666
|
}
|
|
667
|
+
const actualSpawns = (0, spawns_1.performEntitySpawns)(spawnedEntities, boardWithDeadEntity, boardWithDeadEntityHero, deadEntity, deadEntityIndexFromRight, otherBoard, otherBoardHero, gameState);
|
|
668
|
+
finalSpawns.push(...actualSpawns);
|
|
666
669
|
if (hasTriggered) {
|
|
667
670
|
(0, deathrattle_on_trigger_1.onDeathrattleTriggered)(deathrattleTriggeredInput);
|
|
668
671
|
}
|
|
669
672
|
}
|
|
670
673
|
}
|
|
671
|
-
return
|
|
674
|
+
return finalSpawns;
|
|
672
675
|
};
|
|
673
676
|
exports.spawnEntitiesFromDeathrattle = spawnEntitiesFromDeathrattle;
|
|
674
677
|
const spawnEntitiesFromEnchantments = (deadEntity, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState) => {
|