Commit b90cefa8 authored by salix5's avatar salix5 Committed by GitHub

fix negate effect filter (#1661)

aux.NegateMonsterFilter()
filter for "negate the effects of a face-up monster" (無限泡影/Infinite Impermanence)
If the card text says "target 1 face-up monster", the script will use this filter.

aux.NegateEffectMonsterFilter()
filter for "negate the effects of an Effect Monster" (エフェクト・ヴェーラー/Effect Veiler)
If the card text says "target 1 Effect Monster", the script will use this filter.

aux.NegateAnyFilter()
filter for "negate the effects of a face-up card"
It can target a trap monster which is also a Normal Monster.

* fix オルターガイスト・クンティエリ

* fix aux.NegateAnyTargetFilter()

* fix aux.NegateAnyTargetFilter()

* change aux.disfilter1() into an alias

* add aux.NegateMonsterFilter()

* add aux.NegateAnyFilter()

* add aux.NegateEffectMonsterFilter()

* fix negate effect

* aux.NegateEffectMonsterFilter()

* fix No.8 紋章王ゲノム・ヘリター

* fix LL-バード・ストライク, スターヴ・ヴェネミー・ドラゴン
parent 4e021a86
...@@ -18,10 +18,10 @@ function c10045474.initial_effect(c) ...@@ -18,10 +18,10 @@ function c10045474.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10045474.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10045474.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 aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c10045474.activate(e,tp,eg,ep,ev,re,r,rp) function c10045474.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -10,7 +10,7 @@ function c1005587.initial_effect(c) ...@@ -10,7 +10,7 @@ function c1005587.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c1005587.filter(c,tp) function c1005587.filter(c,tp)
return aux.disfilter1(c) and c:IsAttackAbove(2000) and c:IsSummonPlayer(tp) and not c:IsDisabled() return aux.NegateMonsterFilter(c) and c:IsAttackAbove(2000) and c:IsSummonPlayer(tp) and not c:IsDisabled()
end end
function c1005587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1005587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
...@@ -20,7 +20,7 @@ function c1005587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,7 +20,7 @@ function c1005587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c1005587.filter2(c,e,tp) function c1005587.filter2(c,e,tp)
return aux.disfilter1(c) and c:IsAttackAbove(2000) return aux.NegateMonsterFilter(c) and c:IsAttackAbove(2000)
and c:IsSummonPlayer(tp) and c:IsRelateToEffect(e) and c:IsSummonPlayer(tp) and c:IsRelateToEffect(e)
end end
function c1005587.activate(e,tp,eg,ep,ev,re,r,rp) function c1005587.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,7 +31,7 @@ function c12219047.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +31,7 @@ function c12219047.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c12219047.filter(c) function c12219047.filter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and (c:GetAttack()>0 or aux.NegateMonsterFilter(c))
end end
function c12219047.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12219047.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 c12219047.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c12219047.filter(chkc) end
......
...@@ -28,10 +28,10 @@ function c15844566.initial_effect(c) ...@@ -28,10 +28,10 @@ function c15844566.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c15844566.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15844566.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c15844566.disop(e,tp,eg,ep,ev,re,r,rp) function c15844566.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -52,10 +52,10 @@ function c17874674.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,10 +52,10 @@ function c17874674.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c17874674.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17874674.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end end
function c17874674.operation(e,tp,eg,ep,ev,re,r,rp) function c17874674.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -82,7 +82,7 @@ function c21250202.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function c21250202.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c21250202.disfilter(c) function c21250202.disfilter(c)
return aux.disfilter1(c) and c:IsSummonLocation(LOCATION_EXTRA) return aux.NegateMonsterFilter(c) and c:IsSummonLocation(LOCATION_EXTRA)
end end
function c21250202.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21250202.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c21250202.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c21250202.disfilter(chkc) end
......
...@@ -75,12 +75,12 @@ function c21522601.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,12 +75,12 @@ function c21522601.discost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c21522601.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c21522601.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c21522601.disop(e,tp,eg,ep,ev,re,r,rp) function c21522601.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -89,12 +89,12 @@ function c22070401.counter(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,12 +89,12 @@ function c22070401.counter(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c22070401.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22070401.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c22070401.operation(e,tp,eg,ep,ev,re,r,rp) function c22070401.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -44,12 +44,12 @@ function c22423493.efilter(e,te) ...@@ -44,12 +44,12 @@ function c22423493.efilter(e,te)
end end
function c22423493.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22423493.distg(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(aux.disfilter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end end
function c22423493.disop(e,tp,eg,ep,ev,re,r,rp) function c22423493.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -20,12 +20,12 @@ function c22634473.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,12 +20,12 @@ function c22634473.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22634473.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c22634473.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c22634473.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22634473.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c22634473.activate(e,tp,eg,ep,ev,re,r,rp) function c22634473.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -35,10 +35,10 @@ function c22748199.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,10 +35,10 @@ function c22748199.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22748199.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) return Duel.IsExistingMatchingCard(c22748199.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil)
end end
function c22748199.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22748199.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 aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c22748199.activate(e,tp,eg,ep,ev,re,r,rp) function c22748199.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -34,10 +34,10 @@ function c23204029.initial_effect(c) ...@@ -34,10 +34,10 @@ function c23204029.initial_effect(c)
end end
c23204029.material_setcode=0x8 c23204029.material_setcode=0x8
function c23204029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23204029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c23204029.operation(e,tp,eg,ep,ev,re,r,rp) function c23204029.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function c25166510.operation(e,tp,eg,ep,ev,re,r,rp) function c25166510.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local tg=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) local tg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
if ct>0 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(25166510,2)) then if ct>0 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(25166510,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
......
...@@ -49,14 +49,11 @@ function c28388927.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,14 +49,11 @@ function c28388927.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_INSECT) local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_INSECT)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function c28388927.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c28388927.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c28388927.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c28388927.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28388927.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c28388927.disfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c28388927.disop(e,tp,eg,ep,ev,re,r,rp) function c28388927.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -48,14 +48,11 @@ end ...@@ -48,14 +48,11 @@ end
function c29357687.discon(e,tp,eg,ep,ev,re,r,rp) function c29357687.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode,1,nil,44133040) return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode,1,nil,44133040)
end end
function c29357687.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c29357687.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c29357687.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c29357687.disfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29357687.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c29357687.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
if Duel.GetCurrentPhase()==PHASE_STANDBY then if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:GetHandler():RegisterFlagEffect(29357687,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,EFFECT_FLAG_OATH,2,Duel.GetTurnCount()) e:GetHandler():RegisterFlagEffect(29357687,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,EFFECT_FLAG_OATH,2,Duel.GetTurnCount())
...@@ -66,7 +63,7 @@ end ...@@ -66,7 +63,7 @@ end
function c29357687.disop(e,tp,eg,ep,ev,re,r,rp) function c29357687.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -45,22 +45,22 @@ function c30286474.costfilter(c,g) ...@@ -45,22 +45,22 @@ function c30286474.costfilter(c,g)
end end
function c30286474.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c30286474.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup() local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then if chk==0 then
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c30286474.costfilter,tp,LOCATION_MZONE,0,1,nil,lg) return Duel.IsExistingMatchingCard(c30286474.costfilter,tp,LOCATION_MZONE,0,1,nil,lg)
and Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
else return false end else return false end
end end
e:SetLabel(0) e:SetLabel(0)
local rt=Duel.GetTargetCount(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) local rt=Duel.GetTargetCount(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local cg=Duel.SelectMatchingCard(tp,c30286474.costfilter,tp,LOCATION_MZONE,0,1,rt,nil,lg) local cg=Duel.SelectMatchingCard(tp,c30286474.costfilter,tp,LOCATION_MZONE,0,1,rt,nil,lg)
local ct=cg:GetCount() local ct=cg:GetCount()
Duel.SendtoHand(cg,nil,REASON_COST) Duel.SendtoHand(cg,nil,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,ct,ct,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c30286474.disfilter(c,e) function c30286474.disfilter(c,e)
......
...@@ -55,10 +55,10 @@ function c30439101.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,10 +55,10 @@ function c30439101.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c30439101.cfilter,1,nil,tp) return eg:IsExists(c30439101.cfilter,1,nil,tp)
end end
function c30439101.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c30439101.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c30439101.disop(e,tp,eg,ep,ev,re,r,rp) function c30439101.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function c32056070.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32056070.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 and not eg:IsExists(c32056070.filter,1,nil,ATTRIBUTE_ALL,0) then return false end if chk==0 and not eg:IsExists(c32056070.filter,1,nil,ATTRIBUTE_ALL,0) then return false end
local b1=Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) local b1=Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) local b2=Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,11738490,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) and Duel.IsPlayerCanSpecialSummonMonster(tp,11738490,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK)
local used=Duel.GetFlagEffectLabel(tp,32056070) local used=Duel.GetFlagEffectLabel(tp,32056070)
...@@ -75,7 +75,7 @@ end ...@@ -75,7 +75,7 @@ end
function c32056070.attrop2(e,tp,eg,ep,ev,re,r,rp) function c32056070.attrop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g==0 then return end if #g==0 then return end
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -28,7 +28,7 @@ function c32349062.initial_effect(c) ...@@ -28,7 +28,7 @@ function c32349062.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c32349062.filter(c) function c32349062.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and aux.disfilter1(c) return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and aux.NegateMonsterFilter(c)
end end
function c32349062.distg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c32349062.distg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c32349062.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c32349062.filter(chkc) end
...@@ -60,7 +60,7 @@ function c32349062.disop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c32349062.disop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c32349062.cfilter(c,tp) function c32349062.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(1-tp) and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and aux.disfilter1(c) return c:IsFaceup() and c:IsSummonPlayer(1-tp) and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and aux.NegateMonsterFilter(c)
end end
function c32349062.discon2(e,tp,eg,ep,ev,re,r,rp) function c32349062.discon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c32349062.cfilter,1,nil,tp) return eg:IsExists(c32349062.cfilter,1,nil,tp)
......
...@@ -26,10 +26,10 @@ function c33833230.initial_effect(c) ...@@ -26,10 +26,10 @@ function c33833230.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c33833230.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33833230.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c33833230.disop(e,tp,eg,ep,ev,re,r,rp) function c33833230.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -42,14 +42,11 @@ end ...@@ -42,14 +42,11 @@ end
function c35334193.zonelimit(e) function c35334193.zonelimit(e)
return 0x7f007f & ~e:GetHandler():GetLinkedZone() return 0x7f007f & ~e:GetHandler():GetLinkedZone()
end end
function c35334193.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c35334193.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35334193.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c35334193.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c35334193.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c35334193.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c35334193.disop(e,tp,eg,ep,ev,re,r,rp) function c35334193.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,18 +28,15 @@ end ...@@ -28,18 +28,15 @@ end
function c3693034.posfilter1(c) function c3693034.posfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x11) and c:IsCanChangePosition() return c:IsFaceup() and c:IsSetCard(0x11) and c:IsCanChangePosition()
end end
function c3693034.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c3693034.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3693034.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(c3693034.posfilter1,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c3693034.posfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c3693034.disfilter,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g1=Duel.SelectTarget(tp,c3693034.posfilter1,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c3693034.posfilter1,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g2=Duel.SelectTarget(tp,c3693034.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g2,1,0,0)
end end
......
...@@ -58,11 +58,11 @@ end ...@@ -58,11 +58,11 @@ end
function c37351133.spop2(e,tp,eg,ep,ev,re,r,rp) function c37351133.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(37351133,2)) then and Duel.SelectYesNo(tp,aux.Stringid(37351133,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -38,10 +38,10 @@ function c38148100.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,10 +38,10 @@ function c38148100.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
end end
function c38148100.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38148100.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c38148100.negop(e,tp,eg,ep,ev,re,r,rp) function c38148100.negop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,7 +31,7 @@ function c38265153.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c38265153.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_TRAP) then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_TRAP) then
local g1=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) local g1=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local g2=Duel.GetMatchingGroup(c38265153.cfilter,tp,LOCATION_MZONE,0,nil) local g2=Duel.GetMatchingGroup(c38265153.cfilter,tp,LOCATION_MZONE,0,nil)
local off=1 local off=1
local ops={} local ops={}
......
...@@ -31,10 +31,10 @@ function c38904695.initial_effect(c) ...@@ -31,10 +31,10 @@ function c38904695.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c38904695.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38904695.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c38904695.disop(e,tp,eg,ep,ev,re,r,rp) function c38904695.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -77,7 +77,7 @@ function c40080312.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c40080312.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local d=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) local d=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and #g>0 then if Duel.Draw(p,d,REASON_EFFECT)~=0 and #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
......
...@@ -55,17 +55,14 @@ end ...@@ -55,17 +55,14 @@ end
function c40939228.gfilter(g,syncard,c1) function c40939228.gfilter(g,syncard,c1)
return g:IsExists(c40939228.cfilter,1,c1) return g:IsExists(c40939228.cfilter,1,c1)
end end
function c40939228.disfilter(c)
return aux.disfilter1(c) and c:IsType(TYPE_EFFECT)
end
function c40939228.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c40939228.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40939228.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_MZONE)
end end
function c40939228.disop(e,tp,eg,ep,ev,re,r,rp,chk) function c40939228.disop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,c40939228.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.HintSelection(g) Duel.HintSelection(g)
......
...@@ -89,7 +89,7 @@ end ...@@ -89,7 +89,7 @@ end
function c41578483.eqop(e,tp,eg,ep,ev,re,r,rp) function c41578483.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_EFFECT) and tc:IsControler(1-tp) then
c41578483.equip_monster(c,tp,tc) c41578483.equip_monster(c,tp,tc)
end end
end end
......
...@@ -63,7 +63,7 @@ function c42291297.eptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,7 +63,7 @@ function c42291297.eptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local op=0 local op=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
if aux.disfilter1(c) then op=Duel.SelectOption(tp,aux.Stringid(42291297,1),aux.Stringid(42291297,2)) if aux.NegateMonsterFilter(c) then op=Duel.SelectOption(tp,aux.Stringid(42291297,1),aux.Stringid(42291297,2))
else op=Duel.SelectOption(tp,aux.Stringid(42291297,1)) end else op=Duel.SelectOption(tp,aux.Stringid(42291297,1)) end
if op==0 then if op==0 then
e:SetCategory(0) e:SetCategory(0)
......
...@@ -29,12 +29,12 @@ function c43436049.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,12 +29,12 @@ function c43436049.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c43436049.target(e,tp,eg,ep,ev,re,r,rp,chk) function c43436049.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c43436049.operation(e,tp,eg,ep,ev,re,r,rp) function c43436049.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -28,7 +28,7 @@ function c44852429.initial_effect(c) ...@@ -28,7 +28,7 @@ function c44852429.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c44852429.negfilter(c) function c44852429.negfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.disfilter1(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.NegateAnyFilter(c)
end end
function c44852429.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c44852429.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c44852429.negfilter(chkc) end if chkc then return chkc:IsOnField() and c44852429.negfilter(chkc) end
......
...@@ -54,10 +54,10 @@ function c45002991.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,10 +54,10 @@ function c45002991.discost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c45002991.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45002991.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c45002991.disop(e,tp,eg,ep,ev,re,r,rp) function c45002991.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -27,9 +27,6 @@ function c45420955.initial_effect(c) ...@@ -27,9 +27,6 @@ function c45420955.initial_effect(c)
e2:SetOperation(c45420955.eop) e2:SetOperation(c45420955.eop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c45420955.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c45420955.dcfilter(c) function c45420955.dcfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end end
...@@ -38,10 +35,10 @@ function c45420955.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,10 +35,10 @@ function c45420955.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function c45420955.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45420955.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45420955.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45420955.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c45420955.dcfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c45420955.dcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c45420955.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c45420955.negop(e,tp,eg,ep,ev,re,r,rp) function c45420955.negop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -58,11 +58,11 @@ function c47017574.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,11 +58,11 @@ function c47017574.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c47017574.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c47017574.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
end end
function c47017574.disop(e,tp,eg,ep,ev,re,r,rp) function c47017574.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -44,7 +44,7 @@ function c47021196.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c47021196.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c47021196.negfilter(c) function c47021196.negfilter(c)
return aux.disfilter1(c) and not c:IsSetCard(0xb2) return aux.NegateMonsterFilter(c) and not c:IsSetCard(0xb2)
end end
function c47021196.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47021196.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
......
...@@ -17,7 +17,7 @@ function c47387961.initial_effect(c) ...@@ -17,7 +17,7 @@ function c47387961.initial_effect(c)
end end
c47387961.xyz_number=8 c47387961.xyz_number=8
function c47387961.filter(c) function c47387961.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and (c:IsAttackAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c47387961.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47387961.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 c47387961.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c47387961.filter(chkc) end
...@@ -29,12 +29,11 @@ function c47387961.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,12 +29,11 @@ function c47387961.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(tc:GetOriginalCodeRule())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -42,7 +41,7 @@ function c47387961.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +41,7 @@ function c47387961.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(tc:GetAttack()) e2:SetValue(tc:GetAttack())
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) local cid=c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_ATTACK_FINAL) e4:SetCode(EFFECT_SET_ATTACK_FINAL)
...@@ -50,18 +49,20 @@ function c47387961.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,18 +49,20 @@ function c47387961.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetLabelObject(e2) e4:SetLabelObject(e2)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) if aux.NegateMonsterFilter(tc) then
e5:SetType(EFFECT_TYPE_SINGLE) local e5=Effect.CreateEffect(c)
e5:SetCode(EFFECT_DISABLE) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetLabelObject(e4) e5:SetCode(EFFECT_DISABLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e5:SetLabelObject(e4)
tc:RegisterEffect(e5) e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local e6=Effect.CreateEffect(c) tc:RegisterEffect(e5)
e6:SetType(EFFECT_TYPE_SINGLE) local e6=Effect.CreateEffect(c)
e6:SetCode(EFFECT_DISABLE_EFFECT) e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetLabelObject(e5) e6:SetCode(EFFECT_DISABLE_EFFECT)
e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e6:SetLabelObject(e5)
tc:RegisterEffect(e6) e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e6)
end
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(47387961,1)) e7:SetDescription(aux.Stringid(47387961,1))
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -54,10 +54,10 @@ function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,10 +54,10 @@ function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return aux.disfilter1(chkc) and chkc:IsLocation(LOCATION_MZONE) end if chkc then return aux.NegateMonsterFilter(chkc) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c47728740.disop(e,tp,eg,ep,ev,re,r,rp) function c47728740.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -84,7 +84,7 @@ function c49306994.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c49306994.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc
end end
function c49306994.disfilter(c) function c49306994.disfilter(c)
return aux.disfilter1(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) return aux.NegateAnyFilter(c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c49306994.disop(e,tp,eg,ep,ev,re,r,rp) function c49306994.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -39,10 +39,10 @@ function c50275295.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,10 +39,10 @@ function c50275295.discost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c50275295.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50275295.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c50275295.disop(e,tp,eg,ep,ev,re,r,rp) function c50275295.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -52,10 +52,10 @@ function c50907446.splimit(e,se,sp,st) ...@@ -52,10 +52,10 @@ function c50907446.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function c50907446.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50907446.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end end
function c50907446.disop(e,tp,eg,ep,ev,re,r,rp) function c50907446.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -39,7 +39,7 @@ function c51570882.splimit(e,se,sp,st) ...@@ -39,7 +39,7 @@ function c51570882.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end end
function c51570882.disfilter(c) function c51570882.disfilter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and (c:GetAttack()>0 or aux.NegateMonsterFilter(c))
end end
function c51570882.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c51570882.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51570882.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51570882.disfilter(chkc) end
......
...@@ -16,7 +16,7 @@ function c52038441.initial_effect(c) ...@@ -16,7 +16,7 @@ function c52038441.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c52038441.cfilter(c,tp) function c52038441.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(1-tp) and (aux.disfilter1(c) or c:GetAttack()>0) return c:IsFaceup() and c:IsSummonPlayer(1-tp) and (aux.NegateMonsterFilter(c) or c:GetAttack()>0)
end end
function c52038441.discon(e,tp,eg,ep,ev,re,r,rp) function c52038441.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c52038441.cfilter,1,nil,tp) return eg:IsExists(c52038441.cfilter,1,nil,tp)
......
...@@ -43,10 +43,10 @@ function c52927340.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,10 +43,10 @@ function c52927340.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c52927340.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52927340.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c52927340.disop(e,tp,eg,ep,ev,re,r,rp) function c52927340.disop(e,tp,eg,ep,ev,re,r,rp)
...@@ -61,6 +61,11 @@ function c52927340.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,11 @@ function c52927340.disop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c52927340.rcon) e1:SetCondition(c52927340.rcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
if tc:IsType(TYPE_TRAPMONSTER) then
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e2)
end
end end
end end
function c52927340.rcon(e) function c52927340.rcon(e)
......
...@@ -25,10 +25,10 @@ function c52945066.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,10 +25,10 @@ function c52945066.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c52945066.ccfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c52945066.ccfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c52945066.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52945066.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 aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c52945066.cfilter(c) function c52945066.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsLinkAbove(2) return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsLinkAbove(2)
......
...@@ -53,10 +53,10 @@ function c53184342.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,10 +53,10 @@ function c53184342.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c53184342.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c53184342.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c53184342.eqfilter(c) function c53184342.eqfilter(c)
return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP) return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP)
......
...@@ -28,14 +28,14 @@ end ...@@ -28,14 +28,14 @@ end
function c54340229.acttg(e,tp,eg,ep,ev,re,r,rp,chk) function c54340229.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if Duel.IsExistingMatchingCard(c54340229.lkfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(c54340229.lkfilter,tp,LOCATION_MZONE,0,1,nil) then
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
end end
function c54340229.actop(e,tp,eg,ep,ev,re,r,rp) function c54340229.actop(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
if Duel.IsExistingMatchingCard(c54340229.lkfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(c54340229.lkfilter,tp,LOCATION_MZONE,0,1,nil) then
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -10,8 +10,8 @@ function c54693926.initial_effect(c) ...@@ -10,8 +10,8 @@ function c54693926.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c54693926.target(e,tp,eg,ep,ev,re,r,rp,chk) function c54693926.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c54693926.chainlm) Duel.SetChainLimit(c54693926.chainlm)
...@@ -21,7 +21,7 @@ function c54693926.chainlm(e,rp,tp) ...@@ -21,7 +21,7 @@ function c54693926.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER) return not e:GetHandler():IsType(TYPE_MONSTER)
end end
function c54693926.activate(e,tp,eg,ep,ev,re,r,rp) function c54693926.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -71,7 +71,7 @@ function c55415564.discon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +71,7 @@ function c55415564.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function c55415564.disfilter2(c) function c55415564.disfilter2(c)
return aux.disfilter1(c) and c:IsSummonType(SUMMON_TYPE_PENDULUM) return aux.NegateMonsterFilter(c) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function c55415564.distg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c55415564.distg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c55415564.disfilter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c55415564.disfilter2(chkc) end
......
...@@ -18,7 +18,7 @@ function c56588755.filter(c,tp) ...@@ -18,7 +18,7 @@ function c56588755.filter(c,tp)
and Duel.IsExistingTarget(c56588755.filter2,tp,0,LOCATION_MZONE,1,nil,ctype) and Duel.IsExistingTarget(c56588755.filter2,tp,0,LOCATION_MZONE,1,nil,ctype)
end end
function c56588755.filter2(c,ctype) function c56588755.filter2(c,ctype)
return c:IsFaceup() and c:IsType(ctype) and c:IsType(TYPE_EFFECT) and not c:IsDisabled() return c:IsType(ctype) and aux.NegateEffectMonsterFilter(c)
end end
function c56588755.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56588755.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -18,12 +18,12 @@ function c56619778.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,12 +18,12 @@ function c56619778.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c56619778.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c56619778.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c56619778.target(e,tp,eg,ep,ev,re,r,rp,chk) function c56619778.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c56619778.activate(e,tp,eg,ep,ev,re,r,rp) function c56619778.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -28,7 +28,7 @@ function c57043986.initial_effect(c) ...@@ -28,7 +28,7 @@ function c57043986.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c57043986.negfilter(c) function c57043986.negfilter(c)
return c:IsType(TYPE_MONSTER) and aux.disfilter1(c) return c:IsType(TYPE_MONSTER) and aux.NegateMonsterFilter(c)
end end
function c57043986.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57043986.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c57043986.negfilter(chkc) end if chkc then return chkc:IsOnField() and c57043986.negfilter(chkc) end
......
...@@ -52,19 +52,16 @@ function c57450198.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,19 +52,16 @@ function c57450198.discost(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 c57450198.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c57450198.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57450198.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c57450198.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c57450198.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c57450198.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c57450198.disop(e,tp,eg,ep,ev,re,r,rp) function c57450198.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -30,18 +30,18 @@ function c5795980.cfilter(c,ec,tp) ...@@ -30,18 +30,18 @@ function c5795980.cfilter(c,ec,tp)
return Duel.IsExistingTarget(c5795980.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec) return Duel.IsExistingTarget(c5795980.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end end
function c5795980.tgfilter(c,tc,ec) function c5795980.tgfilter(c,tc,ec)
return aux.disfilter1(c) and c:GetEquipTarget()~=tc and c~=ec return aux.NegateAnyFilter(c) and c:GetEquipTarget()~=tc and c~=ec
end end
function c5795980.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c5795980.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) and chkc~=c end if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) and chkc~=c end
if chk==0 then if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end if not Duel.IsPlayerCanDraw(tp,1) then return false end
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c5795980.cfilter,1,c,c,tp) return Duel.CheckReleaseGroup(tp,c5795980.cfilter,1,c,c,tp)
else else
return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end end
end end
if e:GetLabel()==1 then if e:GetLabel()==1 then
...@@ -50,7 +50,7 @@ function c5795980.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,7 +50,7 @@ function c5795980.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
......
...@@ -71,14 +71,11 @@ function c58074177.atkop(e,tp,ep,ev,re,r,rp) ...@@ -71,14 +71,11 @@ function c58074177.atkop(e,tp,ep,ev,re,r,rp)
a:RegisterEffect(e1) a:RegisterEffect(e1)
end end
end end
function c58074177.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c58074177.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c58074177.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c58074177.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c58074177.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c58074177.disfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c58074177.disop(e,tp,eg,ep,ev,re,r,rp) function c58074177.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -46,7 +46,7 @@ function c61525276.cfilter(c,tp) ...@@ -46,7 +46,7 @@ function c61525276.cfilter(c,tp)
return c:IsFaceup() and c:IsCode(66889139) and Duel.IsExistingMatchingCard(c61525276.disfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) return c:IsFaceup() and c:IsCode(66889139) and Duel.IsExistingMatchingCard(c61525276.disfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
end end
function c61525276.disfilter(c,atk) function c61525276.disfilter(c,atk)
return aux.disfilter1(c) and c:IsAttackBelow(atk) return aux.NegateMonsterFilter(c) and c:IsAttackBelow(atk)
end end
function c61525276.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61525276.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c61525276.cfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c61525276.cfilter(chkc,tp) end
......
...@@ -50,16 +50,13 @@ end ...@@ -50,16 +50,13 @@ end
function c62962630.spcon(e,tp,eg,ep,ev,re,r,rp) function c62962630.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c62962630.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(c62962630.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end end
function c62962630.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c62962630.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62962630.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c62962630.disfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62962630.disfilter,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c62962630.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
......
...@@ -49,7 +49,7 @@ function c64276752.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c64276752.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:IsExists(c64276752.mgfilter,1,nil) then if mg:IsExists(c64276752.mgfilter,1,nil) then
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,c) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if #g>0 then Duel.BreakEffect() end if #g>0 then Duel.BreakEffect() end
for tc in aux.Next(g) do for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -24,7 +24,7 @@ function c64554883.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +24,7 @@ function c64554883.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c64554883.filter(c) function c64554883.filter(c)
return c:IsFaceup() and c:IsLevelAbove(5) and not c:IsDisabled() and c:IsType(TYPE_EFFECT) return c:IsLevelAbove(5) and aux.NegateEffectMonsterFilter(c)
end end
function c64554883.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c64554883.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 c64554883.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c64554883.filter(chkc) end
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function c64554883.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c64554883.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and not tc:IsDisabled() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
......
...@@ -53,10 +53,10 @@ function c66192538.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,10 +53,10 @@ function c66192538.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c66192538.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c66192538.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c66192538.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66192538.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c66192538.disop(e,tp,eg,ep,ev,re,r,rp) function c66192538.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -59,10 +59,10 @@ function c68045685.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,10 +59,10 @@ function c68045685.discost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c68045685.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68045685.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c68045685.disop(e,tp,eg,ep,ev,re,r,rp) function c68045685.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,11 +32,11 @@ end ...@@ -32,11 +32,11 @@ end
function c68159562.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68159562.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 if chk==0 then
return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(c68159562.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(c68159562.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g1=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,c68159562.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) local g2=Duel.SelectTarget(tp,c68159562.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
......
...@@ -46,11 +46,11 @@ function c69680031.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,11 +46,11 @@ function c69680031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c69680031.ofilter,tp,LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c69680031.ofilter,tp,LOCATION_MZONE,0,1,c)
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(69680031,2)) then and Duel.SelectYesNo(tp,aux.Stringid(69680031,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -33,11 +33,11 @@ function c73445448.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,11 +33,11 @@ function c73445448.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end end
function c73445448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73445448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return e:GetHandler():IsAttackPos() if chk==0 then return e:GetHandler():IsAttackPos()
and Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c73445448.operation(e,tp,eg,ep,ev,re,r,rp) function c73445448.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,7 +33,7 @@ function c74371660.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,7 @@ function c74371660.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c74371660.filter(c,atk) function c74371660.filter(c,atk)
return aux.disfilter1(c) and c:GetAttack()<atk return aux.NegateMonsterFilter(c) and c:GetAttack()<atk
end end
function c74371660.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74371660.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74371660.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end if chk==0 then return Duel.IsExistingMatchingCard(c74371660.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end
......
...@@ -68,12 +68,9 @@ end ...@@ -68,12 +68,9 @@ end
function c74689476.discon(e,tp,eg,ep,ev,re,r,rp) function c74689476.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() return e:GetHandler():GetEquipTarget()
end end
function c74689476.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c74689476.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74689476.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c74689476.disfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74689476.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c74689476.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c74689476.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
...@@ -81,7 +78,7 @@ end ...@@ -81,7 +78,7 @@ end
function c74689476.disop(e,tp,eg,ep,ev,re,r,rp) function c74689476.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -46,7 +46,7 @@ function c75130221.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c75130221.discon(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c75130221.disfilter(c) function c75130221.disfilter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and (c:GetAttack()>0 or aux.NegateMonsterFilter(c))
end end
function c75130221.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75130221.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c75130221.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c75130221.disfilter(chkc) end
......
...@@ -67,15 +67,15 @@ function c75402014.cfilter(c) ...@@ -67,15 +67,15 @@ function c75402014.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107e) and c:GetOriginalType()&TYPE_MONSTER~=0 return c:IsFaceup() and c:IsSetCard(0x107e) and c:GetOriginalType()&TYPE_MONSTER~=0
end end
function c75402014.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75402014.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
local ct=e:GetHandler():GetEquipGroup():FilterCount(c75402014.cfilter,nil) local ct=e:GetHandler():GetEquipGroup():FilterCount(c75402014.cfilter,nil)
if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end end
function c75402014.disfilter(c,e) function c75402014.disfilter(c,e)
return aux.disfilter1(c) and c:IsRelateToEffect(e) return aux.NegateAnyFilter(c) and c:IsRelateToEffect(e)
end end
function c75402014.disop(e,tp,eg,ep,ev,re,r,rp) function c75402014.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -76,7 +76,7 @@ function c7631534.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,7 @@ function c7631534.discon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c7631534.fmfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c7631534.fmfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c7631534.disfilter(c) function c7631534.disfilter(c)
return aux.disfilter1(c) and c:IsSummonLocation(LOCATION_EXTRA) return aux.NegateMonsterFilter(c) and c:IsSummonLocation(LOCATION_EXTRA)
end end
function c7631534.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7631534.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c7631534.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c7631534.disfilter(chkc) end
......
...@@ -55,16 +55,16 @@ function c77539547.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,16 +55,16 @@ function c77539547.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x137) and rp==tp and re:GetHandler()~=e:GetHandler() return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x137) and rp==tp and re:GetHandler()~=e:GetHandler()
end end
function c77539547.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77539547.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c77539547.disop(e,tp,eg,ep,ev,re,r,rp) function c77539547.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -74,10 +74,10 @@ function c7841112.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,10 +74,10 @@ function c7841112.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c7841112.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7841112.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c7841112.disop(e,tp,eg,ep,ev,re,r,rp) function c7841112.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,14 +24,11 @@ function c78474168.initial_effect(c) ...@@ -24,14 +24,11 @@ function c78474168.initial_effect(c)
e2:SetOperation(c78474168.activate2) e2:SetOperation(c78474168.activate2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c78474168.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c78474168.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78474168.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 c78474168.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c78474168.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c78474168.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c78474168.activate(e,tp,eg,ep,ev,re,r,rp) function c78474168.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -59,7 +59,7 @@ function c7922915.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c7922915.negcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.IsExistingMatchingCard(c7922915.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return aux.exccon(e) and Duel.IsExistingMatchingCard(c7922915.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c7922915.negfilter(c) function c7922915.negfilter(c)
return aux.disfilter1(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) return aux.NegateAnyFilter(c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c7922915.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7922915.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c7922915.negfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c7922915.negfilter(chkc) end
......
...@@ -102,12 +102,12 @@ function c80776622.pfilter(c) ...@@ -102,12 +102,12 @@ function c80776622.pfilter(c)
return c:GetCurrentScale()%2~=0 return c:GetCurrentScale()%2~=0
end end
function c80776622.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80776622.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
local ct=1 local ct=1
if Duel.IsExistingMatchingCard(c80776622.pfilter,tp,LOCATION_PZONE,0,1,nil) then ct=2 end if Duel.IsExistingMatchingCard(c80776622.pfilter,tp,LOCATION_PZONE,0,1,nil) then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end end
function c80776622.disfilter(c,e) function c80776622.disfilter(c,e)
......
...@@ -40,11 +40,11 @@ function c81146288.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -40,11 +40,11 @@ function c81146288.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(g1,POS_FACEUP,REASON_COST) Duel.Remove(g1,POS_FACEUP,REASON_COST)
end end
function c81146288.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c81146288.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
end end
function c81146288.disop(e,tp,eg,ep,ev,re,r,rp) function c81146288.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e)) local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -33,7 +33,7 @@ function c82257671.initial_effect(c) ...@@ -33,7 +33,7 @@ function c82257671.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c82257671.cfilter(c) function c82257671.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_EFFECT) and not c:IsDisabled() return c:IsRace(RACE_CYBERSE) and aux.NegateEffectMonsterFilter(c)
end end
function c82257671.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c82257671.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -70,7 +70,7 @@ function c86331741.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,7 +70,7 @@ function c86331741.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end end
function c86331741.atkfilter(c) function c86331741.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and (not c:IsAttack(4000) or aux.disfilter1(c)) return c:IsFaceup() and c:IsType(TYPE_XYZ) and (not c:IsAttack(4000) or aux.NegateMonsterFilter(c))
end end
function c86331741.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86331741.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86331741.atkfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86331741.atkfilter(chkc) end
......
...@@ -64,7 +64,7 @@ function c86379342.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c86379342.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379342.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) return Duel.IsExistingMatchingCard(c86379342.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end end
function c86379342.negfilter(c) function c86379342.negfilter(c)
return aux.disfilter1(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) return aux.NegateAnyFilter(c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c86379342.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86379342.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c86379342.negfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c86379342.negfilter(chkc) end
......
...@@ -20,10 +20,10 @@ function c86848580.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,10 +20,10 @@ function c86848580.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
end end
function c86848580.disop(e,tp,eg,ep,ev,re,r,rp) function c86848580.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -68,7 +68,7 @@ function c90036274.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function c90036274.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c90036274.disfilter(c) function c90036274.disfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and (c:IsAttackAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and (c:GetAttack()>0 or aux.NegateMonsterFilter(c))
end end
function c90036274.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c90036274.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c90036274.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c90036274.disfilter(chkc) end
......
...@@ -101,14 +101,11 @@ function c92650018.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,14 +101,11 @@ function c92650018.discon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsControler(tp) return ec and ec:IsControler(tp)
end end
function c92650018.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c92650018.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c92650018.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c92650018.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c92650018.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c92650018.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c92650018.disop(e,tp,eg,ep,ev,re,r,rp) function c92650018.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ function c93356623.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,7 +21,7 @@ function c93356623.condition(e,tp,eg,ep,ev,re,r,rp)
and aux.dscon() and aux.dscon()
end end
function c93356623.filter(c) function c93356623.filter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or c:IsDefenseAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0 or aux.NegateMonsterFilter(c))
end end
function c93356623.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93356623.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c93356623.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c93356623.filter(chkc) end
......
...@@ -81,34 +81,36 @@ function c93729065.copycost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,34 +81,36 @@ function c93729065.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(93729065)==0 end if chk==0 then return e:GetHandler():GetFlagEffect(93729065)==0 end
e:GetHandler():RegisterFlagEffect(93729065,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(93729065,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
function c93729065.copyfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
end
function c93729065.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93729065.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c93729065.copyfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c93729065.copyfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c93729065.copyfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function c93729065.copyop(e,tp,eg,ep,ev,re,r,rp) function c93729065.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsType(TYPE_TOKEN) then if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(tc:GetOriginalCodeRule())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then if not tc:IsType(TYPE_TRAPMONSTER) then
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) local cid=c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93729065,4)) e2:SetDescription(aux.Stringid(93729065,4))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
...@@ -127,17 +129,19 @@ function c93729065.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,17 +129,19 @@ function c93729065.copyop(e,tp,eg,ep,ev,re,r,rp)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE) e4:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) if aux.NegateMonsterFilter(tc) then
e5:SetType(EFFECT_TYPE_SINGLE) local e5=Effect.CreateEffect(c)
e5:SetCode(EFFECT_DISABLE) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e5:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e5) e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local e6=Effect.CreateEffect(c) tc:RegisterEffect(e5)
e6:SetType(EFFECT_TYPE_SINGLE) local e6=Effect.CreateEffect(c)
e6:SetCode(EFFECT_DISABLE_EFFECT) e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetValue(RESET_TURN_SET) e6:SetCode(EFFECT_DISABLE_EFFECT)
e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e6:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e6) e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e6)
end
Duel.Damage(1-tp,500,REASON_EFFECT) Duel.Damage(1-tp,500,REASON_EFFECT)
end end
end end
......
...@@ -23,20 +23,17 @@ function c97268402.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,20 +23,17 @@ function c97268402.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c97268402.filter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c97268402.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97268402.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 c97268402.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c97268402.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c97268402.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c97268402.operation(e,tp,eg,ep,ev,re,r,rp) function c97268402.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() and tc:IsControler(1-tp) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -34,10 +34,10 @@ function c9753964.sfilter(c) ...@@ -34,10 +34,10 @@ function c9753964.sfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
end end
function c9753964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9753964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c9753964.operation(e,tp,eg,ep,ev,re,r,rp) function c9753964.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -54,12 +54,12 @@ function c98127546.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,12 +54,12 @@ function c98127546.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c98127546.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c98127546.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c98127546.disop(e,tp,eg,ep,ev,re,r,rp) function c98127546.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -17,14 +17,11 @@ end ...@@ -17,14 +17,11 @@ end
function c98338152.condition(e,tp,eg,ep,ev,re,r,rp) function c98338152.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c98338152.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c98338152.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c98338152.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c98338152.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98338152.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98338152.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98338152.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c98338152.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then
e:SetCategory(CATEGORY_DISABLE+CATEGORY_CONTROL) e:SetCategory(CATEGORY_DISABLE+CATEGORY_CONTROL)
end end
...@@ -32,7 +29,7 @@ end ...@@ -32,7 +29,7 @@ end
function c98338152.activate(e,tp,eg,ep,ev,re,r,rp) function c98338152.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -46,7 +43,7 @@ function c98338152.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +43,7 @@ function c98338152.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
and tc:IsControler(1-tp) and tc:IsControlerCanBeChanged() and tc:IsDisabled() and tc:IsControler(1-tp) and tc:IsControlerCanBeChanged()
and Duel.SelectYesNo(tp,aux.Stringid(98338152,0)) then and Duel.SelectYesNo(tp,aux.Stringid(98338152,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.GetControl(tc,tp,PHASE_END,1) Duel.GetControl(tc,tp,PHASE_END,1)
......
...@@ -55,7 +55,7 @@ function c99185129.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c99185129.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c99185129.filter(c) function c99185129.filter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and (c:IsAttackAbove(1) or aux.disfilter1(c)) return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and (c:GetAttack()>0 or aux.NegateMonsterFilter(c))
end end
function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end
......
...@@ -32,14 +32,11 @@ end ...@@ -32,14 +32,11 @@ end
function c99456344.discon(e,tp,eg,ep,ev,re,r,rp) function c99456344.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c99456344.cfilter,1,nil) return eg:IsExists(c99456344.cfilter,1,nil)
end end
function c99456344.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c99456344.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c99456344.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99456344.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c99456344.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c99456344.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c99456344.disop(e,tp,eg,ep,ev,re,r,rp) function c99456344.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -49,11 +49,11 @@ function c99469936.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,11 +49,11 @@ function c99469936.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c99469936.target(e,tp,eg,ep,ev,re,r,rp,chk) function c99469936.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
end end
function c99469936.operation(e,tp,eg,ep,ev,re,r,rp) function c99469936.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -2165,10 +2165,26 @@ function Auxiliary.ChangeBattleDamage(player,value) ...@@ -2165,10 +2165,26 @@ function Auxiliary.ChangeBattleDamage(player,value)
end end
end end
end end
--card effect disable filter(target) --filter for "negate the effects of a face-up monster" (無限泡影/Infinite Impermanence)
function Auxiliary.disfilter1(c) function Auxiliary.NegateMonsterFilter(c)
return c:IsFaceup() and not c:IsDisabled() and (not c:IsType(TYPE_NORMAL) or c:GetOriginalType()&TYPE_EFFECT~=0) return c:IsFaceup() and not c:IsDisabled() and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
--filter for "negate the effects of an Effect Monster" (エフェクト・ヴェーラー/Effect Veiler)
function Auxiliary.NegateEffectMonsterFilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
--filter for "negate the effects of a face-up card"
function Auxiliary.NegateAnyFilter(c)
if c:IsType(TYPE_TRAPMONSTER) then
return c:IsFaceup()
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsFaceup() and not c:IsDisabled()
else
return aux.NegateMonsterFilter(c)
end
end end
--alias for compatibility
Auxiliary.disfilter1=Auxiliary.NegateAnyFilter
--condition of EVENT_BATTLE_DESTROYING --condition of EVENT_BATTLE_DESTROYING
function Auxiliary.bdcon(e,tp,eg,ep,ev,re,r,rp) function Auxiliary.bdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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