Commit fedc2459 authored by salix5's avatar salix5

remove redundant condition

In current OCG ruling, IsDestructable() in the target filter function is not
necessary.
parent 3db645f4
...@@ -15,14 +15,11 @@ end ...@@ -15,14 +15,11 @@ end
function c10532969.condition(e,tp,eg,ep,ev,re,r,rp) function c10532969.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return ep~=tp
end end
function c10532969.filter(c)
return c:IsDestructable()
end
function c10532969.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10532969.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c10532969.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c10532969.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c10532969.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c10532969.operation(e,tp,eg,ep,ev,re,r,rp) function c10532969.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -40,14 +40,11 @@ function c10755153.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,14 +40,11 @@ function c10755153.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c10755153.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c10755153.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c10755153.desfilter(c)
return c:IsDestructable()
end
function c10755153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10755153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10755153.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c10755153.desfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c10755153.desfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c10755153.desop(e,tp,eg,ep,ev,re,r,rp) function c10755153.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function c11958188.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function c11958188.descost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c11958188.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c11958188.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject():GetReasonCard() local tc=e:GetLabelObject():GetReasonCard()
if chk==0 then return tc:IsRelateToBattle() and tc:IsDestructable() end if chk==0 then return tc:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
function c11958188.desop(e,tp,eg,ep,ev,re,r,rp) function c11958188.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -87,7 +87,7 @@ function c131182.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -87,7 +87,7 @@ function c131182.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c131182.desop(e,tp,eg,ep,ev,re,r,rp) function c131182.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -16,8 +16,7 @@ end ...@@ -16,8 +16,7 @@ end
function c15083728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15083728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chkc then return chkc==tc end if chkc then return chkc==tc end
if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetDefense()<=500 and tc:IsOnField() if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetDefense()<=500 and tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
......
...@@ -19,14 +19,11 @@ function c15561463.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,14 +19,11 @@ function c15561463.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c15561463.filter(c)
return c:IsDestructable()
end
function c15561463.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15561463.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c15561463.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c15561463.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15561463.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c15561463.desop(e,tp,eg,ep,ev,re,r,rp) function c15561463.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function c16678947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,7 +22,7 @@ function c16678947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local tc=eg:GetFirst() local tc=eg:GetFirst()
local bc=Duel.GetAttacker() local bc=Duel.GetAttacker()
if chk==0 then return bc:IsCanBeEffectTarget(e) and bc:IsDestructable() end if chk==0 then return bc:IsCanBeEffectTarget(e) end
local lv=tc:GetLevel() local lv=tc:GetLevel()
e:SetLabel(lv) e:SetLabel(lv)
Duel.SetTargetCard(bc) Duel.SetTargetCard(bc)
......
...@@ -14,9 +14,6 @@ end ...@@ -14,9 +14,6 @@ end
function c1781310.cfilter(c,att) function c1781310.cfilter(c,att)
return c:IsFaceup() and c:IsAttribute(att) return c:IsFaceup() and c:IsAttribute(att)
end end
function c1781310.dfilter1(c)
return c:IsDestructable()
end
function c1781310.dfilter2(c) function c1781310.dfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
...@@ -27,7 +24,7 @@ function c1781310.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +24,7 @@ function c1781310.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH) and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH)
end end
function c1781310.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1781310.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1781310.dfilter1,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
or Duel.IsExistingMatchingCard(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,1,nil) or Duel.IsExistingMatchingCard(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,1,nil)
or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2
or Duel.IsPlayerCanDraw(tp,2) end or Duel.IsPlayerCanDraw(tp,2) end
...@@ -36,7 +33,7 @@ function c1781310.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +33,7 @@ function c1781310.activate(e,tp,eg,ep,ev,re,r,rp)
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if Duel.IsExistingMatchingCard(c1781310.dfilter1,tp,0,LOCATION_MZONE,1,nil) then if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) then
ops[off]=aux.Stringid(1781310,0) ops[off]=aux.Stringid(1781310,0)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
...@@ -59,7 +56,7 @@ function c1781310.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +56,7 @@ function c1781310.activate(e,tp,eg,ep,ev,re,r,rp)
if off==1 then return end if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops)) local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then if opval[op]==1 then
local g=Duel.GetMatchingGroup(c1781310.dfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
elseif opval[op]==2 then elseif opval[op]==2 then
local g=Duel.GetMatchingGroup(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,nil)
......
...@@ -26,7 +26,7 @@ function c18716735.initial_effect(c) ...@@ -26,7 +26,7 @@ function c18716735.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c18716735.desfilter(c,tp) function c18716735.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c18716735.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c18716735.filter,tp,LOCATION_DECK,0,1,nil,true)
......
...@@ -10,14 +10,11 @@ function c18739764.initial_effect(c) ...@@ -10,14 +10,11 @@ function c18739764.initial_effect(c)
e1:SetOperation(c18739764.activate) e1:SetOperation(c18739764.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18739764.filter(c)
return c:IsDestructable()
end
function c18739764.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18739764.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c18739764.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c18739764.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c18739764.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if g:GetFirst():IsFaceup() then if g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack()) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
......
...@@ -15,7 +15,7 @@ function c22047978.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c22047978.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c22047978.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22047978.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chk==0 then return tg:IsOnField() and tg:IsDestructable() end if chk==0 then return tg:IsOnField() end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
......
...@@ -76,15 +76,12 @@ function c22110647.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,15 +76,12 @@ function c22110647.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
end end
function c22110647.filter(c)
return c:IsDestructable()
end
function c22110647.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22110647.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22110647.filter(chkc) end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>1 if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>1
and Duel.IsExistingTarget(c22110647.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22110647.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c22110647.desop(e,tp,eg,ep,ev,re,r,rp) function c22110647.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,8 +19,8 @@ function c22479888.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -19,8 +19,8 @@ function c22479888.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if chkc then return false end if chkc then return false end
if chk==0 then return a:IsOnField() and a:IsDestructable() and a:IsCanBeEffectTarget(e) if chk==0 then return a:IsOnField() and a:IsCanBeEffectTarget(e)
and at:IsOnField() and at:IsDestructable() and at:IsCanBeEffectTarget(e) end and at:IsOnField() and at:IsCanBeEffectTarget(e) end
if at:IsFacedown() then if at:IsFacedown() then
Duel.ConfirmCards(1-tp,at) Duel.ConfirmCards(1-tp,at)
end end
......
...@@ -67,16 +67,13 @@ end ...@@ -67,16 +67,13 @@ end
function c23015896.descon(e,tp,eg,ep,ev,re,r,rp) function c23015896.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end end
function c23015896.desfilter(c)
return c:IsDestructable()
end
function c23015896.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c23015896.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c23015896.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c23015896.desop(e,tp,eg,ep,ev,re,r,rp) function c23015896.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c23015896.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c23015896.spcon2(e,tp,eg,ep,ev,re,r,rp) function c23015896.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function c23323812.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23323812.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if chkc then return chkc==at end if chkc then return chkc==at end
if chk==0 then return at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsCanBeEffectTarget(e) and at:IsDestructable() end if chk==0 then return at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(at) Duel.SetTargetCard(at)
local atk=at:GetAttack() local atk=at:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0)
......
...@@ -22,8 +22,7 @@ function c2359348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,8 +22,7 @@ function c2359348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
if chk==0 then return tc1 and tc2 if chk==0 then return tc1 and tc2
and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) end
and tc1:IsDestructable() and tc2:IsDestructable() end
local g=Group.FromCards(tc1,tc2) local g=Group.FromCards(tc1,tc2)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -60,10 +60,10 @@ end ...@@ -60,10 +60,10 @@ 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 c1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
if chk==0 then return (c1 and c1:IsDestructable()) or (c2 and c2:IsDestructable()) end if chk==0 then return c1 or c2 end
local g=Group.CreateGroup() local g=Group.CreateGroup()
if c1 and c1:IsDestructable() then g:AddCard(c1) end if c1 then g:AddCard(c1) end
if c2 and c2:IsDestructable() then g:AddCard(c2) 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
...@@ -74,8 +74,8 @@ function c25862681.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,8 +74,8 @@ function c25862681.desop(e,tp,eg,ep,ev,re,r,rp)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.CreateGroup() local g=Group.CreateGroup()
if c1 and c1:IsDestructable() then g:AddCard(c1) end if c1 then g:AddCard(c1) end
if c2 and c2:IsDestructable() then g:AddCard(c2) 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
......
...@@ -43,14 +43,11 @@ function c26533075.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,14 +43,11 @@ function c26533075.descon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end end
function c26533075.desfilter(c)
return c:IsDestructable()
end
function c26533075.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26533075.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26533075.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c26533075.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c26533075.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c26533075.desop(e,tp,eg,ep,ev,re,r,rp) function c26533075.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,7 +29,7 @@ function c27782503.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c27782503.descon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c27782503.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c27782503.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c27782503.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c27782503.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget():IsDestructable() end if chk==0 then return Duel.GetAttackTarget():IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0)
end end
function c27782503.desop(e,tp,eg,ep,ev,re,r,rp) function c27782503.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function c2810642.target(e,tp,eg,ep,ev,re,r,rp,chk) function c2810642.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.GetAttacker():IsDestructable() and Duel.GetAttacker():IsRelateToBattle()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c2810642.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c2810642.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetTargetCard(Duel.GetAttacker())
......
...@@ -49,7 +49,7 @@ function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject():GetLabelObject() local bc=e:GetLabelObject():GetLabelObject()
if chk==0 then return bc end if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabelObject():GetLabel()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabelObject():GetLabel())
if bc:IsDestructable() then if bc:IsRelateToBattle() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end end
end end
......
...@@ -25,25 +25,22 @@ function c32542011.spfilter(c,tid,e,tp) ...@@ -25,25 +25,22 @@ function c32542011.spfilter(c,tid,e,tp)
return c:GetTurnID()==tid and c:IsReason(REASON_COST) and re and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) return c:GetTurnID()==tid and c:IsReason(REASON_COST) and re and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c32542011.desfilter(c)
return c:IsDestructable()
end
function c32542011.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32542011.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b1=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE) local b1=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) local b2=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
and ft>0 and Duel.IsExistingMatchingCard(c32542011.spfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp) and ft>0 and Duel.IsExistingMatchingCard(c32542011.spfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
if b1 then if b1 then
local g=Duel.GetMatchingGroup(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
if b2 then if b2 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c32542011.spfilter,tp,LOCATION_GRAVE,0,nil,Duel.GetTurnCount(),e,tp) local g=Duel.GetMatchingGroup(c32542011.spfilter,tp,LOCATION_GRAVE,0,nil,Duel.GetTurnCount(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,ft,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,ft,0,0)
local dg=Duel.GetMatchingGroup(c32542011.desfilter,tp,LOCATION_MZONE,0,nil) local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end end
end end
...@@ -61,7 +58,7 @@ function c32542011.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +58,7 @@ function c32542011.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c32542011.desfilter,tp,LOCATION_MZONE,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
end end
...@@ -69,7 +66,7 @@ function c32542011.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +66,7 @@ function c32542011.activate(e,tp,eg,ep,ev,re,r,rp)
if opt==2 or opt==3 then if opt==2 or opt==3 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
...@@ -22,7 +22,7 @@ function c32548609.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c32548609.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefensePos() return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefensePos()
end end
function c32548609.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c32548609.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget():IsDestructable() end if chk==0 then return Duel.GetAttackTarget():IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0)
end end
function c32548609.desop(e,tp,eg,ep,ev,re,r,rp) function c32548609.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,7 @@ function c33256280.initial_effect(c) ...@@ -14,7 +14,7 @@ function c33256280.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c33256280.desfilter(c,tp) function c33256280.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,true)
......
...@@ -38,14 +38,11 @@ function c35842855.spcon(e,c) ...@@ -38,14 +38,11 @@ function c35842855.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)==5 Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)==5
end end
function c35842855.filter(c)
return c:IsDestructable()
end
function c35842855.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35842855.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c35842855.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c35842855.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c35842855.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end end
......
...@@ -34,15 +34,12 @@ end ...@@ -34,15 +34,12 @@ end
function c36354007.descon(e,tp,eg,ep,ev,re,r,rp) function c36354007.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+1
end end
function c36354007.filter(c)
return c:IsDestructable()
end
function c36354007.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c36354007.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c36354007.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil)
end end
function c36354007.desop(e,tp,eg,ep,ev,re,r,rp) function c36354007.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c36354007.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -27,14 +27,11 @@ function c3814632.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,14 +27,11 @@ function c3814632.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
end end
function c3814632.filter(c)
return c:IsDestructable()
end
function c3814632.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3814632.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c3814632.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c3814632.filter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c3814632.filter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end end
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c4041838.targ(e,tp,eg,ep,ev,re,r,rp,chk) function c4041838.targ(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler() if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsFaceup() and d:IsDefensePos() and d:IsDestructable() end and d~=nil and d:IsFaceup() and d:IsDefensePos() and d:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end end
function c4041838.op(e,tp,eg,ep,ev,re,r,rp) function c4041838.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,8 +17,7 @@ function c4206964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -17,8 +17,7 @@ function c4206964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if not eg then return false end if not eg then return false end
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chkc then return chkc==tc end if chkc then return chkc==tc end
if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()>=1000 and tc:IsOnField() if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()>=1000 and tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
......
...@@ -16,8 +16,7 @@ end ...@@ -16,8 +16,7 @@ end
function c42578427.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c42578427.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chkc then return chkc==tc end if chkc then return chkc==tc end
if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()<=500 and tc:IsOnField() if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()<=500 and tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
......
...@@ -50,14 +50,11 @@ function c43318266.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,14 +50,11 @@ function c43318266.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,2,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1019,2,REASON_COST) e:GetHandler():RemoveCounter(tp,0x1019,2,REASON_COST)
end end
function c43318266.filter(c)
return c:IsDestructable()
end
function c43318266.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43318266.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c43318266.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c43318266.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c43318266.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c43318266.desop(e,tp,eg,ep,ev,re,r,rp) function c43318266.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
function c4923662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4923662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end end
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -21,7 +21,7 @@ function c51254980.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,7 +21,7 @@ function c51254980.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c51254980.target(e,tp,eg,ep,ev,re,r,rp,chk) function c51254980.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ep~=tp and eg:GetFirst():IsDestructable() end if chk==0 then return ep~=tp and eg:GetFirst():IsLocation(LOCATION_MZONE) end
eg:GetFirst():CreateEffectRelation(e) eg:GetFirst():CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
......
...@@ -94,14 +94,11 @@ function c53804307.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -94,14 +94,11 @@ function c53804307.descost(e,tp,eg,ep,ev,re,r,rp,chk)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c53804307.desfilter(c)
return c:IsDestructable()
end
function c53804307.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c53804307.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c53804307.desfilter(chkc) end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(c53804307.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c53804307.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c53804307.desop(e,tp,eg,ep,ev,re,r,rp) function c53804307.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
function c56120475.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56120475.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end end
......
...@@ -17,7 +17,7 @@ function c5616412.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c5616412.condition(e,tp,eg,ep,ev,re,r,rp)
and d:IsDefensePos() and d:IsRelateToBattle() and d:GetDefense()>a:GetAttack() and d:IsDefensePos() and d:IsRelateToBattle() and d:GetDefense()>a:GetAttack()
end end
function c5616412.target(e,tp,eg,ep,ev,re,r,rp,chk) function c5616412.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():IsDestructable() end if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end end
......
...@@ -26,7 +26,7 @@ function c56339050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,7 +26,7 @@ function c56339050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp then if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp then
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if Duel.IsExistingMatchingCard(c56339050.cfilter,tp,LOCATION_MZONE,0,1,nil,tc:GetAttack()) if Duel.IsExistingMatchingCard(c56339050.cfilter,tp,LOCATION_MZONE,0,1,nil,tc:GetAttack())
and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() then and tc:IsOnField() and tc:IsCanBeEffectTarget(e) then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
...@@ -60,8 +60,7 @@ end ...@@ -60,8 +60,7 @@ end
function c56339050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56339050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if chkc then return chkc==tc end if chkc then return chkc==tc end
if chk==0 then return e:GetHandler():GetFlagEffect(56339050)==0 if chk==0 then return e:GetHandler():GetFlagEffect(56339050)==0 and tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
local dam=tc:GetAttack()/2 local dam=tc:GetAttack()/2
Duel.SetTargetParam(dam) Duel.SetTargetParam(dam)
......
...@@ -14,9 +14,6 @@ end ...@@ -14,9 +14,6 @@ end
function c56921677.condition(e,tp,eg,ep,ev,re,r,rp) function c56921677.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattleTarget()~=nil return e:GetHandler():GetBattleTarget()~=nil
end end
function c56921677.filter(c)
return c:IsDestructable()
end
function c56921677.target(e,tp,eg,ep,ev,re,r,rp,chk) function c56921677.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 tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
......
...@@ -37,18 +37,18 @@ end ...@@ -37,18 +37,18 @@ 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 c1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
if chk==0 then return (c1 and c1:IsDestructable()) or (c2 and c2:IsDestructable()) end if chk==0 then return c1 or c2 end
local g=Group.CreateGroup() local g=Group.CreateGroup()
if c1 and c1:IsDestructable() then g:AddCard(c1) end if c1 then g:AddCard(c1) end
if c2 and c2:IsDestructable() then g:AddCard(c2) 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 c1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.CreateGroup() local g=Group.CreateGroup()
if c1 and c1:IsDestructable() then g:AddCard(c1) end if c1 then g:AddCard(c1) end
if c2 and c2:IsDestructable() then g:AddCard(c2) 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
......
...@@ -15,10 +15,10 @@ function c57281778.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,10 +15,10 @@ function c57281778.descon(e,tp,eg,ep,ev,re,r,rp)
local t=Duel.GetAttackTarget() local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end if ev==1 then t=Duel.GetAttacker() end
e:SetLabelObject(t) e:SetLabelObject(t)
return t and t:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and t:IsRelateToBattle() return t and t:IsRace(RACE_SPELLCASTER+RACE_WARRIOR)
end end
function c57281778.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c57281778.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():IsDestructable() end if chk==0 then return e:GetLabelObject():IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
end end
function c57281778.desop(e,tp,eg,ep,ev,re,r,rp) function c57281778.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -46,7 +46,6 @@ function c58990631.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,6 @@ function c58990631.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c58990631.filter2(c,tp) function c58990631.filter2(c,tp)
return c:IsFaceup() and c:IsAttackAbove(1000) and c:GetSummonPlayer()~=tp return c:IsFaceup() and c:IsAttackAbove(1000) and c:GetSummonPlayer()~=tp
and c:IsDestructable()
end end
function c58990631.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c58990631.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c58990631.filter2,1,nil,tp) end if chk==0 then return eg:IsExists(c58990631.filter2,1,nil,tp) end
......
...@@ -37,8 +37,7 @@ function c59762399.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,8 +37,7 @@ function c59762399.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local seq=c:GetSequence() local seq=c:GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsDestructable() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
......
...@@ -14,7 +14,7 @@ function c60473572.initial_effect(c) ...@@ -14,7 +14,7 @@ function c60473572.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60473572.desfilter(c,tp) function c60473572.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,true)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c61132951.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c61132951.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() if chk==0 then return Duel.GetAttacker()==e:GetHandler()
and d and d:IsDefensePos() and d:IsDestructable() end and d and d:IsDefensePos() and d:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end end
function c61132951.desop(e,tp,eg,ep,ev,re,r,rp) function c61132951.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c61679541.targ(e,tp,eg,ep,ev,re,r,rp,chk) function c61679541.targ(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler() if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsDefensePos() and d:IsDestructable() end and d~=nil and d:IsDefensePos() and d:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end end
function c61679541.op(e,tp,eg,ep,ev,re,r,rp) function c61679541.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -40,16 +40,13 @@ end ...@@ -40,16 +40,13 @@ end
function c62188962.tgfilter(c) function c62188962.tgfilter(c)
return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave()
end end
function c62188962.filter(c)
return c:IsDestructable()
end
function c62188962.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62188962.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c62188962.filter(chkc) end if chkc then return chkc:IsOnField() end
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) end if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c62188962.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c62188962.desop(e,tp,eg,ep,ev,re,r,rp) function c62188962.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -42,19 +42,16 @@ function c6353603.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,19 +42,16 @@ function c6353603.setop(e,tp,eg,ep,ev,re,r,rp)
end end
function c6353603.filter1(c) function c6353603.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(c6353603.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c6353603.filter2(c)
return c:IsDestructable()
end end
function c6353603.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6353603.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c6353603.filter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g1,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c6353603.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end end
function c6353603.desop(e,tp,eg,ep,ev,re,r,rp) function c6353603.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,14 +55,11 @@ function c66970002.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,14 +55,11 @@ function c66970002.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c66970002.filter(c)
return c:IsDestructable()
end
function c66970002.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66970002.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c66970002.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c66970002.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c66970002.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack())
end end
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c67273917.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c67273917.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -14,7 +14,7 @@ function c69351984.initial_effect(c) ...@@ -14,7 +14,7 @@ function c69351984.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c69351984.desfilter(c,tp) function c69351984.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,true)
......
...@@ -30,7 +30,7 @@ function c69529567.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function c69529567.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c69529567.desfilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) return Duel.IsExistingMatchingCard(c69529567.desfilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack())
end end
function c69529567.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c69529567.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable() end if chk==0 then return e:GetHandler():IsLocation(LOCATION_ONFIELD) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
function c69529567.desop(e,tp,eg,ep,ev,re,r,rp) function c69529567.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c70948327.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c70948327.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler() if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsFaceup() and d:IsLevelBelow(3) and d:IsDestructable() end and d~=nil and d:IsFaceup() and d:IsLevelBelow(3) and d:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end end
function c70948327.desop(e,tp,eg,ep,ev,re,r,rp) function c70948327.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,7 +12,7 @@ function c71218746.initial_effect(c) ...@@ -12,7 +12,7 @@ function c71218746.initial_effect(c)
end end
function c71218746.targ(e,tp,eg,ep,ev,re,r,rp,chk) function c71218746.targ(e,tp,eg,ep,ev,re,r,rp,chk)
local t=Duel.GetAttackTarget() local t=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and not t:IsAttackPos() and t:IsDestructable() end if chk ==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and not t:IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0)
end end
function c71218746.op(e,tp,eg,ep,ev,re,r,rp) function c71218746.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function c73977033.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,7 @@ function c73977033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c73977033.target(e,tp,eg,ep,ev,re,r,rp,chk) function c73977033.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chk==0 then return tg:IsOnField() and tg:IsDestructable() end if chk==0 then return tg:IsOnField() end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end end
......
...@@ -10,13 +10,13 @@ function c74439492.initial_effect(c) ...@@ -10,13 +10,13 @@ function c74439492.initial_effect(c)
e1:SetOperation(c74439492.activate) e1:SetOperation(c74439492.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c74439492.filter(c,des) function c74439492.filter(c)
return c:IsFaceup() and c:IsSetCard(0x24) and (des or c:IsDestructable()) return c:IsFaceup() and c:IsSetCard(0x24)
end end
function c74439492.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74439492.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c74439492.filter(chkc,false) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c74439492.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74439492.filter,tp,LOCATION_MZONE,0,1,nil,false) if chk==0 then return Duel.IsExistingTarget(c74439492.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c74439492.filter,tp,LOCATION_MZONE,0,2,nil,true) end and Duel.IsExistingMatchingCard(c74439492.filter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c74439492.filter,tp,LOCATION_MZONE,0,1,1,nil,false) local g=Duel.SelectTarget(tp,c74439492.filter,tp,LOCATION_MZONE,0,1,1,nil,false)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
...@@ -58,16 +58,13 @@ end ...@@ -58,16 +58,13 @@ end
function c75180828.descount(c) function c75180828.descount(c)
return c:IsSetCard(0x74) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x74) and c:IsType(TYPE_MONSTER)
end end
function c75180828.desfilter(c)
return c:IsDestructable()
end
function c75180828.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75180828.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c75180828.desfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return true end if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c75180828.descount,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(c75180828.descount,tp,LOCATION_GRAVE,0,nil)
if ct>0 then if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c75180828.desfilter,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
end end
......
...@@ -73,8 +73,7 @@ function c75361204.spfilter2(c,e,tp,code) ...@@ -73,8 +73,7 @@ function c75361204.spfilter2(c,e,tp,code)
return c:IsSetCard(0xd1) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xd1) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c75361204.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c75361204.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsDestructable() if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75361204.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c75361204.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
......
...@@ -16,7 +16,7 @@ function c75902998.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c75902998.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c75902998.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75902998.target(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if chk==0 then return at:IsRelateToBattle() and at:IsDestructable() end if chk==0 then return at:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0)
end end
function c75902998.activate(e,tp,eg,ep,ev,re,r,rp) function c75902998.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
end end
function c75987257.operation(e,tp,eg,ep,ev,re,r,rp) function c75987257.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,8 +20,7 @@ function c77864539.filter(c) ...@@ -20,8 +20,7 @@ function c77864539.filter(c)
end end
function c77864539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77864539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c77864539.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c77864539.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c77864539.filter,tp,LOCATION_GRAVE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c77864539.filter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.GetAttackTarget():IsDestructable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c77864539.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c77864539.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
......
...@@ -14,7 +14,7 @@ function c7868571.initial_effect(c) ...@@ -14,7 +14,7 @@ function c7868571.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c7868571.desfilter(c,tp) function c7868571.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,true)
......
...@@ -13,17 +13,14 @@ end ...@@ -13,17 +13,14 @@ end
function c83544697.filter1(c) function c83544697.filter1(c)
return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function c83544697.filter2(c)
return c:IsDestructable()
end
function c83544697.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83544697.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c83544697.filter1,tp,LOCATION_GRAVE,0,2,nil) if chk==0 then return Duel.IsExistingTarget(c83544697.filter1,tp,LOCATION_GRAVE,0,2,nil)
and Duel.IsExistingTarget(c83544697.filter2,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c83544697.filter1,tp,LOCATION_GRAVE,0,2,2,nil) local g1=Duel.SelectTarget(tp,c83544697.filter1,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c83544697.filter2,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler()) local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end end
......
...@@ -17,14 +17,11 @@ function c84361420.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,14 +17,11 @@ function c84361420.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,59793705) local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,59793705)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c84361420.filter(c)
return c:IsDestructable()
end
function c84361420.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c84361420.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c84361420.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c84361420.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c84361420.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end end
......
...@@ -24,12 +24,12 @@ function c84442536.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,12 +24,12 @@ function c84442536.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c84442536.target(e,tp,eg,ep,ev,re,r,rp,chk) function c84442536.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if chk==0 then return tc and (Duel.IsChainNegatable(ev) or tc:IsDestructable()) end if chk==0 then return tc and (Duel.IsChainNegatable(ev) or tc:IsLocation(LOCATION_MZONE)) end
local sel=0 local sel=0
if Duel.IsChainNegatable(ev) and tc:IsDestructable() then if Duel.IsChainNegatable(ev) and tc:IsLocation(LOCATION_MZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
sel=Duel.SelectOption(tp,aux.Stringid(84442536,0),aux.Stringid(84442536,1)) sel=Duel.SelectOption(tp,aux.Stringid(84442536,0),aux.Stringid(84442536,1))
elseif tc:IsDestructable() then elseif tc:IsLocation(LOCATION_MZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
sel=Duel.SelectOption(tp,aux.Stringid(84442536,0)) sel=Duel.SelectOption(tp,aux.Stringid(84442536,0))
else else
......
...@@ -35,7 +35,7 @@ function c84988419.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c84988419.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c84988419.target(e,tp,eg,ep,ev,re,r,rp,chk) function c84988419.target(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc:IsDestructable() end if chk==0 then return bc:IsRelateToBattle() end
local atk=math.abs(e:GetHandler():GetBaseAttack()-bc:GetBaseAttack()) local atk=math.abs(e:GetHandler():GetBaseAttack()-bc:GetBaseAttack())
Duel.SetTargetCard(bc) Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
......
...@@ -19,14 +19,11 @@ function c85034450.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,14 +19,11 @@ function c85034450.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85034450.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c85034450.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c85034450.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c85034450.cfilter,1,1,REASON_COST+REASON_DISCARD)
end end
function c85034450.filter(c)
return c:IsDestructable()
end
function c85034450.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c85034450.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c85034450.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c85034450.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c85034450.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c85034450.desop(e,tp,eg,ep,ev,re,r,rp) function c85034450.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,14 +55,11 @@ function c85121942.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,14 +55,11 @@ function c85121942.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c85121942.filter(c)
return c:IsDestructable()
end
function c85121942.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c85121942.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c85121942.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c85121942.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c85121942.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack())
end end
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c85682655.target(e,tp,eg,ep,ev,re,r,rp,chk) function c85682655.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc==e:GetHandler() then tc=Duel.GetAttackTarget() end if tc==e:GetHandler() then tc=Duel.GetAttackTarget() end
if chk==0 then return tc and not tc:IsStatus(STATUS_BATTLE_DESTROYED) and tc:IsDestructable() end if chk==0 then return tc and not tc:IsStatus(STATUS_BATTLE_DESTROYED) and tc:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
function c85682655.operation(e,tp,eg,ep,ev,re,r,rp) function c85682655.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -25,15 +25,12 @@ end ...@@ -25,15 +25,12 @@ end
function c85893201.descon(e,tp,eg,ep,ev,re,r,rp) function c85893201.descon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c85893201.cfilter,1,nil,1-tp) return rp~=tp and eg:IsExists(c85893201.cfilter,1,nil,1-tp)
end end
function c85893201.filter(c)
return c:IsDestructable()
end
function c85893201.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c85893201.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c85893201.filter(chkc) end if chkc then return chkc:IsOnField() end
if chk==0 then return e:GetHandler():IsRelateToEffect(e) if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingTarget(c85893201.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c85893201.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c85893201.desop(e,tp,eg,ep,ev,re,r,rp) function c85893201.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -16,7 +16,7 @@ function c8698851.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c8698851.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c8698851.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8698851.target(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if chk==0 then return a:IsOnField() and a:IsDestructable() end if chk==0 then return a:IsOnField() end
Duel.SetTargetCard(a) Duel.SetTargetCard(a)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,a,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,a,1,0,0)
end end
......
...@@ -17,16 +17,13 @@ function c89040386.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,16 +17,13 @@ function c89040386.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil
and Duel.IsExistingMatchingCard(c89040386.cfilter,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(c89040386.cfilter,tp,LOCATION_GRAVE,0,5,nil)
end end
function c89040386.filter(c)
return c:IsDestructable()
end
function c89040386.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89040386.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89040386.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c89040386.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c89040386.activate(e,tp,eg,ep,ev,re,r,rp) function c89040386.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c89040386.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
......
...@@ -48,7 +48,7 @@ function c89113320.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c89113320.lvop(e,tp,eg,ep,ev,re,r,rp)
end end
function c89113320.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89113320.target(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc:IsRelateToBattle() and bc:IsDestructable() end if chk==0 then return bc:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end end
function c89113320.operation(e,tp,eg,ep,ev,re,r,rp) function c89113320.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -86,14 +86,11 @@ function c91998119.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -86,14 +86,11 @@ function c91998119.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c91998119.filter(c)
return c:IsDestructable()
end
function c91998119.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c91998119.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c91998119.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c91998119.filter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c91998119.filter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c91998119.desop(e,tp,eg,ep,ev,re,r,rp) function c91998119.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -77,7 +77,7 @@ end ...@@ -77,7 +77,7 @@ end
function c92408984.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c92408984.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if eg:GetFirst():IsDestructable() then if eg:GetFirst():IsLocation(LOCATION_ONFIELD) then
eg:GetFirst():CreateEffectRelation(e) eg:GetFirst():CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
......
...@@ -36,8 +36,7 @@ end ...@@ -36,8 +36,7 @@ end
function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq)
if chk==0 then return sc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
and Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
Duel.SetTargetCard(sc) Duel.SetTargetCard(sc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
...@@ -39,7 +39,7 @@ function c92773018.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,7 +39,7 @@ function c92773018.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer()
and Duel.IsExistingMatchingCard(c92773018.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c92773018.cfilter,tp,LOCATION_MZONE,0,1,nil)
and tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) and tg:IsOnField() and tg:IsCanBeEffectTarget(e)
and Duel.SelectYesNo(tp,aux.Stringid(92773018,1)) then and Duel.SelectYesNo(tp,aux.Stringid(92773018,1)) then
e:SetCategory(CATEGORY_DESTROY) e:SetCategory(CATEGORY_DESTROY)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -57,7 +57,7 @@ function c92773018.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,7 +57,7 @@ function c92773018.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tg end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end and tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end end
......
...@@ -28,7 +28,7 @@ function c92870717.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c92870717.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c92870717.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c92870717.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable() end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
function c92870717.desop(e,tp,eg,ep,ev,re,r,rp) function c92870717.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c93124273.target(e,tp,eg,ep,ev,re,r,rp,chk) function c93124273.target(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler() if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d and d:IsFaceup() and not d:IsType(TYPE_PENDULUM) and d:IsDestructable() end and d and d:IsFaceup() and not d:IsType(TYPE_PENDULUM) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end end
function c93124273.operation(e,tp,eg,ep,ev,re,r,rp) function c93124273.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,18 +14,15 @@ end ...@@ -14,18 +14,15 @@ end
function c93217231.filter1(c) function c93217231.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE) return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end end
function c93217231.filter2(c)
return c:IsDestructable()
end
function c93217231.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93217231.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c93217231.filter1,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c93217231.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c93217231.filter2,tp,0,LOCATION_ONFIELD,2,nil) end and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c93217231.filter1,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c93217231.filter1,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c93217231.filter2,tp,0,LOCATION_ONFIELD,2,2,nil) local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,2,2,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end end
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c93662626.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c93662626.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -19,8 +19,8 @@ function c93895605.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -19,8 +19,8 @@ function c93895605.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk==0 then return a:IsOnField() and a:IsDestructable() and a:IsCanBeEffectTarget(e) if chk==0 then return a:IsOnField() and a:IsCanBeEffectTarget(e)
and d:IsOnField() and d:IsDestructable() and d:IsCanBeEffectTarget(e) end and d:IsOnField() and d:IsCanBeEffectTarget(e) end
local g=Group.FromCards(a,d) local g=Group.FromCards(a,d)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
......
...@@ -21,14 +21,11 @@ function c9391354.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,14 +21,11 @@ function c9391354.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c9391354.cfilter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9391354.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c9391354.filter(c)
return c:IsDestructable()
end
function c9391354.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9391354.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c9391354.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c9391354.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c9391354.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c9391354.desop(e,tp,eg,ep,ev,re,r,rp) function c9391354.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ function c94081496.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,7 +21,7 @@ function c94081496.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chkc then return chkc==tc end if chkc then return chkc==tc end
if chk==0 then return eg:GetCount()==1 and tc:IsFaceup() and tc:IsType(TYPE_SYNCHRO) and tc:IsOnField() if chk==0 then return eg:GetCount()==1 and tc:IsFaceup() and tc:IsType(TYPE_SYNCHRO) and tc:IsOnField()
and tc:IsControler(1-tp) and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end and tc:IsControler(1-tp) and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
......
...@@ -24,12 +24,11 @@ function c95519486.cfilter(c) ...@@ -24,12 +24,11 @@ function c95519486.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=95519486 return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=95519486
end end
function c95519486.descon(e,tp,eg,ep,ev,re,r,rp) function c95519486.descon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget() return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()
return e:GetHandler()==Duel.GetAttacker() and d and d:IsRelateToBattle()
and Duel.IsExistingMatchingCard(c95519486.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c95519486.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c95519486.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c95519486.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget():IsDestructable() end if chk==0 then return Duel.GetAttackTarget():IsRelateToBattle()() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0)
end end
function c95519486.desop(e,tp,eg,ep,ev,re,r,rp) function c95519486.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c96622984.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c96622984.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if chk==0 then return tc and tc:IsFaceup() and tc:IsLevelBelow(c:GetLevel()) and tc:IsDestructable() end if chk==0 then return tc and tc:IsFaceup() and tc:IsLevelBelow(c:GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
function c96622984.desop(e,tp,eg,ep,ev,re,r,rp) function c96622984.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return pc:IsDestructable() if chk==0 then return Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c97896503.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c97896503.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler() if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsPosition(POS_FACEUP_DEFENSE) and d:IsDestructable() end and d~=nil and d:IsPosition(POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end end
function c97896503.op(e,tp,eg,ep,ev,re,r,rp) function c97896503.op(e,tp,eg,ep,ev,re,r,rp)
......
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