diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index a9dfd33..1d3a1bd 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -503,7 +503,7 @@ "Name": null }, "Arguments": [], - "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/Button_Attack\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/Button_Jump\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/UIJoystick\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RewardHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckInspectHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckAllHud\", false)", + "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/Button_Attack\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/Button_Jump\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/UIJoystick\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RewardHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckInspectHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckAllHud\", false)", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -526,7 +526,7 @@ "Name": "state" } ], - "Code": "self:HideGameHud()\nself:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", state == \"menu\")\nself:SetEntityEnabled(\"/ui/DefaultGroup/CharacterSelectHud\", state == \"charselect\")\nif state == \"map\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", true)\nelseif state == \"combat\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nelseif state == \"shop\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", true)\nelseif state == \"rest\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", true)\nend", + "Code": "self:HideGameHud()\nself:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", state == \"menu\")\nself:SetEntityEnabled(\"/ui/DefaultGroup/CharacterSelectHud\", state == \"charselect\")\nif state == \"map\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", true)\nelseif state == \"combat\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nelseif state == \"shop\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", true)\nelseif state == \"rest\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", true)\nelseif state == \"treasure\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud\", true)\nend", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -804,7 +804,7 @@ "Name": null }, "Arguments": [], - "Code": "local endTurn = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckHud/EndTurnButton\")\nif endTurn ~= nil and endTurn.ButtonComponent ~= nil then\n\tif self.EndTurnHandler ~= nil then\n\t\tendTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler)\n\t\tself.EndTurnHandler = nil\n\tend\n\tself.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end)\nend\nlocal drawPile = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckHud/DrawPile\")\nif drawPile ~= nil and drawPile.ButtonComponent ~= nil then\n\tif self.DrawPileHandler ~= nil then\n\t\tdrawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler)\n\t\tself.DrawPileHandler = nil\n\tend\n\tself.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect(\"draw\") end)\nend\nlocal discardPile = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckHud/DiscardPile\")\nif discardPile ~= nil and discardPile.ButtonComponent ~= nil then\n\tif self.DiscardPileHandler ~= nil then\n\t\tdiscardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler)\n\t\tself.DiscardPileHandler = nil\n\tend\n\tself.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect(\"discard\") end)\nend\nlocal inspectClose = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckInspectHud/Close\")\nif inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then\n\tif self.DeckInspectCloseHandler ~= nil then\n\t\tinspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler)\n\t\tself.DeckInspectCloseHandler = nil\n\tend\n\tself.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end)\nend\nlocal allDeckButton = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/TopBar/AllDeckButton\")\nif allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then\n\tif self.AllDeckHandler ~= nil then\n\t\tallDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler)\n\t\tself.AllDeckHandler = nil\n\tend\n\tself.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end)\nend\nlocal allDeckClose = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Close\")\nif allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then\n\tif self.AllDeckCloseHandler ~= nil then\n\t\tallDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)\n\t\tself.AllDeckCloseHandler = nil\n\tend\n\tself.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)\nend\nfor i = 1, 5 do\n\tlocal cardEntity = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(i))\n\tif cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then\n\t\tcardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end)\n\t\tcardEntity:ConnectEvent(UITouchDragEvent, function(ev) self:OnCardDrag(i, ev.TouchPoint) end)\n\t\tcardEntity:ConnectEvent(UITouchEndDragEvent, function(ev) self:OnCardDragEnd(i, ev.TouchPoint) end)\n\tend\nend\nfor i = 1, 3 do\n\tlocal rc = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RewardHud/Reward\" .. tostring(i))\n\tif rc ~= nil and rc.ButtonComponent ~= nil then\n\t\trc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end)\n\tend\nend\nlocal skip = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RewardHud/Skip\")\nif skip ~= nil and skip.ButtonComponent ~= nil then\n\tskip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end)\nend\nlocal mapNodeIds = {}\nfor r = 1, 7 do\n\tfor c = 1, 4 do\n\t\ttable.insert(mapNodeIds, \"r\" .. tostring(r) .. \"c\" .. tostring(c))\n\tend\nend\ntable.insert(mapNodeIds, \"boss\")\nfor i = 1, #mapNodeIds do\n\tlocal nid = mapNodeIds[i]\n\tlocal mn = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/MapHud/Node_\" .. nid)\n\tif mn ~= nil and mn.ButtonComponent ~= nil then\n\t\tmn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end)\n\tend\nend\nfor i = 1, 3 do\n\tlocal sc = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Card\" .. tostring(i))\n\tif sc ~= nil and sc.ButtonComponent ~= nil then\n\t\tsc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end)\n\tend\nend\nlocal shopLeave = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Leave\")\nif shopLeave ~= nil and shopLeave.ButtonComponent ~= nil then\n\tshopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)\nend\nlocal shopRelic = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Relic\")\nif shopRelic ~= nil and shopRelic.ButtonComponent ~= nil then\n\tshopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end)\nend\nlocal restLeave = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RestHud/Leave\")\nif restLeave ~= nil and restLeave.ButtonComponent ~= nil then\n\trestLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)\nend\nfor i = 1, 4 do\n\tlocal ms = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/MonsterSlot\" .. tostring(i))\n\tif ms ~= nil and ms.ButtonComponent ~= nil then\n\t\tms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end)\n\tend\nend\nfor i = 1, 10 do\n\tlocal rs = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/TopBar/RelicSlot\" .. tostring(i))\n\tif rs ~= nil and rs.UITouchReceiveComponent ~= nil then\n\t\tlocal idx = i\n\t\trs:ConnectEvent(UITouchEnterEvent, function()\n\t\t\tlocal rid = nil\n\t\t\tif self.RunRelics ~= nil then rid = self.RunRelics[idx] end\n\t\t\tif rid ~= nil and self.Relics[rid] ~= nil then\n\t\t\t\tself:ShowTooltip(self.Relics[rid].name, self.Relics[rid].desc, -240 + (idx - 1) * 48)\n\t\t\tend\n\t\tend)\n\t\trs:ConnectEvent(UITouchExitEvent, function() self:HideTooltip() end)\n\tend\nend\nfor i = 1, 5 do\n\tlocal ps = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/TopBar/PotionSlot\" .. tostring(i))\n\tif ps ~= nil and ps.UITouchReceiveComponent ~= nil then\n\t\tlocal idx = i\n\t\tps:ConnectEvent(UITouchEnterEvent, function()\n\t\t\tlocal pid = nil\n\t\t\tif self.RunPotions ~= nil then pid = self.RunPotions[idx] end\n\t\t\tif pid ~= nil and self.Potions[pid] ~= nil then\n\t\t\t\tself:ShowTooltip(self.Potions[pid].name, self.Potions[pid].desc, 240 + (idx - 1) * 44)\n\t\t\tend\n\t\tend)\n\t\tps:ConnectEvent(UITouchExitEvent, function() self:HideTooltip() end)\n\t\tps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end)\n\tend\nend\nlocal pmUse = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/PotionMenu/Use\")\nif pmUse ~= nil and pmUse.ButtonComponent ~= nil then\n\tpmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end)\nend\nlocal pmToss = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/PotionMenu/Toss\")\nif pmToss ~= nil and pmToss.ButtonComponent ~= nil then\n\tpmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end)\nend\nlocal pmClose = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/PotionMenu/Close\")\nif pmClose ~= nil and pmClose.ButtonComponent ~= nil then\n\tpmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end)\nend\nlocal shopPotion = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Potion\")\nif shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then\n\tshopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end)\nend", + "Code": "local endTurn = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckHud/EndTurnButton\")\nif endTurn ~= nil and endTurn.ButtonComponent ~= nil then\n\tif self.EndTurnHandler ~= nil then\n\t\tendTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler)\n\t\tself.EndTurnHandler = nil\n\tend\n\tself.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end)\nend\nlocal drawPile = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckHud/DrawPile\")\nif drawPile ~= nil and drawPile.ButtonComponent ~= nil then\n\tif self.DrawPileHandler ~= nil then\n\t\tdrawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler)\n\t\tself.DrawPileHandler = nil\n\tend\n\tself.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect(\"draw\") end)\nend\nlocal discardPile = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckHud/DiscardPile\")\nif discardPile ~= nil and discardPile.ButtonComponent ~= nil then\n\tif self.DiscardPileHandler ~= nil then\n\t\tdiscardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler)\n\t\tself.DiscardPileHandler = nil\n\tend\n\tself.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect(\"discard\") end)\nend\nlocal inspectClose = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckInspectHud/Close\")\nif inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then\n\tif self.DeckInspectCloseHandler ~= nil then\n\t\tinspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler)\n\t\tself.DeckInspectCloseHandler = nil\n\tend\n\tself.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end)\nend\nlocal allDeckButton = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/TopBar/AllDeckButton\")\nif allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then\n\tif self.AllDeckHandler ~= nil then\n\t\tallDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler)\n\t\tself.AllDeckHandler = nil\n\tend\n\tself.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end)\nend\nlocal allDeckClose = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Close\")\nif allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then\n\tif self.AllDeckCloseHandler ~= nil then\n\t\tallDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)\n\t\tself.AllDeckCloseHandler = nil\n\tend\n\tself.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)\nend\nfor i = 1, 5 do\n\tlocal cardEntity = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(i))\n\tif cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then\n\t\tcardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end)\n\t\tcardEntity:ConnectEvent(UITouchDragEvent, function(ev) self:OnCardDrag(i, ev.TouchPoint) end)\n\t\tcardEntity:ConnectEvent(UITouchEndDragEvent, function(ev) self:OnCardDragEnd(i, ev.TouchPoint) end)\n\tend\nend\nfor i = 1, 3 do\n\tlocal rc = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RewardHud/Reward\" .. tostring(i))\n\tif rc ~= nil and rc.ButtonComponent ~= nil then\n\t\trc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end)\n\tend\nend\nlocal skip = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RewardHud/Skip\")\nif skip ~= nil and skip.ButtonComponent ~= nil then\n\tskip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end)\nend\nlocal mapNodeIds = {}\nfor r = 1, 7 do\n\tfor c = 1, 4 do\n\t\ttable.insert(mapNodeIds, \"r\" .. tostring(r) .. \"c\" .. tostring(c))\n\tend\nend\ntable.insert(mapNodeIds, \"boss\")\nfor i = 1, #mapNodeIds do\n\tlocal nid = mapNodeIds[i]\n\tlocal mn = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/MapHud/Node_\" .. nid)\n\tif mn ~= nil and mn.ButtonComponent ~= nil then\n\t\tmn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end)\n\tend\nend\nfor i = 1, 3 do\n\tlocal sc = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Card\" .. tostring(i))\n\tif sc ~= nil and sc.ButtonComponent ~= nil then\n\t\tsc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end)\n\tend\nend\nlocal shopLeave = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Leave\")\nif shopLeave ~= nil and shopLeave.ButtonComponent ~= nil then\n\tshopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)\nend\nlocal shopRelic = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Relic\")\nif shopRelic ~= nil and shopRelic.ButtonComponent ~= nil then\n\tshopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end)\nend\nlocal restLeave = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RestHud/Leave\")\nif restLeave ~= nil and restLeave.ButtonComponent ~= nil then\n\trestLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)\nend\nfor i = 1, 4 do\n\tlocal ms = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/MonsterSlot\" .. tostring(i))\n\tif ms ~= nil and ms.ButtonComponent ~= nil then\n\t\tms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end)\n\tend\nend\nfor i = 1, 10 do\n\tlocal rs = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/TopBar/RelicSlot\" .. tostring(i))\n\tif rs ~= nil and rs.UITouchReceiveComponent ~= nil then\n\t\tlocal idx = i\n\t\trs:ConnectEvent(UITouchEnterEvent, function()\n\t\t\tlocal rid = nil\n\t\t\tif self.RunRelics ~= nil then rid = self.RunRelics[idx] end\n\t\t\tif rid ~= nil and self.Relics[rid] ~= nil then\n\t\t\t\tself:ShowTooltip(self.Relics[rid].name, self.Relics[rid].desc, -240 + (idx - 1) * 48)\n\t\t\tend\n\t\tend)\n\t\trs:ConnectEvent(UITouchExitEvent, function() self:HideTooltip() end)\n\tend\nend\nfor i = 1, 5 do\n\tlocal ps = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/TopBar/PotionSlot\" .. tostring(i))\n\tif ps ~= nil and ps.UITouchReceiveComponent ~= nil then\n\t\tlocal idx = i\n\t\tps:ConnectEvent(UITouchEnterEvent, function()\n\t\t\tlocal pid = nil\n\t\t\tif self.RunPotions ~= nil then pid = self.RunPotions[idx] end\n\t\t\tif pid ~= nil and self.Potions[pid] ~= nil then\n\t\t\t\tself:ShowTooltip(self.Potions[pid].name, self.Potions[pid].desc, 240 + (idx - 1) * 44)\n\t\t\tend\n\t\tend)\n\t\tps:ConnectEvent(UITouchExitEvent, function() self:HideTooltip() end)\n\t\tps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end)\n\tend\nend\nlocal pmUse = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/PotionMenu/Use\")\nif pmUse ~= nil and pmUse.ButtonComponent ~= nil then\n\tpmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end)\nend\nlocal pmToss = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/PotionMenu/Toss\")\nif pmToss ~= nil and pmToss.ButtonComponent ~= nil then\n\tpmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end)\nend\nlocal pmClose = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CombatHud/PotionMenu/Close\")\nif pmClose ~= nil and pmClose.ButtonComponent ~= nil then\n\tpmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end)\nend\nlocal shopPotion = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Potion\")\nif shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then\n\tshopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end)\nend\nlocal chest = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/TreasureHud/Chest\")\nif chest ~= nil and chest.ButtonComponent ~= nil then\n\tchest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end)\nend\nlocal treasureLeave = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/TreasureHud/Leave\")\nif treasureLeave ~= nil and treasureLeave.ButtonComponent ~= nil then\n\ttreasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)\nend", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -2003,7 +2003,7 @@ "Name": null }, "Arguments": [], - "Code": "local pool = {}\nfor i = 1, #self.RelicPool do\n\tif self:HasRelic(self.RelicPool[i]) == false then\n\t\ttable.insert(pool, self.RelicPool[i])\n\tend\nend\nif #pool == 0 then\n\tself.Gold = self.Gold + 25\n\tself:Toast(\"유물을 모두 모았습니다! 골드 +25\")\n\treturn \"\"\nend\nreturn pool[math.random(1, #pool)]", + "Code": "local pool = {}\nfor i = 1, #self.RelicPool do\n\tif self:HasRelic(self.RelicPool[i]) == false then\n\t\ttable.insert(pool, self.RelicPool[i])\n\tend\nend\nif #pool == 0 then\n\tself.Gold = self.Gold + 25\n\tself:Toast(\"유물을 모두 모았습니다! 메소 +25\")\n\treturn \"\"\nend\nreturn pool[math.random(1, #pool)]", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -2372,7 +2372,7 @@ "Name": null }, "Arguments": [], - "Code": "self:SetText(\"/ui/DefaultGroup/ShopHud/Gold\", \"골드 \" .. string.format(\"%d\", self.Gold))\nfor i = 1, 3 do\n\tlocal cid = self.ShopChoices[i]\n\tlocal c = self.Cards[cid]\n\tlocal base = \"/ui/DefaultGroup/ShopHud/Card\" .. tostring(i)\n\tif c ~= nil then\n\t\tself:ApplyCardFace(base, cid)\n\t\tself:SetText(base .. \"/Price\", string.format(\"%d\", 30) .. \" 골드\")\n\t\tlocal e = _EntityService:GetEntityByPath(base)\n\t\tif e ~= nil and e.SpriteGUIRendererComponent ~= nil then\n\t\t\tif self.ShopBought[i] == true then\n\t\t\t\te.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)\n\t\t\tend\n\t\tend\n\tend\nend\nlocal rr = self.Relics[self.ShopRelic]\nif rr ~= nil then\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Relic/Label\", rr.name .. \" — \" .. rr.desc)\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Relic/Price\", string.format(\"%d\", 60) .. \" 골드\")\n\tlocal re = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Relic\")\n\tif re ~= nil and re.SpriteGUIRendererComponent ~= nil then\n\t\tif self.ShopRelicBought == true then\n\t\t\tre.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)\n\t\telse\n\t\t\tre.SpriteGUIRendererComponent.Color = Color(0.7, 0.55, 0.85, 1)\n\t\tend\n\tend\nend\nlocal pp = self.Potions[self.ShopPotion]\nif pp ~= nil then\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Potion/Label\", pp.name .. \" — \" .. pp.desc)\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Potion/Price\", string.format(\"%d\", 20) .. \" 골드\")\n\tlocal pe = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Potion\")\n\tif pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then\n\t\tif self.ShopPotionBought == true then\n\t\t\tpe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)\n\t\telse\n\t\t\tpe.SpriteGUIRendererComponent.Color = Color(0.45, 0.7, 0.55, 1)\n\t\tend\n\tend\nend", + "Code": "self:SetText(\"/ui/DefaultGroup/ShopHud/Gold\", \"메소 \" .. string.format(\"%d\", self.Gold))\nfor i = 1, 3 do\n\tlocal cid = self.ShopChoices[i]\n\tlocal c = self.Cards[cid]\n\tlocal base = \"/ui/DefaultGroup/ShopHud/Card\" .. tostring(i)\n\tif c ~= nil then\n\t\tself:ApplyCardFace(base, cid)\n\t\tself:SetText(base .. \"/Price\", string.format(\"%d\", 30) .. \" 메소\")\n\t\tlocal e = _EntityService:GetEntityByPath(base)\n\t\tif e ~= nil and e.SpriteGUIRendererComponent ~= nil then\n\t\t\tif self.ShopBought[i] == true then\n\t\t\t\te.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)\n\t\t\tend\n\t\tend\n\tend\nend\nlocal rr = self.Relics[self.ShopRelic]\nif rr ~= nil then\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Relic/Label\", rr.name .. \" — \" .. rr.desc)\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Relic/Price\", string.format(\"%d\", 60) .. \" 메소\")\n\tlocal re = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Relic\")\n\tif re ~= nil and re.SpriteGUIRendererComponent ~= nil then\n\t\tif self.ShopRelicBought == true then\n\t\t\tre.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)\n\t\telse\n\t\t\tre.SpriteGUIRendererComponent.Color = Color(0.7, 0.55, 0.85, 1)\n\t\tend\n\tend\nend\nlocal pp = self.Potions[self.ShopPotion]\nif pp ~= nil then\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Potion/Label\", pp.name .. \" — \" .. pp.desc)\n\tself:SetText(\"/ui/DefaultGroup/ShopHud/Potion/Price\", string.format(\"%d\", 20) .. \" 메소\")\n\tlocal pe = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud/Potion\")\n\tif pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then\n\t\tif self.ShopPotionBought == true then\n\t\t\tpe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)\n\t\telse\n\t\t\tpe.SpriteGUIRendererComponent.Color = Color(0.45, 0.7, 0.55, 1)\n\t\tend\n\tend\nend", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -2455,11 +2455,41 @@ "Name": null }, "Arguments": [], - "Code": "local s = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud\")\nif s ~= nil then\n\ts.Enable = false\nend\nlocal r = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RestHud\")\nif r ~= nil then\n\tr.Enable = false\nend\nself:ShowMap()", + "Code": "local s = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/ShopHud\")\nif s ~= nil then\n\ts.Enable = false\nend\nlocal r = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/RestHud\")\nif r ~= nil then\n\tr.Enable = false\nend\nlocal t = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/TreasureHud\")\nif t ~= nil then\n\tt.Enable = false\nend\nself:ShowMap()", "Scope": 2, "ExecSpace": 6, "Attributes": [], "Name": "LeaveNode" + }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "self.ChestOpened = false\nlocal chest = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/TreasureHud/Chest\")\nif chest ~= nil then\n\tif chest.SpriteGUIRendererComponent ~= nil then\n\t\tchest.SpriteGUIRendererComponent.ImageRUID = \"43df67920c0d43298e0d93c02c6afa71\"\n\tend\n\tif chest.UITransformComponent ~= nil then\n\t\tchest.UITransformComponent.anchoredPosition = Vector2(0, 40)\n\tend\nend\nself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud/Reward\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud/Hint\", true)\nself:ShowState(\"treasure\")", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "ShowTreasure" + }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "if self.ChestOpened == true then\n\treturn\nend\nself.ChestOpened = true\nself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud/Hint\", false)\nlocal chest = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/TreasureHud/Chest\")\nlocal steps = { 10, -10, 8, -8, 5, 0 }\nfor i = 1, #steps do\n\tlocal dx = steps[i]\n\t_TimerService:SetTimerOnce(function()\n\t\tif chest ~= nil and isvalid(chest) and chest.UITransformComponent ~= nil then\n\t\t\tchest.UITransformComponent.anchoredPosition = Vector2(dx, 40)\n\t\tend\n\tend, 0.08 * i)\nend\n_TimerService:SetTimerOnce(function()\n\tif chest ~= nil and isvalid(chest) and chest.SpriteGUIRendererComponent ~= nil then\n\t\tchest.SpriteGUIRendererComponent.ImageRUID = \"09c5cee56fd640bf8ae3a18ce50f4759\"\n\tend\n\tlocal g = 40 + math.random(0, 20)\n\tlocal nid = self:PickNewRelic()\n\tlocal msg = \"\"\n\tif nid ~= \"\" then\n\t\tself:AddRelic(nid)\n\t\tlocal nr = self.Relics[nid]\n\t\tmsg = \"유물 획득: \" .. nr.name .. \" · 메소 +\" .. tostring(g)\n\telse\n\t\tg = g + 30\n\t\tmsg = \"메소 +\" .. tostring(g)\n\tend\n\tself.Gold = self.Gold + g\n\tself:RenderRun()\n\tself:SetText(\"/ui/DefaultGroup/TreasureHud/Reward\", msg)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud/Reward\", true)\nend, 0.55)", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "OpenChest" } ], "EntityEventHandlers": [] diff --git a/tools/deck/gen-slaydeck.mjs b/tools/deck/gen-slaydeck.mjs index e1aafbd..7c062ef 100644 --- a/tools/deck/gen-slaydeck.mjs +++ b/tools/deck/gen-slaydeck.mjs @@ -17,6 +17,10 @@ if (!ENEMIES.enemies[ENEMIES.activeEnemy]) { const MAP_ROWS = 7; // 걷는 행 1..7, 보스 row 8 const MAP_COLS = 4; +// 보물 상자 스프라이트 (공식 maplestory 리소스, 메이커 선별) +const CHEST_CLOSED_RUID = '43df67920c0d43298e0d93c02c6afa71'; +const CHEST_OPEN_RUID = '09c5cee56fd640bf8ae3a18ce50f4759'; + const RELICS = JSON.parse(readFileSync('data/relics.json', 'utf8')); if (!RELICS.relics[RELICS.startingRelic]) throw new Error(`[gen-slaydeck] startingRelic 없음: ${RELICS.startingRelic}`); for (const id of RELICS.relicPool) { @@ -85,6 +89,7 @@ const GENERATED_UI_SECTIONS = [ 'MapHud', 'ShopHud', 'RestHud', + 'TreasureHud', 'MainMenu', 'CharacterSelectHud', ]; @@ -95,6 +100,7 @@ const UI_APPEND_ORDER = [ 'MapHud', 'ShopHud', 'RestHud', + 'TreasureHud', 'DeckInspectHud', 'DeckAllHud', 'MainMenu', @@ -123,7 +129,7 @@ const ALIGN_BOTTOM_CENTER = 6; function guid(prefix, n) { // 유효한 8-4-4-4-12 hex GUID 생성. prefix는 충돌 방지용 네임스페이스 바이트로 매핑. - const ns = prefix === 'hud' ? 0xd0 : prefix === 'dck' ? 0xca : prefix === 'cmb' ? 0xcb : prefix === 'rwd' ? 0xcc : prefix === 'map' ? 0xcd : prefix === 'shp' ? 0xce : prefix === 'rst' ? 0xcf : prefix === 'menu' ? 0xe0 : prefix === 'ins' ? 0xe1 : prefix === 'all' ? 0xe2 : 0xfe; + const ns = prefix === 'hud' ? 0xd0 : prefix === 'dck' ? 0xca : prefix === 'cmb' ? 0xcb : prefix === 'rwd' ? 0xcc : prefix === 'map' ? 0xcd : prefix === 'shp' ? 0xce : prefix === 'rst' ? 0xcf : prefix === 'menu' ? 0xe0 : prefix === 'ins' ? 0xe1 : prefix === 'all' ? 0xe2 : prefix === 'trs' ? 0xe3 : 0xfe; const v = (ns * 0x100000 + n) >>> 0; return `${v.toString(16).padStart(8, '0')}-0000-4000-8000-${v.toString(16).padStart(12, '0')}`; } @@ -1145,7 +1151,7 @@ function upsertUi() { })); const topTexts = [ ['Floor', -520, 160, '막 1/3', GOLD], - ['Gold', -360, 160, '골드 0', { r: 0.98, g: 0.85, b: 0.4, a: 1 }], + ['Gold', -360, 160, '메소 0', { r: 0.98, g: 0.85, b: 0.4, a: 1 }], ]; topTexts.forEach(([suffix, x, w, value, color], ti) => { combat.push(entity({ @@ -1566,7 +1572,7 @@ function upsertUi() { components: [ transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 300, y: 44 }, pos: { x: 0, y: 330 } }), sprite({ color: TRANSPARENT }), - text({ value: '골드 0', fontSize: 28, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), + text({ value: '메소 0', fontSize: 28, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), ], })); let shpN = 3; @@ -1590,7 +1596,7 @@ function upsertUi() { ['Cost', { size: { x: 44, y: 44 }, pos: { x: -68, y: 103 }, value: '1', fontSize: 26, bold: true, color: { r: 1, g: 1, b: 1, a: 1 } }], ['Name', { size: { x: 168, y: 30 }, pos: { x: 0, y: -8 }, value: '카드', fontSize: 20, bold: true, color: { r: 1, g: 1, b: 1, a: 1 } }], ['Desc', { size: { x: 164, y: 56 }, pos: { x: 0, y: -58 }, value: '', fontSize: 18, bold: false, color: { r: 1, g: 1, b: 1, a: 1 } }], - ['Price', { size: { x: 160, y: 40 }, pos: { x: 0, y: -105 }, value: '30 골드', fontSize: 22, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 } }], + ['Price', { size: { x: 160, y: 40 }, pos: { x: 0, y: -105 }, value: '30 메소', fontSize: 22, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 } }], ]) { const dOrder = suffix === 'Cost' ? 7 : suffix === 'Name' ? 6 : suffix === 'Desc' ? 8 : 9; shop.push(entity({ @@ -1662,7 +1668,7 @@ function upsertUi() { components: [ transform({ parentW: 560, parentH: 76, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 540, y: 30 }, pos: { x: 0, y: -22 } }), sprite({ color: TRANSPARENT }), - text({ value: '60 골드', fontSize: 20, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), + text({ value: '60 메소', fontSize: 20, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), ], })); shop.push(entity({ @@ -1701,7 +1707,7 @@ function upsertUi() { components: [ transform({ parentW: 560, parentH: 76, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 540, y: 30 }, pos: { x: 0, y: -22 } }), sprite({ color: TRANSPARENT }), - text({ value: '20 골드', fontSize: 20, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), + text({ value: '20 메소', fontSize: 20, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), ], })); shop.push(entity({ @@ -1777,6 +1783,92 @@ function upsertUi() { })); emit('RestHud', rest); + // 유물 방 — 보물 상자 (P8) + const treasure = []; + const treasureHud = entity({ + id: guid('trs', 0), + path: '/ui/DefaultGroup/TreasureHud', + modelId: 'uisprite', + entryId: 'UISprite', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent', + displayOrder: 8, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 1920, y: 1080 }, pos: { x: 0, y: 0 }, align: ALIGN_CENTER }), + sprite({ color: { r: 0.05, g: 0.06, b: 0.09, a: 0.92 }, type: 1, raycast: true }), + ], + }); + treasureHud.jsonString.enable = false; + treasure.push(treasureHud); + treasure.push(entity({ + id: guid('trs', 1), + path: '/ui/DefaultGroup/TreasureHud/Title', + modelId: 'uitext', + entryId: 'UIText', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent', + displayOrder: 0, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 700, y: 60 }, pos: { x: 0, y: 320 } }), + sprite({ color: TRANSPARENT }), + text({ value: '보물 상자', fontSize: 40, bold: true, color: GOLD, alignment: 4 }), + ], + })); + treasure.push(entity({ + id: guid('trs', 2), + path: '/ui/DefaultGroup/TreasureHud/Chest', + modelId: 'uisprite', + entryId: 'UISprite', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent', + displayOrder: 1, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 180, y: 180 }, pos: { x: 0, y: 40 } }), + sprite({ dataId: CHEST_CLOSED_RUID, color: { r: 1, g: 1, b: 1, a: 1 }, type: 0, raycast: true }), + button(), + ], + })); + treasure.push(entity({ + id: guid('trs', 3), + path: '/ui/DefaultGroup/TreasureHud/Hint', + modelId: 'uitext', + entryId: 'UIText', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent', + displayOrder: 2, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 500, y: 34 }, pos: { x: 0, y: -90 } }), + sprite({ color: TRANSPARENT }), + text({ value: '상자를 클릭해 여세요', fontSize: 20, bold: false, color: { r: 0.85, g: 0.85, b: 0.9, a: 1 }, alignment: 4 }), + ], + })); + const treasureReward = entity({ + id: guid('trs', 4), + path: '/ui/DefaultGroup/TreasureHud/Reward', + modelId: 'uitext', + entryId: 'UIText', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent', + displayOrder: 3, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 800, y: 44 }, pos: { x: 0, y: -160 } }), + sprite({ color: TRANSPARENT }), + text({ value: '', fontSize: 28, bold: true, color: { r: 0.98, g: 0.85, b: 0.4, a: 1 }, alignment: 4 }), + ], + }); + treasureReward.jsonString.enable = false; + treasure.push(treasureReward); + treasure.push(entity({ + id: guid('trs', 5), + path: '/ui/DefaultGroup/TreasureHud/Leave', + modelId: 'uibutton', + entryId: 'UIButton', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent', + displayOrder: 4, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 200, y: 60 }, pos: { x: 0, y: -280 } }), + sprite({ color: DARK, type: 1, raycast: true }), + button(), + text({ value: '나가기', fontSize: 26, bold: true, color: GOLD, alignment: 4 }), + ], + })); + emit('TreasureHud', treasure); + const menu = []; menu.push(entity({ id: guid('menu', 0), @@ -2157,6 +2249,7 @@ self:SetEntityEnabled("/ui/DefaultGroup/RewardHud", false) self:SetEntityEnabled("/ui/DefaultGroup/MapHud", false) self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", false) self:SetEntityEnabled("/ui/DefaultGroup/RestHud", false) +self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", false) self:SetEntityEnabled("/ui/DefaultGroup/DeckInspectHud", false) self:SetEntityEnabled("/ui/DefaultGroup/DeckAllHud", false)`), method('ShowState', `self:HideGameHud() @@ -2172,6 +2265,8 @@ elseif state == "shop" then self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", true) elseif state == "rest" then self:SetEntityEnabled("/ui/DefaultGroup/RestHud", true) +elseif state == "treasure" then + self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", true) end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'state' }]), method('ShowMainMenu', `self.SelectedClass = "" self:ShowState("menu") @@ -2505,6 +2600,14 @@ end local shopPotion = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion") if shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then shopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end) +end +local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest") +if chest ~= nil and chest.ButtonComponent ~= nil then + chest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end) +end +local treasureLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Leave") +if treasureLeave ~= nil and treasureLeave.ButtonComponent ~= nil then + treasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end) end`), method('StartPlayerTurn', `self.Turn = self.Turn + 1 self.Energy = self.MaxEnergy @@ -3344,7 +3447,7 @@ for i = 1, #self.RelicPool do end if #pool == 0 then self.Gold = self.Gold + 25 - self:Toast("유물을 모두 모았습니다! 골드 +25") + self:Toast("유물을 모두 모았습니다! 메소 +25") return "" end return pool[math.random(1, #pool)]`, [], 0, 'string'), @@ -3767,14 +3870,14 @@ self.ShopPotion = pkeys[math.random(1, #pkeys)] self.ShopPotionBought = false self:RenderShop() self:ShowState("shop")`), - method('RenderShop', `self:SetText("/ui/DefaultGroup/ShopHud/Gold", "골드 " .. string.format("%d", self.Gold)) + method('RenderShop', `self:SetText("/ui/DefaultGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold)) for i = 1, 3 do local cid = self.ShopChoices[i] local c = self.Cards[cid] local base = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i) if c ~= nil then self:ApplyCardFace(base, cid) - self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 골드") + self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 메소") local e = _EntityService:GetEntityByPath(base) if e ~= nil and e.SpriteGUIRendererComponent ~= nil then if self.ShopBought[i] == true then @@ -3786,7 +3889,7 @@ end local rr = self.Relics[self.ShopRelic] if rr ~= nil then self:SetText("/ui/DefaultGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc) - self:SetText("/ui/DefaultGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 골드") + self:SetText("/ui/DefaultGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소") local re = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic") if re ~= nil and re.SpriteGUIRendererComponent ~= nil then if self.ShopRelicBought == true then @@ -3799,7 +3902,7 @@ end local pp = self.Potions[self.ShopPotion] if pp ~= nil then self:SetText("/ui/DefaultGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc) - self:SetText("/ui/DefaultGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 골드") + self:SetText("/ui/DefaultGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소") local pe = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion") if pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then if self.ShopPotionBought == true then @@ -3864,7 +3967,59 @@ local r = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud") if r ~= nil then r.Enable = false end +local t = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud") +if t ~= nil then + t.Enable = false +end self:ShowMap()`), + method('ShowTreasure', `self.ChestOpened = false +local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest") +if chest ~= nil then + if chest.SpriteGUIRendererComponent ~= nil then + chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_CLOSED_RUID}" + end + if chest.UITransformComponent ~= nil then + chest.UITransformComponent.anchoredPosition = Vector2(0, 40) + end +end +self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", false) +self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", true) +self:ShowState("treasure")`), + method('OpenChest', `if self.ChestOpened == true then + return +end +self.ChestOpened = true +self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", false) +local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest") +local steps = { 10, -10, 8, -8, 5, 0 } +for i = 1, #steps do + local dx = steps[i] + _TimerService:SetTimerOnce(function() + if chest ~= nil and isvalid(chest) and chest.UITransformComponent ~= nil then + chest.UITransformComponent.anchoredPosition = Vector2(dx, 40) + end + end, 0.08 * i) +end +_TimerService:SetTimerOnce(function() + if chest ~= nil and isvalid(chest) and chest.SpriteGUIRendererComponent ~= nil then + chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_OPEN_RUID}" + end + local g = 40 + math.random(0, 20) + local nid = self:PickNewRelic() + local msg = "" + if nid ~= "" then + self:AddRelic(nid) + local nr = self.Relics[nid] + msg = "유물 획득: " .. nr.name .. " · 메소 +" .. tostring(g) + else + g = g + 30 + msg = "메소 +" .. tostring(g) + end + self.Gold = self.Gold + g + self:RenderRun() + self:SetText("/ui/DefaultGroup/TreasureHud/Reward", msg) + self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", true) +end, 0.55)`), ]); for (const m of combat.ContentProto.Json.Methods) { m.ExecSpace = 6; diff --git a/ui/DefaultGroup.ui b/ui/DefaultGroup.ui index 3b490eb..c0ecc4e 100644 --- a/ui/DefaultGroup.ui +++ b/ui/DefaultGroup.ui @@ -19360,7 +19360,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "골드 0", + "Text": "메소 0", "UseOutLine": true, "Enable": true } @@ -66749,7 +66749,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "골드 0", + "Text": "메소 0", "UseOutLine": true, "Enable": true } @@ -67689,7 +67689,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "30 골드", + "Text": "30 메소", "UseOutLine": true, "Enable": true } @@ -69052,7 +69052,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "30 골드", + "Text": "30 메소", "UseOutLine": true, "Enable": true } @@ -70415,7 +70415,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "30 골드", + "Text": "30 메소", "UseOutLine": true, "Enable": true } @@ -71402,7 +71402,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "60 골드", + "Text": "60 메소", "UseOutLine": true, "Enable": true } @@ -71966,7 +71966,7 @@ "bottom": 0 }, "SizeFit": false, - "Text": "20 골드", + "Text": "20 메소", "UseOutLine": true, "Enable": true } @@ -72961,6 +72961,1134 @@ "@version": 1 } }, + { + "id": "0e300000-0000-4000-8000-00000e300000", + "path": "/ui/DefaultGroup/TreasureHud", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", + "jsonString": { + "name": "TreasureHud", + "path": "/ui/DefaultGroup/TreasureHud", + "nameEditable": true, + "enable": false, + "visible": true, + "localize": true, + "displayOrder": 8, + "pathConstraints": "///", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UISprite", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uisprite", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 960, + "y": 540 + }, + "OffsetMin": { + "x": -960, + "y": -540 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 1920, + "y": 1080 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": 0 + }, + "Position": { + "x": 0, + "y": 0, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0.05, + "g": 0.06, + "b": 0.09, + "a": 0.92 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": true, + "Type": 1, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "0e300001-0000-4000-8000-00000e300001", + "path": "/ui/DefaultGroup/TreasureHud/Title", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "Title", + "path": "/ui/DefaultGroup/TreasureHud/Title", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 0, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIText", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uitext", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 350, + "y": 350 + }, + "OffsetMin": { + "x": -350, + "y": 290 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 700, + "y": 60 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": 320 + }, + "Position": { + "x": 0, + "y": 320, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0, + "g": 0, + "b": 0, + "a": 0 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": false, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 4, + "Bold": true, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.94, + "g": 0.74, + "b": 0.26, + "a": 1 + }, + "FontSize": 40, + "MaxSize": 40, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "보물 상자", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "0e300002-0000-4000-8000-00000e300002", + "path": "/ui/DefaultGroup/TreasureHud/Chest", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent", + "jsonString": { + "name": "Chest", + "path": "/ui/DefaultGroup/TreasureHud/Chest", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 1, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UISprite", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uisprite", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 90, + "y": 130 + }, + "OffsetMin": { + "x": -90, + "y": -50 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 180, + "y": 180 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": 40 + }, + "Position": { + "x": 0, + "y": 40, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "43df67920c0d43298e0d93c02c6afa71" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 1, + "g": 1, + "b": 1, + "a": 1 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": true, + "Type": 0, + "Enable": true + }, + { + "@type": "MOD.Core.ButtonComponent", + "Colors": { + "NormalColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1 + }, + "HighlightedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "PressedColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 1 + }, + "SelectedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "DisabledColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 0.5019608 + }, + "ColorMultiplier": 1, + "FadeDuration": 0.1 + }, + "ImageRUIDs": { + "HighlightedSprite": null, + "PressedSprite": null, + "SelectedSprite": null, + "DisabledSprite": null + }, + "KeyCode": 0, + "OverrideSorting": false, + "Transition": 1, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "0e300003-0000-4000-8000-00000e300003", + "path": "/ui/DefaultGroup/TreasureHud/Hint", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "Hint", + "path": "/ui/DefaultGroup/TreasureHud/Hint", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 2, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIText", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uitext", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 250, + "y": -73 + }, + "OffsetMin": { + "x": -250, + "y": -107 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 500, + "y": 34 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": -90 + }, + "Position": { + "x": 0, + "y": -90, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0, + "g": 0, + "b": 0, + "a": 0 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": false, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 4, + "Bold": false, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.85, + "g": 0.85, + "b": 0.9, + "a": 1 + }, + "FontSize": 20, + "MaxSize": 20, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "상자를 클릭해 여세요", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "0e300004-0000-4000-8000-00000e300004", + "path": "/ui/DefaultGroup/TreasureHud/Reward", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "Reward", + "path": "/ui/DefaultGroup/TreasureHud/Reward", + "nameEditable": true, + "enable": false, + "visible": true, + "localize": true, + "displayOrder": 3, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIText", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uitext", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 400, + "y": -138 + }, + "OffsetMin": { + "x": -400, + "y": -182 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 800, + "y": 44 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": -160 + }, + "Position": { + "x": 0, + "y": -160, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0, + "g": 0, + "b": 0, + "a": 0 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": false, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 4, + "Bold": true, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.98, + "g": 0.85, + "b": 0.4, + "a": 1 + }, + "FontSize": 28, + "MaxSize": 28, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "0e300005-0000-4000-8000-00000e300005", + "path": "/ui/DefaultGroup/TreasureHud/Leave", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "Leave", + "path": "/ui/DefaultGroup/TreasureHud/Leave", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 4, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIButton", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uibutton", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 100, + "y": -250 + }, + "OffsetMin": { + "x": -100, + "y": -310 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 200, + "y": 60 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": -280 + }, + "Position": { + "x": 0, + "y": -280, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0.08, + "g": 0.09, + "b": 0.11, + "a": 0.92 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": true, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.ButtonComponent", + "Colors": { + "NormalColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1 + }, + "HighlightedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "PressedColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 1 + }, + "SelectedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "DisabledColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 0.5019608 + }, + "ColorMultiplier": 1, + "FadeDuration": 0.1 + }, + "ImageRUIDs": { + "HighlightedSprite": null, + "PressedSprite": null, + "SelectedSprite": null, + "DisabledSprite": null + }, + "KeyCode": 0, + "OverrideSorting": false, + "Transition": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 4, + "Bold": true, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.94, + "g": 0.74, + "b": 0.26, + "a": 1 + }, + "FontSize": 26, + "MaxSize": 26, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "나가기", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, { "id": "0e100000-0000-4000-8000-00000e100000", "path": "/ui/DefaultGroup/DeckInspectHud",