Commit 38b09fa5 authored by POLYMER's avatar POLYMER

fix

parent 93625877
......@@ -3,7 +3,7 @@ function c11561008.initial_effect(c)
--cancan
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11561008,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_SPSUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,11561008)
......@@ -76,8 +76,8 @@ function c11561008.canop(e,tp,eg,ep,ev,re,r,rp)
local b1=pg and pg:GetClassCount(Card.GetAttribute)==pg:GetCount()
local b2=pg and pg:GetClassCount(Card.GetLevel)==1
if pg and x>0 then
if b1 and Duel.IsExistingMatchingCard(c11561008.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,pg) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=Duel.SelectMatchingCard(tp,c11561008.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,pg)
if b1 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c11561008.spfil),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,pg) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11561008.spfil),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,pg)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
if b2 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
......
......@@ -61,6 +61,7 @@ function cm.filter(c,ft)
end
function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,ft)
......
......@@ -46,6 +46,7 @@ function cm.rfilter(c,tp)
end
function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
if c:GetFlagEffect(53738000)==0 and c:IsLocation(LOCATION_GRAVE) then return false end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.rfilter,nil,tp)
......
......@@ -41,6 +41,7 @@ function cm.rfilter(c,tp)
end
function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
if c:GetFlagEffect(53738000)==0 and c:IsLocation(LOCATION_GRAVE) then return false end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.rfilter,nil,tp)
......
......@@ -42,6 +42,7 @@ function cm.rfilter(c,tp)
end
function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
if c:GetFlagEffect(53738000)==0 and c:IsLocation(LOCATION_GRAVE) then return false end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.rfilter,nil,tp)
......
......@@ -107,23 +107,31 @@ function s.initial_effect(c)
end
local f8=Duel.IsPlayerCanSummon
Duel.IsPlayerCanSummon=function(tp,type,sc)
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f8(tp,type,sc) end
if type then
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f8(tp,type,sc) end
else return f8(tp) end
end
local f9=Duel.IsPlayerCanMSet
Duel.IsPlayerCanMSet=function(tp,type,sc)
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f9(tp,type,sc) end
if type then
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f9(tp,type,sc) end
else return f9(tp) end
end
local f10=Duel.IsPlayerCanSSet
Duel.IsPlayerCanSSet=function(tp,sc)
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f10(tp,sc) end
if sc then
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f10(tp,sc) end
else return f10(tp) end
end
local f11=Duel.IsPlayerCanSpecialSummon
Duel.IsPlayerCanSpecialSummon=function(p,type,pos,tp,sc)
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f11(p,type,pos,tp,sc) end
if type then
local ct=sc:GetFlagEffectLabel(id)
if ct then return false else return f11(p,type,pos,tp,sc) end
else return f11(p) end
end
local funcs={}
local fnames={"SendtoGrave","Destroy","SendtoHand","SendtoExtraP","SendtoDeck","Overlay","SpecialSummon","SpecialSummonStep","MoveToField","ReturnToField","Summon","MSet","SSet","Equip"}
......
......@@ -32,6 +32,7 @@ function cm.spfilter(c,ft)
end
function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil,ft) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
......
......@@ -29,6 +29,7 @@ function cm.sprfilter(c)
end
function cm.sprcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
return not c:IsPreviousLocation(LOCATION_ONFIELD) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.sprfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
......
......@@ -14,6 +14,7 @@ function cm.initial_effect(c)
end
function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=10
end
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