1 Commits

Author SHA1 Message Date
a7a6b2123a Fix damage popup sequencing 2026-07-08 02:35:01 +09:00
16 changed files with 17924 additions and 4199 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -304,6 +304,7 @@ if dmg > 0 then
self:ApplyPoisonToMonster(m, poison) self:ApplyPoisonToMonster(m, poison)
end end
end end
self:ShowDmgPop(m.slot, dmg)
self:MonsterHitMotion(m.slot) self:MonsterHitMotion(m.slot)
local killed = false local killed = false
if m.hp <= 0 then if m.hp <= 0 then
@@ -383,7 +384,7 @@ local burstEvery = self:AddPowerFieldTotal("poisonApplicationBurstEvery")
local burstDamage = self:AddPowerFieldTotal("poisonApplicationBurstDamage") local burstDamage = self:AddPowerFieldTotal("poisonApplicationBurstDamage")
if burstEvery ~= nil and burstEvery > 0 and burstDamage ~= nil and burstDamage > 0 then if burstEvery ~= nil and burstEvery > 0 and burstDamage ~= nil and burstDamage > 0 then
if (self.PoisonApplicationsThisCombat % burstEvery) == 0 then if (self.PoisonApplicationsThisCombat % burstEvery) == 0 then
self:DealDamageToAllMonsters(burstDamage) self:DealDamageToAllMonsters(burstDamage, false)
end end
end`, [ end`, [
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'target' }, { Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'target' },
@@ -440,6 +441,13 @@ return killCount > 0`, [
], 0, 'boolean'), ], 0, 'boolean'),
method('PlayAttackFx', `local m = self.Monsters[targetIndex] method('PlayAttackFx', `local m = self.Monsters[targetIndex]
if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then
local shown = damage
if m ~= nil and m.alive == true and m.vuln > 0 then
shown = math.floor(damage * 1.5)
end
if m ~= nil and m.alive == true and m.weak > 0 and self.ActiveAttackDamageVsWeakMultiplier ~= nil and self.ActiveAttackDamageVsWeakMultiplier > 1 then
shown = math.floor(shown * self.ActiveAttackDamageVsWeakMultiplier)
end
self:DealDamageToTarget(damage, pierce) self:DealDamageToTarget(damage, pierce)
self.ActiveAttackDamageVsWeakMultiplier = 1 self.ActiveAttackDamageVsWeakMultiplier = 1
self:RenderCombat() self:RenderCombat()
@@ -474,7 +482,6 @@ _TimerService:SetTimerOnce(function()
self.ActiveKillReward = 0 self.ActiveKillReward = 0
self.ActiveKillMaxHpGain = 0 self.ActiveKillMaxHpGain = 0
self.ActiveAttackDamageVsWeakMultiplier = 1 self.ActiveAttackDamageVsWeakMultiplier = 1
self:ShowDmgPop(targetIndex, shown)
self:RenderCombat() self:RenderCombat()
self:CheckCombatEnd() self:CheckCombatEnd()
end, 0.35)`, [ end, 0.35)`, [
@@ -599,7 +606,7 @@ if dmg > 0 then
end end
if self:HasRelic("centennialPuzzle") and self.FirstHpLossDone == false then if self:HasRelic("centennialPuzzle") and self.FirstHpLossDone == false then
self.FirstHpLossDone = true self.FirstHpLossDone = true
self:DrawCards(3) self:DrawCards(3, true)
self:RenderHand(false) self:RenderHand(false)
end end
end end

View File

@@ -321,7 +321,7 @@ if self.NextTurnAddCards ~= nil then
end end
local drawN = 5 + (self.NextTurnDraw or 0) + powerTurnDraw local drawN = 5 + (self.NextTurnDraw or 0) + powerTurnDraw
self.NextTurnDraw = 0 self.NextTurnDraw = 0
self:DrawCards(drawN) self:DrawCards(drawN, true)
self:RenderHand(true) self:RenderHand(true)
self:RenderCombat() self:RenderCombat()
if powerTurnDiscard > 0 then if powerTurnDiscard > 0 then

View File

@@ -784,6 +784,7 @@ if c.kind == "Attack" then
baseDmg = xEnergy * c.xDamagePerEnergy baseDmg = xEnergy * c.xDamagePerEnergy
end end
local total = 0 local total = 0
local hitDamages = {}
local hitN = c.hits or 1 local hitN = c.hits or 1
if c.otherHandAtLeast ~= nil and c.bonusHitsWhenOtherHandAtLeast ~= nil then if c.otherHandAtLeast ~= nil and c.bonusHitsWhenOtherHandAtLeast ~= nil then
local otherHand = 0 local otherHand = 0
@@ -796,7 +797,9 @@ if c.kind == "Attack" then
end end
end end
for h = 1, hitN do for h = 1, hitN do
total = total + self:CalcPlayerAttack(baseDmg) local hitDamage = self:CalcPlayerAttack(baseDmg)
hitDamages[h] = hitDamage
total = total + hitDamage
end end
local useAoe = c.aoe == true local useAoe = c.aoe == true
if c.class == "shiv" and (self.ShivAoeThisCombat == true or self:HasPowerField("shivAoe") == true) then if c.class == "shiv" and (self.ShivAoeThisCombat == true or self:HasPowerField("shivAoe") == true) then
@@ -841,11 +844,16 @@ if c.kind == "Attack" then
if targetIdx ~= nil and targetIdx > 0 then if targetIdx ~= nil and targetIdx > 0 then
local prev = self.TargetIndex local prev = self.TargetIndex
self.TargetIndex = targetIdx self.TargetIndex = targetIdx
local killed = self:DealDamageToTarget(total / hitN, c.pierce == true) local killed = self:DealDamageToTarget(hitDamages[h] or 0, c.pierce == true)
self.TargetIndex = prev self.TargetIndex = prev
if killed == true then roundKilled = true end if killed == true then roundKilled = true end
end end
end end
elseif hitN > 1 then
for h = 1, hitN do
local killed = self:DealDamageToTarget(hitDamages[h] or 0, c.pierce == true)
if killed == true then roundKilled = true end
end
else else
local killed = self:DealDamageToTarget(total, c.pierce == true) local killed = self:DealDamageToTarget(total, c.pierce == true)
if killed == true then roundKilled = true end if killed == true then roundKilled = true end

View File

@@ -25,7 +25,7 @@ for i = 1, #self.RunRelics do
elseif r.effect == "strength" then elseif r.effect == "strength" then
self.PlayerStr = self.PlayerStr + r.value self.PlayerStr = self.PlayerStr + r.value
elseif r.effect == "draw" then elseif r.effect == "draw" then
self:DrawCards(r.value) self:DrawCards(r.value, true)
self:RenderHand(false) self:RenderHand(false)
elseif r.effect == "heal" or r.effect == "healOnAttack" or r.effect == "healOnWin" then elseif r.effect == "heal" or r.effect == "healOnAttack" or r.effect == "healOnWin" then
self.PlayerHp = self.PlayerHp + r.value self.PlayerHp = self.PlayerHp + r.value
@@ -151,7 +151,6 @@ if p.effect == "heal" then
self.PlayerHp = math.min(self.PlayerHp + p.value, self.PlayerMaxHp) self.PlayerHp = math.min(self.PlayerHp + p.value, self.PlayerMaxHp)
elseif p.effect == "damage" then elseif p.effect == "damage" then
self:DealDamageToTarget(p.value, false) self:DealDamageToTarget(p.value, false)
self:ShowDmgPop(self.TargetIndex, p.value)
elseif p.effect == "strength" then elseif p.effect == "strength" then
self.PlayerStr = self.PlayerStr + p.value self.PlayerStr = self.PlayerStr + p.value
elseif p.effect == "block" then elseif p.effect == "block" then

View File

@@ -100,29 +100,39 @@ end
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Buffs", pb) self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Buffs", pb)
self:RenderRun()`), self:RenderRun()`),
method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0)) method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0))
local base = "/ui/RunUIGroup/CombatHud/DmgPop" .. slotKey if self.DmgPopSlotQueue == nil then
self.DmgPopSlotQueue = {}
end
local popIndex = (self.DmgPopSlotQueue[slotKey] or 0) + 1
if popIndex > 5 then
popIndex = 1
end
self.DmgPopSlotQueue[slotKey] = popIndex
local base = "/ui/RunUIGroup/CombatHud/DmgPop" .. slotKey .. "_" .. tostring(popIndex)
local pop = _EntityService:GetEntityByPath(base) local pop = _EntityService:GetEntityByPath(base)
if pop == nil then if pop == nil then
return return
end end
self.DmgPopSeq = (self.DmgPopSeq or 0) + 1 local startDelay = 0.2 * (popIndex - 1)
local popSeq = self.DmgPopSeq local function showNow()
self:SetText(base, "") self:SetEntityEnabled(base, false)
local damageDigitRuids = { ${DAMAGE_DIGIT_RUIDS.map(luaStr).join(', ')} } self:SetText(base, "")
local shown = tostring(math.max(0, math.floor(amount))) local damageDigitRuids = { ${DAMAGE_DIGIT_RUIDS.map(luaStr).join(', ')} }
if string.len(shown) > ${DAMAGE_POP_MAX_DIGITS} then local shown = tostring(math.max(0, math.floor(amount)))
if string.len(shown) > ${DAMAGE_POP_MAX_DIGITS} then
shown = string.sub(shown, 1, ${DAMAGE_POP_MAX_DIGITS}) shown = string.sub(shown, 1, ${DAMAGE_POP_MAX_DIGITS})
end end
local digits = {} local digits = {}
for i = 1, string.len(shown) do local digitPathsToEnable = {}
for i = 1, string.len(shown) do
table.insert(digits, tonumber(string.sub(shown, i, i)) or 0) table.insert(digits, tonumber(string.sub(shown, i, i)) or 0)
end end
local totalW = #digits * ${DAMAGE_POP_DIGIT_W} + math.max(0, #digits - 1) * ${DAMAGE_POP_DIGIT_SPACING} local totalW = #digits * ${DAMAGE_POP_DIGIT_W} + math.max(0, #digits - 1) * ${DAMAGE_POP_DIGIT_SPACING}
local startX = -totalW / 2 + ${DAMAGE_POP_DIGIT_W} / 2 local startX = -totalW / 2 + ${DAMAGE_POP_DIGIT_W} / 2
for i = 1, ${DAMAGE_POP_MAX_DIGITS} do for i = 1, ${DAMAGE_POP_MAX_DIGITS} do
self:SetEntityEnabled(base .. "/Digit" .. tostring(i), false) self:SetEntityEnabled(base .. "/Digit" .. tostring(i), false)
end end
for i = 1, ${DAMAGE_POP_MAX_DIGITS} do for i = 1, ${DAMAGE_POP_MAX_DIGITS} do
local digitPath = base .. "/Digit" .. tostring(i) local digitPath = base .. "/Digit" .. tostring(i)
local digitEntity = _EntityService:GetEntityByPath(digitPath) local digitEntity = _EntityService:GetEntityByPath(digitPath)
if digitEntity ~= nil and digitEntity.SpriteGUIRendererComponent ~= nil then if digitEntity ~= nil and digitEntity.SpriteGUIRendererComponent ~= nil then
@@ -132,51 +142,64 @@ for i = 1, ${DAMAGE_POP_MAX_DIGITS} do
if digitEntity.UITransformComponent ~= nil then if digitEntity.UITransformComponent ~= nil then
digitEntity.UITransformComponent.anchoredPosition = Vector2(startX + (i - 1) * (${DAMAGE_POP_DIGIT_W} + ${DAMAGE_POP_DIGIT_SPACING}), 0) digitEntity.UITransformComponent.anchoredPosition = Vector2(startX + (i - 1) * (${DAMAGE_POP_DIGIT_W} + ${DAMAGE_POP_DIGIT_SPACING}), 0)
end end
self:SetEntityEnabled(digitPath, true) table.insert(digitPathsToEnable, digitPath)
else else
self:SetEntityEnabled(digitPath, false) self:SetEntityEnabled(digitPath, false)
end end
end end
end end
local popPos = nil local popPos = nil
local m = self.Monsters[slot] local m = self.Monsters[slot]
if m ~= nil and m.entity ~= nil and isvalid(m.entity) and m.entity.TransformComponent ~= nil then if m ~= nil and m.entity ~= nil and isvalid(m.entity) and m.entity.TransformComponent ~= nil then
local wp = m.entity.TransformComponent.WorldPosition local wp = m.entity.TransformComponent.WorldPosition
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45})) local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45}))
popPos = _UILogic:ScreenToUIPosition(screen) popPos = _UILogic:ScreenToUIPosition(screen)
else else
local slotEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. slotKey) local slotEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. slotKey)
if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then
local sp = slotEntity.UITransformComponent.anchoredPosition local sp = slotEntity.UITransformComponent.anchoredPosition
popPos = Vector2(sp.x, sp.y + 76) popPos = Vector2(sp.x, sp.y + 76)
end end
end end
if pop ~= nil and pop.UITransformComponent ~= nil then if pop.UITransformComponent ~= nil then
if popPos ~= nil then if popPos ~= nil then
pop.UITransformComponent.anchoredPosition = popPos pop.UITransformComponent.anchoredPosition = popPos
else else
pop.UITransformComponent.anchoredPosition = Vector2(0, 120) pop.UITransformComponent.anchoredPosition = Vector2(0, 120)
end end
end
self:SetEntityEnabled(base, true)
for i = 1, 6 do
_TimerService:SetTimerOnce(function()
if self.DmgPopSeq ~= popSeq then
return
end end
self:SetEntityEnabled(base, true)
for i = 1, #digitPathsToEnable do
self:SetEntityEnabled(digitPathsToEnable[i], true)
end
for i = 1, 6 do
_TimerService:SetTimerOnce(function()
local p = _EntityService:GetEntityByPath(base) local p = _EntityService:GetEntityByPath(base)
if p ~= nil and p.UITransformComponent ~= nil then if p ~= nil and p.UITransformComponent ~= nil then
local cur = p.UITransformComponent.anchoredPosition local cur = p.UITransformComponent.anchoredPosition
p.UITransformComponent.anchoredPosition = Vector2(cur.x, cur.y + 7) p.UITransformComponent.anchoredPosition = Vector2(cur.x, cur.y + 7)
end end
end, 0.045 * i) local alpha = 1 - (i / 6)
end if alpha < 0 then alpha = 0 end
_TimerService:SetTimerOnce(function() for di = 1, ${DAMAGE_POP_MAX_DIGITS} do
if self.DmgPopSeq ~= popSeq then local digitEntity = _EntityService:GetEntityByPath(base .. "/Digit" .. tostring(di))
return if digitEntity ~= nil and digitEntity.Enable == true and digitEntity.SpriteGUIRendererComponent ~= nil then
digitEntity.SpriteGUIRendererComponent.Color = Color(1, 1, 1, alpha)
end end
end
end, 0.05 * i)
end
_TimerService:SetTimerOnce(function()
self:SetEntityEnabled(base, false) self:SetEntityEnabled(base, false)
end, 0.48)`, [ end, 0.3)
end
if startDelay > 0 then
_TimerService:SetTimerOnce(function()
showNow()
end, startDelay)
else
showNow()
end`, [
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }, { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' }, { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
]), ]),
@@ -301,4 +324,5 @@ if self.AscensionLevel > 0 then
end end
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Floor", floorText) self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Floor", floorText)
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`), self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`),
]; ];

View File

@@ -106,6 +106,7 @@ self.HolyChargeCount = 0
self.DamagePowerStrengthUsed = false self.DamagePowerStrengthUsed = false
self.DamageDealtThisTurn = 0 self.DamageDealtThisTurn = 0
self.DmgPopSeq = 0 self.DmgPopSeq = 0
self.DmgPopSlotQueue = {}
self.FirstHpLossDone = false self.FirstHpLossDone = false
self.ClayBlockNext = 0 self.ClayBlockNext = 0
self.DiscardSelectRemaining = 0 self.DiscardSelectRemaining = 0

View File

@@ -49,9 +49,9 @@ end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], N
method('ShowMainMenu', `self.SelectedClass = "" method('ShowMainMenu', `self.SelectedClass = ""
self:RenderAscension() self:RenderAscension()
self:ShowState("menu") self:ShowState("menu")
self:SetText("/ui/DefaultGroup/MainMenu/Title", "메이플 덱 어드벤처") self:SetText("/ui/DefaultGroup/MainMenu/Title", "Maple Deck Adventure")
self:SetText("/ui/DefaultGroup/MainMenu/Subtitle", "캐릭터를 고르고 덱을 만들어 모험을 시작하세요") self:SetText("/ui/DefaultGroup/MainMenu/Subtitle", "Choose your character and begin your run")
self:SetText("/ui/DefaultGroup/MainMenu/NewGameButton", "새 게임") self:SetText("/ui/DefaultGroup/MainMenu/NewGameButton", "New Game")
self:BindMenuButtons()`), self:BindMenuButtons()`),
method('BindMenuButtons', `local buttonEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/NewGameButton") method('BindMenuButtons', `local buttonEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/NewGameButton")
if buttonEntity ~= nil and (buttonEntity.ButtonComponent ~= nil or buttonEntity:AddComponent("ButtonComponent") ~= nil) then if buttonEntity ~= nil and (buttonEntity.ButtonComponent ~= nil or buttonEntity:AddComponent("ButtonComponent") ~= nil) then
@@ -136,22 +136,28 @@ self:BindLobbyButtons()
self:BindMenuButtons() self:BindMenuButtons()
self:GoLobbyMap()`), self:GoLobbyMap()`),
method('RenderSoulLabel', `local soulPoints = self.SoulPoints or 0 method('RenderSoulLabel', `local soulPoints = self.SoulPoints or 0
self:SetText("/ui/LobbyUIGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", soulPoints)) self:SetText("/ui/LobbyUIGroup/LobbyHud/SoulLabel", "Soul " .. string.format("%d", soulPoints))
self:SetText("/ui/LobbyUIGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", soulPoints))`), self:SetText("/ui/LobbyUIGroup/SoulShopHud/Souls", "Soul " .. string.format("%d", soulPoints))`),
method('BindLobbyButtons', `if self.LobbyBound == true then method('BindLobbyButtons', `if self.LobbyBound == true then
return return
end end
self.LobbyBound = true self.LobbyBound = true
local function bindClick(path, handler) local ascMinus = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/LobbyHud/AscMinus")
local entity = _EntityService:GetEntityByPath(path) if ascMinus ~= nil and (ascMinus.ButtonComponent ~= nil or ascMinus:AddComponent("ButtonComponent") ~= nil) then
if entity ~= nil and (entity.ButtonComponent ~= nil or entity:AddComponent("ButtonComponent") ~= nil) then ascMinus:ConnectEvent(ButtonClickEvent, function() self:AdjustAscension(-1) end)
entity:ConnectEvent(ButtonClickEvent, handler)
end
end end
bindClick("/ui/LobbyUIGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end) local ascPlus = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/LobbyHud/AscPlus")
bindClick("/ui/LobbyUIGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end) if ascPlus ~= nil and (ascPlus.ButtonComponent ~= nil or ascPlus:AddComponent("ButtonComponent") ~= nil) then
bindClick("/ui/LobbyUIGroup/BoardHud/Close", function() self:CloseBoard() end) ascPlus:ConnectEvent(ButtonClickEvent, function() self:AdjustAscension(1) end)
bindClick("/ui/LobbyUIGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`), end
local boardClose = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/BoardHud/Close")
if boardClose ~= nil and (boardClose.ButtonComponent ~= nil or boardClose:AddComponent("ButtonComponent") ~= nil) then
boardClose:ConnectEvent(ButtonClickEvent, function() self:CloseBoard() end)
end
local soulClose = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/SoulShopHud/Close")
if soulClose ~= nil and (soulClose.ButtonComponent ~= nil or soulClose:AddComponent("ButtonComponent") ~= nil) then
soulClose:ConnectEvent(ButtonClickEvent, function() self:CloseSoulShop() end)
end`),
method('ShowCodex', `self.CodexMode = true method('ShowCodex', `self.CodexMode = true
self.ClassDeckMode = true self.ClassDeckMode = true
local close = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close") local close = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")

View File

@@ -41,24 +41,36 @@ if lp ~= nil then
end end
self:RenderSoulLabel()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "n" }]), self:RenderSoulLabel()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "n" }]),
method('BuySoulUnlock', `local d = nil method('BuySoulUnlock', `local d = nil
if self.SoulShopDef ~= nil then d = self.SoulShopDef[slot] end if self.SoulShopDef ~= nil then
if d == nil then return end d = self.SoulShopDef[slot]
if self.SoulUnlocks ~= nil and self.SoulUnlocks[d.key] == true then end
self:Toast("이미 보유 중입니다") if d == nil then
return return
end end
if (self.SoulPoints or 0) < d.cost then local unlockKey = d.key
self:Toast("영혼이 부족합니다") local unlockCost = d.cost
local unlockName = d.name or "Unlock"
if unlockKey == nil or unlockCost == nil then
return return
end end
self.SoulPoints = self.SoulPoints - d.cost if self.SoulUnlocks ~= nil and self.SoulUnlocks[unlockKey] == true then
if self.SoulUnlocks == nil then self.SoulUnlocks = {} end self:Toast("Already owned")
self.SoulUnlocks[d.key] = true return
end
if (self.SoulPoints or 0) < unlockCost then
self:Toast("Not enough soul")
return
end
self.SoulPoints = self.SoulPoints - unlockCost
if self.SoulUnlocks == nil then
self.SoulUnlocks = {}
end
self.SoulUnlocks[unlockKey] = true
local lp = _UserService.LocalPlayer local lp = _UserService.LocalPlayer
if lp ~= nil then if lp ~= nil then
self:SaveSouls(self.SoulPoints, self:SerializeUnlocks(), lp.PlayerComponent.UserId) self:SaveSouls(self.SoulPoints, self:SerializeUnlocks(), lp.PlayerComponent.UserId)
end end
self:Toast(d.name .. " 해금!") self:Toast(unlockName .. " unlocked")
self:RenderSoulLabel() self:RenderSoulLabel()
self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]), self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]),
method('RenderSoulShop', `local defs = self.SoulShopDef or {} method('RenderSoulShop', `local defs = self.SoulShopDef or {}
@@ -68,16 +80,20 @@ for i = 1, 4 do
if d == nil then if d == nil then
self:SetEntityEnabled(base, false) self:SetEntityEnabled(base, false)
else else
local itemName = d.name or "Unlock"
local itemDesc = d.desc or ""
local itemKey = d.key
local itemCost = d.cost or 0
self:SetEntityEnabled(base, true) self:SetEntityEnabled(base, true)
self:SetText(base .. "/Name", d.name) self:SetText(base .. "/Name", itemName)
self:SetText(base .. "/Desc", d.desc) self:SetText(base .. "/Desc", itemDesc)
local owned = self.SoulUnlocks ~= nil and self.SoulUnlocks[d.key] == true local owned = itemKey ~= nil and self.SoulUnlocks ~= nil and self.SoulUnlocks[itemKey] == true
if owned then if owned then
self:SetText(base .. "/Status", "보유 중") self:SetText(base .. "/Status", "Owned")
elseif (self.SoulPoints or 0) >= d.cost then elseif (self.SoulPoints or 0) >= itemCost then
self:SetText(base .. "/Status", tostring(d.cost) .. " 영혼 · 구매") self:SetText(base .. "/Status", tostring(itemCost) .. " soul · buy")
else else
self:SetText(base .. "/Status", tostring(d.cost) .. " 영혼 · 부족") self:SetText(base .. "/Status", tostring(itemCost) .. " soul · low")
end end
end end
end`), end`),

View File

@@ -36,6 +36,7 @@ function writeCodeblocks() {
prop('number', 'TweenEventId', '0'), prop('number', 'TweenEventId', '0'),
prop('number', 'CardHoverTweenId', '0'), prop('number', 'CardHoverTweenId', '0'),
prop('number', 'DmgPopSeq', '0'), prop('number', 'DmgPopSeq', '0'),
prop('any', 'DmgPopSlotQueue'),
prop('any', 'EndTurnHandler'), prop('any', 'EndTurnHandler'),
prop('any', 'NewGameHandler'), prop('any', 'NewGameHandler'),
prop('any', 'WarriorSelectHandler'), prop('any', 'WarriorSelectHandler'),

View File

@@ -24,7 +24,7 @@
"enable": true, "enable": true,
"visible": true, "visible": true,
"localize": true, "localize": true,
"displayOrder": 4, "displayOrder": 6,
"pathConstraints": "//", "pathConstraints": "//",
"revision": 1, "revision": 1,
"origin": { "origin": {

View File

@@ -24,7 +24,7 @@
"enable": true, "enable": true,
"visible": true, "visible": true,
"localize": true, "localize": true,
"displayOrder": 5, "displayOrder": 1,
"pathConstraints": "//", "pathConstraints": "//",
"revision": 1, "revision": 1,
"origin": { "origin": {

View File

@@ -24,7 +24,7 @@
"enable": true, "enable": true,
"visible": true, "visible": true,
"localize": true, "localize": true,
"displayOrder": 1, "displayOrder": 2,
"pathConstraints": "//", "pathConstraints": "//",
"revision": 1, "revision": 1,
"origin": { "origin": {

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@
"enable": true, "enable": true,
"visible": true, "visible": true,
"localize": true, "localize": true,
"displayOrder": 2, "displayOrder": 3,
"pathConstraints": "//", "pathConstraints": "//",
"revision": 1, "revision": 1,
"origin": { "origin": {