밴딧 카드 공용 효과 확장

This commit is contained in:
2026-06-19 01:26:15 +09:00
parent f64e35668d
commit 71435a2c91
12 changed files with 148 additions and 23 deletions

View File

@@ -44,15 +44,29 @@ end
if self:CanPlayCardNow(c) ~= true then
return
end
if self.Energy < c.cost then
local cost = c.cost or 0
local skillFree = false
if c.kind == "Skill" and self.NextSkillCostZero == true then
cost = 0
skillFree = true
end
if c.kind == "Skill" and self.SkillCostReductionThisTurn ~= nil and self.SkillCostReductionThisTurn > 0 then
cost = math.max(0, cost - self.SkillCostReductionThisTurn)
end
if self.Energy < cost then
self:Toast("에너지가 부족합니다")
return
end
self.Energy = self.Energy - c.cost
self.Energy = self.Energy - cost
self:ResolveCardEffects(cardId, slot, c, false)
if c.kind == "Attack" then
self.TurnAttackCardsPlayed = (self.TurnAttackCardsPlayed or 0) + 1
end
if skillFree == true then
if c.nextSkillCostZero ~= true then
self.NextSkillCostZero = false
end
end
if self:HasPowerField("cardPlayedBlock") == true then
self:AddCardBlock(self:AddPowerFieldTotal("cardPlayedBlock"))
end

View File

@@ -230,8 +230,10 @@ self.TurnAttackCardsPlayed = 0
self.TurnDiscardedCards = 0
self.NextTurnSelectCopies = 0
self.NextTurnSelectPrompt = ""
self.SkillCostReductionThisTurn = 0
self:UpdateDiscardPrompt()
self.Energy = self.MaxEnergy
self.BlockGainMultiplier = 1
self:ApplyRelics("turnStart")
if self.NextTurnKeepBlock == true then
self.NextTurnKeepBlock = false

View File

@@ -269,6 +269,9 @@ end, 1 / 60)`, [
if amount > 0 and self.PlayerDex ~= nil then
amount = amount + self.PlayerDex
end
if self.BlockGainMultiplier ~= nil and self.BlockGainMultiplier > 1 then
amount = amount * self.BlockGainMultiplier
end
if amount < 0 then
amount = 0
end
@@ -367,9 +370,18 @@ if c.nextTurnAttackMultiplier ~= nil and c.nextTurnAttackMultiplier > 0 then
local cur = self.NextTurnAttackMultiplier or 1
self.NextTurnAttackMultiplier = cur * c.nextTurnAttackMultiplier
end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }]),
method('ResolveCardEffects', `if c == nil then
method('ResolveCardEffects', `if c == nil then
return
end
if c.blockGainMultiplier ~= nil and c.blockGainMultiplier > 0 then
self.BlockGainMultiplier = (self.BlockGainMultiplier or 1) * c.blockGainMultiplier
end
if c.nextSkillCostZero == true then
self.NextSkillCostZero = true
end
if c.skillCostReductionThisTurn ~= nil and c.skillCostReductionThisTurn > 0 then
self.SkillCostReductionThisTurn = (self.SkillCostReductionThisTurn or 0) + c.skillCostReductionThisTurn
end
if c.kind == "Attack" then
if c.damage ~= nil then
self:PlayerAttackMotion()

View File

@@ -67,6 +67,9 @@ self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
self.MaxEnergy = 3
self.Turn = 0
self.PlayerBlock = 0
self.BlockGainMultiplier = 1
self.NextSkillCostZero = false
self.SkillCostReductionThisTurn = 0
self.PlayerStr = 0
self.PlayerDex = 0
self.PlayerThorns = 0