Commit 1600d7d7 authored by TanakaKotoha's avatar TanakaKotoha

No.107 银河眼时空龙

parent 04ef72ac
No preview for this file type
......@@ -74,16 +74,17 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.rmfilter(c)
return c:IsFaceup() and not c:IsAttack(e:GetHandler():GetAttack()) and c:IsAbleToRemove()
function cm.rmfilter(c,atk)
return c:IsFaceup() and not c:IsAttack(atk) and c:IsAbleToRemove()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
local c=e:GetHandler()
local atk=c:GetAttack()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.rmfilter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,0,LOCATION_MZONE,1,nil,c,atk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_MZONE,1,1,nil,c,atk)
local tc=g:GetFirst()
local c=e:GetHandler()
local atk=math.abs(tc:GetAttack()-c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,atk)
......
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