도적 카드 공용 효과 추가
This commit is contained in:
@@ -721,6 +721,14 @@ test("chooseAction: skillCostReductionThisTurn allows discounted skills", () =>
|
||||
assert.equal(chooseAction(["Guard"], cards, 1, {}), -1);
|
||||
});
|
||||
|
||||
test("chooseAction: handCostZeroThisTurn lets expensive cards be played", () => {
|
||||
const cards = {
|
||||
Burst: { name: "Burst", cost: 3, kind: "Skill", block: 8 },
|
||||
};
|
||||
assert.equal(chooseAction(["Burst"], cards, 0, { handCostZeroThisTurn: true }), 0);
|
||||
assert.equal(chooseAction(["Burst"], cards, 0, {}), -1);
|
||||
});
|
||||
|
||||
test("simulateCombat: drawSkillBlock grants block for each drawn skill", () => {
|
||||
const data = {
|
||||
cards: {
|
||||
@@ -739,3 +747,33 @@ test("simulateCombat: drawSkillBlock grants block for each drawn skill", () => {
|
||||
assert.equal(r.draw, true);
|
||||
assert.equal(stats.Escape.block, 3);
|
||||
});
|
||||
|
||||
test("simulateCombat: poisonPerTurn powers poison all enemies at turn start", () => {
|
||||
const data = {
|
||||
cards: {
|
||||
Fumes: { name: "NoxiousFumes", cost: 1, kind: "Power", powerEffect: "poisonPerTurn", value: 2 },
|
||||
},
|
||||
starterDeck: ["Fumes"],
|
||||
monsters: [
|
||||
{ name: "DummyA", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||
{ name: "DummyB", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||
],
|
||||
};
|
||||
const r = simulateCombat(data, () => 0.999999);
|
||||
assert.equal(r.win, true);
|
||||
});
|
||||
|
||||
test("simulateCombat: damagePerTurn powers damage all enemies at turn start", () => {
|
||||
const data = {
|
||||
cards: {
|
||||
Speed: { name: "Speedster", cost: 2, kind: "Power", powerEffect: "damagePerTurn", value: 2 },
|
||||
},
|
||||
starterDeck: ["Speed"],
|
||||
monsters: [
|
||||
{ name: "DummyA", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||
{ name: "DummyB", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||
],
|
||||
};
|
||||
const r = simulateCombat(data, () => 0.999999);
|
||||
assert.equal(r.win, true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user