Commit 3a5ab86e authored by nanahira's avatar nanahira

more..

parent 91143cdb
...@@ -209,7 +209,7 @@ function cm.exgoal(g,tp,fc) ...@@ -209,7 +209,7 @@ function cm.exgoal(g,tp,fc)
return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0
end end
function cm.CheckSummonLocation(c,tp) function cm.CheckSummonLocation(c,tp)
if c:IsLocation(LOCATION_EXTRA) then return Duel.GetLocationCountFromEx(tp)>0 end if c:IsLocation(LOCATION_EXTRA) then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end
return Duel.GetMZoneCount(tp)>0 return Duel.GetMZoneCount(tp)>0
end end
function cm.AND(...) function cm.AND(...)
......
...@@ -45,12 +45,12 @@ function cm.filter(c,e,tp) ...@@ -45,12 +45,12 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0x570) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_XYZ) return c:IsSetCard(0x570) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_XYZ)
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)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -83,7 +83,7 @@ function cm.tfilter1(c,e,tp) ...@@ -83,7 +83,7 @@ function cm.tfilter1(c,e,tp)
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)>0
and Duel.IsExistingMatchingCard(cm.tfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.tfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
......
...@@ -53,7 +53,7 @@ function cm.sprcon(e,c) ...@@ -53,7 +53,7 @@ function cm.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED,0,nil,c) local mg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED,0,nil,c)
return Duel.GetLocationCountFromEx(tp)>0 and c:CheckFusionMaterial(mg,nil,PLAYER_NONE) return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION and c:CheckFusionMaterial(mg,nil,PLAYER_NONE)
end end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED,0,nil,c) local mg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED,0,nil,c)
......
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