Commit 8352a409 authored by nekrozar's avatar nekrozar

replace miracle_synchro_fusion

parent cd7ada55
......@@ -73,7 +73,7 @@ function c13331639.initial_effect(c)
e8:SetOperation(c13331639.penop)
c:RegisterEffect(e8)
end
c13331639.miracle_synchro_fusion=true
c13331639.material_type=TYPE_SYNCHRO
function c13331639.fusfilter1(c)
return c:IsRace(RACE_DRAGON) and c:IsFusionType(TYPE_FUSION)
end
......
......@@ -31,9 +31,9 @@ function c14017402.initial_effect(c)
e4:SetValue(c14017402.splimit)
c:RegisterEffect(e4)
end
c14017402.miracle_synchro_fusion=true
c14017402.material_type=TYPE_SYNCHRO
function c14017402.splimit(e,se,sp,st)
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
return true
......
......@@ -21,7 +21,7 @@ function c17412721.initial_effect(c)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end
c17412721.miracle_synchro_fusion=true
c17412721.material_type=TYPE_SYNCHRO
function c17412721.ffilter(c)
return c:IsFusionType(TYPE_XYZ+TYPE_SYNCHRO)
end
......
......@@ -54,9 +54,9 @@ function c21113684.initial_effect(c)
e6:SetValue(c21113684.splimit)
c:RegisterEffect(e6)
end
c21113684.miracle_synchro_fusion=true
c21113684.material_type=TYPE_SYNCHRO
function c21113684.splimit(e,se,sp,st)
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
return true
......
......@@ -54,6 +54,7 @@ function c21123811.initial_effect(c)
e6:SetOperation(c21123811.negop)
c:RegisterEffect(e6)
end
c21123811.material_type=TYPE_SYNCHRO
function c21123811.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
......
......@@ -48,6 +48,7 @@ function c24696097.initial_effect(c)
e4:SetOperation(c24696097.sumop)
c:RegisterEffect(e4)
end
c24696097.material_type=TYPE_SYNCHRO
function c24696097.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5
end
......
......@@ -38,6 +38,7 @@ function c25165047.initial_effect(c)
e5:SetValue(c25165047.valcheck)
c:RegisterEffect(e5)
end
c25165047.material_type=TYPE_SYNCHRO
function c25165047.lpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
......@@ -53,7 +54,7 @@ function c25165047.repfilter(c)
end
function c25165047.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE)
if chk==0 then return not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(c25165047.repfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
......@@ -25,7 +25,7 @@ function c25793414.initial_effect(c)
e2:SetOperation(c25793414.spop)
c:RegisterEffect(e2)
end
c25793414.miracle_synchro_fusion=true
c25793414.material_type=TYPE_SYNCHRO
function c25793414.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end
......
......@@ -43,6 +43,7 @@ function c26268488.initial_effect(c)
e4:SetOperation(c26268488.spop)
c:RegisterEffect(e4)
end
c26268488.material_type=TYPE_SYNCHRO
function c26268488.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
......
......@@ -26,6 +26,7 @@ function c2743001.initial_effect(c)
e2:SetOperation(c2743001.spop)
c:RegisterEffect(e2)
end
c2743001.material_type=TYPE_SYNCHRO
function c2743001.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
......@@ -37,7 +38,7 @@ function c2743001.rmfilter(c)
end
function c2743001.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c2743001.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil)
return Duel.IsExistingMatchingCard(c2743001.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil)
and not Duel.IsExistingMatchingCard(c2743001.chkfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil)
end
local g=Duel.GetMatchingGroup(c2743001.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
......
......@@ -48,6 +48,7 @@ function c35952884.initial_effect(c)
e4:SetOperation(c35952884.sumop)
c:RegisterEffect(e4)
end
c35952884.material_type=TYPE_SYNCHRO
function c35952884.mfilter(c)
return not c:IsType(TYPE_TUNER)
end
......
......@@ -27,7 +27,7 @@ function c36484016.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c36484016.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c.miracle_synchro_fusion and (not f or f(c))
return c:IsType(TYPE_FUSION) and aux.IsMaterialListType(c,TYPE_SYNCHRO) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and m:IsExists(c36484016.filter3,1,nil,c,m,chkf)
end
function c36484016.filter3(c,fusc,m,chkf)
......
......@@ -27,6 +27,7 @@ function c36857073.initial_effect(c)
e2:SetOperation(c36857073.spop2)
c:RegisterEffect(e2)
end
c36857073.material_type=TYPE_SYNCHRO
function c36857073.sfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
end
......
......@@ -34,9 +34,9 @@ function c40101111.initial_effect(c)
e5:SetValue(c40101111.splimit)
c:RegisterEffect(e5)
end
c40101111.miracle_synchro_fusion=true
c40101111.material_type=TYPE_SYNCHRO
function c40101111.splimit(e,se,sp,st)
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
return true
......
......@@ -25,6 +25,7 @@ function c50954680.initial_effect(c)
e2:SetOperation(c50954680.atkop)
c:RegisterEffect(e2)
end
c50954680.material_type=TYPE_SYNCHRO
function c50954680.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
......
......@@ -41,6 +41,7 @@ function c51447164.initial_effect(c)
e3:SetOperation(c51447164.spop)
c:RegisterEffect(e3)
end
c51447164.material_type=TYPE_SYNCHRO
function c51447164.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......
......@@ -20,7 +20,7 @@ function c58601383.initial_effect(c)
e3:SetValue(c58601383.efilter2)
c:RegisterEffect(e3)
end
c58601383.miracle_synchro_fusion=true
c58601383.material_type=TYPE_SYNCHRO
function c58601383.ffilter(c)
return c:IsFusionType(TYPE_SYNCHRO) and not c:IsFusionType(TYPE_EFFECT)
end
......
......@@ -42,7 +42,7 @@ function c59255742.initial_effect(c)
e4:SetOperation(c59255742.ctop)
c:RegisterEffect(e4)
end
c59255742.miracle_synchro_fusion=true
c59255742.material_type=TYPE_SYNCHRO
function c59255742.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsFusionType(TYPE_SYNCHRO)
end
......
......@@ -41,6 +41,7 @@ function c62242678.initial_effect(c)
e5:SetCode(21142671)
c:RegisterEffect(e5)
end
c62242678.material_type=TYPE_SYNCHRO
function c62242678.sfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroType(TYPE_SYNCHRO)
end
......
......@@ -45,6 +45,7 @@ function c67030233.initial_effect(c)
e5:SetValue(1)
c:RegisterEffect(e5)
end
c67030233.material_type=TYPE_SYNCHRO
function c67030233.mfilter1(c)
return c:IsCode(21159309)
end
......
......@@ -38,6 +38,7 @@ function c74892653.initial_effect(c)
e3:SetOperation(c74892653.scop)
c:RegisterEffect(e3)
end
c74892653.material_type=TYPE_SYNCHRO
function c74892653.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
......
......@@ -47,6 +47,7 @@ function c7841112.initial_effect(c)
e5:SetOperation(c7841112.spop)
c:RegisterEffect(e5)
end
c7841112.material_type=TYPE_SYNCHRO
function c7841112.mfilter1(c)
return c:IsCode(21159309)
end
......
......@@ -59,6 +59,7 @@ function c80896940.initial_effect(c)
e7:SetOperation(c80896940.penop)
c:RegisterEffect(e7)
end
c80896940.material_type=TYPE_SYNCHRO
function c80896940.matfilter1(c)
return c:IsType(TYPE_TUNER) or (c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM))
end
......
......@@ -21,6 +21,7 @@ function c84305651.initial_effect(c)
e2:SetOperation(c84305651.spop)
c:RegisterEffect(e2)
end
c84305651.material_type=TYPE_SYNCHRO
function c84305651.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()~=nil
end
......
......@@ -32,6 +32,7 @@ function c89474727.initial_effect(c)
e3:SetOperation(c89474727.spop)
c:RegisterEffect(e3)
end
c89474727.material_type=TYPE_SYNCHRO
function c89474727.cfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
end
......
......@@ -38,6 +38,7 @@ function c89907227.initial_effect(c)
e3:SetOperation(c89907227.spop)
c:RegisterEffect(e3)
end
c89907227.material_type=TYPE_SYNCHRO
function c89907227.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
......
......@@ -17,7 +17,7 @@ function c90555947.initial_effect(c)
e1:SetOperation(c90555947.disop)
c:RegisterEffect(e1)
end
c90555947.miracle_synchro_fusion=true
c90555947.material_type=TYPE_SYNCHRO
function c90555947.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_EARTH) and c:IsFusionType(TYPE_SYNCHRO)
end
......
......@@ -50,6 +50,7 @@ function c97489701.initial_effect(c)
e6:SetCode(21142671)
c:RegisterEffect(e6)
end
c97489701.material_type=TYPE_SYNCHRO
function c97489701.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_TUNER)*500
end
......
......@@ -29,6 +29,7 @@ function c9753964.initial_effect(c)
e2:SetOperation(c9753964.spop)
c:RegisterEffect(e2)
end
c9753964.material_type=TYPE_SYNCHRO
function c9753964.sfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
end
......
......@@ -42,6 +42,7 @@ function c97836203.initial_effect(c)
e5:SetOperation(c97836203.spop)
c:RegisterEffect(e5)
end
c97836203.material_type=TYPE_SYNCHRO
function c97836203.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
......
......@@ -17,7 +17,7 @@ function c99916754.initial_effect(c)
e2:SetOperation(c99916754.disop)
c:RegisterEffect(e2)
end
c99916754.miracle_synchro_fusion=true
c99916754.material_type=TYPE_SYNCHRO
function c99916754.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
......
......@@ -2015,6 +2015,9 @@ function Auxiliary.IsMaterialListSetCard(c,setcode)
end
return false
end
function Auxiliary.IsMaterialListType(c,type)
return c.material_type and type&c.material_type==type
end
function Auxiliary.AddCodeList(c,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end
if c.card_code_list==nil then
......
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