@firestone-hs/simulate-bgs-battle 1.1.587 → 1.1.589
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/battlecruiser.js +2 -4
- package/dist/cards/impl/minion/battlecruiser.js.map +1 -1
- package/dist/cards/impl/minion/glowgullet-warlord.js +4 -1
- package/dist/cards/impl/minion/glowgullet-warlord.js.map +1 -1
- package/dist/cards/impl/minion/stitched-salvager.js +1 -1
- package/dist/cards/impl/minion/stitched-salvager.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/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 +7 -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/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/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,13 +69,13 @@ 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
77
|
for (let i = 0; i < multiplier; i++) {
|
|
78
|
+
const spawnedEntities = [];
|
|
78
79
|
let hasTriggered = true;
|
|
79
80
|
const spawnEntityImpl = _card_mappings_1.cardMappings[deadEntityCardId];
|
|
80
81
|
if ((0, card_interface_1.hasDeathrattleSpawn)(spawnEntityImpl)) {
|
|
@@ -663,12 +664,16 @@ const spawnEntitiesFromDeathrattle = (deadEntity, deadEntityIndexFromRight, boar
|
|
|
663
664
|
break;
|
|
664
665
|
}
|
|
665
666
|
}
|
|
667
|
+
if ((spawnedEntities === null || spawnedEntities === void 0 ? void 0 : spawnedEntities.length) > 0) {
|
|
668
|
+
const actualSpawns = (0, spawns_1.performEntitySpawns)(spawnedEntities, boardWithDeadEntity, boardWithDeadEntityHero, deadEntity, deadEntityIndexFromRight, otherBoard, otherBoardHero, gameState);
|
|
669
|
+
finalSpawns.push(...actualSpawns);
|
|
670
|
+
}
|
|
666
671
|
if (hasTriggered) {
|
|
667
672
|
(0, deathrattle_on_trigger_1.onDeathrattleTriggered)(deathrattleTriggeredInput);
|
|
668
673
|
}
|
|
669
674
|
}
|
|
670
675
|
}
|
|
671
|
-
return
|
|
676
|
+
return finalSpawns;
|
|
672
677
|
};
|
|
673
678
|
exports.spawnEntitiesFromDeathrattle = spawnEntitiesFromDeathrattle;
|
|
674
679
|
const spawnEntitiesFromEnchantments = (deadEntity, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState) => {
|