fix(deck): useAllEnergy 카드는 코스트감소를 무시하고 전 에너지 소비 (Lua/JS 동기화)

Malaise(불쾌, xWeakPerEnergy)·Skewer(꼬챙이, xDamagePerEnergy) 같은
useAllEnergy 카드는 X 효과가 소비 에너지에 비례하는데, Lua는 코스트
감소(스킬코스트감소·다음스킬무료·전투코스트감소)를 useAllEnergy에도
적용해 소비 에너지가 full보다 줄고 X도 약해졌다(코스트감소가 카드를
약화시키는 역설). JS는 스킬코스트감소만 건너뛰고 combatReduction은
적용해 양쪽이 미묘하게 달랐다.

정답: useAllEnergy는 "전 에너지 소비"이므로 어떤 코스트감소도 무시.
Lua는 3개 감소 조건에 useAllEnergy 제외 추가, JS는 finalCost를
useAllEnergy면 combatReduction 미적용으로. 양쪽 모두 full 에너지 소비로
일치. 산출물 재생성 포함.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UUvHKjrt8jqLzDeCsRRGmj
This commit is contained in:
2026-06-29 20:48:29 +09:00
parent d78049182b
commit ead73b427e
3 changed files with 5 additions and 5 deletions

View File

@@ -659,7 +659,7 @@ export function simulateCombat(data, rng, stats) {
const baseCost = c.cost || 0;
const combatReduction = combatCardCostReduction[id] || 0;
const cost = handCostZeroThisTurn === true ? 0 : (c.useAllEnergy === true ? energy : (skillFree ? 0 : (c.kind === 'Skill' ? Math.max(0, baseCost - skillCostReductionThisTurn) : baseCost)));
const finalCost = Math.max(0, cost - combatReduction);
const finalCost = c.useAllEnergy === true ? cost : Math.max(0, cost - combatReduction);
energy -= finalCost;
resolveCardEffects(id, c, finalCost);
const playedBlock = powerFieldTotal('cardPlayedBlock');

View File

@@ -52,14 +52,14 @@ if self.HandCostZeroThisTurn == true then
elseif c.useAllEnergy == true then
cost = self.Energy
end
if c.kind == "Skill" and self.NextSkillCostZero == true then
if c.kind == "Skill" and c.useAllEnergy ~= true and self.NextSkillCostZero == true then
cost = 0
skillFree = true
end
if c.kind == "Skill" and self.SkillCostReductionThisTurn ~= nil and self.SkillCostReductionThisTurn > 0 then
if c.kind == "Skill" and c.useAllEnergy ~= true and self.SkillCostReductionThisTurn ~= nil and self.SkillCostReductionThisTurn > 0 then
cost = math.max(0, cost - self.SkillCostReductionThisTurn)
end
if self.CombatCardCostReduction ~= nil and self.CombatCardCostReduction[cardId] ~= nil then
if c.useAllEnergy ~= true and self.CombatCardCostReduction ~= nil and self.CombatCardCostReduction[cardId] ~= nil then
cost = math.max(0, cost - self.CombatCardCostReduction[cardId])
end
if c.kind == "Skill" and self.NextSkillRepeatCount ~= nil and self.NextSkillRepeatCount > 0 then