From 788167b1ae7a537c517e7a132f8f80b32c82edf5 Mon Sep 17 00:00:00 2001 From: gahusb Date: Tue, 9 Jun 2026 01:02:56 +0900 Subject: [PATCH] =?UTF-8?q?carddeck(B):=20CombatHud=20=EC=A0=81=20?= =?UTF-8?q?=ED=8C=A8=EB=84=90=20=EC=A0=95=EB=A0=AC=C2=B7=EC=A0=95=EC=88=98?= =?UTF-8?q?=20=ED=91=9C=EA=B8=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 런타임 검증에서 발견된 시각 결함 2건 수정. - 적 텍스트(이름/HP/방어/의도)를 EnemyBg 패널(y=300) 위로 정렬 (기존 center 배치로 패널과 분리됨) - HP/방어/에너지 등 codeblock number Property를 string.format("%d")로 정수 표기 (Lua tostring의 .0 제거) 생성기 단일 소스에서 재생성. 메이커 Play로 정렬·정수 갱신 확인. Co-Authored-By: Claude Opus 4.8 (1M context) --- RootDesk/MyDesk/SlayDeckController.codeblock | 4 +-- tools/gen-slaydeck.mjs | 18 +++++------ ui/DefaultGroup.ui | 32 ++++++++++---------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index bdecb69..c2d2bf0 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -309,7 +309,7 @@ "Name": null }, "Arguments": [], - "Code": "self:SetText(\"/ui/DefaultGroup/DeckHud/DrawPile/Count\", tostring(#self.DrawPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/DiscardPile/Count\", tostring(#self.DiscardPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/Energy\", \"에너지 \" .. tostring(self.Energy) .. \"/\" .. tostring(self.MaxEnergy))", + "Code": "self:SetText(\"/ui/DefaultGroup/DeckHud/DrawPile/Count\", tostring(#self.DrawPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/DiscardPile/Count\", tostring(#self.DiscardPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/Energy\", \"에너지 \" .. string.format(\"%d\", self.Energy) .. \"/\" .. string.format(\"%d\", self.MaxEnergy))", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -596,7 +596,7 @@ "Name": null }, "Arguments": [], - "Code": "self:SetText(\"/ui/DefaultGroup/CombatHud/EnemyName\", self.EnemyName)\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyHp\", \"HP \" .. tostring(self.EnemyHp) .. \"/\" .. tostring(self.EnemyMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyBlock\", \"방어 \" .. tostring(self.EnemyBlock))\nlocal intent = self.EnemyIntents[self.EnemyIntentIndex]\nlocal intentText = \"\"\nif intent ~= nil then\n\tif intent.kind == \"Attack\" then\n\t\tintentText = \"의도: 공격 \" .. tostring(intent.value)\n\telseif intent.kind == \"Defend\" then\n\t\tintentText = \"의도: 방어 \" .. tostring(intent.value)\n\tend\nend\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyIntent\", intentText)\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerHp\", \"HP \" .. tostring(self.PlayerHp) .. \"/\" .. tostring(self.PlayerMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerBlock\", \"방어 \" .. tostring(self.PlayerBlock))", + "Code": "self:SetText(\"/ui/DefaultGroup/CombatHud/EnemyName\", self.EnemyName)\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyHp\", \"HP \" .. string.format(\"%d\", self.EnemyHp) .. \"/\" .. string.format(\"%d\", self.EnemyMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyBlock\", \"방어 \" .. string.format(\"%d\", self.EnemyBlock))\nlocal intent = self.EnemyIntents[self.EnemyIntentIndex]\nlocal intentText = \"\"\nif intent ~= nil then\n\tif intent.kind == \"Attack\" then\n\t\tintentText = \"의도: 공격 \" .. tostring(intent.value)\n\telseif intent.kind == \"Defend\" then\n\t\tintentText = \"의도: 방어 \" .. tostring(intent.value)\n\tend\nend\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyIntent\", intentText)\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerHp\", \"HP \" .. string.format(\"%d\", self.PlayerHp) .. \"/\" .. string.format(\"%d\", self.PlayerMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerBlock\", \"방어 \" .. string.format(\"%d\", self.PlayerBlock))", "Scope": 2, "ExecSpace": 6, "Attributes": [], diff --git a/tools/gen-slaydeck.mjs b/tools/gen-slaydeck.mjs index 790d574..1d246c1 100644 --- a/tools/gen-slaydeck.mjs +++ b/tools/gen-slaydeck.mjs @@ -360,10 +360,10 @@ function upsertUi() { ], })); const enemyTexts = [ - ['EnemyName', { x: 0, y: 58 }, { x: 360, y: 44 }, '슬라임', 28, true, GOLD], - ['EnemyHp', { x: 0, y: 16 }, { x: 360, y: 40 }, 'HP 45/45', 24, true, { r: 1, g: 1, b: 1, a: 1 }], - ['EnemyBlock', { x: 0, y: -20 }, { x: 360, y: 36 }, '방어 0', 20, false, { r: 0.6, g: 0.8, b: 1, a: 1 }], - ['EnemyIntent', { x: 0, y: -56 }, { x: 360, y: 38 }, '의도: 공격 10', 22, true, { r: 1, g: 0.72, b: 0.5, a: 1 }], + ['EnemyName', { x: 0, y: 358 }, { x: 360, y: 44 }, '슬라임', 28, true, GOLD], + ['EnemyHp', { x: 0, y: 316 }, { x: 360, y: 40 }, 'HP 45/45', 24, true, { r: 1, g: 1, b: 1, a: 1 }], + ['EnemyBlock', { x: 0, y: 280 }, { x: 360, y: 36 }, '방어 0', 20, false, { r: 0.6, g: 0.8, b: 1, a: 1 }], + ['EnemyIntent', { x: 0, y: 244 }, { x: 360, y: 38 }, '의도: 공격 10', 22, true, { r: 1, g: 0.72, b: 0.5, a: 1 }], ]; let cmbN = 2; for (const [suffix, pos, size, value, fontSize, bold, color] of enemyTexts) { @@ -597,7 +597,7 @@ self.DiscardPile = {} self:Shuffle(self.DrawPile)`), method('RenderPiles', `self:SetText("/ui/DefaultGroup/DeckHud/DrawPile/Count", tostring(#self.DrawPile)) self:SetText("/ui/DefaultGroup/DeckHud/DiscardPile/Count", tostring(#self.DiscardPile)) -self:SetText("/ui/DefaultGroup/DeckHud/Energy", "에너지 " .. tostring(self.Energy) .. "/" .. tostring(self.MaxEnergy))`), +self:SetText("/ui/DefaultGroup/DeckHud/Energy", "에너지 " .. string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy))`), method('RenderHand', `local drawStart = Vector2(-590, 8) for i = 1, 5 do \tlocal cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i)) @@ -747,8 +747,8 @@ if entity ~= nil then entity.Enable = true end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'text' }]), method('RenderCombat', `self:SetText("/ui/DefaultGroup/CombatHud/EnemyName", self.EnemyName) -self:SetText("/ui/DefaultGroup/CombatHud/EnemyHp", "HP " .. tostring(self.EnemyHp) .. "/" .. tostring(self.EnemyMaxHp)) -self:SetText("/ui/DefaultGroup/CombatHud/EnemyBlock", "방어 " .. tostring(self.EnemyBlock)) +self:SetText("/ui/DefaultGroup/CombatHud/EnemyHp", "HP " .. string.format("%d", self.EnemyHp) .. "/" .. string.format("%d", self.EnemyMaxHp)) +self:SetText("/ui/DefaultGroup/CombatHud/EnemyBlock", "방어 " .. string.format("%d", self.EnemyBlock)) local intent = self.EnemyIntents[self.EnemyIntentIndex] local intentText = "" if intent ~= nil then @@ -759,8 +759,8 @@ if intent ~= nil then end end self:SetText("/ui/DefaultGroup/CombatHud/EnemyIntent", intentText) -self:SetText("/ui/DefaultGroup/CombatHud/PlayerHp", "HP " .. tostring(self.PlayerHp) .. "/" .. tostring(self.PlayerMaxHp)) -self:SetText("/ui/DefaultGroup/CombatHud/PlayerBlock", "방어 " .. tostring(self.PlayerBlock))`), +self:SetText("/ui/DefaultGroup/CombatHud/PlayerHp", "HP " .. string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp)) +self:SetText("/ui/DefaultGroup/CombatHud/PlayerBlock", "방어 " .. string.format("%d", self.PlayerBlock))`), ]); for (const m of combat.ContentProto.Json.Methods) { m.ExecSpace = 6; diff --git a/ui/DefaultGroup.ui b/ui/DefaultGroup.ui index 2311207..edc6e83 100644 --- a/ui/DefaultGroup.ui +++ b/ui/DefaultGroup.ui @@ -6884,11 +6884,11 @@ "MobileOnly": false, "OffsetMax": { "x": 180, - "y": 80 + "y": 380 }, "OffsetMin": { "x": -180, - "y": 36 + "y": 336 }, "Pivot": { "x": 0.5, @@ -6907,11 +6907,11 @@ "UIVersion": 2, "anchoredPosition": { "x": 0, - "y": 58 + "y": 358 }, "Position": { "x": 0, - "y": 58, + "y": 358, "z": 0 }, "QuaternionRotation": { @@ -7072,11 +7072,11 @@ "MobileOnly": false, "OffsetMax": { "x": 180, - "y": 36 + "y": 336 }, "OffsetMin": { "x": -180, - "y": -4 + "y": 296 }, "Pivot": { "x": 0.5, @@ -7095,11 +7095,11 @@ "UIVersion": 2, "anchoredPosition": { "x": 0, - "y": 16 + "y": 316 }, "Position": { "x": 0, - "y": 16, + "y": 316, "z": 0 }, "QuaternionRotation": { @@ -7260,11 +7260,11 @@ "MobileOnly": false, "OffsetMax": { "x": 180, - "y": -2 + "y": 298 }, "OffsetMin": { "x": -180, - "y": -38 + "y": 262 }, "Pivot": { "x": 0.5, @@ -7283,11 +7283,11 @@ "UIVersion": 2, "anchoredPosition": { "x": 0, - "y": -20 + "y": 280 }, "Position": { "x": 0, - "y": -20, + "y": 280, "z": 0 }, "QuaternionRotation": { @@ -7448,11 +7448,11 @@ "MobileOnly": false, "OffsetMax": { "x": 180, - "y": -37 + "y": 263 }, "OffsetMin": { "x": -180, - "y": -75 + "y": 225 }, "Pivot": { "x": 0.5, @@ -7471,11 +7471,11 @@ "UIVersion": 2, "anchoredPosition": { "x": 0, - "y": -56 + "y": 244 }, "Position": { "x": 0, - "y": -56, + "y": 244, "z": 0 }, "QuaternionRotation": {