Commit 8e0cff8f authored by Nemo Ma's avatar Nemo Ma

fix

parent 7ecb687e
...@@ -28,20 +28,20 @@ function cm.initial_effect(c) ...@@ -28,20 +28,20 @@ function cm.initial_effect(c)
e2:SetOperation(cm.xyzop) e2:SetOperation(cm.xyzop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c,tp) function cm.filter1(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsCanOverlay()
and (c:IsControler(tp) or c:IsAbleToChangeControler()) and c:IsRace(RACE_MACHINE)
end end
function cm.efilter(c,e) function cm.efilter(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil,tp) and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil,tp) local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,tp) local g2=Duel.SelectTarget(tp,Card.IsCanOverlay,tp,0,LOCATION_MZONE,1,1,nil,tp)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
...@@ -28,7 +28,7 @@ function c22021220.initial_effect(c) ...@@ -28,7 +28,7 @@ function c22021220.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22021220,1)) e3:SetDescription(aux.Stringid(22021220,1))
e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_DETACH_MATERIAL) e3:SetCode(EVENT_DETACH_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
......
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