Commit cc8b147e authored by nanahira's avatar nanahira Committed by GitHub

add Auxiliary.AddContactFusionProcedure (#1148)

* add Auxiliary.AddContactFusionProcedure

* Changes for #1173
parent 0ab45522
......@@ -3,6 +3,7 @@ function c11502550.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,54959865,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c11502550.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c11502550.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11502550.spcon)
e2:SetOperation(c11502550.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11502550,0))
......@@ -51,37 +43,6 @@ c11502550.neos_fusion=true
function c11502550.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c11502550.matfilter(c)
return c:IsFusionCode(89943723,54959865) and c:IsAbleToDeckOrExtraAsCost()
end
function c11502550.spfilter1(c,tp,g)
return g:IsExists(c11502550.spfilter2,1,c,tp,c)
end
function c11502550.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(54959865)
or c:IsFusionCode(54959865) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11502550.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c11502550.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c11502550.spfilter1,1,nil,tp,g)
end
function c11502550.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c11502550.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c11502550.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c11502550.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c11502550.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,21 +3,13 @@ function c12678870.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x10b5),aux.FilterBoolFunction(Card.IsFusionSetCard,0x20b5),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c12678870.sprcon)
e2:SetOperation(c12678870.sprop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -39,35 +31,6 @@ function c12678870.initial_effect(c)
e4:SetOperation(c12678870.spop)
c:RegisterEffect(e4)
end
function c12678870.matfilter(c)
return (c:IsFusionSetCard(0x10b5) or c:IsFusionSetCard(0x20b5))
and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c12678870.spfilter1(c,tp,g)
return g:IsExists(c12678870.spfilter2,1,c,tp,c)
end
function c12678870.spfilter2(c,tp,mc)
return (c:IsFusionSetCard(0x10b5) and mc:IsFusionSetCard(0x20b5)
or c:IsFusionSetCard(0x20b5) and mc:IsFusionSetCard(0x10b5))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c12678870.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c12678870.matfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c12678870.spfilter1,1,nil,tp,g)
end
function c12678870.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c12678870.matfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c12678870.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c12678870.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c12678870.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
......
......@@ -3,6 +3,7 @@ function c1561110.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,30012506,77411244,3405259,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c1561110.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c1561110.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c1561110.spcon)
e2:SetOperation(c1561110.spop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1561110,0))
......@@ -51,47 +43,6 @@ end
function c1561110.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c1561110.cfilter(c)
return c:IsFusionCode(30012506,77411244,3405259) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c1561110.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c1561110.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c1561110.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c1561110.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c1561110.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c1561110.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c1561110.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c1561110.fselect,1,nil,tp,mg,sg,30012506,77411244,3405259)
end
function c1561110.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c1561110.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c1561110.fselect,1,1,sg,tp,mg,sg,30012506,77411244,3405259)
sg:Merge(g)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c1561110.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -3,6 +3,7 @@ function c15661378.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c15661378.ffilter,3,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL):SetValue(1)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,16 +11,6 @@ function c15661378.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c15661378.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c15661378.spcon)
e2:SetOperation(c15661378.spop)
e2:SetValue(1)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(15661378,0))
......@@ -46,38 +37,6 @@ function c15661378.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
or st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c15661378.cfilter(c,fc)
return c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(fc)
end
function c15661378.fselect(c,tp,mg,sg)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c15661378.fselect,1,sg,tp,mg,sg)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
res=sg:GetClassCount(Card.GetFusionCode)==3
end
sg:RemoveCard(c)
return res
end
function c15661378.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c15661378.cfilter,tp,LOCATION_MZONE,0,nil,c)
local sg=Group.CreateGroup()
return mg:IsExists(c15661378.fselect,1,nil,tp,mg,sg)
end
function c15661378.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c15661378.cfilter,tp,LOCATION_MZONE,0,nil,c)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c15661378.fselect,1,1,sg,tp,mg,sg)
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c15661378.mfilter(c)
return c:GetOriginalRace()~=RACE_DRAGON
end
......
......@@ -3,6 +3,7 @@ function c17032740.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,43237273,17732278,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c17032740.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c17032740.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c17032740.spcon)
e2:SetOperation(c17032740.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032740,0))
......@@ -54,51 +46,6 @@ c17032740.card_code_list={89943723}
function c17032740.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c17032740.cfilter(c)
return c:IsFusionCode(89943723,43237273,17732278) and c:IsAbleToDeckOrExtraAsCost()
end
function c17032740.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c17032740.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c17032740.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c17032740.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c17032740.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c17032740.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c17032740.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c17032740.fselect,1,nil,tp,mg,sg,89943723,43237273,17732278)
end
function c17032740.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c17032740.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c17032740.fselect,1,1,sg,tp,mg,sg,89943723,43237273,17732278)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c17032740.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,6 +3,7 @@ function c2111707.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,62651957,65622692,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c2111707.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c2111707.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c2111707.spcon)
e2:SetOperation(c2111707.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2111707,0))
......@@ -34,33 +26,6 @@ end
function c2111707.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
end
function c2111707.matfilter(c)
return c:IsFusionCode(62651957,65622692) and c:IsAbleToRemoveAsCost()
end
function c2111707.spfilter1(c,tp,g)
return g:IsExists(c2111707.spfilter2,1,c,tp,c)
end
function c2111707.spfilter2(c,tp,mc)
return (c:IsFusionCode(62651957) and mc:IsFusionCode(65622692)
or c:IsFusionCode(65622692) and mc:IsFusionCode(62651957))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c2111707.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c2111707.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c2111707.spfilter1,1,nil,tp,g)
end
function c2111707.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c2111707.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c2111707.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c2111707.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c2111707.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -3,6 +3,7 @@ function c2129638.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeRep(c,89631139,2,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c2129638.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c2129638.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c2129638.spcon)
e2:SetOperation(c2129638.spop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -49,32 +41,6 @@ end
function c2129638.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c2129638.spfilter(c,fc)
return c:IsFusionCode(89631139) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToGraveAsCost()
end
function c2129638.spfilter1(c,tp,g)
return g:IsExists(c2129638.spfilter2,1,c,tp,c)
end
function c2129638.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c2129638.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c2129638.spfilter,tp,LOCATION_MZONE,0,nil,c)
return g:IsExists(c2129638.spfilter1,1,nil,tp,g)
end
function c2129638.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c2129638.spfilter,tp,LOCATION_MZONE,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c2129638.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c2129638.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.SendtoGrave(g1,REASON_COST)
end
function c2129638.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -2,6 +2,8 @@
function c22638495.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsType,TYPE_PENDULUM),aux.AND(aux.FilterBoolFunction(Card.IsType,TYPE_PENDULUM),aux.FilterBoolFunction(Card.IsFusionSetCard,0xc7)),false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_FUSION+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -9,24 +11,6 @@ function c22638495.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c22638495.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c22638495.spcon)
e2:SetOperation(c22638495.spop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c22638495.sptg)
e3:SetOperation(c22638495.spop2)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
......@@ -48,33 +32,6 @@ end
function c22638495.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c22638495.rfilter(c,fc)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeFusionMaterial(fc)
end
function c22638495.spfilter1(c,tp,g)
return g:IsExists(c22638495.spfilter2,1,c,tp,c)
end
function c22638495.spfilter2(c,tp,mc)
return (c:IsFusionSetCard(0xc7) or mc:IsFusionSetCard(0xc7))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c22638495.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(c22638495.rfilter,nil,c)
return rg:IsExists(c22638495.spfilter1,1,nil,tp,rg)
end
function c22638495.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c22638495.rfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=rg:FilterSelect(tp,c22638495.spfilter1,1,1,nil,tp,rg)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:FilterSelect(tp,c22638495.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c22638495.spfilter(c,e,tp)
return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -3,6 +3,7 @@ function c25119460.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,65622692,64500000,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c25119460.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c25119460.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c25119460.spcon)
e2:SetOperation(c25119460.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(25119460,0))
......@@ -34,33 +26,6 @@ end
function c25119460.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
end
function c25119460.matfilter(c)
return c:IsFusionCode(65622692,64500000) and c:IsAbleToRemoveAsCost()
end
function c25119460.spfilter1(c,tp,g)
return g:IsExists(c25119460.spfilter2,1,c,tp,c)
end
function c25119460.spfilter2(c,tp,mc)
return (c:IsFusionCode(65622692) and mc:IsFusionCode(64500000)
or c:IsFusionCode(64500000) and mc:IsFusionCode(65622692))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c25119460.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c25119460.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c25119460.spfilter1,1,nil,tp,g)
end
function c25119460.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c25119460.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c25119460.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c25119460.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c25119460.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -3,6 +3,7 @@ function c27346636.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,78868776,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),2,true,true)
aux.AddContactFusionProcedure(c,c27346636.cfilter,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,16 +11,6 @@ function c27346636.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c27346636.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27346636,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c27346636.sprcon)
e2:SetOperation(c27346636.sprop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(27346636,0))
......@@ -39,45 +30,7 @@ function c27346636.splimit(e,se,sp,st)
end
function c27346636.cfilter(c)
return (c:IsFusionCode(78868776) or c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER))
and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost()
end
function c27346636.fcheck(c,sg)
return c:IsFusionCode(78868776) and sg:IsExists(c27346636.fcheck2,2,c)
end
function c27346636.fcheck2(c)
return c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER)
end
function c27346636.fselect(c,tp,mg,sg)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c27346636.fselect,1,sg,tp,mg,sg)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
res=sg:IsExists(c27346636.fcheck,1,nil,sg)
end
sg:RemoveCard(c)
return res
end
function c27346636.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c27346636.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c27346636.fselect,1,nil,tp,mg,sg)
end
function c27346636.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c27346636.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c27346636.fselect,1,1,sg,tp,mg,sg)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)
and c:IsAbleToDeckOrExtraAsCost()
end
function c27346636.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
......
......@@ -3,6 +3,7 @@ function c28677304.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,43237273,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c28677304.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c28677304.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c28677304.spcon)
e2:SetOperation(c28677304.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28677304,0))
......@@ -54,37 +46,6 @@ c28677304.neos_fusion=true
function c28677304.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c28677304.matfilter(c)
return c:IsFusionCode(89943723,43237273) and c:IsAbleToDeckOrExtraAsCost()
end
function c28677304.spfilter1(c,tp,g)
return g:IsExists(c28677304.spfilter2,1,c,tp,c)
end
function c28677304.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(43237273)
or c:IsFusionCode(43237273) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c28677304.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c28677304.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c28677304.spfilter1,1,nil,tp,g)
end
function c28677304.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c28677304.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c28677304.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c28677304.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c28677304.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -2,6 +2,7 @@
function c30864377.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c30864377.matfilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_MZONE,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -9,16 +10,6 @@ function c30864377.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c30864377.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30864377,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c30864377.sprcon)
e2:SetOperation(c30864377.sprop)
c:RegisterEffect(e2)
--cannot be fusion material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -55,31 +46,6 @@ end
function c30864377.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c30864377.fspfilter(c)
return c30864377.matfilter(c) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial()
end
function c30864377.spfilter1(c,tp,g)
return g:IsExists(c30864377.spfilter2,1,c,tp,c)
end
function c30864377.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c30864377.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c30864377.fspfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c30864377.spfilter1,1,nil,tp,g)
end
function c30864377.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c30864377.fspfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c30864377.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c30864377.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c30864377.espfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and not c:IsCode(30864377)
and c:IsCanBeSpecialSummoned(e,124,tp,true,false)
......
......@@ -2,6 +2,7 @@
function c33964637.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c33964637.ffilter,3,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -9,15 +10,6 @@ function c33964637.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c33964637.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c33964637.sprcon)
e2:SetOperation(c33964637.sprop)
c:RegisterEffect(e2)
--fusion limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -53,35 +45,6 @@ end
function c33964637.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x3d) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c33964637.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c33964637.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function c33964637.sprfilter1(c,tp,fc)
return c:IsFusionSetCard(0x3d) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(c33964637.sprfilter2,tp,LOCATION_MZONE,0,1,c,tp,fc,c)
end
function c33964637.sprfilter2(c,tp,fc,mc)
return c:IsFusionSetCard(0x3d) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(fc) and not c:IsFusionAttribute(mc:GetFusionAttribute())
and Duel.IsExistingMatchingCard(c33964637.sprfilter3,tp,LOCATION_MZONE,0,1,c,tp,fc,mc,c)
end
function c33964637.sprfilter3(c,tp,fc,mc1,mc2)
local g=Group.FromCards(c,mc1,mc2)
return c:IsFusionSetCard(0x3d) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(fc) and not c:IsFusionAttribute(mc1:GetFusionAttribute()) and not c:IsFusionAttribute(mc2:GetFusionAttribute())
and Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function c33964637.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c33964637.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c33964637.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),tp,c,g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,c33964637.sprfilter3,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),tp,c,g1:GetFirst(),g2:GetFirst())
g1:Merge(g2)
g1:Merge(g3)
Duel.SendtoGrave(g1,REASON_COST)
end
function c33964637.costfilter(c,tp)
return c:IsSetCard(0x3d) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
......
......@@ -2,6 +2,7 @@
function c3779662.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,7573135,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),2,true,true)
aux.AddContactFusionProcedure(c,c3779662.cfilter,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST):SetValue(1)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -9,17 +10,6 @@ function c3779662.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c3779662.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(3779662,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetValue(1)
e2:SetCondition(c3779662.sprcon)
e2:SetOperation(c3779662.sprop)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(3779662,4))
......@@ -49,45 +39,7 @@ function c3779662.splimit(e,se,sp,st)
end
function c3779662.cfilter(c)
return (c:IsFusionCode(7573135) or c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER))
and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost()
end
function c3779662.fcheck(c,sg)
return c:IsFusionCode(7573135) and sg:IsExists(c3779662.fcheck2,2,c)
end
function c3779662.fcheck2(c)
return c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER)
end
function c3779662.fselect(c,tp,mg,sg)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c3779662.fselect,1,sg,tp,mg,sg)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
res=sg:IsExists(c3779662.fcheck,1,nil,sg)
end
sg:RemoveCard(c)
return res
end
function c3779662.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c3779662.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c3779662.fselect,1,nil,tp,mg,sg)
end
function c3779662.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c3779662.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c3779662.fselect,1,1,sg,tp,mg,sg)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)
and c:IsAbleToDeckOrExtraAsCost()
end
function c3779662.espcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
......@@ -3,6 +3,7 @@ function c40080312.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,80344569,43237273,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c40080312.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c40080312.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c40080312.spcon)
e2:SetOperation(c40080312.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40080312,0))
......@@ -52,51 +44,6 @@ c40080312.card_code_list={89943723}
function c40080312.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c40080312.cfilter(c)
return c:IsFusionCode(89943723,80344569,43237273) and c:IsAbleToDeckOrExtraAsCost()
end
function c40080312.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c40080312.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c40080312.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c40080312.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c40080312.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c40080312.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c40080312.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c40080312.fselect,1,nil,tp,mg,sg,89943723,80344569,43237273)
end
function c40080312.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c40080312.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c40080312.fselect,1,1,sg,tp,mg,sg,89943723,80344569,43237273)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c40080312.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,6 +3,7 @@ function c43378048.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,6007213,32491822,69890967,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c43378048.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c43378048.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c43378048.spcon)
e2:SetOperation(c43378048.spop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -38,47 +30,6 @@ end
function c43378048.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c43378048.cfilter(c)
return c:IsFaceup() and c:IsFusionCode(6007213,32491822,69890967) and c:IsAbleToRemoveAsCost()
end
function c43378048.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c43378048.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c43378048.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c43378048.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c43378048.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c43378048.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c43378048.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c43378048.fselect,1,nil,tp,mg,sg,6007213,32491822,69890967)
end
function c43378048.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c43378048.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c43378048.fselect,1,1,sg,tp,mg,sg,6007213,32491822,69890967)
sg:Merge(g)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c43378048.atkcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
......@@ -3,6 +3,7 @@ function c43387895.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c43387895.ffilter,2,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_FUSION+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c43387895.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c43387895.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c43387895.spcon)
e2:SetOperation(c43387895.spop)
c:RegisterEffect(e2)
--copy effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43387895,0))
......@@ -37,32 +29,6 @@ end
function c43387895.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c43387895.spfilter(c,fc)
return c43387895.ffilter(c) and c:IsCanBeFusionMaterial(fc)
end
function c43387895.spfilter1(c,tp,g)
return g:IsExists(c43387895.spfilter2,1,c,tp,c)
end
function c43387895.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c43387895.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetReleaseGroup(tp):Filter(c43387895.spfilter,nil,c)
return g:IsExists(c43387895.spfilter1,1,nil,tp,g)
end
function c43387895.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetReleaseGroup(tp):Filter(c43387895.spfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,c43387895.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=g:FilterSelect(tp,c43387895.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c43387895.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(41209827)==0 end
e:GetHandler():RegisterFlagEffect(41209827,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
......
......@@ -3,21 +3,13 @@ function c48063985.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x10b5),aux.FilterBoolFunction(Card.IsFusionSetCard,0x20b5),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c48063985.sprcon)
e2:SetOperation(c48063985.sprop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48063985,0))
......@@ -43,35 +35,6 @@ function c48063985.initial_effect(c)
e4:SetOperation(c48063985.spop)
c:RegisterEffect(e4)
end
function c48063985.matfilter(c)
return (c:IsFusionSetCard(0x10b5) or c:IsFusionSetCard(0x20b5))
and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c48063985.spfilter1(c,tp,g)
return g:IsExists(c48063985.spfilter2,1,c,tp,c)
end
function c48063985.spfilter2(c,tp,mc)
return (c:IsFusionSetCard(0x10b5) and mc:IsFusionSetCard(0x20b5)
or c:IsFusionSetCard(0x20b5) and mc:IsFusionSetCard(0x10b5))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c48063985.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c48063985.matfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c48063985.spfilter1,1,nil,tp,g)
end
function c48063985.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c48063985.matfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c48063985.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c48063985.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c48063985.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb5)
end
......
......@@ -3,6 +3,7 @@ function c48156348.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,41470137,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),1,true,true)
aux.AddContactFusionProcedure(c,c48156348.cfilter,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -47,7 +48,7 @@ function c48156348.splimit(e,se,sp,st)
end
function c48156348.cfilter(c)
return (c:IsFusionCode(41470137) or c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER))
and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost()
and c:IsAbleToDeckOrExtraAsCost()
end
function c48156348.spfilter1(c,tp,g)
return g:IsExists(c48156348.spfilter2,1,c,tp,c)
......
......@@ -3,6 +3,7 @@ function c48996569.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,80344569,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c48996569.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c48996569.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c48996569.spcon)
e2:SetOperation(c48996569.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48996569,0))
......@@ -54,37 +46,6 @@ c48996569.neos_fusion=true
function c48996569.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c48996569.matfilter(c)
return c:IsFusionCode(89943723,80344569) and c:IsAbleToDeckOrExtraAsCost()
end
function c48996569.spfilter1(c,tp,g)
return g:IsExists(c48996569.spfilter2,1,c,tp,c)
end
function c48996569.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(80344569)
or c:IsFusionCode(80344569) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c48996569.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c48996569.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c48996569.spfilter1,1,nil,tp,g)
end
function c48996569.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c48996569.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c48996569.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c48996569.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c48996569.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,6 +3,7 @@ function c49352945.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,17955766,54959865,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c49352945.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c49352945.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c49352945.spcon)
e2:SetOperation(c49352945.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49352945,0))
......@@ -61,51 +53,6 @@ c49352945.card_code_list={89943723}
function c49352945.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c49352945.cfilter(c)
return c:IsFusionCode(89943723,17955766,54959865) and c:IsAbleToDeckOrExtraAsCost()
end
function c49352945.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c49352945.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c49352945.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c49352945.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c49352945.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c49352945.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c49352945.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c49352945.fselect,1,nil,tp,mg,sg,89943723,17955766,54959865)
end
function c49352945.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c49352945.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c49352945.fselect,1,1,sg,tp,mg,sg,89943723,17955766,54959865)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c49352945.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,6 +3,7 @@ function c5128859.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,78734254,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c5128859.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c5128859.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c5128859.spcon)
e2:SetOperation(c5128859.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5128859,0))
......@@ -36,37 +28,6 @@ c5128859.neos_fusion=true
function c5128859.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c5128859.matfilter(c)
return c:IsFusionCode(89943723,78734254) and c:IsAbleToDeckOrExtraAsCost()
end
function c5128859.spfilter1(c,tp,g)
return g:IsExists(c5128859.spfilter2,1,c,tp,c)
end
function c5128859.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(78734254)
or c:IsFusionCode(78734254) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c5128859.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c5128859.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c5128859.spfilter1,1,nil,tp,g)
end
function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c5128859.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c5128859.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c5128859.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c5128859.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
......
......@@ -3,6 +3,7 @@ function c53315891.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,80019195,85800949,84565800,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_ONFIELD,0,Duel.SendtoGrave,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -45,47 +46,6 @@ function c53315891.initial_effect(c)
e5:SetOperation(c53315891.spop)
c:RegisterEffect(e5)
end
function c53315891.cfilter(c)
return c:IsFusionCode(80019195,85800949,84565800) and c:IsAbleToGraveAsCost()
end
function c53315891.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c53315891.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c53315891.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c53315891.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c53315891.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c53315891.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c53315891.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c53315891.fselect,1,nil,tp,mg,sg,80019195,85800949,84565800)
end
function c53315891.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c53315891.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=mg:FilterSelect(tp,c53315891.fselect,1,1,sg,tp,mg,sg,80019195,85800949,84565800)
sg:Merge(g)
end
Duel.SendtoGrave(sg,REASON_COST)
end
function c53315891.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......
......@@ -3,6 +3,7 @@ function c55171412.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,17955766,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c55171412.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c55171412.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c55171412.spcon)
e2:SetOperation(c55171412.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55171412,0))
......@@ -54,37 +46,6 @@ c55171412.neos_fusion=true
function c55171412.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c55171412.matfilter(c)
return c:IsFusionCode(89943723,17955766) and c:IsAbleToDeckOrExtraAsCost()
end
function c55171412.spfilter1(c,tp,g)
return g:IsExists(c55171412.spfilter2,1,c,tp,c)
end
function c55171412.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(17955766)
or c:IsFusionCode(17955766) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c55171412.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c55171412.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c55171412.spfilter1,1,nil,tp,g)
end
function c55171412.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c55171412.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c55171412.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c55171412.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c55171412.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
--聖霊獣騎 ガイアペライオ
function c56655675.initial_effect(c)
c:EnableReviveLimit()
local mat_list={}
for i=0,2 do
table.insert(mat_list,aux.FilterBoolFunction(Card.IsFusionSetCard,0xb5|(0x1000<<i)))
end
aux.AddFusionProcMix(c,false,false,table.unpack(mat_list))
aux.AddContactFusionProcedure(c,c56655675.cfilter,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST):SetValue(1)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -28,46 +34,7 @@ function c56655675.initial_effect(c)
end
function c56655675.cfilter(c)
return (c:IsFusionSetCard(0x40b5) or c:IsFusionSetCard(0x10b5) or c:IsFusionSetCard(0x20b5))
and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c56655675.fcheck(c,sg,g,code,...)
if not c:IsFusionSetCard(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c56655675.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c56655675.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c56655675.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c56655675.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c56655675.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c56655675.cfilter,tp,LOCATION_MZONE,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c56655675.fselect,1,nil,tp,mg,sg,0x40b5,0x10b5,0x20b5)
end
function c56655675.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c56655675.cfilter,tp,LOCATION_MZONE,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c56655675.fselect,1,1,sg,tp,mg,sg,0x40b5,0x10b5,0x20b5)
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
and c:IsAbleToRemoveAsCost()
end
function c56655675.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
......@@ -3,6 +3,7 @@ function c58859575.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,51638941,96300057,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c58859575.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c58859575.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c58859575.spcon)
e2:SetOperation(c58859575.spop)
c:RegisterEffect(e2)
--pos
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(58859575,0))
......@@ -34,33 +26,6 @@ end
function c58859575.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c58859575.matfilter(c)
return c:IsFusionCode(51638941,96300057) and c:IsAbleToRemoveAsCost()
end
function c58859575.spfilter1(c,tp,g)
return g:IsExists(c58859575.spfilter2,1,c,tp,c)
end
function c58859575.spfilter2(c,tp,mc)
return (c:IsFusionCode(51638941) and mc:IsFusionCode(96300057)
or c:IsFusionCode(96300057) and mc:IsFusionCode(51638941))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c58859575.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c58859575.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c58859575.spfilter1,1,nil,tp,g)
end
function c58859575.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c58859575.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c58859575.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c58859575.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c58859575.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -3,6 +3,7 @@ function c72378329.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c72378329.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_FUSION+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c72378329.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c72378329.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c72378329.spcon)
e2:SetOperation(c72378329.spop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
......@@ -42,35 +34,6 @@ end
function c72378329.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c72378329.rfilter(c,fc)
return (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_BEAST))
and c:IsCanBeFusionMaterial(fc)
end
function c72378329.spfilter1(c,tp,g)
return g:IsExists(c72378329.spfilter2,1,c,tp,c)
end
function c72378329.spfilter2(c,tp,mc)
return (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsRace(RACE_BEAST)
or c:IsRace(RACE_BEAST) and mc:IsRace(RACE_DRAGON) and mc:IsAttribute(ATTRIBUTE_DARK))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c72378329.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(c72378329.rfilter,nil,c)
return rg:IsExists(c72378329.spfilter1,1,nil,tp,rg)
end
function c72378329.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c72378329.rfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=rg:FilterSelect(tp,c72378329.spfilter1,1,1,nil,tp,rg)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:FilterSelect(tp,c72378329.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c72378329.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -3,6 +3,7 @@ function c73285669.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_MZONE,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -23,28 +24,3 @@ end
function c73285669.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c73285669.spfilter(c)
return c:IsFusionSetCard(0x19) and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost()
end
function c73285669.spfilter1(c,tp,g)
return g:IsExists(c73285669.spfilter2,1,c,tp,c)
end
function c73285669.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c73285669.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c73285669.spfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c73285669.spfilter1,1,nil,tp,g)
end
function c73285669.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c73285669.spfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c73285669.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c73285669.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
......@@ -3,6 +3,7 @@ function c75906310.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,84243274,73879377,true,true)
aux.AddContactFusionProcedure(c,c75906310.cfilter,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c75906310.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c75906310.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c75906310.spcon)
e2:SetOperation(c75906310.spop)
c:RegisterEffect(e2)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......@@ -63,47 +55,9 @@ end
function c75906310.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c75906310.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsFusionCode(84243274,73879377) and c:IsAbleToRemoveAsCost()
end
function c75906310.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c75906310.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c75906310.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<2 then
res=mg:IsExists(c75906310.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c75906310.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c75906310.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c75906310.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local sg=Group.CreateGroup()
return Duel.GetFlagEffect(tp,75906310)>0 and Duel.GetFlagEffect(tp,75906311)>0
and mg:IsExists(c75906310.fselect,1,nil,tp,mg,sg,84243274,73879377)
end
function c75906310.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c75906310.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c75906310.fselect,1,1,sg,tp,mg,sg,84243274,73879377)
sg:Merge(g)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
function c75906310.cfilter(c,fc)
local tp=fc:GetControler()
return c:IsFusionCode(84243274,73879377) and c:IsAbleToRemoveAsCost() and Duel.GetFlagEffect(tp,75906310)>0 and Duel.GetFlagEffect(tp,75906311)>0
end
function c75906310.acfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
......
......@@ -3,6 +3,7 @@ function c78512663.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,89621922,80344569,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c78512663.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c78512663.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c78512663.spcon)
e2:SetOperation(c78512663.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(78512663,0))
......@@ -59,51 +51,6 @@ c78512663.card_code_list={89943723}
function c78512663.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c78512663.cfilter(c)
return c:IsFusionCode(89943723,89621922,80344569) and c:IsAbleToDeckOrExtraAsCost()
end
function c78512663.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c78512663.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c78512663.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c78512663.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c78512663.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c78512663.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c78512663.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c78512663.fselect,1,nil,tp,mg,sg,89943723,89621922,80344569)
end
function c78512663.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c78512663.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c78512663.fselect,1,1,sg,tp,mg,sg,89943723,89621922,80344569)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c78512663.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_ONFIELD,LOCATION_ONFIELD)*400
end
......
......@@ -4,6 +4,7 @@ function c80532587.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionType,TYPE_SYNCHRO),aux.FilterBoolFunction(Card.IsFusionType,TYPE_XYZ),false)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -3,6 +3,7 @@ function c81566151.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,89621922,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c81566151.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c81566151.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c81566151.spcon)
e2:SetOperation(c81566151.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(81566151,0))
......@@ -51,37 +43,6 @@ c81566151.neos_fusion=true
function c81566151.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c81566151.matfilter(c)
return c:IsFusionCode(89943723,89621922) and c:IsAbleToDeckOrExtraAsCost()
end
function c81566151.spfilter1(c,tp,g)
return g:IsExists(c81566151.spfilter2,1,c,tp,c)
end
function c81566151.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(89621922)
or c:IsFusionCode(89621922) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c81566151.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c81566151.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c81566151.spfilter1,1,nil,tp,g)
end
function c81566151.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c81566151.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c81566151.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c81566151.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c81566151.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,6 +3,7 @@ function c84243274.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,58859575,91998119,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c84243274.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c84243274.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c84243274.spcon)
e2:SetOperation(c84243274.spop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(84243274,0))
......@@ -44,33 +36,6 @@ end
function c84243274.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c84243274.matfilter(c)
return c:IsFusionCode(58859575,91998119) and c:IsAbleToRemoveAsCost()
end
function c84243274.spfilter1(c,tp,g)
return g:IsExists(c84243274.spfilter2,1,c,tp,c)
end
function c84243274.spfilter2(c,tp,mc)
return (c:IsFusionCode(58859575) and mc:IsFusionCode(91998119)
or c:IsFusionCode(91998119) and mc:IsFusionCode(58859575))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c84243274.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c84243274.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c84243274.spfilter1,1,nil,tp,g)
end
function c84243274.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c84243274.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c84243274.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c84243274.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c84243274.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -3,6 +3,7 @@ function c85507811.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,17732278,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c85507811.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c85507811.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c85507811.spcon)
e2:SetOperation(c85507811.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(85507811,0))
......@@ -55,37 +47,6 @@ c85507811.neos_fusion=true
function c85507811.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c85507811.matfilter(c)
return c:IsFusionCode(89943723,17732278) and c:IsAbleToDeckOrExtraAsCost()
end
function c85507811.spfilter1(c,tp,g)
return g:IsExists(c85507811.spfilter2,1,c,tp,c)
end
function c85507811.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(17732278)
or c:IsFusionCode(17732278) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c85507811.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c85507811.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c85507811.spfilter1,1,nil,tp,g)
end
function c85507811.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c85507811.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c85507811.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c85507811.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c85507811.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,21 +3,13 @@ function c86274272.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x10b5),aux.FilterBoolFunction(Card.IsFusionSetCard,0x20b5),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c86274272.sprcon)
e2:SetOperation(c86274272.sprop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -40,35 +32,6 @@ function c86274272.initial_effect(c)
e4:SetOperation(c86274272.spop)
c:RegisterEffect(e4)
end
function c86274272.matfilter(c)
return (c:IsFusionSetCard(0x10b5) or c:IsFusionSetCard(0x20b5))
and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c86274272.spfilter1(c,tp,g)
return g:IsExists(c86274272.spfilter2,1,c,tp,c)
end
function c86274272.spfilter2(c,tp,mc)
return (c:IsFusionSetCard(0x10b5) and mc:IsFusionSetCard(0x20b5)
or c:IsFusionSetCard(0x20b5) and mc:IsFusionSetCard(0x10b5))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c86274272.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c86274272.matfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c86274272.spfilter1,1,nil,tp,g)
end
function c86274272.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c86274272.matfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c86274272.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c86274272.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c86274272.immcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
......
......@@ -3,6 +3,7 @@ function c90050480.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,c90050480.ffilter,3,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c90050480.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c90050480.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c90050480.sprcon)
e2:SetOperation(c90050480.sprop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90050480,0))
......@@ -54,46 +46,6 @@ end
function c90050480.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c90050480.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c90050480.sprfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp,c)
end
function c90050480.sprfilter1(c,tp,fc)
return c:IsFusionCode(89943723) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(c90050480.sprfilter2,tp,LOCATION_MZONE,0,1,c,tp,fc,c)
end
function c90050480.sprfilter2(c,tp,fc,mc)
return c:IsFusionSetCard(0x1f) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(c90050480.sprfilter3,tp,LOCATION_MZONE,0,1,Group.FromCards(c,mc),tp,fc,mc,c)
end
function c90050480.sprfilter3(c,tp,fc,mc1,mc2)
return c:IsFusionSetCard(0x1f) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc) and not c:IsFusionAttribute(mc2:GetFusionAttribute())
and Duel.IsExistingMatchingCard(c90050480.sprfilter4,tp,LOCATION_MZONE,0,1,Group.FromCards(c,mc1,mc2),tp,fc,mc1,mc2,c)
end
function c90050480.sprfilter4(c,tp,fc,mc1,mc2,mc3)
local g=Group.FromCards(c,mc1,mc2,mc3)
return c:IsFusionSetCard(0x1f) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc) and not c:IsFusionAttribute(mc2:GetFusionAttribute()) and not c:IsFusionAttribute(mc3:GetFusionAttribute())
and Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function c90050480.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,c90050480.sprfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,c90050480.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),tp,c,g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g3=Duel.SelectMatchingCard(tp,c90050480.sprfilter3,tp,LOCATION_MZONE,0,1,1,Group.FromCards(g1:GetFirst(),g2:GetFirst()),tp,c,g1:GetFirst(),g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g4=Duel.SelectMatchingCard(tp,c90050480.sprfilter4,tp,LOCATION_MZONE,0,1,1,Group.FromCards(g1:GetFirst(),g2:GetFirst(),g3:GetFirst()),tp,c,g1:GetFirst(),g2:GetFirst(),g3:GetFirst())
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c90050480.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
......
......@@ -3,6 +3,7 @@ function c90957527.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,79580323,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),1,true,true)
aux.AddContactFusionProcedure(c,c90957527.cfilter,LOCATION_ONFIELD,0,Duel.SendtoDeck,nil,2,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -48,35 +49,7 @@ function c90957527.splimit(e,se,sp,st)
end
function c90957527.cfilter(c)
return (c:IsFusionCode(79580323) or c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER))
and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost()
end
function c90957527.spfilter1(c,tp,g)
return g:IsExists(c90957527.spfilter2,1,c,tp,c)
end
function c90957527.spfilter2(c,tp,mc)
return (c:IsFusionCode(79580323) and mc:IsFusionSetCard(0x19) and mc:IsType(TYPE_MONSTER)
or c:IsFusionSetCard(0x19) and c:IsType(TYPE_MONSTER) and mc:IsFusionCode(79580323))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c90957527.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c90957527.cfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c90957527.spfilter1,1,nil,tp,g)
end
function c90957527.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c90957527.cfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c90957527.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c90957527.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
and c:IsAbleToDeckOrExtraAsCost()
end
function c90957527.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -3,6 +3,7 @@ function c91998119.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,62651957,65622692,64500000,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c91998119.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c91998119.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c91998119.spcon)
e2:SetOperation(c91998119.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(91998119,0))
......@@ -34,47 +26,6 @@ end
function c91998119.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
end
function c91998119.cfilter(c)
return c:IsFusionCode(62651957,65622692,64500000) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c91998119.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c91998119.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c91998119.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c91998119.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c91998119.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c91998119.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c91998119.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c91998119.fselect,1,nil,tp,mg,sg,62651957,65622692,64500000)
end
function c91998119.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c91998119.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c91998119.fselect,1,1,sg,tp,mg,sg,62651957,65622692,64500000)
sg:Merge(g)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c91998119.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -3,6 +3,7 @@ function c95793022.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c95793022.ffilter,3,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_FUSION+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -45,36 +46,6 @@ end
function c95793022.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c95793022.spfilter(c,fc)
return c95793022.ffilter(c) and c:IsCanBeFusionMaterial(fc)
end
function c95793022.spcheck(g,tp)
return Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function c95793022.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetReleaseGroup(tp):Filter(c95793022.spfilter,nil,c)
return g:CheckSubGroup(c95793022.spcheck,3,3,tp)
end
function c95793022.sptg(e,tp,eg,ep,ev,re,r,rp,check,c)
local g=Duel.GetReleaseGroup(tp):Filter(c95793022.spfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,c95793022.spcheck,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else
return false
end
end
function c95793022.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
c:SetMaterial(sg)
Duel.Release(sg,REASON_COST+REASON_FUSION+REASON_MATERIAL)
sg:DeleteGroup()
end
function c95793022.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
......
......@@ -3,6 +3,7 @@ function c99724761.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,62651957,64500000,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -10,15 +11,6 @@ function c99724761.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c99724761.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c99724761.spcon)
e2:SetOperation(c99724761.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99724761,0))
......@@ -34,33 +26,6 @@ end
function c99724761.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
end
function c99724761.matfilter(c)
return c:IsFusionCode(62651957,64500000) and c:IsAbleToRemoveAsCost()
end
function c99724761.spfilter1(c,tp,g)
return g:IsExists(c99724761.spfilter2,1,c,tp,c)
end
function c99724761.spfilter2(c,tp,mc)
return (c:IsFusionCode(62651957) and mc:IsFusionCode(64500000)
or c:IsFusionCode(64500000) and mc:IsFusionCode(62651957))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c99724761.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c99724761.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c99724761.spfilter1,1,nil,tp,g)
end
function c99724761.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c99724761.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c99724761.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:FilterSelect(tp,c99724761.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c99724761.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -1394,6 +1394,40 @@ function Auxiliary.FShaddollOperation(attr)
Duel.SetFusionMaterial(g)
end
end
function Auxiliary.AddContactFusionProcedure(c,filter,self_location,opponent_location,mat_operation,...)
local self_location=self_location or 0
local opponent_location=opponent_location or 0
local operation_params={...}
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(Auxiliary.ContactFusionCondition(filter,self_location,opponent_location))
e2:SetOperation(Auxiliary.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params))
c:RegisterEffect(e2)
return e2
end
function Auxiliary.ContactFusionMaterialFilter(c,fc,filter)
return c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL) and (not filter or filter(c,fc))
end
function Auxiliary.ContactFusionCondition(filter,self_location,opponent_location)
return function(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(Auxiliary.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter)
return c:CheckFusionMaterial(mg,nil,tp)
end
end
function Auxiliary.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(Auxiliary.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter)
local g=Duel.SelectFusionMaterial(tp,c,mg,nil,tp)
c:SetMaterial(g)
mat_operation(g,table.unpack(operation_params))
end
end
function Auxiliary.AddRitualProcUltimate(c,filter,level_function,greater_or_equal,summon_location,grave_filter,mat_filter)
summon_location=summon_location or LOCATION_HAND
local e1=Effect.CreateEffect(c)
......
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