Commit 6c91b505 authored by Aephiex's avatar Aephiex Committed by nanahira

Fix "except this card" (#1031)

parent 17b2fe52
......@@ -51,6 +51,8 @@ function c10485110.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c10485110.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,exc)
Duel.SendtoGrave(g,REASON_EFFECT)
end
......@@ -98,7 +98,9 @@ function c14799437.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c14799437.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
......
......@@ -42,6 +42,7 @@ function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,1)
e1:SetValue(c15939229.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -49,13 +50,14 @@ function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c15939229.disable)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e2,tp)
end
function c15939229.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and e:GetHandler()~=re:GetHandler()
return re:GetHandler():IsOnField() and re:GetHandler():GetFieldID()~=e:GetLabel()
end
function c15939229.disable(e,c)
return c~=e:GetHandler() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
return c:GetFieldID()~=e:GetLabel() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end
function c15939229.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -48,7 +48,9 @@ function c16172067.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c16172067.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
......
......@@ -163,7 +163,9 @@ function c16306932.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c16306932.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,exc)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
......
......@@ -29,6 +29,8 @@ function c19684740.chlimit(e,ep,tp)
return tp==ep
end
function c19684740.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
......@@ -61,6 +61,8 @@ function c20073910.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c20073910.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......@@ -87,7 +87,9 @@ function c21105106.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c21105106.filter(c,tp)
......
......@@ -74,7 +74,9 @@ function c23015896.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c23015896.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
function c23015896.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,7 +27,9 @@ function c2407234.negfilter(c)
end
function c2407234.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c2407234.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c2407234.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......
......@@ -80,6 +80,8 @@ function c29146185.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c29146185.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -71,7 +71,9 @@ function c36956512.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c36956512.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=tg:GetFirst()
while tc do
local atk=tc:GetAttack()
......
......@@ -26,6 +26,8 @@ function c37721209.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c37721209.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -42,7 +42,9 @@ function c39272762.negcon(e,tp,eg,ep,ev,re,r,rp)
end
function c39272762.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......
......@@ -43,6 +43,8 @@ function c39765958.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c39765958.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local sg=Duel.GetMatchingGroup(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(sg,REASON_EFFECT)
end
......@@ -77,7 +77,9 @@ function c41753322.postg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c41753322.posop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
function c41753322.dcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -103,7 +103,9 @@ function c42589641.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c42589641.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function c42589641.hdcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -63,6 +63,8 @@ function c4335427.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetChainLimit(aux.FALSE)
end
function c4335427.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......@@ -26,7 +26,7 @@ function c45960523.initial_effect(c)
c:RegisterEffect(e2)
end
function c45960523.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x105)
return re and re:IsActiveType(TYPE_MONSTER+TYPE_PENDULUM) and re:GetHandler():IsSetCard(0x105)
end
function c45960523.rmfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove() and c:IsFaceup()
......@@ -37,7 +37,9 @@ function c45960523.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c45960523.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45960523.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c45960523.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -52,6 +52,8 @@ function c46772449.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -76,7 +76,9 @@ function c4779091.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c4779091.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -43,9 +43,11 @@ function c52512994.rfilter(c)
return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRace(RACE_ZOMBIE) and bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0
end
function c52512994.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local c=e:GetHandler()
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local rt=Duel.GetOperatedGroup():FilterCount(c52512994.rfilter,nil)
if rt>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
......
......@@ -60,7 +60,9 @@ function c57774843.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c57774843.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(sg,REASON_EFFECT)
end
function c57774843.condition2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -91,15 +91,16 @@ function c58330108.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c58330108.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local gc=Duel.GetMatchingGroup(c58330108.filter,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)
if gc==1 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT)
else
local loc=LOCATION_ONFIELD
if gc>2 then loc=LOCATION_ONFIELD+LOCATION_GRAVE end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,loc,loc,c)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,loc,loc,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
......@@ -17,6 +17,8 @@ function c58760121.postg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c58760121.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c58760121.filter,tp,LOCATION_MZONE,0,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c58760121.filter,tp,LOCATION_MZONE,0,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE,0,POS_FACEDOWN_DEFENSE,0)
end
......@@ -43,6 +43,8 @@ function c60258960.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c60258960.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -39,6 +39,8 @@ function c64599569.sucop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e3)
end
function c64599569.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,exc)
Duel.SendtoGrave(g,REASON_EFFECT)
end
......@@ -52,9 +52,11 @@ function c64681432.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c64681432.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
local ct=Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
if ct>0 and c:IsFaceup() and exc~=nil then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -50,11 +50,14 @@ function c68299524.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(cost)
end
function c68299524.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local c=e:GetHandler()
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst()
local val=e:GetLabel()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-val)
......
......@@ -33,7 +33,9 @@ function c68396121.filter(c)
end
function c68396121.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c68396121.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c68396121.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......
......@@ -25,6 +25,8 @@ function c698785.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c698785.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -41,7 +41,9 @@ function c71525232.filter(c)
end
function c71525232.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local mg,atk=og:GetMaxGroup(c71525232.filter)
......
......@@ -74,7 +74,9 @@ function c74530899.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300)
end
function c74530899.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
......
......@@ -34,7 +34,9 @@ function c75433814.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
end
function c75433814.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x1024,1)
......
......@@ -39,7 +39,9 @@ function c77336644.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c77336644.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
function c77336644.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -20,6 +20,8 @@ function c77428945.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c77428945.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c77428945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c77428945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
......@@ -51,7 +51,9 @@ function c82308875.operation(e,tp,eg,ep,ev,re,r,rp)
elseif not b1 and b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,2),aux.Stringid(82308875,3))+1
else op=Duel.SelectOption(tp,aux.Stringid(82308875,1),aux.Stringid(82308875,2),aux.Stringid(82308875,3)) end
if op==0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.SendtoGrave(g,REASON_EFFECT)
elseif op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -46,7 +46,9 @@ function c82697249.ctfilter(c)
end
function c82697249.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,c)
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,exc)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local ct=Duel.GetOperatedGroup():FilterCount(c82697249.ctfilter,nil)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
......
......@@ -41,7 +41,9 @@ function c84417082.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c84417082.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
function c84417082.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -54,7 +54,9 @@ function c84488827.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c84488827.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
elseif e:GetLabel()==2 then
local g=Duel.GetMatchingGroup(c84488827.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
......@@ -33,6 +33,8 @@ function c86099788.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c86099788.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -49,7 +49,9 @@ function c88177324.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c88177324.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c88177324.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,c)
local exc=c
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c88177324.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......@@ -64,7 +66,7 @@ function c88177324.negop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
g=Duel.GetMatchingGroup(c88177324.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,c)
g=Duel.GetMatchingGroup(c88177324.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
tc=g:GetFirst()
while tc do
if tc:GetAttack()~=tc:GetBaseAttack() then
......
......@@ -31,8 +31,8 @@ function c89111398.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c89111398.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c89111398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c89111398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -37,10 +37,10 @@ function c92970404.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c92970404.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
function c92970404.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsFacedown() and c:IsControler(tp)
......
......@@ -59,6 +59,8 @@ function c94092230.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c94092230.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment