Commit 528963af authored by VanillaSalt's avatar VanillaSalt

update

parent a0ed3abf
......@@ -56,7 +56,10 @@ function c31444249.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xbb) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp)
function c31444249.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=6
end
function c31444249.dmcon(tp)
return not Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,0,LOCATION_MZONE,1,nil)
end
......@@ -64,11 +67,15 @@ function c31444249.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp)
if c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) then
if c31444249.dmcon(tp) then
local sg=Duel.GetMatchingGroup(c31444249.filter0,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
Auxiliary.FCheckAdditional=c31444249.fcheck
end
end
local res=Duel.IsExistingMatchingCard(c31444249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
......@@ -85,11 +92,17 @@ end
function c31444249.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c31444249.filter1,nil,e)
if c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) then
local dmg=Duel.GetMatchingGroup(c31444249.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(dmg)
local exmat=false
if c31444249.dmcon(tp) then
local sg=Duel.GetMatchingGroup(c31444249.filter0,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
exmat=true
end
end
if exmat then Auxiliary.FCheckAdditional=c31444249.fcheck end
local sg1=Duel.GetMatchingGroup(c31444249.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
......@@ -106,12 +119,9 @@ function c31444249.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) then
local mgd=Duel.GetMatchingGroup(c31444249.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mgd)
tc:RegisterFlagEffect(31444249,RESET_CHAIN,0,1)
end
if exmat then Auxiliary.FCheckAdditional=c31444249.fcheck end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
......
......@@ -24,16 +24,18 @@ function c48144509.filter2(c,e,tp,m,f,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c48144509.fcheck(tp,sg,fc)
return not sg:IsContains(fc) and sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=2
return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=2
end
function c48144509.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToGrave,nil)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
Auxiliary.FCheckAdditional=c48144509.fcheck
local sg=Duel.GetMatchingGroup(c48144509.exfilter0,tp,LOCATION_EXTRA,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
Auxiliary.FCheckAdditional=c48144509.fcheck
end
end
local res=Duel.IsExistingMatchingCard(c48144509.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
......@@ -55,9 +57,11 @@ function c48144509.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(c48144509.filter1,nil,e)
local exmat=false
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
exmat=true
local sg=Duel.GetMatchingGroup(c48144509.exfilter1,tp,LOCATION_EXTRA,0,nil,e)
if sg:GetCount()>0 then
mg1:Merge(sg)
exmat=true
end
end
if exmat then Auxiliary.FCheckAdditional=c48144509.fcheck end
local sg1=Duel.GetMatchingGroup(c48144509.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
......@@ -2,13 +2,7 @@
function c74506079.initial_effect(c)
--fusion material
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c74506079.fscondition)
e1:SetOperation(c74506079.fsoperation)
c:RegisterEffect(e1)
aux.AddFusionProcFunRep2(c,c74506079.ffilter,2,63,true)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -17,17 +11,7 @@ function c74506079.initial_effect(c)
c:RegisterEffect(e2)
end
function c74506079.ffilter(c,fc)
return c:IsFusionSetCard(0x3e) and c:IsRace(RACE_REPTILE) and not c:IsHasEffect(6205579) and c:IsCanBeFusionMaterial(fc)
end
function c74506079.fscondition(e,g,gc)
if g==nil then return true end
if gc then return false end
return g:IsExists(c74506079.ffilter,2,nil,e:GetHandler())
end
function c74506079.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=eg:FilterSelect(tp,c74506079.ffilter,2,63,nil,e:GetHandler())
Duel.SetFusionMaterial(g)
return c:IsFusionSetCard(0x3e) and c:IsRace(RACE_REPTILE)
end
function c74506079.matcheck(e,c)
local ct=c:GetMaterial():GetClassCount(Card.GetCode)
......
--インフェルノイド・ティエラ
function c82734805.initial_effect(c)
c:EnableReviveLimit()
--fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c82734805.fscon)
e1:SetOperation(c82734805.fsop)
c:RegisterEffect(e1)
c:EnableReviveLimit()
aux.AddFusionProcCode2FunRep(c,14799437,23440231,aux.FilterBoolFunction(Card.IsFusionSetCard,0xbb),1,63,true,true)
--spsummon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82734805,0))
......@@ -26,8 +20,6 @@ function c82734805.initial_effect(c)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
c82734805.material_count=2
c82734805.material={14799437,23440231}
function c82734805.valcheck(e,c)
local ct=e:GetHandler():GetMaterial():GetClassCount(Card.GetCode)
e:GetLabelObject():SetLabel(ct)
......@@ -101,145 +93,3 @@ function c82734805.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g1,REASON_EFFECT)
end
end
function c82734805.filter(c)
return c:IsFusionSetCard(0xbb) and not c:IsHasEffect(6205579)
end
function c82734805.fcfilter1(c,code1,code2,g)
return c:IsFusionCode(code1,code2) and g:IsExists(c82734805.filter,1,c)
end
function c82734805.fcfilter2(c,code,g,fc)
return (c:IsFusionCode(code) or c:CheckFusionSubstitute(fc)) and g:IsExists(c82734805.filter,1,c)
end
function c82734805.fcfilter22(c,fc)
return c:IsFusionCode(14799437,23440231) or c:CheckFusionSubstitute(fc)
end
function c82734805.fcfilter3(c,g,fc)
return ((c:IsFusionCode(14799437) or c:CheckFusionSubstitute(fc)) and g:IsExists(Card.IsFusionCode,1,c,23440231))
or ((c:IsFusionCode(23440231) or c:CheckFusionSubstitute(fc)) and g:IsExists(Card.IsFusionCode,1,c,14799437))
end
function c82734805.fcfilter4(c,code,fc)
return c:IsFusionCode(code) or c:CheckFusionSubstitute(fc)
end
function c82734805.fcfilter7(c,chkf,fc)
return aux.FConditionCheckF(c,chkf) and (c82734805.filter(c) or c:CheckFusionSubstitute(fc))
end
function c82734805.fscon(e,g,gc,chkf)
if g==nil then return true end
local c=e:GetHandler()
local mg=g:Filter(Card.IsCanBeFusionMaterial,gc,c)
if gc then
if gc:CheckFusionSubstitute(c) then
return mg:IsExists(c82734805.fcfilter1,1,nil,14799437,23440231,mg)
elseif gc:IsFusionCode(14799437) then
return mg:IsExists(c82734805.fcfilter2,1,nil,23440231,mg,c)
elseif gc:IsFusionCode(23440231) then
return mg:IsExists(c82734805.fcfilter2,1,nil,14799437,mg,c)
elseif c82734805.filter(gc) then
return mg:IsExists(c82734805.fcfilter3,1,nil,mg,c)
else
return false
end
end
local b1=0 local b2=0 local b3=0 local bs=0
local fs=false
local tc=mg:GetFirst()
while tc do
if tc:CheckFusionSubstitute(c) then
bs=1 if aux.FConditionCheckF(tc,chkf) then fs=true end
elseif tc:IsFusionCode(14799437) then
if b1==0 then b1=1 else b3=1 end if aux.FConditionCheckF(tc,chkf) then fs=true end
elseif tc:IsFusionCode(23440231) then
if b2==0 then b2=1 else b3=1 end if aux.FConditionCheckF(tc,chkf) then fs=true end
elseif c82734805.filter(tc) then
b3=1 if aux.FConditionCheckF(tc,chkf) then fs=true end
end
tc=mg:GetNext()
end
if chkf~=PLAYER_NONE then
return fs and b1+b2+b3+bs>=3
else
return b1+b2+b3+bs>=3
end
end
function c82734805.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(Card.IsCanBeFusionMaterial,gc,c)
local g1=Group.CreateGroup()
if not gc and chkf~=PLAYER_NONE then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
gc=mg:FilterSelect(tp,c82734805.fcfilter7,1,1,nil,chkf,c):GetFirst()
g1:AddCard(gc)
end
local ok=false
if gc then
if gc:CheckFusionSubstitute(c) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:FilterSelect(tp,c82734805.fcfilter1,1,1,nil,14799437,23440231,mg)
g1:Merge(sg)
elseif gc:IsFusionCode(14799437) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:FilterSelect(tp,c82734805.fcfilter2,1,1,nil,23440231,mg,c)
g1:Merge(sg)
elseif gc:IsFusionCode(23440231) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:FilterSelect(tp,c82734805.fcfilter2,1,1,nil,14799437,mg,c)
g1:Merge(sg)
elseif c82734805.filter(gc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:FilterSelect(tp,c82734805.fcfilter3,1,1,nil,mg,c)
g1:Merge(sg)
local tc1=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if tc1:IsFusionCode(14799437) then
local sg=mg:FilterSelect(tp,c82734805.fcfilter4,1,1,nil,23440231,c)
g1:Merge(sg)
elseif tc1:IsFusionCode(23440231) then
local sg=mg:FilterSelect(tp,c82734805.fcfilter4,1,1,nil,14799437,c)
g1:Merge(sg)
else
local sg=mg:FilterSelect(tp,aux.FConditionFilter21,1,1,nil,14799437,23440231)
g1:Merge(sg)
end
ok=true
end
else
local mg2=mg:Filter(c82734805.fcfilter22,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg1=mg2:Select(tp,1,1,nil)
local tc1=sg1:GetFirst()
if not mg:IsExists(c82734805.filter,2,tc1) then
mg2:Remove(c82734805.filter,nil)
end
if tc1:CheckFusionSubstitute(c) then
mg2:Remove(Card.CheckFusionSubstitute,nil,c)
else mg2:Remove(Card.IsFusionCode,nil,tc1:GetCode()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg2=mg2:Select(tp,1,1,nil)
g1:Merge(sg1)
g1:Merge(sg2)
end
mg:Sub(g1)
mg=mg:Filter(c82734805.filter,nil)
if ok and (mg:GetCount()==0 or not Duel.SelectYesNo(tp,93)) then
Duel.SetFusionMaterial(g1)
return
end
if c:GetFlagEffect(31444249)~=0 then
local dmg=mg:Filter(Card.IsLocation,nil,LOCATION_DECK)
mg:Remove(Card.IsLocation,nil,LOCATION_DECK)
if mg:GetCount()==0 or (dmg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(31444249,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=dmg:Select(tp,1,6-g1:FilterCount(Card.IsLocation,nil,LOCATION_DECK),nil)
g1:Merge(sg)
if mg:GetCount()==0 or not Duel.SelectYesNo(tp,93) then
Duel.SetFusionMaterial(g1)
return
end
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:Select(tp,1,99,nil)
g1:Merge(sg)
Duel.SetFusionMaterial(g1)
return
end
--キメラテック・ランページ・ドラゴン
function c84058253.initial_effect(c)
c:EnableReviveLimit()
--fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c84058253.fscondition)
e1:SetOperation(c84058253.fsoperation)
c:RegisterEffect(e1)
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),2,63,true)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
......@@ -29,38 +23,6 @@ function c84058253.initial_effect(c)
e3:SetOperation(c84058253.tgop)
c:RegisterEffect(e3)
end
function c84058253.ffilter(c,fc)
return c:IsFusionSetCard(0x1093) and not c:IsHasEffect(6205579) and c:IsCanBeFusionMaterial(fc)
end
function c84058253.fscondition(e,g,gc,chkf)
if g==nil then return false end
if gc then return c84058253.ffilter(gc,e:GetHandler()) and g:IsExists(c84058253.ffilter,1,gc,e:GetHandler()) end
local g1=g:Filter(c84058253.ffilter,nil,e:GetHandler())
if chkf~=PLAYER_NONE then
return g1:IsExists(aux.FConditionCheckF,1,nil,chkf) and g1:GetCount()>=2
else return g1:GetCount()>=2 end
end
function c84058253.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
if gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,c84058253.ffilter,1,63,gc,e:GetHandler())
Duel.SetFusionMaterial(g1)
return
end
local sg=eg:Filter(c84058253.ffilter,nil,e:GetHandler())
if chkf==PLAYER_NONE or sg:GetCount()==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg:Select(tp,2,63,nil)
Duel.SetFusionMaterial(g1)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=sg:Select(tp,1,63,g1:GetFirst())
g1:Merge(g2)
Duel.SetFusionMaterial(g1)
end
function c84058253.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
......
This diff is collapsed.
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