fix(ui): 코드리뷰 발견 UI 버그 6건 수정

1. [높음] DealDamageToTarget에 ShowDmgPop 추가 — 단일/랜덤 공격 데미지
   팝업 누락 해소(팝업 붙이던 PlayAttackFx는 죽은코드). 중복될 물약
   ShowDmgPop 제거.
2. [중간] hand.mjs 다단 랜덤공격 total/hitN을 math.floor로 — 소수 HP →
   render %d 크래시(akabeko/penNib 조건) 방지. 공통케이스 값 불변(=perHit).
3. [높음] ShowShop이 미보유 유물만 제시 — 상점 중복 유물 판매→스택 방지.
   빈 슬롯 숨김·빈 유물 구매 가드 포함.
4. [중간] PickReward 스킵 시에도 BonusRewardScreens 소비 — 보상 건너뛰기
   시 남은 보너스 보상 전량 소실 방지.
5. [낮음] RenderAllDeck: CodexMode면 제목 "카드 도감"으로 — 도감 제목
   오표기(전사 전체 덱) 수정.
6. [낮음] OpenAllDeck에 CodexMode 리셋 추가(opener 간 비대칭 해소).

전 카테고리 검증: cbgap GAP 0·cbprops 0·cardkinds 정합·테스트 105/105
(sim-balance 회귀 없음). §6 미러 무영향.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011xhLoQbJvQYL65kBtDNDTy
This commit is contained in:
2026-07-09 13:16:20 +09:00
parent 30c73c9899
commit 84dc340193
6 changed files with 24 additions and 4 deletions

View File

@@ -295,6 +295,7 @@ if dmg > 0 then
self:ApplyPoisonToMonster(m, poison)
end
end
self:ShowDmgPop(m.slot, dmg)
self:MonsterHitMotion(m.slot)
local killed = false
if m.hp <= 0 then

View File

@@ -181,6 +181,7 @@ end
self.DeckInspectKind = ""
self.ClassDeckMode = false
self.ClassDeckClass = ""
self.CodexMode = false
self.DebugCardPickerMode = false
self:RenderClassDeckTabs()
self.DeckAllOpen = true
@@ -211,6 +212,9 @@ local title = "모든 덱"
if self.ClassDeckMode == true then
pile = self.ClassDeckCards or {}
title = self.ClassDeckTitle
if self.CodexMode == true then
title = "카드 도감"
end
if self.DebugCardPickerMode == true then
title = title .. " - 테스트 카드 추가"
end

View File

@@ -550,7 +550,7 @@ if c.kind == "Attack" then
if targetIdx ~= nil and targetIdx > 0 then
local prev = self.TargetIndex
self.TargetIndex = targetIdx
local killed = self:DealDamageToTarget(total / hitN, c.pierce == true)
local killed = self:DealDamageToTarget(math.floor(total / hitN), c.pierce == true)
self.TargetIndex = prev
if killed == true then roundKilled = true end
end

View File

@@ -151,7 +151,6 @@ if p.effect == "heal" then
self.PlayerHp = math.min(self.PlayerHp + p.value, self.PlayerMaxHp)
elseif p.effect == "damage" then
self:DealDamageToTarget(p.value, false)
self:ShowDmgPop(self.TargetIndex, p.value)
elseif p.effect == "strength" then
self.PlayerStr = self.PlayerStr + p.value
elseif p.effect == "block" then

View File

@@ -47,7 +47,7 @@ if slot ~= 0 and self.RewardChoices ~= nil then
table.insert(self.RunDeck, id)
end
end
if self.BonusRewardScreens ~= nil and self.BonusRewardScreens > 0 and slot ~= 0 then
if self.BonusRewardScreens ~= nil and self.BonusRewardScreens > 0 then
self.BonusRewardScreens = self.BonusRewardScreens - 1
self:OfferReward()
return

View File

@@ -9,7 +9,17 @@ self.ShopBought = { false, false, false }
for i = 1, 3 do
self.ShopChoices[i] = pool[math.random(1, #pool)]
end
self.ShopRelic = self.RelicPool[math.random(1, #self.RelicPool)]
local relicChoices = {}
for i = 1, #self.RelicPool do
if self:HasRelic(self.RelicPool[i]) == false then
table.insert(relicChoices, self.RelicPool[i])
end
end
if #relicChoices > 0 then
self.ShopRelic = relicChoices[math.random(1, #relicChoices)]
else
self.ShopRelic = ""
end
self.ShopRelicBought = false
local pkeys = {}
for pid, _ in pairs(self.Potions) do
@@ -38,6 +48,7 @@ for i = 1, 3 do
end
local rr = self.Relics[self.ShopRelic]
if rr ~= nil then
self:SetEntityEnabled("/ui/RunUIGroup/ShopHud/Relic", true)
self:SetText("/ui/RunUIGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc)
self:SetText("/ui/RunUIGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소")
local re = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic")
@@ -48,6 +59,8 @@ if rr ~= nil then
re.SpriteGUIRendererComponent.Color = Color(0.7, 0.55, 0.85, 1)
end
end
else
self:SetEntityEnabled("/ui/RunUIGroup/ShopHud/Relic", false)
end
local pp = self.Potions[self.ShopPotion]
if pp ~= nil then
@@ -65,6 +78,9 @@ end`),
method('BuyRelic', `if self.ShopRelicBought == true then
return
end
if self.ShopRelic == nil or self.ShopRelic == "" then
return
end
if self.Gold < ${RELIC_PRICE} then
return
end