밴딧 카드 공용 효과 확장
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user