Commit a2e266ea authored by VanillaSalt's avatar VanillaSalt

update

parent 51b34024
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +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 Duel.GetControl(tc,tp,PHASE_BATTLE,1) then if Duel.GetControl(tc,tp,PHASE_BATTLE,1)~=0 then
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))
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function c17490535.activate(e,tp,eg,ep,ev,re,r,rp) function c17490535.activate(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 Duel.GetControl(tc,tp) then if Duel.GetControl(tc,tp)~=0 then
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_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
......
...@@ -41,7 +41,7 @@ function c18963306.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +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) and Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
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)
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c31975743.operation(e,tp,eg,ep,ev,re,r,rp) function c31975743.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 Duel.GetControl(tc,tp,PHASE_END,1) then if Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
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_CHANGE_POSITION) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
......
...@@ -26,7 +26,7 @@ function c32065885.ctlop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +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 Duel.GetControl(tc,tp,PHASE_END,2) then if Duel.GetControl(tc,tp,PHASE_END,2)~=0 then
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)
......
...@@ -119,7 +119,7 @@ function c36898537.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,7 +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 Duel.GetControl(tc,tp) then if Duel.GetControl(tc,tp)~=0 then
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,7 +20,7 @@ end ...@@ -20,7 +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) and Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
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)
......
...@@ -47,7 +47,7 @@ function c43476205.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +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 return end if Duel.GetControl(tc,tp)==0 then 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
......
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function c5257687.operation(e,tp,eg,ep,ev,re,r,rp) function c5257687.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
if Duel.GetControl(tc,tp,PHASE_END,1) then if Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
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_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
......
...@@ -24,13 +24,6 @@ function c52860176.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,13 +24,6 @@ function c52860176.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end end
function c52860176.operation(e,tp,eg,ep,ev,re,r,rp) function c52860176.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(c52860176.filter,tp,0,LOCATION_MZONE,nil)
local c=e:GetHandler() Duel.GetControl(g,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c52860176.filter,tp,0,LOCATION_MZONE,ft,ft,nil)
local tc=g:GetFirst()
while tc do
Duel.GetControl(tc,tp)
tc=g:GetNext()
end
end end
...@@ -96,11 +96,7 @@ end ...@@ -96,11 +96,7 @@ end
function c59255742.operation(e,tp,eg,ep,ev,re,r,rp) function c59255742.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
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() Duel.GetControl(g,tp)
while tc do
Duel.GetControl(tc,tp)
tc=g:GetNext()
end
end end
function c59255742.ctcon(e,tp,eg,ep,ev,re,r,rp) function c59255742.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -27,33 +27,25 @@ function c71564150.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,33 +27,25 @@ function c71564150.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c71564150.filter,tp,0,LOCATION_MZONE,ft,ft,nil) local g=Duel.SelectMatchingCard(tp,c71564150.filter,tp,0,LOCATION_MZONE,ft,ft,nil)
local tc=g:GetFirst() Duel.GetControl(g,tp,PHASE_END,1)
local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
while tc do while tc do
if Duel.GetControl(tc,tp,PHASE_END,1) then local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) e1:SetValue(1)
e1:SetValue(1) tc:RegisterEffect(e1)
tc:RegisterEffect(e1) local e2=e1:Clone()
local e2=Effect.CreateEffect(c) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e2:SetType(EFFECT_TYPE_SINGLE) tc:RegisterEffect(e2)
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) local e3=e1:Clone()
e2:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) e3:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetValue(1) tc:RegisterEffect(e3)
tc:RegisterEffect(e2) local e4=e1:Clone()
local e3=Effect.CreateEffect(c) e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetType(EFFECT_TYPE_SINGLE) tc:RegisterEffect(e4)
e3:SetCode(EFFECT_CANNOT_TRIGGER) tc=og:GetNext()
e3:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END)
e4:SetValue(1)
tc:RegisterEffect(e4)
end
tc=g:GetNext()
end end
end end
...@@ -30,32 +30,8 @@ end ...@@ -30,32 +30,8 @@ end
function c72621670.tfilter(c,e) function c72621670.tfilter(c,e)
return c:IsRelateToEffect(e) and c:IsFaceup() return c:IsRelateToEffect(e) and c:IsFaceup()
end end
function c72621670.tfilter2(c,e)
return not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler()
end
function c72621670.activate(e,tp,eg,ep,ev,re,r,rp) function c72621670.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c72621670.tfilter,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c72621670.tfilter,nil,e)
if g:GetCount()<2 then return end if g:GetCount()<2 then return end
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL) Duel.GetControl(g,tp,PHASE_END+RESET_SELF_TURN,1)
local g1=g:Filter(c72621670.tfilter2,nil,e)
local sg=nil
local dg=g1:Clone()
if g1:GetCount()>ct then
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
sg=g1:Select(tp,1,1,nil)
else
sg=Group.CreateGroup()
end
dg:Sub(sg)
else
sg=g1:Clone()
dg:Clear()
end
local tc=sg:GetFirst()
while tc do
Duel.GetControl(tc,tp,PHASE_END+RESET_SELF_TURN,1)
tc=sg:GetNext()
end
if dg:GetCount()>0 then Duel.Destroy(dg,REASON_RULE) 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) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetControl(tc,1-tp)~=0 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)
......
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function c93983867.activate(e,tp,eg,ep,ev,re,r,rp) function c93983867.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
if Duel.GetControl(tc,tp,PHASE_END,1) then if Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c93983867.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c93983867.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ 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() and Duel.GetControl(tc,tp,PHASE_BATTLE,1) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetControl(tc,tp,PHASE_BATTLE,1)~=0 then
if a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
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