Commit 47793e3f authored by DailyShana's avatar DailyShana

fix

parent cfdf07eb
......@@ -87,10 +87,9 @@ function c19748583.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c19748583.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if not ec then return end
local tc=ec:GetBattleTarget()
if tc and tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if not c:IsRelateToEffect(e) then return end
local tc=c:GetEquipTarget():GetBattleTarget()
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
end
......
......@@ -50,11 +50,10 @@ function c59123194.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c59123194.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bc=e:GetHandler():GetBattleTarget()
local dam=bc:GetTextAttack()
if chk==0 then return dam>0 end
Duel.SetTargetCard(bc)
local dam=bc:GetAttack()
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
......@@ -63,7 +62,7 @@ function c59123194.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=tc:GetAttack()
local dam=tc:GetTextAttack()
if dam<0 then dam=0 end
Duel.Damage(p,dam,REASON_EFFECT)
end
......
......@@ -65,7 +65,7 @@ end
function c90673413.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetPreviousEquipTarget()
return c:IsReason(REASON_LOST_TARGET) and tc and tc:IsLocation(LOCATION_OVERLAY)
return c:IsReason(REASON_LOST_TARGET) and c:IsReason(REASON_DESTROY) and tc:IsLocation(LOCATION_OVERLAY)
end
function c90673413.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
......
......@@ -95,7 +95,7 @@ REASON_BATTLE =0x20 --战斗破坏
REASON_EFFECT =0x40 --效果
REASON_COST =0x80 --用於代價或無法支付代價而破壞
REASON_ADJUST =0x100 --调整(御前试合)
REASON_LOST_TARGET =0x200 --失去效果对象
REASON_LOST_TARGET =0x200 --失去装备对象(被破坏)/失去叠放对象(不是被破坏)
REASON_RULE =0x400 --规则
REASON_SPSUMMON =0x800 --特殊召唤
REASON_DISSUMMON =0x1000 --召唤失败
......
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