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)
return math.max(0, atk)
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 张卡,可以取消
function RushDuel.SelectGroup(player, group, min, max)
local sg = Group.CreateGroup()
......
......@@ -28,8 +28,7 @@ end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local dam=tc:GetBaseAttack()
if dam<0 then dam=0 end
local dam=RD.GetBaseAttackOnDestroy(tc)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
......
......@@ -43,8 +43,7 @@ end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local dam=tc:GetBaseAttack()
if dam<0 then dam=0 end
local dam=RD.GetBaseAttackOnDestroy(tc)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT)
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