전투 카드 대상 표시 개선

This commit is contained in:
2026-07-16 01:41:08 +09:00
parent 89f2e2e149
commit 0795563185
5 changed files with 157 additions and 24 deletions

View File

@@ -14,7 +14,12 @@ return table.concat(parts, " ")`, [
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'vuln' },
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'poison' },
], 0, 'string'),
method('RenderCombat', `for i = 1, ${MAX_MONSTERS} do
method('RenderCombat', `local targetMode = self:GetDragTargetMode()
local targetMarkerRuid = "f86110df71ce48dbbcbc8d38bd1076ad"
local shownTarget = self.TargetIndex
if self.DragTargetIndex ~= nil and self.DragTargetIndex > 0 then shownTarget = self.DragTargetIndex end
if self.DragCanPlay ~= true then targetMode = "none" end
for i = 1, ${MAX_MONSTERS} do
local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. self:IntStr(i)
local m = self.Monsters[i]
if m ~= nil and m.alive == true then
@@ -38,11 +43,17 @@ return table.concat(parts, " ")`, [
end
end
self:SetText(base .. "/Intent", t)
local dragActive = self.DragTargetIndex ~= nil and self.DragTargetIndex > 0
local shownTarget = self.TargetIndex
if dragActive == true then shownTarget = self.DragTargetIndex end
self:SetEntityEnabled(base .. "/TargetMarker", i == shownTarget and dragActive)
self:SetEntityEnabled(base .. "/TargetMarker/Label", i == shownTarget and dragActive)
local targeted = targetMode == "all" or (targetMode == "single" and i == shownTarget)
self:SetEntityEnabled(base .. "/TargetMarker", targeted)
self:SetEntityEnabled(base .. "/TargetMarker/Label", targeted)
if targeted == true then
local marker = _EntityService:GetEntityByPath(base .. "/TargetMarker")
if marker ~= nil and marker.SpriteGUIRendererComponent ~= nil then
marker.SpriteGUIRendererComponent.ImageRUID = targetMarkerRuid
marker.SpriteGUIRendererComponent.AnimClipPlayType = SpriteAnimClipPlayType.Loop
marker.SpriteGUIRendererComponent.PlayRate = 1
end
end
local intentEntity = _EntityService:GetEntityByPath(base .. "/Intent")
if intentEntity ~= nil and intentEntity.TextComponent ~= nil and intent ~= nil then
if intent.kind == "Attack" then
@@ -98,6 +109,7 @@ if self.PlayerPowers ~= nil and #self.PlayerPowers > 0 then
pb = pb .. table.concat(names, " ")
end
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Buffs", pb)
self:RenderPlayerTargetPreview(targetMode == "player")
self:RenderRun()`),
method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0))
if self.DmgPopSlotQueue == nil then