Commit 1040abfa authored by nekrozar's avatar nekrozar Committed by GitHub

fix&update remove (#1250)

parent 56b1e8aa
...@@ -10,14 +10,14 @@ function c11961740.initial_effect(c) ...@@ -10,14 +10,14 @@ function c11961740.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c11961740.target(e,tp,eg,ep,ev,re,r,rp,chk) function c11961740.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end end
function c11961740.activate(e,tp,eg,ep,ev,re,r,rp) function c11961740.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,tp,POS_FACEDOWN)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)~=0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then if tc and Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)~=0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
tc:RegisterFlagEffect(11961740,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(11961740,RESET_EVENT+RESETS_STANDARD,0,1)
......
...@@ -28,17 +28,14 @@ end ...@@ -28,17 +28,14 @@ end
function c15256925.condition(e,tp,eg,ep,ev,re,r,rp) function c15256925.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c15256925.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c15256925.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c15256925.rmfilter(c)
return c:IsAbleToRemove() and not c:IsType(TYPE_TOKEN)
end
function c15256925.target(e,tp,eg,ep,ev,re,r,rp,chk) function c15256925.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp,POS_FACEDOWN) end
local g=Duel.GetMatchingGroup(c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c15256925.activate(e,tp,eg,ep,ev,re,r,rp) function c15256925.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e),tp,POS_FACEDOWN)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
......
...@@ -20,15 +20,12 @@ end ...@@ -20,15 +20,12 @@ end
function c15693423.condition(e,tp,eg,ep,ev,re,r,rp) function c15693423.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetCurrentPhase()==PHASE_BATTLE
end end
function c15693423.rmfilter(c,p)
return Duel.IsPlayerCanRemove(p,c) and not c:IsType(TYPE_TOKEN)
end
function c15693423.target(e,tp,eg,ep,ev,re,r,rp,chk) function c15693423.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then ct=ct-1 end if e:GetHandler():IsLocation(LOCATION_HAND) then ct=ct-1 end
if chk==0 then return Duel.IsPlayerCanRemove(1-tp) if chk==0 then return Duel.IsPlayerCanRemove(1-tp)
and ct>0 and g:IsExists(c15693423.rmfilter,1,nil,1-tp) end and ct>0 and g:IsExists(Card.IsAbleToRemove,1,nil,1-tp,POS_FACEDOWN,REASON_RULE) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0)
end end
function c15693423.activate(e,tp,eg,ep,ev,re,r,rp) function c15693423.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -37,7 +34,7 @@ function c15693423.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +34,7 @@ function c15693423.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if ct>0 then if ct>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(1-tp,c15693423.rmfilter,ct,ct,nil,1-tp) local sg=g:FilterSelect(1-tp,Card.IsAbleToRemove,ct,ct,nil,1-tp,POS_FACEDOWN,REASON_RULE)
Duel.Remove(sg,POS_FACEDOWN,REASON_RULE) Duel.Remove(sg,POS_FACEDOWN,REASON_RULE)
end end
end end
......
...@@ -60,7 +60,7 @@ function c1735088.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +60,7 @@ function c1735088.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function c1735088.cfilter(c,e,tp) function c1735088.cfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x58) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 return c:IsFaceup() and c:IsSetCard(0x58) and c:IsAbleToRemoveAsCost(POS_FACEDOWN) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c1735088.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c1735088.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end end
function c1735088.spfilter(c,e,tp,code) function c1735088.spfilter(c,e,tp,code)
......
...@@ -26,7 +26,7 @@ function c18658572.cfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c18658572.cfop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetMinGroup(Card.GetSequence):GetFirst() local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0) Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
if tc:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(18658572,1)) then if tc:IsAbleToRemove(tp,POS_FACEDOWN) and Duel.SelectYesNo(tp,aux.Stringid(18658572,1)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end end
......
...@@ -38,11 +38,8 @@ end ...@@ -38,11 +38,8 @@ end
function c29432790.spfilter(c,e,tp) function c29432790.spfilter(c,e,tp)
return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c29432790.rmfilter(c)
return c:IsAbleToRemove() and not c:IsType(TYPE_TOKEN)
end
function c29432790.target(e,tp,eg,ep,ev,re,r,rp,chk) function c29432790.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29432790.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp,POS_FACEDOWN)
if chk==0 then return Duel.IsExistingMatchingCard(c29432790.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c29432790.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and g:GetCount()>0 and Duel.GetMZoneCount(tp,g)>0 end and g:GetCount()>0 and Duel.GetMZoneCount(tp,g)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
...@@ -50,7 +47,7 @@ function c29432790.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +47,7 @@ function c29432790.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c29432790.activate(e,tp,eg,ep,ev,re,r,rp) function c29432790.activate(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
local g=Duel.GetMatchingGroup(c29432790.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp,POS_FACEDOWN)
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 then if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
......
...@@ -75,11 +75,11 @@ function c32013448.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,11 +75,11 @@ function c32013448.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c32013448.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c32013448.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end end
function c32013448.rmop2(e,tp,eg,ep,ev,re,r,rp) function c32013448.rmop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,tp,POS_FACEDOWN)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
local tc=sg:GetFirst() local tc=sg:GetFirst()
......
...@@ -20,11 +20,11 @@ function c32999573.rcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,11 +20,11 @@ function c32999573.rcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(32999573+ep)==0 return e:GetHandler():GetFlagEffect(32999573+ep)==0
and bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ) and bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ)
and re:GetHandler():GetOverlayCount()>=ev-1 and re:GetHandler():GetOverlayCount()>=ev-1
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil,tp,POS_FACEDOWN)
end end
function c32999573.rop(e,tp,eg,ep,ev,re,r,rp) function c32999573.rop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(32999573+ep,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(32999573+ep,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil,tp,POS_FACEDOWN)
return Duel.Remove(g,POS_FACEDOWN,REASON_COST) return Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end end
...@@ -14,7 +14,7 @@ function c35261759.initial_effect(c) ...@@ -14,7 +14,7 @@ function c35261759.initial_effect(c)
end end
function c35261759.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c35261759.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,10) local g=Duel.GetDecktopGroup(tp,10)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==10 if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==10
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=12 end and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=12 end
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
......
...@@ -32,24 +32,21 @@ function c36970611.initial_effect(c) ...@@ -32,24 +32,21 @@ function c36970611.initial_effect(c)
e3:SetOperation(c36970611.thop) e3:SetOperation(c36970611.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c36970611.rmfilter(c) function c36970611.cfilter(c,tp)
return c:IsAbleToRemove() and not c:IsType(TYPE_TOKEN)
end
function c36970611.cfilter(c)
return c:IsSetCard(0xc1) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xc1) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c36970611.rmfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp,POS_FACEDOWN)
end end
function c36970611.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c36970611.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36970611.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c36970611.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cg=Duel.SelectMatchingCard(tp,c36970611.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local cg=Duel.SelectMatchingCard(tp,c36970611.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
Duel.Remove(cg,POS_FACEUP,REASON_COST) Duel.Remove(cg,POS_FACEUP,REASON_COST)
end end
function c36970611.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36970611.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c36970611.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c36970611.operation(e,tp,eg,ep,ev,re,r,rp) function c36970611.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -51,7 +51,7 @@ function c40080312.retcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c40080312.retcon2(e,tp,eg,ep,ev,re,r,rp)
end end
function c40080312.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c40080312.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
...@@ -60,7 +60,7 @@ function c40080312.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c40080312.retop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then if c:IsLocation(LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
end end
......
...@@ -19,7 +19,7 @@ function c40555959.initial_effect(c) ...@@ -19,7 +19,7 @@ function c40555959.initial_effect(c)
end end
function c40555959.activate(e,tp,eg,ep,ev,re,r,rp) function c40555959.activate(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(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(c40555959.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c40555959.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(40555959,1)) then and Duel.SelectYesNo(tp,aux.Stringid(40555959,1)) then
c40555959.remop(e,tp,eg,ep,ev,re,r,rp) c40555959.remop(e,tp,eg,ep,ev,re,r,rp)
...@@ -35,13 +35,13 @@ function c40555959.remcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,13 +35,13 @@ function c40555959.remcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c40555959.remtg(e,tp,eg,ep,ev,re,r,rp,chk) function c40555959.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(40555959)==0 if chk==0 then return e:GetHandler():GetFlagEffect(40555959)==0
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
e:GetHandler():RegisterFlagEffect(40555959,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(40555959,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
function c40555959.remop(e,tp,eg,ep,ev,re,r,rp) function c40555959.remop(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
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil,tp,POS_FACEDOWN)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -37,7 +37,7 @@ function c43175858.initial_effect(c) ...@@ -37,7 +37,7 @@ function c43175858.initial_effect(c)
end end
function c43175858.target(e,tp,eg,ep,ev,re,r,rp,chk) function c43175858.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end end
function c43175858.activate(e,tp,eg,ep,ev,re,r,rp) function c43175858.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -56,7 +56,7 @@ end ...@@ -56,7 +56,7 @@ end
function c43175858.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c43175858.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=eg:FilterCount(c43175858.repfilter,nil,tp) local ct=eg:FilterCount(c43175858.repfilter,nil,tp)
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
if chk==0 then return g:IsExists(Card.IsAbleToRemove,ct,nil) end if chk==0 then return g:IsExists(Card.IsAbleToRemove,ct,nil,tp,POS_FACEDOWN) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
......
...@@ -24,8 +24,14 @@ function c45148985.initial_effect(c) ...@@ -24,8 +24,14 @@ function c45148985.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() --cannot remove
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_REMOVE) e4:SetCode(EFFECT_CANNOT_REMOVE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,1)
e4:SetTarget(c45148985.rmlimit)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--spsummon --spsummon
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
...@@ -63,6 +69,9 @@ function c45148985.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -63,6 +69,9 @@ function c45148985.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=g:SelectSubGroup(tp,c45148985.gselect,false,5,5,tp) local rg=g:SelectSubGroup(tp,c45148985.gselect,false,5,5,tp)
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c45148985.rmlimit(e,c,tp,r)
return c==e:GetHandler() and r==REASON_EFFECT
end
function c45148985.spcon(e,tp,eg,ep,ev,re,r,rp) function c45148985.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
end end
......
...@@ -11,7 +11,7 @@ function c45221020.initial_effect(c) ...@@ -11,7 +11,7 @@ function c45221020.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c45221020.cfilter(c) function c45221020.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end end
function c45221020.filter(c,e,tp,lv) function c45221020.filter(c,e,tp,lv)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -27,7 +27,7 @@ function c47870325.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c47870325.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE)
end end
function c47870325.rmfilter(c,tp) function c47870325.rmfilter(c,tp)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove(tp) return c:IsType(TYPE_SPELL) and c:IsAbleToRemove(tp,POS_FACEDOWN)
end end
function c47870325.activate(e,tp,eg,ep,ev,re,r,rp) function c47870325.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -19,7 +19,7 @@ function c49238328.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,7 +19,7 @@ function c49238328.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function c49238328.cfilter(c) function c49238328.cfilter(c)
return c:IsFacedown() and c:IsAbleToRemoveAsCost() return c:IsFacedown() and c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end end
function c49238328.target(e,tp,eg,ep,ev,re,r,rp,chk) function c49238328.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c49238328.cfilter,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(c49238328.cfilter,tp,LOCATION_EXTRA,0,nil)
......
...@@ -11,7 +11,7 @@ function c49587034.initial_effect(c) ...@@ -11,7 +11,7 @@ function c49587034.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c49587034.target(e,tp,eg,ep,ev,re,r,rp,chk) function c49587034.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end end
function c49587034.activate(e,tp,eg,ep,ev,re,r,rp) function c49587034.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,7 +12,7 @@ function c56256517.initial_effect(c) ...@@ -12,7 +12,7 @@ function c56256517.initial_effect(c)
end end
function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk) function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end end
function c56256517.activate(e,tp,eg,ep,ev,re,r,rp) function c56256517.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,8 +12,7 @@ function c58297729.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -12,8 +12,7 @@ function c58297729.target(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk==0 then return d and a:GetControler()~=d:GetControler() if chk==0 then return d and a:GetControler()~=d:GetControler()
and a:IsAbleToRemove() and d:IsAbleToRemove() and a:IsAbleToRemove(a:GetControler(),POS_FACEDOWN,REASON_RULE) and d:IsAbleToRemove(d:GetControler(),POS_FACEDOWN,REASON_RULE) end
and not a:IsType(TYPE_TOKEN) and not d:IsType(TYPE_TOKEN) end
end end
function c58297729.activate(e,tp,eg,ep,ev,re,r,rp) function c58297729.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -62,21 +62,18 @@ end ...@@ -62,21 +62,18 @@ end
function c63845230.fuslimit(e,c,sumtype) function c63845230.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION return sumtype==SUMMON_TYPE_FUSION
end end
function c63845230.cfilter(c)
return c:IsAbleToRemoveAsCost() and not c:IsType(TYPE_TOKEN)
end
function c63845230.spcon(e,c) function c63845230.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local ct=-ft+1
local g=Duel.GetMatchingGroup(c63845230.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c) local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c,POS_FACEDOWN)
return g:GetCount()>=5 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE)) return g:GetCount()>=5 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE))
end end
function c63845230.spop(e,tp,eg,ep,ev,re,r,rp,c) function c63845230.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local ct=-ft+1
local g=Duel.GetMatchingGroup(c63845230.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c) local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c,POS_FACEDOWN)
local rg=nil local rg=nil
if ft<=0 then if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
...@@ -98,7 +95,7 @@ function c63845230.val(e,c) ...@@ -98,7 +95,7 @@ function c63845230.val(e,c)
end end
function c63845230.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c63845230.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToRemove() and not tc:IsType(TYPE_TOKEN) end if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToRemove(tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end end
function c63845230.rmop(e,tp,eg,ep,ev,re,r,rp) function c63845230.rmop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -27,7 +27,7 @@ function c71197066.initial_effect(c) ...@@ -27,7 +27,7 @@ function c71197066.initial_effect(c)
end end
function c71197066.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c71197066.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,8) local g=Duel.GetDecktopGroup(tp,8)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==8 end if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==8 end
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end end
...@@ -43,9 +43,9 @@ function c71197066.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,9 +43,9 @@ function c71197066.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c71197066.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c71197066.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,3,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,3,nil,POS_FACEDOWN) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,3,3,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,3,3,nil,POS_FACEDOWN)
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end end
function c71197066.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71197066.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -43,7 +43,7 @@ function c72283691.mtcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c72283691.mtcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c72283691.mtop(e,tp,eg,ep,ev,re,r,rp) function c72283691.mtop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,10) local g=Duel.GetDecktopGroup(tp,10)
if g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==10 then if g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==10 then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
else else
......
...@@ -19,9 +19,9 @@ function c73414375.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,9 +19,9 @@ function c73414375.operation(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil) local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil)
g:Merge(rg) g:Merge(rg)
end end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(73414375,1)) then if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,nil,1-tp) and Duel.SelectYesNo(1-tp,aux.Stringid(73414375,1)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,3,nil) local rg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,3,nil,1-tp)
g:Merge(rg) g:Merge(rg)
end end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
......
...@@ -76,7 +76,7 @@ function c77498348.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -76,7 +76,7 @@ function c77498348.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetLabel()==ATTRIBUTE_LIGHT then if e:GetLabel()==ATTRIBUTE_LIGHT then
return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else else
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN)
end end
end end
if e:GetLabel()==ATTRIBUTE_LIGHT then if e:GetLabel()==ATTRIBUTE_LIGHT then
...@@ -96,7 +96,7 @@ function c77498348.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +96,7 @@ function c77498348.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
else else
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,tp,POS_FACEDOWN)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local rg=g:RandomSelect(tp,1) local rg=g:RandomSelect(tp,1)
local tc=rg:GetFirst() local tc=rg:GetFirst()
......
...@@ -11,7 +11,7 @@ function c81223446.initial_effect(c) ...@@ -11,7 +11,7 @@ function c81223446.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c81223446.filter1(c) function c81223446.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove(tp,POS_FACEDOWN)
end end
function c81223446.filter2(c,e,tp,m,f,chkf) function c81223446.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
......
...@@ -10,12 +10,12 @@ function c82257940.initial_effect(c) ...@@ -10,12 +10,12 @@ function c82257940.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c82257940.target(e,tp,eg,ep,ev,re,r,rp,chk) function c82257940.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil,1-tp,POS_FACEDOWN) end
end end
function c82257940.activate(e,tp,eg,ep,ev,re,r,rp) function c82257940.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_DECK,0,nil) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_DECK,0,nil,tp,POS_FACEDOWN)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,nil) local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,nil,1-tp,POS_FACEDOWN)
if g1:GetCount()==0 or g2:GetCount()==0 then return end if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg1=g1:Select(tp,1,1,nil) local rg1=g1:Select(tp,1,1,nil)
......
...@@ -11,7 +11,7 @@ function c84640866.initial_effect(c) ...@@ -11,7 +11,7 @@ function c84640866.initial_effect(c)
end end
function c84640866.filter(c,tp) function c84640866.filter(c,tp)
return c:GetSummonPlayer()~=tp and bit.band(c:GetSummonLocation(),LOCATION_DECK+LOCATION_GRAVE)~=0 return c:GetSummonPlayer()~=tp and bit.band(c:GetSummonLocation(),LOCATION_DECK+LOCATION_GRAVE)~=0
and c:IsAbleToRemove() and c:IsLocation(LOCATION_MZONE) and c:IsAbleToRemove(tp,POS_FACEDOWN) and c:IsLocation(LOCATION_MZONE)
end end
function c84640866.target(e,tp,eg,ep,ev,re,r,rp,chk) function c84640866.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c84640866.filter,nil,tp) local g=eg:Filter(c84640866.filter,nil,tp)
......
...@@ -14,7 +14,7 @@ function c90384300.initial_effect(c) ...@@ -14,7 +14,7 @@ function c90384300.initial_effect(c)
end end
function c90384300.costfilter(c) function c90384300.costfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER)
and not c:IsSummonableCard() and not c:IsType(TYPE_TOKEN) and c:IsAbleToRemoveAsCost() and not c:IsSummonableCard() and c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end end
function c90384300.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c90384300.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90384300.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c90384300.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end
......
...@@ -15,7 +15,7 @@ function c94446564.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,7 +15,7 @@ function c94446564.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
local g2=Duel.GetDecktopGroup(1-tp,1) local g2=Duel.GetDecktopGroup(1-tp,1)
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
return tc1 and tc2 and tc1:IsAbleToRemove() and tc2:IsAbleToRemove() and tc1:IsAbleToHand() and tc2:IsAbleToHand() return tc1 and tc2 and tc1:IsAbleToRemove(tp) and tc2:IsAbleToRemove(1-tp) and tc1:IsAbleToHand() and tc2:IsAbleToHand()
end end
end end
function c94446564.activate(e,tp,eg,ep,ev,re,r,rp) function c94446564.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -53,14 +53,14 @@ function c95474755.excost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,14 +53,14 @@ function c95474755.excost(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 c95474755.extg(e,tp,eg,ep,ev,re,r,rp,chk) function c95474755.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end end
function c95474755.exop(e,tp,eg,ep,ev,re,r,rp) function c95474755.exop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end end
function c95474755.regop(e,tp,eg,ep,ev,re,r,rp) function c95474755.regop(e,tp,eg,ep,ev,re,r,rp)
...@@ -70,9 +70,9 @@ function c95474755.grcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,9 +70,9 @@ function c95474755.grcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(95474755)~=0 return e:GetHandler():GetFlagEffect(95474755)~=0
end end
function c95474755.grtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95474755.grtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil,tp,POS_FACEDOWN) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil,tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end end
function c95474755.grop(e,tp,eg,ep,ev,re,r,rp) function c95474755.grop(e,tp,eg,ep,ev,re,r,rp)
...@@ -91,7 +91,7 @@ function c95474755.dktg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,7 +91,7 @@ function c95474755.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c95474755.dkfilter,tp,0,LOCATION_REMOVED,nil,1-tp) local ct=Duel.GetMatchingGroupCount(c95474755.dkfilter,tp,0,LOCATION_REMOVED,nil,1-tp)
local tg=Duel.GetDecktopGroup(1-tp,ct) local tg=Duel.GetDecktopGroup(1-tp,ct)
if chk==0 then return ct>0 if chk==0 then return ct>0
and tg:FilterCount(Card.IsAbleToRemove,nil)==ct end and tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==ct end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,1-tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,1-tp,LOCATION_DECK)
end end
function c95474755.dkop(e,tp,eg,ep,ev,re,r,rp) function c95474755.dkop(e,tp,eg,ep,ev,re,r,rp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment