fix(combat): clear temporary curse cards after combat

This commit is contained in:
2026-06-15 00:37:57 +09:00
parent f9e7bc3603
commit b40c8d11d8
2 changed files with 25 additions and 1 deletions

View File

@@ -2745,7 +2745,22 @@
"Name": null "Name": null
}, },
"Arguments": [], "Arguments": [],
"Code": "local anyAlive = false\nfor i = 1, #self.Monsters do\n\tif self.Monsters[i].alive == true then anyAlive = true; break end\nend\nif anyAlive == false then\n\tself.CombatOver = true\n\tself.Gold = self.Gold + math.floor(25 * self:AscGoldMult())\n\tself:ApplyRelics(\"combatEnd\")\n\tself:ApplyRelics(\"combatReward\")\n\tself:MaybeDropPotion()\n\tself:RenderRun()\n\tlocal node = self.MapNodes[self.CurrentNodeId]\n\tif node ~= nil and node.type == \"elite\" then\n\t\tself.Gold = self.Gold + 15\n\t\tlocal nid = self:PickNewRelic()\n\t\tif nid ~= \"\" then\n\t\t\tself:AddRelic(nid)\n\t\t\tlocal nr = self.Relics[nid]\n\t\t\tif nr ~= nil then\n\t\t\t\tself:Toast(\"유물 획득: \" .. nr.name)\n\t\t\tend\n\t\tend\n\tend\n\tif node ~= nil and node.type == \"boss\" then\n\t\tif self.PlayerJob == \"\" and self.Floor < self.RunLength then\n\t\t\tself:ShowJobChoice()\n\t\telse\n\t\t\tif self.PlayerJob ~= \"\" then self:AwardSouls(1) end\n\t\t\tlocal bid = self:PickNewRelic()\n\t\t\tif bid ~= \"\" then\n\t\t\t\tself:AddRelic(bid)\n\t\t\t\tlocal br = self.Relics[bid]\n\t\t\t\tif br ~= nil then\n\t\t\t\t\tself:Toast(\"유물 획득: \" .. br.name)\n\t\t\t\tend\n\t\t\tend\n\t\t\tself:ContinueAfterBoss()\n\t\tend\n\telse\n\t\tself:OfferReward()\n\tend\nelseif self.PlayerHp <= 0 then\n\tself.CombatOver = true\n\tself:EndRun(\"패배...\")\nend", "Code": "self.DrawPile = {}\nself.DiscardPile = {}\nself.Hand = {}\nself.DiscardSelectRemaining = 0\nself.DiscardSelectTotal = 0\nself:UpdateDiscardPrompt()\nself:RenderHand(false)\nself:RenderPiles()",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
"Name": "ClearCombatCards"
},
{
"Return": {
"Type": "void",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": null
},
"Arguments": [],
"Code": "local anyAlive = false\nfor i = 1, #self.Monsters do\n\tif self.Monsters[i].alive == true then anyAlive = true; break end\nend\nif anyAlive == false then\n\tself.CombatOver = true\n\tself:ClearCombatCards()\n\tself.Gold = self.Gold + math.floor(25 * self:AscGoldMult())\n\tself:ApplyRelics(\"combatEnd\")\n\tself:ApplyRelics(\"combatReward\")\n\tself:MaybeDropPotion()\n\tself:RenderRun()\n\tlocal node = self.MapNodes[self.CurrentNodeId]\n\tif node ~= nil and node.type == \"elite\" then\n\t\tself.Gold = self.Gold + 15\n\t\tlocal nid = self:PickNewRelic()\n\t\tif nid ~= \"\" then\n\t\t\tself:AddRelic(nid)\n\t\t\tlocal nr = self.Relics[nid]\n\t\t\tif nr ~= nil then\n\t\t\t\tself:Toast(\"유물 획득: \" .. nr.name)\n\t\t\tend\n\t\tend\n\tend\n\tif node ~= nil and node.type == \"boss\" then\n\t\tif self.PlayerJob == \"\" and self.Floor < self.RunLength then\n\t\t\tself:ShowJobChoice()\n\t\telse\n\t\t\tif self.PlayerJob ~= \"\" then self:AwardSouls(1) end\n\t\t\tlocal bid = self:PickNewRelic()\n\t\t\tif bid ~= \"\" then\n\t\t\t\tself:AddRelic(bid)\n\t\t\t\tlocal br = self.Relics[bid]\n\t\t\t\tif br ~= nil then\n\t\t\t\t\tself:Toast(\"유물 획득: \" .. br.name)\n\t\t\t\tend\n\t\t\tend\n\t\t\tself:ContinueAfterBoss()\n\t\tend\n\telse\n\t\tself:OfferReward()\n\tend\nelseif self.PlayerHp <= 0 then\n\tself.CombatOver = true\n\tself:EndRun(\"패배...\")\nend",
"Scope": 2, "Scope": 2,
"ExecSpace": 6, "ExecSpace": 6,
"Attributes": [], "Attributes": [],

View File

@@ -4690,12 +4690,21 @@ if self.CombatOver == true then
return return
end end
_TimerService:SetTimerOnce(function() self:StartPlayerTurn() end, 0.45)`), _TimerService:SetTimerOnce(function() self:StartPlayerTurn() end, 0.45)`),
method('ClearCombatCards', `self.DrawPile = {}
self.DiscardPile = {}
self.Hand = {}
self.DiscardSelectRemaining = 0
self.DiscardSelectTotal = 0
self:UpdateDiscardPrompt()
self:RenderHand(false)
self:RenderPiles()`),
method('CheckCombatEnd', `local anyAlive = false method('CheckCombatEnd', `local anyAlive = false
for i = 1, #self.Monsters do for i = 1, #self.Monsters do
if self.Monsters[i].alive == true then anyAlive = true; break end if self.Monsters[i].alive == true then anyAlive = true; break end
end end
if anyAlive == false then if anyAlive == false then
self.CombatOver = true self.CombatOver = true
self:ClearCombatCards()
self.Gold = self.Gold + math.floor(${GOLD_PER_WIN} * self:AscGoldMult()) self.Gold = self.Gold + math.floor(${GOLD_PER_WIN} * self:AscGoldMult())
self:ApplyRelics("combatEnd") self:ApplyRelics("combatEnd")
self:ApplyRelics("combatReward") self:ApplyRelics("combatReward")