Commit 5d4d0228 authored by Tachibana's avatar Tachibana

ndyd

parent 8c3c9b69
......@@ -79,7 +79,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp,nil,nil,nil,nil,e)
local mg1=Duel.GetFusionMaterial(tp)
local mgg=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil,e)
mg1:Merge(mgg)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
......@@ -14,7 +14,7 @@ function cm.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
return c:IsAbleToRemove() and c:IsLocation(LOCATION_HAND)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
......@@ -26,11 +26,11 @@ end
function cm.sfilter0(c,e,tp)
local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(cm.sfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp,lv)
and Duel.IsExistingMatchingCard(cm.sfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp,lv)
end
function cm.sfilter1(c,tp,lv)
local rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(cm.sfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c)
local rg=Duel.GetMatchingGroup(cm.sfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,c)
return rlv>0 and c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,63)
end
......@@ -60,14 +60,16 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
local op=1
if res1 or res2 then
local m={}
local mc={}
local n={}
local ct=1
if res1 then m[ct]=aux.Stringid(m,0) n[ct]=1 ct=ct+1 end
if res2 then m[ct]=aux.Stringid(m,1) n[ct]=2 ct=ct+1 end
local sp=Duel.SelectOption(tp,table.unpack(m))
if res1 then mc[ct]=aux.Stringid(m,0) n[ct]=0 ct=ct+1 end
if res2 then mc[ct]=aux.Stringid(m,1) n[ct]=1 ct=ct+1 end
Debug.Message(#mc)
local sp=Duel.SelectOption(tp,table.unpack(mc))
op=n[sp+1]
end
Debug.Message(op)
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
......@@ -77,7 +79,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
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