fix(deck): DealDamageToAllMonsters를 isAttack 매개변수화 (버스트 평면화)
DealDamageToAllMonsters는 AoE 공격(취약 1.5x·attackPoison 적용)과 Outbreak 독 버스트(평면 피해) 두 용도로 공유되는데, 취약을 항상 적용해 버스트가 취약 대상에 과다 피해를 줬다(JS 미러는 버스트를 평면 applyDamage로 처리 — Lua만 발산). 또한 직전 커밋에서 추가한 attackPoison도 버스트에 적용돼, Envenom+Outbreak 동시 활성 시 버스트→attackPoison→독 적용→또 버스트의 재귀 위험이 있었다. isAttack 매개변수를 추가해 취약·attackPoison을 공격일 때만 적용: AoE 공격(ResolveCardEffects)은 true, 버스트는 미전달(평면). JS의 dealToTarget(취약+attackPoison) vs 버스트(평면) 분리와 일치. 산출물 재생성 포함. 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:
File diff suppressed because one or more lines are too long
@@ -381,7 +381,7 @@ for i = 1, #self.Monsters do
|
|||||||
local m = self.Monsters[i]
|
local m = self.Monsters[i]
|
||||||
if m ~= nil and m.alive == true then
|
if m ~= nil and m.alive == true then
|
||||||
local dmg = amount
|
local dmg = amount
|
||||||
if m.vuln > 0 then
|
if isAttack == true and m.vuln > 0 then
|
||||||
dmg = math.floor(dmg * 1.5)
|
dmg = math.floor(dmg * 1.5)
|
||||||
end
|
end
|
||||||
if m.block > 0 then
|
if m.block > 0 then
|
||||||
@@ -392,9 +392,11 @@ for i = 1, #self.Monsters do
|
|||||||
m.hp = m.hp - dmg
|
m.hp = m.hp - dmg
|
||||||
if dmg > 0 then
|
if dmg > 0 then
|
||||||
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg
|
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg
|
||||||
local poison = self:AddPowerFieldTotal("attackPoison")
|
if isAttack == true then
|
||||||
if poison ~= nil and poison > 0 then
|
local poison = self:AddPowerFieldTotal("attackPoison")
|
||||||
self:ApplyPoisonToMonster(m, poison)
|
if poison ~= nil and poison > 0 then
|
||||||
|
self:ApplyPoisonToMonster(m, poison)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:ShowDmgPop(i, dmg)
|
self:ShowDmgPop(i, dmg)
|
||||||
@@ -413,6 +415,7 @@ self:RenderCombat()
|
|||||||
self:CheckCombatEnd()
|
self:CheckCombatEnd()
|
||||||
return killCount > 0`, [
|
return killCount > 0`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'isAttack' },
|
||||||
], 0, 'boolean'),
|
], 0, 'boolean'),
|
||||||
method('PlayAttackFx', `local m = self.Monsters[targetIndex]
|
method('PlayAttackFx', `local m = self.Monsters[targetIndex]
|
||||||
if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then
|
if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then
|
||||||
|
|||||||
@@ -542,7 +542,7 @@ if c.kind == "Attack" then
|
|||||||
local function resolveAttackRound()
|
local function resolveAttackRound()
|
||||||
local roundKilled = false
|
local roundKilled = false
|
||||||
if useAoe == true then
|
if useAoe == true then
|
||||||
local killed = self:DealDamageToAllMonsters(total)
|
local killed = self:DealDamageToAllMonsters(total, true)
|
||||||
if killed == true then roundKilled = true end
|
if killed == true then roundKilled = true end
|
||||||
elseif c.randomTargetEachHit == true then
|
elseif c.randomTargetEachHit == true then
|
||||||
for h = 1, hitN do
|
for h = 1, hitN do
|
||||||
|
|||||||
Reference in New Issue
Block a user