Implement thief discard and retain flows

This commit is contained in:
2026-06-17 22:48:55 +09:00
parent 098571e9aa
commit f2828deb19
7 changed files with 414 additions and 56 deletions

View File

@@ -7,6 +7,10 @@ export const combatMethods = [
self:SelectDiscardSlot(slot)
return
end
if self:IsRetainSelecting() == true then
self:SelectRetainSlot(slot)
return
end
if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
return
end
@@ -50,6 +54,8 @@ self:RenderCombat()
self:CheckCombatEnd()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
method('OnCardButton', `if self:IsDiscardSelecting() == true then
self:SelectDiscardSlot(slot)
elseif self:IsRetainSelecting() == true then
self:SelectRetainSlot(slot)
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
method('FindMonsterAtTouch', `local best = 0
local bestDist = 200
@@ -137,6 +143,10 @@ self:ResolveCardDrop(slot, touchPoint)`, [
self:SelectDiscardSlot(slot)
return
end
if self:IsRetainSelecting() == true then
self:SelectRetainSlot(slot)
return
end
if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
return
end
@@ -417,6 +427,7 @@ self.DiscardSelectRemaining = 0
self.DiscardSelectTotal = 0
self.DiscardPostShiv = 0
self.DiscardShivPerPick = 0
self.RetainSelectActive = false
self:UpdateDiscardPrompt()
self:RenderHand(false)
self:RenderPiles()`),