Commit dd48bcb4 authored by 未闻皂名's avatar 未闻皂名

2024/7/28 bug修复

parent 68400107
Pipeline #28751 passed with stages
in 7 minutes and 59 seconds
...@@ -132,6 +132,17 @@ function RushDuel.GetBaseAttackOnTribute(c) ...@@ -132,6 +132,17 @@ function RushDuel.GetBaseAttackOnTribute(c)
return math.max(0, atk) return math.max(0, atk)
end end
-- 获取被破坏时的基础攻击力
function RushDuel.GetBaseAttackOnDestroy(c)
local atk
if c:IsSummonType(SUMMON_TYPE_MAXIMUM) and c:IsReason(REASON_DESTROY) then
atk = c.maximum_attack
else
atk = c:GetTextAttack()
end
return math.max(0, atk)
end
-- 让玩家选择卡片组的 min ~ max 张卡,可以取消 -- 让玩家选择卡片组的 min ~ max 张卡,可以取消
function RushDuel.SelectGroup(player, group, min, max) function RushDuel.SelectGroup(player, group, min, max)
local sg = Group.CreateGroup() local sg = Group.CreateGroup()
......
...@@ -28,8 +28,7 @@ end ...@@ -28,8 +28,7 @@ end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
if tc then if tc then
local dam=tc:GetBaseAttack() local dam=RD.GetBaseAttackOnDestroy(tc)
if dam<0 then dam=0 end
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT)
end end
......
...@@ -43,8 +43,7 @@ end ...@@ -43,8 +43,7 @@ end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
if tc then if tc then
local dam=tc:GetBaseAttack() local dam=RD.GetBaseAttackOnDestroy(tc)
if dam<0 then dam=0 end
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment