Commit 347c7ebf authored by nekrozar's avatar nekrozar Committed by GitHub

use LOCATION_FZONE (#1256)

parent 3d071f99
...@@ -35,7 +35,7 @@ function c1050355.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c1050355.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -34,11 +34,7 @@ function c10875327.initial_effect(c) ...@@ -34,11 +34,7 @@ function c10875327.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c10875327.sdcon(e) function c10875327.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c10875327.descon(e,tp,eg,ep,ev,re,r,rp) function c10875327.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -95,7 +95,7 @@ function c11881272.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +95,7 @@ function c11881272.actop(e,tp,eg,ep,ev,re,r,rp)
local b=te:IsActivatable(tp,true,true) local b=te:IsActivatable(tp,true,true)
if b then if b then
Duel.ResetFlagEffect(tp,11881272) Duel.ResetFlagEffect(tp,11881272)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -36,11 +36,7 @@ function c15187079.initial_effect(c) ...@@ -36,11 +36,7 @@ function c15187079.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c15187079.sdcon(e) function c15187079.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
......
...@@ -11,7 +11,7 @@ function c15248873.initial_effect(c) ...@@ -11,7 +11,7 @@ function c15248873.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c15248873.condition(e,tp,eg,ep,ev,re,r,rp) function c15248873.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldCard(tp,LOCATION_SZONE,5)==nil and Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)~=nil return Duel.GetFieldCard(tp,LOCATION_FZONE,0)==nil and Duel.GetFieldCard(1-tp,LOCATION_FZONE,0)~=nil
end end
function c15248873.filter(c,tp) function c15248873.filter(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
...@@ -26,7 +26,7 @@ function c15248873.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c15248873.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,c15248873.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c15248873.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
Duel.ResetFlagEffect(tp,15248873) Duel.ResetFlagEffect(tp,15248873)
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -72,9 +72,7 @@ function c1710476.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -72,9 +72,7 @@ function c1710476.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
end end
function c1710476.descon(e) function c1710476.descon(e)
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end end
function c1710476.antarget(e,c) function c1710476.antarget(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
......
...@@ -38,7 +38,7 @@ function c19089195.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c19089195.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19089195.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19089195.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -86,12 +86,12 @@ end ...@@ -86,12 +86,12 @@ end
function c20644748.aclimit(e,re,tp) function c20644748.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
if re:IsActiveType(TYPE_FIELD) then if re:IsActiveType(TYPE_FIELD) then
return not Duel.GetFieldCard(tp,LOCATION_SZONE,5) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4 return not Duel.GetFieldCard(tp,LOCATION_FZONE,0) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4
elseif re:IsActiveType(TYPE_PENDULUM) then elseif re:IsActiveType(TYPE_PENDULUM) then
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4 return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4
end end
return false return false
end end
function c20644748.setlimit(e,c,tp) function c20644748.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD) and not Duel.GetFieldCard(tp,LOCATION_SZONE,5) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4 return c:IsType(TYPE_FIELD) and not Duel.GetFieldCard(tp,LOCATION_FZONE,0) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4
end end
...@@ -12,7 +12,7 @@ function c22900598.initial_effect(c) ...@@ -12,7 +12,7 @@ function c22900598.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c22900598.condition(e,tp,eg,ep,ev,re,r,rp) function c22900598.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldCard(tp,LOCATION_SZONE,5)~=nil then return false end if Duel.GetFieldCard(tp,LOCATION_FZONE,0)~=nil then return false end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
return g:GetCount()>0 and g:FilterCount(Card.IsRace,nil,RACE_ZOMBIE)==g:GetCount() return g:GetCount()>0 and g:FilterCount(Card.IsRace,nil,RACE_ZOMBIE)==g:GetCount()
end end
......
...@@ -23,15 +23,11 @@ function c24294108.initial_effect(c) ...@@ -23,15 +23,11 @@ function c24294108.initial_effect(c)
end end
function c24294108.target(e,tp,eg,ep,ev,re,r,rp,chk) function c24294108.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local g=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.FromCards(c1,c2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c24294108.activate(e,tp,eg,ep,ev,re,r,rp) function c24294108.activate(e,tp,eg,ep,ev,re,r,rp)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local g=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.FromCards(c1,c2)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
......
...@@ -58,12 +58,8 @@ function c25862681.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,12 +58,8 @@ function c25862681.sumop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c25862681.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c25862681.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local g=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) if chk==0 then return g:GetCount()>0 end
if chk==0 then return c1 or c2 end
local g=Group.CreateGroup()
if c1 then g:AddCard(c1) end
if c2 then g:AddCard(c2) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end end
...@@ -71,11 +67,7 @@ function c25862681.ffilter(c) ...@@ -71,11 +67,7 @@ function c25862681.ffilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand() return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end end
function c25862681.desop(e,tp,eg,ep,ev,re,r,rp) function c25862681.desop(e,tp,eg,ep,ev,re,r,rp)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local g=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.CreateGroup()
if c1 then g:AddCard(c1) end
if c2 then g:AddCard(c2) end
if g:GetCount()>0 then if g:GetCount()>0 then
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then if ct>0 then
......
...@@ -51,7 +51,7 @@ function c32036866.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c32036866.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c32036866.condition2(e,tp,eg,ep,ev,re,r,rp) function c32036866.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldCard(tp,LOCATION_SZONE,5)==nil return Duel.GetFieldCard(tp,LOCATION_FZONE,0)==nil
end end
function c32036866.filter2(c,tp) function c32036866.filter2(c,tp)
return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
...@@ -63,7 +63,7 @@ function c32036866.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c32036866.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32036866.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32036866.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -57,7 +57,7 @@ function c32912040.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c32912040.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c32912040.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c32912040.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local tc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if chkc then return false end if chkc then return false end
if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0xe2) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e) if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0xe2) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c32912040.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end and Duel.IsExistingMatchingCard(c32912040.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end
......
...@@ -32,11 +32,7 @@ function c33537328.initial_effect(c) ...@@ -32,11 +32,7 @@ function c33537328.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c33537328.sdcon(e) function c33537328.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c33537328.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c33537328.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -9,20 +9,17 @@ function c35787450.initial_effect(c) ...@@ -9,20 +9,17 @@ function c35787450.initial_effect(c)
e1:SetOperation(c35787450.addc) e1:SetOperation(c35787450.addc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c35787450.check(tp) function c35787450.filter(c)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) return c:IsFaceup() and c:IsCode(75041269) and c:IsCanAddCounter(0x1b,2)
return tc and tc:IsFaceup() and tc:IsCode(75041269) and tc:IsCanAddCounter(0x1b,2)
end end
function c35787450.addtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35787450.addtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c35787450.check(0) or c35787450.check(1) end if chk==0 then return Duel.IsExistingMatchingCard(c35787450.filter,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) end
end end
function c35787450.addc(e,tp,eg,ep,ev,re,r,rp) function c35787450.addc(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local g=Duel.GetMatchingGroup(c35787450.filter,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if tc and tc:IsFaceup() and tc:IsCode(75041269) then local tc=g:GetFirst()
tc:AddCounter(0x1b,2) while tc do
end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if tc and tc:IsFaceup() and tc:IsCode(75041269) then
tc:AddCounter(0x1b,2) tc:AddCounter(0x1b,2)
tc=g:GetNext()
end end
end end
...@@ -80,9 +80,7 @@ function c36521459.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -80,9 +80,7 @@ function c36521459.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
end end
function c36521459.descon(e) function c36521459.descon(e)
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end end
function c36521459.antarget(e,c) function c36521459.antarget(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
......
...@@ -20,14 +20,15 @@ function c36625827.initial_effect(c) ...@@ -20,14 +20,15 @@ function c36625827.initial_effect(c)
e2:SetOperation(c36625827.desop) e2:SetOperation(c36625827.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c36625827.ctfilter(c)
return c:IsFaceup() and c:IsCode(75041269) and c:IsCanAddCounter(0x1b,1)
end
function c36625827.addc(e,tp,eg,ep,ev,re,r,rp) function c36625827.addc(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local g=Duel.GetMatchingGroup(c36625827.ctfilter,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if tc and tc:IsFaceup() and tc:IsCode(75041269) then local tc=g:GetFirst()
tc:AddCounter(0x1b,1) while tc do
end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if tc and tc:IsFaceup() and tc:IsCode(75041269) then
tc:AddCounter(0x1b,1) tc:AddCounter(0x1b,1)
tc=g:GetNext()
end end
end end
function c36625827.descon(e,tp,eg,ep,ev,re,r,rp) function c36625827.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -72,9 +72,7 @@ function c37115575.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,9 +72,7 @@ function c37115575.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c37115575.descon(e) function c37115575.descon(e)
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end end
function c37115575.decon(e,tp,eg,ep,ev,re,r,rp) function c37115575.decon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -22,7 +22,7 @@ function c37931734.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c37931734.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c37931734.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c37931734.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -25,7 +25,7 @@ function c40522482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,7 +25,7 @@ function c40522482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=tg:GetFirst():GetAttack() local atk=tg:GetFirst():GetAttack()
local g=Duel.GetMatchingGroup(c40522482.desfilter,tp,0,LOCATION_MZONE,nil,atk) local g=Duel.GetMatchingGroup(c40522482.desfilter,tp,0,LOCATION_MZONE,nil,atk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local dam=0 local dam=0
if fc and c40522482.ffilter(fc) then if fc and c40522482.ffilter(fc) then
dam=g:GetSum(Card.GetBaseAttack) dam=g:GetSum(Card.GetBaseAttack)
...@@ -44,7 +44,7 @@ function c40522482.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c40522482.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)>0 then if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE) local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if og:GetCount()==0 then return end if og:GetCount()==0 then return end
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local dam=0 local dam=0
if fc and c40522482.ffilter(fc) then if fc and c40522482.ffilter(fc) then
dam=og:GetSum(Card.GetBaseAttack) dam=og:GetSum(Card.GetBaseAttack)
......
...@@ -34,11 +34,7 @@ function c41181774.initial_effect(c) ...@@ -34,11 +34,7 @@ function c41181774.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c41181774.sdcon(e) function c41181774.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c41181774.hdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41181774.hdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToDeck() end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToDeck() end
......
...@@ -53,14 +53,8 @@ function c4179255.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,14 +53,8 @@ function c4179255.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c4179255.check()
local tc=Duel.GetFieldCard(0,LOCATION_SZONE,5)
if tc and tc:IsFaceup() then return true end
tc=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return tc and tc:IsFaceup()
end
function c4179255.descon(e,tp,eg,ep,ev,re,r,rp) function c4179255.descon(e,tp,eg,ep,ev,re,r,rp)
return c4179255.check() return Duel.IsExistingMatchingCard(nil,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end end
function c4179255.desfilter(c) function c4179255.desfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) return c:IsPosition(POS_FACEUP_ATTACK)
......
...@@ -33,11 +33,7 @@ function c46263076.initial_effect(c) ...@@ -33,11 +33,7 @@ function c46263076.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c46263076.sdcon(e) function c46263076.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -60,12 +60,12 @@ end ...@@ -60,12 +60,12 @@ end
function c48605591.aclimit(e,re,tp) function c48605591.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
if re:IsActiveType(TYPE_FIELD) then if re:IsActiveType(TYPE_FIELD) then
return not Duel.GetFieldCard(tp,LOCATION_SZONE,5) and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)>2 return not Duel.GetFieldCard(tp,LOCATION_FZONE,0) and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)>2
elseif re:IsActiveType(TYPE_PENDULUM) then elseif re:IsActiveType(TYPE_PENDULUM) then
return Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)>2 return Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)>2
end end
return false return false
end end
function c48605591.setlimit(e,c,tp) function c48605591.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD) and not Duel.GetFieldCard(tp,LOCATION_SZONE,5) and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)>2 return c:IsType(TYPE_FIELD) and not Duel.GetFieldCard(tp,LOCATION_FZONE,0) and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)>2
end end
...@@ -25,7 +25,7 @@ function c48934760.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c48934760.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48934760,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48934760,0))
local tc=Duel.SelectMatchingCard(tp,c48934760.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c48934760.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -10,12 +10,9 @@ function c5291803.initial_effect(c) ...@@ -10,12 +10,9 @@ function c5291803.initial_effect(c)
e1:SetCondition(c5291803.spcon) e1:SetCondition(c5291803.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c5291803.cfilter(tc)
return tc and tc:IsFaceup()
end
function c5291803.spcon(e,c) function c5291803.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (c5291803.cfilter(Duel.GetFieldCard(tp,LOCATION_SZONE,5)) or c5291803.cfilter(Duel.GetFieldCard(1-tp,LOCATION_SZONE,5))) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end end
...@@ -65,9 +65,7 @@ function c55343236.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -65,9 +65,7 @@ function c55343236.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
end end
function c55343236.descon(e) function c55343236.descon(e)
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end end
function c55343236.antarget(e,c) function c55343236.antarget(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
......
...@@ -67,7 +67,7 @@ function c56773577.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function c56773577.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c56773577.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c56773577.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -35,20 +35,12 @@ function c56931015.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,20 +35,12 @@ function c56931015.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
end end
function c56931015.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c56931015.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local g=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) if chk==0 then return g:GetCount()>0 end
if chk==0 then return c1 or c2 end
local g=Group.CreateGroup()
if c1 then g:AddCard(c1) end
if c2 then g:AddCard(c2) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c56931015.desop(e,tp,eg,ep,ev,re,r,rp) function c56931015.desop(e,tp,eg,ep,ev,re,r,rp)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local g=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.CreateGroup()
if c1 then g:AddCard(c1) end
if c2 then g:AddCard(c2) end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
......
...@@ -73,9 +73,7 @@ function c598988.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -73,9 +73,7 @@ function c598988.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
end end
function c598988.descon(e) function c598988.descon(e)
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end end
function c598988.antarget(e,c) function c598988.antarget(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
......
...@@ -24,7 +24,7 @@ function c61818176.initial_effect(c) ...@@ -24,7 +24,7 @@ function c61818176.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c61818176.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61818176.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local tc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if chkc then return false end if chkc then return false end
if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0x8d) and tc:IsAbleToHand() and tc:IsCanBeEffectTarget(e) end if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0x8d) and tc:IsAbleToHand() and tc:IsCanBeEffectTarget(e) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
......
...@@ -35,7 +35,7 @@ function c66570171.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c66570171.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c66570171.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c66570171.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -66,7 +66,7 @@ function c69529337.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c69529337.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c69529337.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69529337.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local tc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if chkc then return false end if chkc then return false end
if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0xe2) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e) if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0xe2) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c69529337.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end and Duel.IsExistingMatchingCard(c69529337.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end
......
...@@ -44,11 +44,7 @@ function c69931927.initial_effect(c) ...@@ -44,11 +44,7 @@ function c69931927.initial_effect(c)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function c69931927.sdcon(e) function c69931927.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c69931927.damcost(e,tp,eg,ep,ev,re,r,rp,chk) function c69931927.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
...@@ -71,7 +71,7 @@ end ...@@ -71,7 +71,7 @@ end
function c72332074.actop(e,tp,eg,ep,ev,re,r,rp) function c72332074.actop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c72332074.actfilter,tp,LOCATION_DECK,0,nil,tp) local tc=Duel.GetFirstMatchingCard(c72332074.actfilter,tp,LOCATION_DECK,0,nil,tp)
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -10,8 +10,5 @@ function c73776643.initial_effect(c) ...@@ -10,8 +10,5 @@ function c73776643.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73776643.condtion(e) function c73776643.condtion(e)
local tc=Duel.GetFieldCard(0,LOCATION_SZONE,5) return Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if tc and tc:IsFaceup() then return true end
tc=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return tc and tc:IsFaceup()
end end
...@@ -46,7 +46,7 @@ function c74665651.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c74665651.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -34,11 +34,7 @@ function c79798060.initial_effect(c) ...@@ -34,11 +34,7 @@ function c79798060.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c79798060.sdcon(e) function c79798060.sdcon(e)
local c=e:GetHandler() return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end end
function c79798060.descon(e,tp,eg,ep,ev,re,r,rp) function c79798060.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -33,7 +33,7 @@ function c89208725.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function c89208725.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -65,9 +65,7 @@ function c9433350.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -65,9 +65,7 @@ function c9433350.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
end end
function c9433350.descon(e) function c9433350.descon(e)
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end end
function c9433350.antarget(e,c) function c9433350.antarget(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
......
...@@ -24,10 +24,7 @@ function c95923441.initial_effect(c) ...@@ -24,10 +24,7 @@ function c95923441.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c95923441.sumcon(e) function c95923441.sumcon(e)
local tc=Duel.GetFieldCard(0,LOCATION_SZONE,5) return Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
if tc and tc:IsFaceup() then return true end
tc=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return tc and tc:IsFaceup()
end end
function c95923441.filter(c,tp,code) function c95923441.filter(c,tp,code)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0xe2) and c:GetActivateEffect():IsActivatable(tp,true,true) and not c:IsCode(code) return c:IsType(TYPE_FIELD) and c:IsSetCard(0xe2) and c:GetActivateEffect():IsActivatable(tp,true,true) and not c:IsCode(code)
...@@ -36,7 +33,7 @@ function c95923441.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +33,7 @@ function c95923441.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c95923441.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95923441.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local tc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if chkc then return false end if chkc then return false end
if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0xe2) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e) if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0xe2) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c95923441.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end and Duel.IsExistingMatchingCard(c95923441.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end
......
...@@ -22,13 +22,13 @@ end ...@@ -22,13 +22,13 @@ end
function c97970833.activate(e,tp,eg,ep,ev,re,r,rp) function c97970833.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,nil,tp) local tc=Duel.GetFirstMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,nil,tp)
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5) fc=Duel.GetFieldCard(1-tp,LOCATION_FZONE,0)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
if fc and fc:IsFaceup() and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(tp,aux.Stringid(97970833,0)) then if fc and fc:IsFaceup() and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(tp,aux.Stringid(97970833,0)) then
......
...@@ -20,13 +20,9 @@ function c99092624.initial_effect(c) ...@@ -20,13 +20,9 @@ function c99092624.initial_effect(c)
e2:SetOperation(c99092624.tdop) e2:SetOperation(c99092624.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c99092624.cfilter(c)
return c:GetSequence()==5
end
function c99092624.target(e,tp,eg,ep,ev,re,r,rp,chk) function c99092624.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ct=Duel.GetMatchingGroupCount(c99092624.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local ct=Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_FIELD)
ct=ct+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_FIELD)
if ct==0 then return false end if ct==0 then return false end
for p=0,1 do for p=0,1 do
if Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,p) then return true end if Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,p) then return true end
...@@ -37,8 +33,7 @@ function c99092624.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,8 +33,7 @@ function c99092624.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,0,PLAYER_ALL,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,0,PLAYER_ALL,0)
end end
function c99092624.activate(e,tp,eg,ep,ev,re,r,rp) function c99092624.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c99092624.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local ct=Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_FIELD)
ct=ct+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_FIELD)
if ct==0 then return end if ct==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
repeat repeat
......
...@@ -1435,7 +1435,7 @@ function Auxiliary.FShaddollCondition(attr) ...@@ -1435,7 +1435,7 @@ function Auxiliary.FShaddollCondition(attr)
local c=e:GetHandler() local c=e:GetHandler()
local mg=g:Filter(Auxiliary.FShaddollFilter,nil,c,attr) local mg=g:Filter(Auxiliary.FShaddollFilter,nil,c,attr)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local exg=nil local exg=nil
if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
exg=Duel.GetMatchingGroup(Auxiliary.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,attr) exg=Duel.GetMatchingGroup(Auxiliary.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,attr)
...@@ -1451,7 +1451,7 @@ function Auxiliary.FShaddollOperation(attr) ...@@ -1451,7 +1451,7 @@ function Auxiliary.FShaddollOperation(attr)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler() local c=e:GetHandler()
local mg=eg:Filter(Auxiliary.FShaddollFilter,nil,c,attr) local mg=eg:Filter(Auxiliary.FShaddollFilter,nil,c,attr)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local exg=nil local exg=nil
if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
exg=Duel.GetMatchingGroup(Auxiliary.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,attr) exg=Duel.GetMatchingGroup(Auxiliary.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,attr)
......
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