@firestone-hs/simulate-bgs-battle 1.1.507 → 1.1.508
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.
|
@@ -49,11 +49,11 @@ export interface BgsPlayerGlobalInfo {
|
|
|
49
49
|
AstralAutomatonsSummonedThisGame?: number;
|
|
50
50
|
ChoralAttackBuff?: number;
|
|
51
51
|
ChoralHealthBuff?: number;
|
|
52
|
-
BattlecriesTriggeredThisGame?: number;
|
|
53
52
|
BeetleAttackBuff?: number;
|
|
54
53
|
BeetleHealthBuff?: number;
|
|
55
54
|
MutatedLasherAttackBuff?: number;
|
|
56
55
|
MutatedLasherHealthBuff?: number;
|
|
56
|
+
BattlecriesTriggeredThisGame?: number;
|
|
57
57
|
FriendlyMinionsDeadLastCombat?: number;
|
|
58
58
|
}
|
|
59
59
|
export interface BgsQuestEntity {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bgs-player-entity.js","sourceRoot":"","sources":["../src/bgs-player-entity.ts"],"names":[],"mappings":"","sourcesContent":["import { BoardEntity } from './board-entity';\r\nimport { BoardSecret } from './board-secret';\r\n\r\nexport interface BgsPlayerEntity {\r\n\tcardId: string;\r\n\treadonly nonGhostCardId?: string;\r\n\thpLeft: number;\r\n\treadonly tavernTier: number;\r\n\r\n\theroPowerId?: string | undefined | null;\r\n\treadonly heroPowerEntityId?: number;\r\n\treadonly heroPowerUsed: boolean;\r\n\treadonly heroPowerInfo?: number | string;\r\n\theroPowerInfo2?: number;\r\n\t// For Ozumat\r\n\theroPowerActivated?: boolean;\r\n\r\n\tfriendly?: boolean;\r\n\tentityId?: number;\r\n\tquestEntities: BgsQuestEntity[];\r\n\tquestRewards?: string[];\r\n\tquestRewardEntities?: {\r\n\t\tcardId: string;\r\n\t\tentityId: number;\r\n\t\tavengeDefault?: number;\r\n\t\tavengeCurrent?: number;\r\n\t\tscriptDataNum1: number;\r\n\t}[];\r\n\thand?: BoardEntity[];\r\n\tsecrets?: BoardSecret[];\r\n\ttrinkets?: BoardTrinket[];\r\n\tavengeCurrent?: number;\r\n\tavengeDefault?: number;\r\n\tglobalInfo?: BgsPlayerGlobalInfo;\r\n\tstartOfCombatDone?: boolean;\r\n\r\n\tdeadEyeDamageDone?: number;\r\n\trapidReanimationMinion?: BoardEntity;\r\n\trapidReanimationIndexFromLeft?: number;\r\n\trapidReanimationIndexFromRight?: number;\r\n}\r\n\r\nexport interface BgsPlayerGlobalInfo {\r\n\tEternalKnightsDeadThisGame?: number;\r\n\tUndeadAttackBonus?: number;\r\n\tFrostlingBonus?: number;\r\n\tBloodGemAttackBonus?: number;\r\n\tBloodGemHealthBonus?: number;\r\n\tGoldrinnBuffAtk?: number;\r\n\tGoldrinnBuffHealth?: number;\r\n\tTavernSpellsCastThisGame?: number;\r\n\tPiratesPlayedThisGame?: number;\r\n\tPiratesSummonedThisGame?: number;\r\n\tPirateAttackBonus?: number;\r\n\tAstralAutomatonsSummonedThisGame?: number;\r\n\tChoralAttackBuff?: number;\r\n\tChoralHealthBuff?: number;\r\n\
|
|
1
|
+
{"version":3,"file":"bgs-player-entity.js","sourceRoot":"","sources":["../src/bgs-player-entity.ts"],"names":[],"mappings":"","sourcesContent":["import { BoardEntity } from './board-entity';\r\nimport { BoardSecret } from './board-secret';\r\n\r\nexport interface BgsPlayerEntity {\r\n\tcardId: string;\r\n\treadonly nonGhostCardId?: string;\r\n\thpLeft: number;\r\n\treadonly tavernTier: number;\r\n\r\n\theroPowerId?: string | undefined | null;\r\n\treadonly heroPowerEntityId?: number;\r\n\treadonly heroPowerUsed: boolean;\r\n\treadonly heroPowerInfo?: number | string;\r\n\theroPowerInfo2?: number;\r\n\t// For Ozumat\r\n\theroPowerActivated?: boolean;\r\n\r\n\tfriendly?: boolean;\r\n\tentityId?: number;\r\n\tquestEntities: BgsQuestEntity[];\r\n\tquestRewards?: string[];\r\n\tquestRewardEntities?: {\r\n\t\tcardId: string;\r\n\t\tentityId: number;\r\n\t\tavengeDefault?: number;\r\n\t\tavengeCurrent?: number;\r\n\t\tscriptDataNum1: number;\r\n\t}[];\r\n\thand?: BoardEntity[];\r\n\tsecrets?: BoardSecret[];\r\n\ttrinkets?: BoardTrinket[];\r\n\tavengeCurrent?: number;\r\n\tavengeDefault?: number;\r\n\tglobalInfo?: BgsPlayerGlobalInfo;\r\n\tstartOfCombatDone?: boolean;\r\n\r\n\tdeadEyeDamageDone?: number;\r\n\trapidReanimationMinion?: BoardEntity;\r\n\trapidReanimationIndexFromLeft?: number;\r\n\trapidReanimationIndexFromRight?: number;\r\n}\r\n\r\nexport interface BgsPlayerGlobalInfo {\r\n\tEternalKnightsDeadThisGame?: number;\r\n\tUndeadAttackBonus?: number;\r\n\tFrostlingBonus?: number;\r\n\tBloodGemAttackBonus?: number;\r\n\tBloodGemHealthBonus?: number;\r\n\tGoldrinnBuffAtk?: number;\r\n\tGoldrinnBuffHealth?: number;\r\n\tTavernSpellsCastThisGame?: number;\r\n\tPiratesPlayedThisGame?: number;\r\n\tPiratesSummonedThisGame?: number;\r\n\tPirateAttackBonus?: number;\r\n\tAstralAutomatonsSummonedThisGame?: number;\r\n\tChoralAttackBuff?: number;\r\n\tChoralHealthBuff?: number;\r\n\tBeetleAttackBuff?: number;\r\n\tBeetleHealthBuff?: number;\r\n\tMutatedLasherAttackBuff?: number;\r\n\tMutatedLasherHealthBuff?: number;\r\n\tBattlecriesTriggeredThisGame?: number;\r\n\tFriendlyMinionsDeadLastCombat?: number;\r\n}\r\n\r\nexport interface BgsQuestEntity {\r\n\tCardId: string;\r\n\tRewardDbfId: number;\r\n\tProgressCurrent: number;\r\n\tProgressTotal: number;\r\n}\r\n\r\nexport interface BoardTrinket {\r\n\tcardId: string;\r\n\tentityId: number;\r\n\tscriptDataNum1: number;\r\n\tscriptDataNum6?: number;\r\n\trememberedMinion?: BoardEntity;\r\n\tavengeDefault?: number;\r\n\tavengeCurrent?: number;\r\n}\r\n"]}
|
|
@@ -14,15 +14,17 @@ exports.EfficientEngineer = {
|
|
|
14
14
|
.filter((e) => { var _a; return (_a = input.gameState.allCards.getCard(e.cardId).mechanics) === null || _a === void 0 ? void 0 : _a.includes(reference_data_1.GameTag[reference_data_1.GameTag.END_OF_TURN]); })
|
|
15
15
|
.filter((e) => !["BG22_403", "BG22_403_G"].includes(e.cardId));
|
|
16
16
|
const target = (0, utils_1.pickRandom)(candidates);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
if (target) {
|
|
18
|
+
const endOfTurnImpl = _card_mappings_1.cardMappings[target.cardId];
|
|
19
|
+
if ((0, card_interface_1.hasEndOfTurn)(endOfTurnImpl)) {
|
|
20
|
+
const numberOfLoops = input.board.some((e) => e.cardId === "BG26_ICC_901_G")
|
|
21
|
+
? 3
|
|
22
|
+
: input.board.some((e) => e.cardId === "BG26_ICC_901")
|
|
23
|
+
? 2
|
|
24
|
+
: 1;
|
|
25
|
+
for (let i = 0; i < numberOfLoops; i++) {
|
|
26
|
+
endOfTurnImpl.endOfTurn(target, input);
|
|
27
|
+
}
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"efficient-engineer.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/efficient-engineer.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAEhE,mDAAqD;AAErD,yDAAmE;AACnE,sDAAiD;AAEpC,QAAA,iBAAiB,GAAkB;IAC/C,OAAO,EAAE,0BAA0E;IACnF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE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CAAC,WAAW,CAAC,CAAC,CAAA,EAAA,CAC5F;iBACA,MAAM,CACN,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,0BAAgE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAiB,CAAC,CAChG,CAAC;YACH,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;YACtC,IAAI,MAAM,EAAE;gBACX,MAAM,aAAa,GAAG,6BAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAClD,IAAI,IAAA,6BAAY,EAAC,aAAa,CAAC,EAAE;oBAChC,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,qBAA6C,CAAC;wBACnG,CAAC,CAAC,CAAC;wBACH,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,mBAA2C,CAAC;4BAC9E,CAAC,CAAC,CAAC;4BACH,CAAC,CAAC,CAAC,CAAC;oBACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE;wBACvC,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;qBACvC;iBACD;aACD;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, GameTag } 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 { BattlecryCard, hasEndOfTurn } from '../../card.interface';\r\nimport { cardMappings } from '../_card-mappings';\r\n\r\nexport const EfficientEngineer: BattlecryCard = {\r\n\tcardIds: [CardIds.EfficientEngineer_BG31_301, CardIds.EfficientEngineer_BG31_301_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.EfficientEngineer_BG31_301_G ? 2 : 1;\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tconst candidates = input.board\r\n\t\t\t\t.filter((e) =>\r\n\t\t\t\t\tinput.gameState.allCards.getCard(e.cardId).mechanics?.includes(GameTag[GameTag.END_OF_TURN]),\r\n\t\t\t\t)\r\n\t\t\t\t.filter(\r\n\t\t\t\t\t(e) =>\r\n\t\t\t\t\t\t![CardIds.YoungMurkEye_BG22_403, CardIds.YoungMurkEye_BG22_403_G].includes(e.cardId as CardIds),\r\n\t\t\t\t);\r\n\t\t\tconst target = pickRandom(candidates);\r\n\t\t\tif (target) {\r\n\t\t\t\tconst endOfTurnImpl = cardMappings[target.cardId];\r\n\t\t\t\tif (hasEndOfTurn(endOfTurnImpl)) {\r\n\t\t\t\t\tconst numberOfLoops = input.board.some((e) => e.cardId === CardIds.DrakkariEnchanter_BG26_ICC_901_G)\r\n\t\t\t\t\t\t? 3\r\n\t\t\t\t\t\t: input.board.some((e) => e.cardId === CardIds.DrakkariEnchanter_BG26_ICC_901)\r\n\t\t\t\t\t\t? 2\r\n\t\t\t\t\t\t: 1;\r\n\t\t\t\t\tfor (let i = 0; i < numberOfLoops; i++) {\r\n\t\t\t\t\t\tendOfTurnImpl.endOfTurn(target, input);\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"]}
|