Commit 573fc14f authored by Tachibana's avatar Tachibana

rar

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