밴딧 카드 공용 효과 확장

This commit is contained in:
2026-06-19 01:26:15 +09:00
parent f64e35668d
commit 71435a2c91
12 changed files with 148 additions and 23 deletions

View File

@@ -684,3 +684,39 @@ test("simulateCombat: cardPlayedBlock grants block whenever a card is played", (
assert.equal(r.draw, true);
assert.equal(r.playerHpRemaining, 80);
});
test("simulateCombat: blockGainMultiplier doubles block gain for the turn", () => {
const data = {
cards: {
Shadow: { name: "Shadowmeld", cost: 1, kind: "Skill", block: 5, blockGainMultiplier: 2 },
Shield: { name: "Shield", cost: 1, kind: "Skill", block: 2 },
},
starterDeck: ["Shadow", "Shield"],
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 8 }] }],
};
const r = simulateCombat(data, () => 0.999999);
assert.equal(r.draw, true);
assert.equal(r.playerHpRemaining, 80);
});
test("simulateCombat: nextSkillCostZero makes the next skill free", () => {
const data = {
cards: {
Pounce: { name: "Pounce", cost: 2, kind: "Attack", damage: 12, nextSkillCostZero: true },
Guard: { name: "Guard", cost: 2, kind: "Skill", block: 8 },
},
starterDeck: ["Pounce", "Guard"],
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 8 }] }],
};
const r = simulateCombat(data, () => 0.999999);
assert.equal(r.draw, true);
assert.equal(r.playerHpRemaining, 80);
});
test("chooseAction: skillCostReductionThisTurn allows discounted skills", () => {
const cards = {
Guard: { name: "Guard", cost: 2, kind: "Skill", block: 8 },
};
assert.equal(chooseAction(["Guard"], cards, 1, { skillCostReductionThisTurn: 1 }), 0);
assert.equal(chooseAction(["Guard"], cards, 1, {}), -1);
});