Commit a74690ef authored by salix5's avatar salix5

fix

parent 5ae5a76f
...@@ -69,7 +69,7 @@ function c41209827.copycost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -69,7 +69,7 @@ function c41209827.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RegisterFlagEffect(41209827,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(41209827,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c41209827.copyfilter(c) function c41209827.copyfilter(c)
return c:IsFaceup() and c:IsLevelAbove(5) return c:IsFaceup() and c:IsLevelAbove(5) and not c:IsType(TYPE_TOKEN)
end end
function c41209827.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41209827.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c41209827.copyfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c41209827.copyfilter(chkc) end
...@@ -80,9 +80,8 @@ end ...@@ -80,9 +80,8 @@ end
function c41209827.copyop(e,tp,eg,ep,ev,re,r,rp) function c41209827.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsType(TYPE_TOKEN) then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCodeRule()
local cid=0
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -11,17 +11,20 @@ function c43237273.initial_effect(c) ...@@ -11,17 +11,20 @@ function c43237273.initial_effect(c)
e1:SetOperation(c43237273.operation) e1:SetOperation(c43237273.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c43237273.copyfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
end
function c43237273.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43237273.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43237273.copyfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c43237273.copyfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c43237273.copyfilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c43237273.operation(e,tp,eg,ep,ev,re,r,rp) function c43237273.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsType(TYPE_TOKEN) then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCodeRule()
local cid=0 local cid=0
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
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