Commit 0553063a authored by VanillaSalt's avatar VanillaSalt

update

parent acb873bf
...@@ -59,10 +59,8 @@ function c10000030.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,10 +59,8 @@ function c10000030.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp) function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
function c10000030.operation2(e,tp,eg,ep,ev,re,r,rp) function c10000030.operation2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -41,9 +41,7 @@ function c11390349.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,9 +41,7 @@ function c11390349.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c11390349.ctlop(e,tp,eg,ep,ev,re,r,rp) function c11390349.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetDefence()==0 and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetDefence()==0 then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -28,11 +28,7 @@ end ...@@ -28,11 +28,7 @@ end
function c11508758.ctlop(e,tp,eg,ep,ev,re,r,rp) function c11508758.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then if Duel.GetControl(tc,tp,PHASE_BATTLE,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
else
if tc:IsAttackable() and not tc:IsImmuneToEffect(e) then if tc:IsAttackable() and not tc:IsImmuneToEffect(e) then
local ats=tc:GetAttackableTarget() local ats=tc:GetAttackableTarget()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11508758,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11508758,1))
......
...@@ -41,9 +41,7 @@ function c12836042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,9 +41,7 @@ function c12836042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c12836042.operation(e,tp,eg,ep,ev,re,r,rp) function c12836042.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
...@@ -35,9 +35,7 @@ function c14729426.cttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,9 +35,7 @@ function c14729426.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c14729426.ctop(e,tp,eg,ep,ev,re,r,rp) function c14729426.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if tc and tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -59,9 +59,7 @@ function c15187079.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,9 +59,7 @@ function c15187079.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c15187079.ctop(e,tp,eg,ep,ev,re,r,rp) function c15187079.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -32,8 +32,6 @@ function c17490535.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,8 +32,6 @@ function c17490535.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(RACE_REPTILE) e1:SetValue(RACE_REPTILE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end end
end end
end end
...@@ -41,13 +41,7 @@ function c18963306.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,13 +41,7 @@ function c18963306.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1) then
if not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
return
end
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -44,10 +44,8 @@ function c24413299.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,10 +44,8 @@ function c24413299.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=g1:Select(tp,1,1,nil) local g=g1:Select(tp,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and not Duel.GetControl(tc,tp) then if tc then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -29,8 +29,6 @@ end ...@@ -29,8 +29,6 @@ end
function c24725825.operation(e,tp,eg,ep,ev,re,r,rp) function c24725825.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE+RACE_DRAGON) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE+RACE_DRAGON) then
if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -27,8 +27,6 @@ function c25774450.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,8 +27,6 @@ function c25774450.activate(e,tp,eg,ep,ev,re,r,rp)
local dc=dg:GetFirst() local dc=dg:GetFirst()
local cc=cg:GetFirst() local cc=cg:GetFirst()
if dc:IsRelateToEffect(e) and cc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 then if dc:IsRelateToEffect(e) and cc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 then
if not Duel.GetControl(cc,1-tp,0,0) and not cc:IsImmuneToEffect(e) and cc:IsAbleToChangeControler() then Duel.GetControl(cc,1-tp)
Duel.Destroy(cc,REASON_EFFECT)
end
end end
end end
...@@ -76,10 +76,8 @@ function c2978414.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -76,10 +76,8 @@ function c2978414.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c2978414.ctop(e,tp,eg,ep,ev,re,r,rp) function c2978414.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
function c2978414.efop(e,tp,eg,ep,ev,re,r,rp) function c2978414.efop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,9 +22,7 @@ function c31440542.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,9 +22,7 @@ function c31440542.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c31440542.ctlop(e,tp,eg,ep,ev,re,r,rp) function c31440542.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -51,8 +51,6 @@ function c31975743.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,8 +51,6 @@ function c31975743.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end end
end end
end end
...@@ -33,9 +33,7 @@ function c32003338.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,9 +33,7 @@ function c32003338.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c32003338.operation(e,tp,eg,ep,ev,re,r,rp) function c32003338.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -26,11 +26,7 @@ function c32065885.ctlop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,11 +26,7 @@ function c32065885.ctlop(e,tp,eg,ep,ev,re,r,rp)
sg=sg:Select(tp,1,1,nil) sg=sg:Select(tp,1,1,nil)
end end
local tc=sg:GetFirst() local tc=sg:GetFirst()
if not Duel.GetControl(tc,tp,PHASE_END,2) then if Duel.GetControl(tc,tp,PHASE_END,2) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
else
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -29,9 +29,7 @@ function c34568403.coinop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,9 +29,7 @@ function c34568403.coinop(e,tp,eg,ep,ev,re,r,rp)
else res=Duel.TossCoin(tp,1) end else res=Duel.TossCoin(tp,1) end
c34568403.arcanareg(c,res) c34568403.arcanareg(c,res)
if res==0 then if res==0 then
if not Duel.GetControl(c,1-tp) and not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then Duel.GetControl(c,1-tp)
Duel.Destroy(c,REASON_EFFECT)
end
end end
end end
function c34568403.arcanareg(c,coin) function c34568403.arcanareg(c,coin)
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function c35262428.ctlop(e,tp,eg,ep,ev,re,r,rp) function c35262428.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler() local tc=e:GetHandler()
local p=e:GetLabel() local p=e:GetLabel()
if tc:GetControler()~=p and not Duel.GetControl(tc,p) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then if tc:IsControler(1-p) then
Duel.Destroy(tc,REASON_EFFECT) Duel.GetControl(tc,p)
end end
end end
...@@ -41,9 +41,7 @@ function c36757171.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,9 +41,7 @@ function c36757171.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -119,11 +119,7 @@ function c36898537.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,11 +119,7 @@ function c36898537.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
if not Duel.GetControl(tc,tp) then if Duel.GetControl(tc,tp) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
else
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
......
...@@ -20,13 +20,7 @@ end ...@@ -20,13 +20,7 @@ end
function c37520316.activate(e,tp,eg,ep,ev,re,r,rp) function c37520316.activate(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:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1) then
if not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
return
end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
local reset=RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END local reset=RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -23,8 +23,6 @@ end ...@@ -23,8 +23,6 @@ end
function c37620434.operation(e,tp,eg,ep,ev,re,r,rp) function c37620434.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FIEND) then if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FIEND) then
if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -28,9 +28,5 @@ function c38354937.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,9 +28,5 @@ function c38354937.ctop(e,tp,eg,ep,ev,re,r,rp)
sg=sg:Select(tp,1,1,nil) sg=sg:Select(tp,1,1,nil)
end end
local tc=sg:GetFirst() local tc=sg:GetFirst()
if not Duel.GetControl(tc,tp) then Duel.GetControl(tc,tp)
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end end
...@@ -33,9 +33,7 @@ function c39765115.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,9 +33,7 @@ function c39765115.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c39765115.activate(e,tp,eg,ep,ev,re,r,rp) function c39765115.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -72,9 +72,7 @@ function c40061558.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -72,9 +72,7 @@ function c40061558.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c40061558.ctop(e,tp,eg,ep,ev,re,r,rp) function c40061558.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -19,9 +19,7 @@ function c4031928.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -19,9 +19,7 @@ function c4031928.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c4031928.activate(e,tp,eg,ep,ev,re,r,rp) function c4031928.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -22,9 +22,7 @@ function c42303365.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,9 +22,7 @@ function c42303365.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c42303365.ctlop(e,tp,eg,ep,ev,re,r,rp) function c42303365.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()==0 and not Duel.GetControl(tc,tp) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()==0 then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -47,12 +47,7 @@ function c43476205.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,12 +47,7 @@ function c43476205.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetTurnPlayer()~=tp then if Duel.GetTurnPlayer()~=tp then
if not tc:IsRelateToEffect(e) or not tc:IsFaceup() then return end if not tc:IsRelateToEffect(e) or not tc:IsFaceup() then return end
if not Duel.GetControl(tc,tp) then if not Duel.GetControl(tc,tp) then return end
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
return
end
Duel.BreakEffect() Duel.BreakEffect()
end end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
......
...@@ -23,9 +23,7 @@ function c45033006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,9 +23,7 @@ function c45033006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c45033006.operation(e,tp,eg,ep,ev,re,r,rp) function c45033006.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsDefencePos() and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsDefencePos() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -28,9 +28,7 @@ function c4941482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -28,9 +28,7 @@ function c4941482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c4941482.operation(e,tp,eg,ep,ev,re,r,rp) function c4941482.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsDefencePos() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if tc and tc:IsDefencePos() and tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -29,8 +29,6 @@ end ...@@ -29,8 +29,6 @@ end
function c51119924.operation(e,tp,eg,ep,ev,re,r,rp) function c51119924.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) then
if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -26,8 +26,6 @@ function c5257687.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,8 +26,6 @@ function c5257687.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end end
end end
end end
...@@ -29,9 +29,7 @@ end ...@@ -29,9 +29,7 @@ end
function c52702748.ctlop(e,tp,eg,ep,ev,re,r,rp) function c52702748.ctlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not Duel.GetControl(c,1-tp) and not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then Duel.GetControl(c,1-tp)
Duel.Destroy(c,REASON_EFFECT)
end
end end
function c52702748.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52702748.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove(1-tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove(1-tp) end
......
...@@ -48,9 +48,7 @@ function c53136004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -48,9 +48,7 @@ function c53136004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c53136004.operation(e,tp,eg,ep,ev,re,r,rp) function c53136004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -98,10 +98,7 @@ function c59255742.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,10 +98,7 @@ function c59255742.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if Duel.GetControl(tc,tp) then Duel.GetControl(tc,tp)
elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
tc=g:GetNext() tc=g:GetNext()
end end
end end
......
...@@ -24,9 +24,7 @@ function c59695933.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,9 +24,7 @@ function c59695933.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c59695933.activate(e,tp,eg,ep,ev,re,r,rp) function c59695933.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -30,9 +30,7 @@ function c62420419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,9 +30,7 @@ function c62420419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c62420419.operation(e,tp,eg,ep,ev,re,r,rp) function c62420419.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -22,9 +22,7 @@ function c63018132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,9 +22,7 @@ function c63018132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c63018132.operation(e,tp,eg,ep,ev,re,r,rp) function c63018132.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -106,10 +106,8 @@ function c65305468.cttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -106,10 +106,8 @@ function c65305468.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c65305468.ctop(e,tp,eg,ep,ev,re,r,rp) function c65305468.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() and not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then if tc:IsRelateToBattle() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_BATTLE,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
function c65305468.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c65305468.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -40,9 +40,7 @@ function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,9 +40,7 @@ function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c69257165.operation(e,tp,eg,ep,ev,re,r,rp) function c69257165.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()==e:GetLabel() and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()==e:GetLabel() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -33,9 +33,7 @@ function c70630741.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,9 +33,7 @@ function c70630741.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c70630741.operation(e,tp,eg,ep,ev,re,r,rp) function c70630741.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -76,9 +76,7 @@ function c70913714.cttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,9 +76,7 @@ function c70913714.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c70913714.ctop(e,tp,eg,ep,ev,re,r,rp) function c70913714.ctop(e,tp,eg,ep,ev,re,r,rp)
local ec=Duel.GetFirstTarget() local ec=Duel.GetFirstTarget()
if ec and ec:IsRelateToEffect(e) and not Duel.GetControl(ec,tp) then if ec and ec:IsRelateToEffect(e) then
if not ec:IsImmuneToEffect(e) and ec:IsAbleToChangeControler() then Duel.GetControl(ec,tp)
Duel.Destroy(ec,REASON_EFFECT)
end
end end
end end
...@@ -53,8 +53,6 @@ function c71564150.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,8 +53,6 @@ function c71564150.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END)
e4:SetValue(1) e4:SetValue(1)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end end
tc=g:GetNext() tc=g:GetNext()
end end
......
...@@ -43,9 +43,7 @@ function c71652522.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,9 +43,7 @@ function c71652522.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c71652522.ctop(e,tp,eg,ep,ev,re,r,rp) function c71652522.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:GetFlagEffect(71652522)~=0 and not Duel.GetControl(tc,1-tp) then if tc:GetFlagEffect(71652522)~=0 then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,1-tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -29,9 +29,7 @@ function c72287557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,9 +29,7 @@ function c72287557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c72287557.activate(e,tp,eg,ep,ev,re,r,rp) function c72287557.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -22,9 +22,7 @@ function c7672244.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,9 +22,7 @@ function c7672244.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c7672244.activate(e,tp,eg,ep,ev,re,r,rp) function c7672244.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,1-tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,1-tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -38,9 +38,7 @@ function c77841719.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,9 +38,7 @@ function c77841719.operation(e,tp,eg,ep,ev,re,r,rp)
local tct=1 local tct=1
if Duel.GetTurnPlayer()~=tp then tct=2 if Duel.GetTurnPlayer()~=tp then tct=2
elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,tct) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,tct)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -33,10 +33,8 @@ function c7914843.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,10 +33,8 @@ function c7914843.operation(e,tp,eg,ep,ev,re,r,rp)
local tct=1 local tct=1
if Duel.GetTurnPlayer()~=tp then tct=2 if Duel.GetTurnPlayer()~=tp then tct=2
elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsRace(RACE_MACHINE) and not Duel.GetControl(tc,tp,PHASE_END,tct) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsRace(RACE_MACHINE) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,tct)
Duel.Destroy(tc,REASON_RULE)
end
end end
end end
function c7914843.desop(e,tp,eg,ep,ev,re,r,rp) function c7914843.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -37,9 +37,7 @@ function c80117527.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,9 +37,7 @@ function c80117527.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c80117527.operation(e,tp,eg,ep,ev,re,r,rp) function c80117527.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -74,10 +74,8 @@ function c84305651.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,10 +74,8 @@ function c84305651.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c84305651.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c84305651.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and not Duel.GetControl(tc,tp) then if tc then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
end end
...@@ -43,9 +43,7 @@ function c84845628.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -43,9 +43,7 @@ function c84845628.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c84845628.operation(e,tp,eg,ep,ev,re,r,rp) function c84845628.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -68,10 +68,8 @@ function c85101097.ctlop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,10 +68,8 @@ function c85101097.ctlop(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:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() and not Duel.GetControl(c,1-tp) then and c:IsRelateToEffect(e) and c:IsFaceup() then
if not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then Duel.GetControl(c,1-tp)
Duel.Destroy(c,REASON_EFFECT)
end
end end
end end
function c85101097.damcon(e,tp,eg,ep,ev,re,r,rp) function c85101097.damcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,8 +29,6 @@ end ...@@ -29,8 +29,6 @@ end
function c87514539.operation(e,tp,eg,ep,ev,re,r,rp) function c87514539.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_ZOMBIE+RACE_FIEND) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_ZOMBIE+RACE_FIEND) then
if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -25,11 +25,7 @@ end ...@@ -25,11 +25,7 @@ end
function c87567063.operation(e,tp,eg,ep,ev,re,r,rp) function c87567063.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then Duel.GetControl(tc,tp,PHASE_BATTLE,1)
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -27,9 +27,7 @@ function c87910978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -27,9 +27,7 @@ function c87910978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c87910978.activate(e,tp,eg,ep,ev,re,r,rp) function c87910978.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -34,9 +34,7 @@ function c88289295.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,9 +34,7 @@ function c88289295.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local ct=1 local ct=1
if Duel.GetTurnPlayer()~=tp then ct=2 end if Duel.GetTurnPlayer()~=tp then ct=2 end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,ct) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,ct)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -21,7 +21,7 @@ function c91148083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,7 +21,7 @@ function c91148083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c91148083.operation(e,tp,eg,ep,ev,re,r,rp) function c91148083.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetControl(tc,1-tp,0,0) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetControl(tc,1-tp) then
tc:RegisterFlagEffect(91148083,RESET_EVENT+0x1fe0000,0,0) tc:RegisterFlagEffect(91148083,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -49,9 +49,7 @@ function c93900406.ctltg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,9 +49,7 @@ function c93900406.ctltg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c93900406.ctlop(e,tp,eg,ep,ev,re,r,rp) function c93900406.ctlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and not Duel.GetControl(c,1-tp) then if c:IsRelateToEffect(e) and c:IsFaceup() then
if not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then Duel.GetControl(c,1-tp)
Duel.Destroy(c,REASON_EFFECT)
end
end end
end end
...@@ -49,10 +49,6 @@ function c93983867.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,10 +49,6 @@ function c93983867.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
else
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
function c93983867.retop(e,tp,eg,ep,ev,re,r,rp) function c93983867.retop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,12 +28,8 @@ end ...@@ -28,12 +28,8 @@ end
function c96008713.activate(e,tp,eg,ep,ev,re,r,rp) function c96008713.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetControl(tc,tp,PHASE_BATTLE,1) then
if not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
elseif a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
......
...@@ -86,9 +86,7 @@ function c97452817.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -86,9 +86,7 @@ function c97452817.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c97452817.ctop(e,tp,eg,ep,ev,re,r,rp) function c97452817.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(tp) and not Duel.GetControl(tc,1-tp) then if tc:IsRelateToEffect(e) and tc:IsControler(tp) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,1-tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
...@@ -52,9 +52,7 @@ function c9780364.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,9 +52,7 @@ function c9780364.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then if e:GetLabel()==0 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
else else
if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
end end
...@@ -61,9 +61,7 @@ function c98045062.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,9 +61,7 @@ function c98045062.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then if e:GetLabel()==0 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
else else
if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
end end
...@@ -92,10 +92,8 @@ function c98777036.cttar(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -92,10 +92,8 @@ function c98777036.cttar(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c98777036.ctop(e,tp,eg,ep,ev,re,r,rp) function c98777036.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp) then if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end end
function c98777036.lvfilter(c) function c98777036.lvfilter(c)
......
...@@ -40,9 +40,7 @@ function c99311109.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,9 +40,7 @@ function c99311109.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c99311109.activate(e,tp,eg,ep,ev,re,r,rp) function c99311109.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.GetControl(tc,tp,PHASE_END,1)
Duel.Destroy(tc,REASON_EFFECT)
end
end end
end 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