fix: codex #98/#99가 revert한 #96 수정 11개 재통합 + Defend 카드 수정
codex #98/#99(도적 Rogue/시프 카드 확장)가 main을 작업 브랜치에 머지 후 그 머지를 통째로 revert하면서, 먼저 머지됐던 #96의 버그수정 11개가 collateral로 전부 사라졌다. 이를 현재 main(codex 카드 147장) 위에 재통합. 복원된 #96(상세는 PR #96): BindButtons 1회가드·drawDamage per-draw+ CheckCombatEnd 멱등가드·firstCardDamageBonus class→kind·PiercingWail 시뮬 음수힘·Envenom AoE attackPoison·firstShivDamageBonus 시뮬 첫Shiv만· Prepared 실제방어+설명·DealDamageToAllMonsters isAttack 분리·useAllEnergy 코스트감소 무시·설명 정정 6장(Rage kind Power→Attack 포함). 추가: Defend(아이언 바디) kind Attack→Skill — block만 있는 방어 카드가 Attack 라우팅(몬스터 드롭 필요)이라 위로 스윕으로 사용 불가였던 것 수정. codex 변경과 라인 충돌 없이 git apply --3way로 소스 재적용 후 재생성. 카드 147장 유지, 테스트 88, propcheck 0, cbgap 0. 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:
@@ -3,6 +3,42 @@ import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_
|
||||
import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER, DISABLED_STOCK_CONTROLS, TRANSPARENT, DARK, GOLD, ATTACK, DEFEND, SKILL, DAMAGE_DIGIT_RUIDS, DAMAGE_POP_MAX_DIGITS, DAMAGE_POP_DIGIT_W, DAMAGE_POP_DIGIT_H, DAMAGE_POP_DIGIT_SPACING, MAX_MONSTERS, HEAD_OFFSET_Y, HP_BAR_W, WHITE, CARD_NAME_TEXT, CARD_DESC_TEXT, cardFaceLayout, CARD_W, CARD_H, CARD_SPACING, CARD_XS, ALIGN_CENTER, ALIGN_BOTTOM_CENTER, guid, transform, sprite, button, text, scrollLayoutGroup, popupLayerFor, uiOrderFor, displayOrderFor, applySortingOverride, entity, uiPath, sectionRoot, isGeneratedUiEntity, appendUiSection } from '../lib/ui-helpers.mjs';
|
||||
|
||||
export const handMethods = [
|
||||
method('ApplyDrawTrigger', `if self.Monsters == nil then
|
||||
return
|
||||
end
|
||||
local drawDamage = self:AddPowerFieldTotal("drawDamage") + (self.DrawDamageThisTurn or 0)
|
||||
local drawPoison = self:AddPowerFieldTotal("drawPoison") + (self.DrawPoisonThisTurn or 0)
|
||||
if (drawDamage ~= nil and drawDamage > 0) or (drawPoison ~= nil and drawPoison > 0) then
|
||||
for mi = 1, #self.Monsters do
|
||||
local m2 = self.Monsters[mi]
|
||||
if m2 ~= nil and m2.alive == true then
|
||||
local dmg = drawDamage or 0
|
||||
if m2.vuln > 0 then
|
||||
dmg = math.floor(dmg * 1.5)
|
||||
end
|
||||
if m2.block > 0 then
|
||||
local absorbed = math.min(m2.block, dmg)
|
||||
m2.block = m2.block - absorbed
|
||||
dmg = dmg - absorbed
|
||||
end
|
||||
if drawPoison ~= nil and drawPoison > 0 then
|
||||
self:ApplyPoisonToMonster(m2, drawPoison)
|
||||
end
|
||||
if dmg > 0 then
|
||||
m2.hp = m2.hp - dmg
|
||||
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg
|
||||
end
|
||||
self:ShowDmgPop(mi, dmg)
|
||||
self:MonsterHitMotion(mi)
|
||||
if m2.hp <= 0 then
|
||||
m2.hp = 0
|
||||
self:KillMonster(m2.slot)
|
||||
end
|
||||
end
|
||||
end
|
||||
self:RenderCombat()
|
||||
self:CheckCombatEnd()
|
||||
end`),
|
||||
method('GetHandSlotX', `local n = 0
|
||||
if self.Hand ~= nil then
|
||||
n = #self.Hand
|
||||
@@ -311,7 +347,7 @@ end
|
||||
if c.damagePerCardDrawnThisCombat ~= nil then
|
||||
base2 = base2 + (self.CardsDrawnThisCombat or 0) * c.damagePerCardDrawnThisCombat
|
||||
end
|
||||
if c.class == "Attack" and (self.TurnCardsPlayedThisTurn or 0) == 0 and c.firstCardDamageBonus ~= nil then
|
||||
if c.kind == "Attack" and (self.TurnCardsPlayedThisTurn or 0) == 0 and c.firstCardDamageBonus ~= nil then
|
||||
base2 = base2 + c.firstCardDamageBonus
|
||||
end
|
||||
if c.class == "shiv" then
|
||||
@@ -506,7 +542,7 @@ if c.kind == "Attack" then
|
||||
local function resolveAttackRound()
|
||||
local roundKilled = false
|
||||
if useAoe == true then
|
||||
local killed = self:DealDamageToAllMonsters(total)
|
||||
local killed = self:DealDamageToAllMonsters(total, true)
|
||||
if killed == true then roundKilled = true end
|
||||
elseif c.randomTargetEachHit == true then
|
||||
for h = 1, hitN do
|
||||
@@ -681,39 +717,6 @@ if c.drawSkillBlock ~= nil and c.drawSkillBlock > 0 then
|
||||
end
|
||||
end
|
||||
end
|
||||
local drawDamage = self:AddPowerFieldTotal("drawDamage") + (self.DrawDamageThisTurn or 0)
|
||||
local drawPoison = self:AddPowerFieldTotal("drawPoison") + (self.DrawPoisonThisTurn or 0)
|
||||
if (drawDamage ~= nil and drawDamage > 0) or (drawPoison ~= nil and drawPoison > 0) then
|
||||
for mi = 1, #self.Monsters do
|
||||
local m2 = self.Monsters[mi]
|
||||
if m2 ~= nil and m2.alive == true then
|
||||
local dmg = drawDamage or 0
|
||||
if m2.vuln > 0 then
|
||||
dmg = math.floor(dmg * 1.5)
|
||||
end
|
||||
if m2.block > 0 then
|
||||
local absorbed = math.min(m2.block, dmg)
|
||||
m2.block = m2.block - absorbed
|
||||
dmg = dmg - absorbed
|
||||
end
|
||||
if drawPoison ~= nil and drawPoison > 0 then
|
||||
self:ApplyPoisonToMonster(m2, drawPoison)
|
||||
end
|
||||
if dmg > 0 then
|
||||
m2.hp = m2.hp - dmg
|
||||
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg
|
||||
end
|
||||
self:ShowDmgPop(mi, dmg)
|
||||
self:MonsterHitMotion(mi)
|
||||
if m2.hp <= 0 then
|
||||
m2.hp = 0
|
||||
self:KillMonster(m2.slot)
|
||||
end
|
||||
end
|
||||
end
|
||||
self:RenderCombat()
|
||||
self:CheckCombatEnd()
|
||||
end
|
||||
if c.addShiv ~= nil and c.discard == nil and c.discardAll ~= true then
|
||||
self:AddCardsToHand("Shiv", c.addShiv)
|
||||
end`, [
|
||||
|
||||
Reference in New Issue
Block a user