Commit 573fc14f authored by Tachibana's avatar Tachibana

rar

parent 52530f80
Pipeline #3524 passed with stages
in 32 minutes and 51 seconds
......@@ -49,21 +49,23 @@ function cm.spfilter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsType(TYPE_TUNER)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function cm.getmat2(mg,e)
local chainid = Duel.GetCurrentChain()
if chainid <= 0 then return end
function cm.getmat2(mg1,e)
local mg = mg1:Clone()
local chainid = not e and Duel.GetCurrentChain() or Duel.GetCurrentChain() - 1
if chainid <= 0 then return Group.CreateGroup() end
local re,loc = Duel.GetChainInfo(chainid,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION)
local rc = re:GetHandler()
if loc == LOCATION_HAND and rc:IsRelateToEffect(re) and rc:IsCanBeFusionMaterial() and (not e or not rc:IsImmuneToEffect(e)) then
mg:AddCard(rc)
end
return mg
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
cm.getmat2(mg1)
mg1 = cm.getmat2(mg1)
local res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -83,7 +85,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.spfilter1,nil,e)
cm.getmat2(mg1,e)
mg1 = cm.getmat2(mg1,e)
local sg1=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
......
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
local e3,e5 = rsef.SV_Card(c,"atk+,def+",cm.aval,"sr",LOCATION_MZONE)
local e4 = rsef.QO(c,nil,"res",{1,m},"res,sp","tg",LOCATION_GRAVE,
cm.spcon,nil,
rstg.target(cm.resfilter2,"res",LOCATION_MZONE,LOCATION_MZONE),
rstg.target({cm.resfilter2,"res",LOCATION_MZONE,LOCATION_MZONE },{rscf.spfilter,"sp"}),
cm.spop)
end
function cm.ffilter(c,fc,sub,mg,sg)
......
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