Commit 1d4d0fb2 authored by nanahira's avatar nanahira

updates

parent 73c8dc8f
...@@ -24,7 +24,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,7 +24,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
......
...@@ -25,7 +25,7 @@ function cm.filter(c,e,tp) ...@@ -25,7 +25,7 @@ function cm.filter(c,e,tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -21,12 +21,12 @@ function cm.filter(c,e,tp) ...@@ -21,12 +21,12 @@ function cm.filter(c,e,tp)
return Senya.check_set_elem(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==4 return Senya.check_set_elem(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==4
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -75,7 +75,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(cm.filter7,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return e:GetHandler():GetOverlayGroup():IsExists(cm.filter7,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
end end
function cm.filter7(c,e,tp) function cm.filter7(c,e,tp)
return c:IsType(TYPE_XYZ) and c:GetRank()==4 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsType(TYPE_XYZ) and c:GetRank()==4 and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
...@@ -83,7 +83,7 @@ end ...@@ -83,7 +83,7 @@ end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp) function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local g1=e:GetHandler():GetOverlayGroup() local g1=e:GetHandler():GetOverlayGroup()
local sg=g1:Filter(cm.filter7,nil,e,tp) local sg=g1:Filter(cm.filter7,nil,e,tp)
if ft==0 or sg:GetCount()==0 then return end if ft==0 or sg:GetCount()==0 then return end
......
...@@ -72,7 +72,7 @@ function cm.filter(c,e,tp) ...@@ -72,7 +72,7 @@ function cm.filter(c,e,tp)
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp
and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -21,7 +21,7 @@ function cm.counterfilter(c) ...@@ -21,7 +21,7 @@ function cm.counterfilter(c)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetMZoneCount(tp)>0
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
......
...@@ -56,7 +56,7 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then
......
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e1:SetCondition(function(e,c) e1:SetCondition(function(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetMZoneCount(c:GetControler())>0
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--xm --xm
......
...@@ -33,7 +33,7 @@ function cm.ssfilter(c) ...@@ -33,7 +33,7 @@ function cm.ssfilter(c)
end end
function cm.hcon(e,c) function cm.hcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.ssfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) return Duel.GetMZoneCount(c:GetControler())>0 and Duel.IsExistingMatchingCard(cm.ssfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return Senya.check_set_elem(c) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return Senya.check_set_elem(c) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
...@@ -43,7 +43,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +43,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -56,7 +56,7 @@ function cm.ssfilter(c,e,tp) ...@@ -56,7 +56,7 @@ function cm.ssfilter(c,e,tp)
end end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.ssfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.ssfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end and Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
......
...@@ -48,14 +48,14 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,14 +48,14 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil) return eg:IsExists(cm.cfilter,1,nil)
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetMZoneCount(tp)<=0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
end end
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetMZoneCount(tp)>0
and Duel.GetLocationCountFromEx(tp)>0 and Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,m)==0 end and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,m)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -34,7 +34,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -34,7 +34,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)>0 then return end if Duel.GetFlagEffect(tp,m)>0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
Duel.RegisterFlagEffect(tp,m,0,0,0) Duel.RegisterFlagEffect(tp,m,0,0,0)
......
...@@ -82,12 +82,12 @@ function cm.fffilter(c,e,tp) ...@@ -82,12 +82,12 @@ function cm.fffilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsCode(m) return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsCode(m)
end end
function cm.spptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.fffilter,tp,LOCATION_EXTRA,LOCATION_EXTRA,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.fffilter,tp,LOCATION_EXTRA,LOCATION_EXTRA,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.sppop(e,tp,eg,ep,ev,re,r,rp) function cm.sppop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local g=Duel.GetMatchingGroup(cm.fffilter,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil,e,tp) local g=Duel.GetMatchingGroup(cm.fffilter,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
for i=0,9 do for i=0,9 do
......
...@@ -210,7 +210,8 @@ end ...@@ -210,7 +210,8 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget() local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) and Duel.Destroy(rc,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) then if rc:IsRelateToEffect(e) and Duel.Destroy(rc,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) then
if rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if rc:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -23,7 +23,7 @@ function cm.ssfilter(c,e,tp) ...@@ -23,7 +23,7 @@ function cm.ssfilter(c,e,tp)
end end
function cm.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.xmfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.xmfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function cm.xmop(e,tp,eg,ep,ev,re,r,rp) function cm.xmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local gg=tc:GetOverlayGroup() local gg=tc:GetOverlayGroup()
if not (gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e)) or tc:IsImmuneToEffect(e) then return end if not (gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 and tc:IsRelateToEffect(e)) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp) local sg=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function cm.rmcon(e,c,og) function cm.rmcon(e,c,og)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local c=e:GetHandler() local c=e:GetHandler()
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and c:IsFaceup() and not c:IsDisabled() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and c:IsFaceup() and not c:IsDisabled() and Duel.GetMZoneCount(tp)>0
end end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) function cm.rmop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,e:GetHandler():GetOriginalCode()) Duel.Hint(HINT_CARD,0,e:GetHandler():GetOriginalCode())
......
...@@ -85,7 +85,7 @@ function c37564101.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -85,7 +85,7 @@ function c37564101.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c37564101.thop(e,tp,eg,ep,ev,re,r,rp) function c37564101.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37564101.tfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c37564101.tfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -85,7 +85,7 @@ function c37564102.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -85,7 +85,7 @@ function c37564102.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c37564102.thop(e,tp,eg,ep,ev,re,r,rp) function c37564102.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37564102.tfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c37564102.tfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -68,7 +68,7 @@ end ...@@ -68,7 +68,7 @@ end
function c37564103.spcon1(e,c) function c37564103.spcon1(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 return Duel.GetMZoneCount(tp)>-2
and Duel.CheckReleaseGroup(tp,c37564103.spfilter1,1,nil,tp,c) and Duel.CheckReleaseGroup(tp,c37564103.spfilter1,1,nil,tp,c)
end end
function c37564103.spop1(e,tp,eg,ep,ev,re,r,rp,c) function c37564103.spop1(e,tp,eg,ep,ev,re,r,rp,c)
...@@ -117,7 +117,7 @@ function c37564103.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -117,7 +117,7 @@ function c37564103.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c37564103.thop(e,tp,eg,ep,ev,re,r,rp) function c37564103.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37564103.tfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c37564103.tfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -115,7 +115,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -115,7 +115,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -113,7 +113,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -113,7 +113,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -33,7 +33,7 @@ function c37564109.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,7 @@ function c37564109.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local res=e:GetLabel()==1 local res=e:GetLabel()==1
e:SetLabel(0) e:SetLabel(0)
return res and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 return res and Duel.GetMZoneCount(tp)>-1
and Duel.IsExistingTarget(c37564109.filter1,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c37564109.filter1,tp,LOCATION_MZONE,0,1,nil) end
e:SetLabel(0) e:SetLabel(0)
local rg=Duel.SelectTarget(tp,c37564109.filter1,tp,LOCATION_MZONE,0,1,1,nil) local rg=Duel.SelectTarget(tp,c37564109.filter1,tp,LOCATION_MZONE,0,1,1,nil)
...@@ -43,7 +43,7 @@ function c37564109.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +43,7 @@ function c37564109.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA)
end end
function c37564109.activate(e,tp,eg,ep,ev,re,r,rp) function c37564109.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tcode=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local tcode=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -63,12 +63,12 @@ function c37564110.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,12 +63,12 @@ function c37564110.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c37564110.target(e,tp,eg,ep,ev,re,r,rp,chk) function c37564110.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp)>-1
and Duel.IsExistingMatchingCard(c37564110.rsfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c37564110.rsfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end end
function c37564110.operation(e,tp,eg,ep,ev,re,r,rp) function c37564110.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if ft<=0 then return end if ft<=0 then return end
if ft>2 then ft=2 end if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
......
...@@ -93,7 +93,7 @@ function c37564111.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -93,7 +93,7 @@ function c37564111.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c37564111.thop(e,tp,eg,ep,ev,re,r,rp) function c37564111.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 or Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37564111.tfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c37564111.tfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -28,7 +28,7 @@ function cm.ssfilter(c,e,tp) ...@@ -28,7 +28,7 @@ function cm.ssfilter(c,e,tp)
end end
function cm.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.xmfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.xmfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,cm.xmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE)
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function cm.xmop(e,tp,eg,ep,ev,re,r,rp) function cm.xmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local gg=tc:GetOverlayGroup() local gg=tc:GetOverlayGroup()
if not (gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e)) or tc:IsImmuneToEffect(e) then return end if not (gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 and tc:IsRelateToEffect(e)) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp) local sg=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,7,nil) and Senya.CheckNoExtra(e,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,7,nil) and Senya.CheckNoExtra(e,tp)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -22,7 +22,7 @@ function cm.filter(c,e,tp) ...@@ -22,7 +22,7 @@ function cm.filter(c,e,tp)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
......
...@@ -31,7 +31,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 then return end if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 then return end
if not tc:IsLocation(LOCATION_REMOVED) then return end if not tc:IsLocation(LOCATION_REMOVED) then return end
local cp=tc:GetOwner() local cp=tc:GetOwner()
if Duel.GetLocationCount(cp,LOCATION_MZONE)==0 or not tc:IsType(TYPE_MONSTER) then if Duel.GetMZoneCount(cp)==0 or not tc:IsType(TYPE_MONSTER) then
Duel.SendtoGrave(tc,REASON_RULE) Duel.SendtoGrave(tc,REASON_RULE)
return return
end end
......
...@@ -20,7 +20,7 @@ function cm.filter(c,e,tp) ...@@ -20,7 +20,7 @@ function cm.filter(c,e,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil,e,tp)
......
...@@ -36,7 +36,7 @@ function cm.filter2(c,e,tp) ...@@ -36,7 +36,7 @@ function cm.filter2(c,e,tp)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.filter2,nil,e,tp) local g=eg:Filter(cm.filter2,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end if Duel.GetMZoneCount(tp)<g:GetCount() then return end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if Duel.GetControl(tc,tp) then if Duel.GetControl(tc,tp) then
......
...@@ -67,7 +67,7 @@ function cm.tlimit(e,c) ...@@ -67,7 +67,7 @@ function cm.tlimit(e,c)
end end
function cm.ttcon(e,c) function cm.ttcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 and Senya.CheckNoExtra(e,c:GetControler()) return Duel.GetMZoneCount(c:GetControler())>-3 and Duel.GetTributeCount(c)>=3 and Senya.CheckNoExtra(e,c:GetControler())
end end
function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c) function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3) local g=Duel.SelectTribute(tp,c,3,3)
......
...@@ -36,7 +36,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
return ft>-1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft) return ft>-1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -62,7 +62,7 @@ function cm.filter(c,e,tp) ...@@ -62,7 +62,7 @@ function cm.filter(c,e,tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
......
...@@ -24,7 +24,7 @@ function cm.spfilter(c,e,tp,code) ...@@ -24,7 +24,7 @@ function cm.spfilter(c,e,tp,code)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
...@@ -32,7 +32,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -32,7 +32,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
......
...@@ -49,7 +49,7 @@ function cm.spfilter(c) ...@@ -49,7 +49,7 @@ function cm.spfilter(c)
end end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetMZoneCount(c:GetControler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,c:GetControler(),LOCATION_HAND,0,3,c) and Senya.CheckNoExtra(e,c:GetControler()) and Duel.IsExistingMatchingCard(cm.spfilter,c:GetControler(),LOCATION_HAND,0,3,c) and Senya.CheckNoExtra(e,c:GetControler())
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -32,7 +32,7 @@ function cm.dfilter(c,ft) ...@@ -32,7 +32,7 @@ function cm.dfilter(c,ft)
return c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDestructable() and c:IsFaceup() return c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDestructable() and c:IsFaceup()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.dfilter(chkc,ft) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.dfilter(chkc,ft) end
if chk==0 then return Duel.IsExistingTarget(cm.dfilter,tp,LOCATION_MZONE,0,1,nil,ft) and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsExistingTarget(cm.dfilter,tp,LOCATION_MZONE,0,1,nil,ft) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -49,7 +49,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Remove(token,POS_FACEUP,REASON_RULE) Duel.Remove(token,POS_FACEUP,REASON_RULE)
Duel.Hint(HINT_CARD,0,token:GetOriginalCode()) Duel.Hint(HINT_CARD,0,token:GetOriginalCode())
if token:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if token:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummon(tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.SpecialSummon(token,0,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,true,true,POS_FACEUP)
else else
Duel.SendtoHand(token,tp,REASON_RULE) Duel.SendtoHand(token,tp,REASON_RULE)
......
...@@ -142,7 +142,7 @@ function cm.spptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -142,7 +142,7 @@ function cm.spptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sumtype=c:GetSummonType() local sumtype=c:GetSummonType()
if chk==0 then if chk==0 then
return not (bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0 return not (bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0
or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) or mg:GetCount()>Duel.GetMZoneCount(tp)
or mg:IsExists(cm.mgfilter,1,nil,e,tp,c)) or mg:IsExists(cm.mgfilter,1,nil,e,tp,c))
end end
mg:KeepAlive() mg:KeepAlive()
...@@ -163,7 +163,7 @@ function cm.sppop(e,tp,eg,ep,ev,re,r,rp) ...@@ -163,7 +163,7 @@ function cm.sppop(e,tp,eg,ep,ev,re,r,rp)
local g=mg:Clone() local g=mg:Clone()
mg:DeleteGroup() mg:DeleteGroup()
if not (g:GetCount()==0 if not (g:GetCount()==0
or g:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) or g:GetCount()>Duel.GetMZoneCount(tp)
or g:IsExists(cm.mgfilterx,1,nil,e,tp,c)) then or g:IsExists(cm.mgfilterx,1,nil,e,tp,c)) then
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -28,12 +28,12 @@ function cm.filter(c,e,tp) ...@@ -28,12 +28,12 @@ function cm.filter(c,e,tp)
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),3) local ft=math.min(Duel.GetMZoneCount(tp),3)
if ft<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND,0,nil,e,tp) local tg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND,0,nil,e,tp)
......
...@@ -95,14 +95,14 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -95,14 +95,14 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=e:GetLabel() or 0 local ft=e:GetLabel() or 0
e:SetLabel(0) e:SetLabel(0)
local ct=-ft local ct=-ft
return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct return Duel.GetMZoneCount(tp)>ct
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetMZoneCount(tp)<=0 or not e:GetHandler():IsRelateToEffect(e) 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_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -61,14 +61,14 @@ end ...@@ -61,14 +61,14 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft) return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
......
...@@ -91,7 +91,7 @@ end ...@@ -91,7 +91,7 @@ end
function cm.sfilter(c,e,tp) function cm.sfilter(c,e,tp)
if c:IsType(TYPE_MONSTER) then if c:IsType(TYPE_MONSTER) then
return c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp)>0 and (not c:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else else
return (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable() return (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable()
end end
......
...@@ -15,11 +15,11 @@ function cm.filter(c) ...@@ -15,11 +15,11 @@ function cm.filter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -66,7 +66,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
for i,t in pairs(tokent) do for i,t in pairs(tokent) do
if Duel.GetLocationCount(p,LOCATION_MZONE)>0 then if Duel.GetMZoneCount(p)>0 then
local token=Duel.CreateToken(t.p,m+1) local token=Duel.CreateToken(t.p,m+1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -72,7 +72,7 @@ function cm.ffilter(c,e,tp,m,f,chkf) ...@@ -72,7 +72,7 @@ function cm.ffilter(c,e,tp,m,f,chkf)
end end
cm.tg={ cm.tg={
[1]=function(e,tp,eg,ep,ev,re,r,rp,chk) [1]=function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end, end,
...@@ -104,7 +104,7 @@ end, ...@@ -104,7 +104,7 @@ end,
cm.op={ cm.op={
[1]=function(e,tp,eg,ep,ev,re,r,rp) [1]=function(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -48,7 +48,7 @@ function cm.nfilter(c,g,t) ...@@ -48,7 +48,7 @@ function cm.nfilter(c,g,t)
return true return true
end end
function cm.fieldcheck(tp,mgf,sgf,co) function cm.fieldcheck(tp,mgf,sgf,co)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)-sgf:GetCount()+mgf:FilterCount(cm.ffilter,nil,tp) local ft=Duel.GetMZoneCount(tp)-sgf:GetCount()+mgf:FilterCount(cm.ffilter,nil,tp)
for fc,mg in pairs(co) do for fc,mg in pairs(co) do
ft=ft+mg:FilterCount(cm.ffilter,nil,tp) ft=ft+mg:FilterCount(cm.ffilter,nil,tp)
end end
......
...@@ -88,7 +88,7 @@ end ...@@ -88,7 +88,7 @@ end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
local og=e:GetHandler():GetOverlayGroup() local og=e:GetHandler():GetOverlayGroup()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if chkc then return false end if chkc then return false end
if chk==0 then return ft>=-1 and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,c,e,tp,og,ft) end if chk==0 then return ft>=-1 and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,c,e,tp,og,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
...@@ -107,7 +107,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,7 +107,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsControler(1-tp) then return end if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsControler(1-tp) then return end
local og=e:GetHandler():GetOverlayGroup() local og=e:GetHandler():GetOverlayGroup()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if ft<0 then return end if ft<0 then return end
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if mg:IsExists(cm.counterfilter,1,nil,e) then return end if mg:IsExists(cm.counterfilter,1,nil,e) then return end
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
local m=37564335 local m=37564335
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end) xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.dfc_front_side=m cm.dfc_front_side=m+1
cm.dfc_back_side=m+1
cm.fit_monster={m+1} cm.fit_monster={m+1}
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -26,12 +25,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,12 +25,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0) e:SetLabel(0)
if chk==0 then if chk==0 then
local c=e:GetHandler() local c=e:GetHandler()
local tcode=c.dfc_back_side local tcode=c.dfc_front_side
if not tcode or l~=1 then return false end if not tcode or l~=1 then return false end
local tempc=Senya.IgnoreActionCheck(Duel.CreateToken,tp,tcode) local tempc=Senya.IgnoreActionCheck(Duel.CreateToken,tp,tcode)
if not tempc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return false end if not tempc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return false end
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,e:GetHandler(),tempc) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,e:GetHandler(),tempc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if ft<0 then return false end if ft<0 then return false end
if ft>0 then if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,tempc:GetLevel(),tempc) return mg:CheckWithSumGreater(Card.GetRitualLevel,tempc:GetLevel(),tempc)
...@@ -45,10 +44,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,10 +44,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
e:SetLabel(1) e:SetLabel(1)
if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) or c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) or c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
local tcode=c.dfc_back_side local tcode=c.dfc_front_side
local tempc=Duel.CreateToken(tp,tcode) local tempc=Duel.CreateToken(tp,tcode)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,tempc) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,tempc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local mat=nil local mat=nil
if ft>0 then if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
...@@ -66,6 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,6 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
c:SetEntityCode(tcode,true) c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0) c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
Duel.Hint(11,0,m*16) Duel.Hint(11,0,m*16)
Duel.Hint(HINT_CARD,0,m+1) Duel.Hint(HINT_CARD,0,m+1)
Duel.ConfirmCards(tp,Group.FromCards(c)) Duel.ConfirmCards(tp,Group.FromCards(c))
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local m=37564336 local m=37564336
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end) xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.dfc_back_side=m-1
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
Senya.DFCBackSideCommonEffect(c) Senya.DFCBackSideCommonEffect(c)
......
...@@ -6,6 +6,7 @@ function cm.initial_effect(c) ...@@ -6,6 +6,7 @@ function cm.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.TRUE,4) aux.AddLinkProcedure(c,aux.TRUE,4)
c:EnableReviveLimit() c:EnableReviveLimit()
Senya.AddSummonMusic(c,m*16+1,SUMMON_TYPE_LINK)
--atk --atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -11,7 +11,7 @@ function cm.filter(c,e,tp) ...@@ -11,7 +11,7 @@ function cm.filter(c,e,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
......
...@@ -10,12 +10,12 @@ function cm.filter(c,e,tp) ...@@ -10,12 +10,12 @@ function cm.filter(c,e,tp)
return Senya.CheckPrism(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return Senya.CheckPrism(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -44,7 +44,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +44,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -28,13 +28,13 @@ function cm.filter2(c,code) ...@@ -28,13 +28,13 @@ function cm.filter2(c,code)
return c:IsCode(code) and c:IsAbleToHand() return c:IsCode(code) and c:IsAbleToHand()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -10,12 +10,12 @@ function cm.filter(c,e,tp) ...@@ -10,12 +10,12 @@ function cm.filter(c,e,tp)
return Senya.CheckPrism(c) and not c:IsCode(37564422) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==3 and Duel.GetFlagEffect(tp,c:GetCode())==0 return Senya.CheckPrism(c) and not c:IsCode(37564422) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==3 and Duel.GetFlagEffect(tp,c:GetCode())==0
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -59,7 +59,7 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
local sg=ag:Filter(cm.tfilter,nil,e,tp) local sg=ag:Filter(cm.tfilter,nil,e,tp)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=sg:GetCount() and not (sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then if sg:GetCount()>0 and Duel.GetMZoneCount(tp)>=sg:GetCount() and not (sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local cval=math.floor(val[1]/2) local cval=math.floor(val[1]/2)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -72,12 +72,12 @@ function cm.filter(c,e,tp) ...@@ -72,12 +72,12 @@ function cm.filter(c,e,tp)
return Senya.CheckPrism(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==3 and Duel.GetFlagEffect(tp,c:GetCode())==0 return Senya.CheckPrism(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==3 and Duel.GetFlagEffect(tp,c:GetCode())==0
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -50,13 +50,13 @@ function cm.sfilter(c,e,tp) ...@@ -50,13 +50,13 @@ function cm.sfilter(c,e,tp)
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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 not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -109,7 +109,7 @@ function cm.filter(c) ...@@ -109,7 +109,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet() return c:IsFaceup() and c:IsCanTurnSet()
end end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(rp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(rp)>0
and re:GetHandler():IsCanBeSpecialSummoned(re,0,rp,false,false) and not re:GetHandler():IsLocation(LOCATION_MZONE) end and re:GetHandler():IsCanBeSpecialSummoned(re,0,rp,false,false) and not re:GetHandler():IsLocation(LOCATION_MZONE) end
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
...@@ -117,7 +117,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,7 +117,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,cm.repop) Duel.ChangeChainOperation(ev,cm.repop)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then if e:GetHandler():IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
e:GetHandler():RegisterFlagEffect(37564499,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(37564499,RESET_EVENT+0x1fe0000,0,1)
......
...@@ -59,11 +59,11 @@ function cm.spcon(e,c) ...@@ -59,11 +59,11 @@ function cm.spcon(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.spfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_MZONE,0,nil)
return Senya.CheckGroup(mg,cm.spgcheck,nil,3,3,Duel.GetLocationCount(tp,LOCATION_MZONE)) return Senya.CheckGroup(mg,cm.spgcheck,nil,3,3,Duel.GetMZoneCount(tp))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_MZONE,0,nil)
local g=Senya.SelectGroup(tp,HINTMSG_RTOHAND,mg,cm.spgcheck,nil,3,3,Duel.GetLocationCount(tp,LOCATION_MZONE)) local g=Senya.SelectGroup(tp,HINTMSG_RTOHAND,mg,cm.spgcheck,nil,3,3,Duel.GetMZoneCount(tp))
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoHand(g,nil,REASON_COST+REASON_FUSION+REASON_MATERIAL) Duel.SendtoHand(g,nil,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end end
......
...@@ -33,7 +33,7 @@ function cm.sfilter(c,e,tp,g) ...@@ -33,7 +33,7 @@ function cm.sfilter(c,e,tp,g)
end end
function cm.scheck(g,c,tp) function cm.scheck(g,c,tp)
if c:IsLocation(LOCATION_EXTRA) then return Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end if c:IsLocation(LOCATION_EXTRA) then return Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end
return Duel.GetLocationCount(tp,LOCATION_MZONE)+g:GetCount()>0 return Duel.GetMZoneCount(tp)+g:GetCount()>0
end end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_MZONE,0,e:GetHandler()) local g=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_MZONE,0,e:GetHandler())
...@@ -78,7 +78,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local sg=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp) local sg=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
local ft=math.min(Duel.GetUsableMZoneCount(tp),ct) local ft=math.min(Duel.GetUsableMZoneCount(tp),ct)
local mft=Duel.GetLocationCount(tp,LOCATION_MZONE) local mft=Duel.GetMZoneCount(tp)
local eft=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and math.min(c29724053[tp],Duel.GetLocationCountFromEx(tp)) or Duel.GetLocationCountFromEx(tp) local eft=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and math.min(c29724053[tp],Duel.GetLocationCountFromEx(tp)) or Duel.GetLocationCountFromEx(tp)
local tg=Senya.SelectGroup(tp,HINTMSG_SPSUMMON,sg,cm.gcheck,nil,1,ft,mft,eft) local tg=Senya.SelectGroup(tp,HINTMSG_SPSUMMON,sg,cm.gcheck,nil,1,ft,mft,eft)
local etg=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA) local etg=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
......
...@@ -21,7 +21,7 @@ function cm.filter(c,e,tp) ...@@ -21,7 +21,7 @@ function cm.filter(c,e,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsAbleToDeck() end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -19,12 +19,12 @@ function cm.filter(c,e,tp) ...@@ -19,12 +19,12 @@ function cm.filter(c,e,tp)
return Senya.CheckPrism(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return Senya.CheckPrism(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():IsAbleToDeck() end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -48,13 +48,13 @@ function cm.ssfilter(c,e,tp) ...@@ -48,13 +48,13 @@ function cm.ssfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:GetOwner()==1-tp return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:GetOwner()==1-tp
end end
function cm.xmtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.xmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():GetOverlayGroup():IsExists(cm.ssfilter,1,nil,e,tp) and e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():GetOverlayGroup():IsExists(cm.ssfilter,1,nil,e,tp) and e:GetHandler():IsType(TYPE_XYZ) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE)
end end
function cm.xmop(e,tp,eg,ep,ev,re,r,rp) function cm.xmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local gg=c:GetOverlayGroup() local gg=c:GetOverlayGroup()
if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) and gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) and gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp):GetFirst() local sg=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp):GetFirst()
if sg and Duel.SpecialSummonStep(sg,0,tp,tp,true,true,POS_FACEUP) then if sg and Duel.SpecialSummonStep(sg,0,tp,tp,true,true,POS_FACEUP) then
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg2(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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
...@@ -49,7 +49,7 @@ function cm.mfilterf(c,tp,mg,rc) ...@@ -49,7 +49,7 @@ function cm.mfilterf(c,tp,mg,rc)
else return false end else return false end
end end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
......
...@@ -53,7 +53,7 @@ function cm.splimit(e,c) ...@@ -53,7 +53,7 @@ function cm.splimit(e,c)
end end
function cm.ntcon(e,c,minc) function cm.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:GetLevel()>4 and Duel.GetMZoneCount(c:GetControler())>0
end end
function cm.ntop(e,tp,eg,ep,ev,re,r,rp,c) function cm.ntop(e,tp,eg,ep,ev,re,r,rp,c)
--change base attack --change base attack
......
...@@ -25,7 +25,7 @@ function cm.initial_effect(c) ...@@ -25,7 +25,7 @@ function cm.initial_effect(c)
end end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetMZoneCount(c:GetControler())>0
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsCode(37564765) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsCode(37564765) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
...@@ -35,11 +35,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,11 +35,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0) e:SetLabel(0)
local mft=0 local mft=0
if l==1 and e:GetHandler():GetSequence()<5 then mft=-1 end if l==1 and e:GetHandler():GetSequence()<5 then mft=-1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>mft and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetMZoneCount(tp)>mft and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -21,12 +21,12 @@ function cm.filter(c,e,tp) ...@@ -21,12 +21,12 @@ function cm.filter(c,e,tp)
return (c:IsCode(37564765) or c.Senya_desc_with_nanahira) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsCode(37564765) or c.Senya_desc_with_nanahira) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -18,12 +18,12 @@ function cm.filter(c,e,tp) ...@@ -18,12 +18,12 @@ function cm.filter(c,e,tp)
return c:GetLevel()==7 and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()==7 and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
......
...@@ -22,7 +22,7 @@ function cm.filter1(c,e,tp) ...@@ -22,7 +22,7 @@ function cm.filter1(c,e,tp)
end end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
local pr1,pr2=e:GetProperty() local pr1,pr2=e:GetProperty()
e:SetProperty(bit.bor(pr1,EFFECT_FLAG_CARD_TARGET),pr2) e:SetProperty(bit.bor(pr1,EFFECT_FLAG_CARD_TARGET),pr2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -30,7 +30,7 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,7 +30,7 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
local pr1,pr2=e:GetProperty() local pr1,pr2=e:GetProperty()
e:SetProperty(pr1-bit.band(pr1,EFFECT_FLAG_CARD_TARGET),pr2) e:SetProperty(pr1-bit.band(pr1,EFFECT_FLAG_CARD_TARGET),pr2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
...@@ -42,7 +42,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local tg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE,0,nil,e,tp) local tg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -82,12 +82,12 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,12 +82,12 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) then if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) then
--c:AddMonsterAttribute(0,0,0,0,0) --c:AddMonsterAttribute(0,0,0,0,0)
......
...@@ -35,7 +35,7 @@ function cm.ssfilter(c) ...@@ -35,7 +35,7 @@ function cm.ssfilter(c)
end end
function cm.hcon(e,c) function cm.hcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.ssfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and c:IsFaceup() and not c:IsDisabled() return Duel.GetMZoneCount(c:GetControler())>0 and Duel.IsExistingMatchingCard(cm.ssfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and c:IsFaceup() and not c:IsDisabled()
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
...@@ -44,12 +44,12 @@ function cm.spfilter(c,e,tp) ...@@ -44,12 +44,12 @@ function cm.spfilter(c,e,tp)
return c:IsCode(37564765) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(37564765) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -47,7 +47,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
--[[if tc:GetOriginalCode()==37564765 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then --[[if tc:GetOriginalCode()==37564765 and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end]] end]]
end end
......
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg2(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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c) local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c)
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
...@@ -54,7 +54,7 @@ function cm.mfilterf(c,tp,mg,rc) ...@@ -54,7 +54,7 @@ function cm.mfilterf(c,tp,mg,rc)
else return false end else return false end
end end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c) local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c)
......
...@@ -46,7 +46,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,7 +46,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
return ft>-1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft) return ft>-1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
return g:GetCount()==1 and Senya.NanahiraFilter(tc,true) return g:GetCount()==1 and Senya.NanahiraFilter(tc,true)
......
...@@ -29,7 +29,7 @@ function cm.initial_effect(c) ...@@ -29,7 +29,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(function(e,c) e1:SetCondition(function(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and c:GetFlagEffect(m)>0 return Duel.GetMZoneCount(c:GetControler())>0 and c:GetFlagEffect(m)>0
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -55,11 +55,11 @@ end ...@@ -55,11 +55,11 @@ end
function cm.bmrlcon(e,c) function cm.bmrlcon(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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.bmrlfilter,1,nil,ft) return ft>-1 and Duel.CheckReleaseGroup(tp,cm.bmrlfilter,1,nil,ft)
end end
function cm.bmrlop(e,tp,eg,ep,ev,re,r,rp,c) function cm.bmrlop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local g=Duel.SelectReleaseGroup(tp,cm.bmrlfilter,1,1,nil,ft) local g=Duel.SelectReleaseGroup(tp,cm.bmrlfilter,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
......
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,7 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,3,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,3,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -49,7 +49,7 @@ function cm.filter1(c,e,tp) ...@@ -49,7 +49,7 @@ function cm.filter1(c,e,tp)
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) and chkc:IsControler(tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) and chkc:IsControler(tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
......
...@@ -35,7 +35,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter,1,nil,1-tp) return eg:IsExists(cm.spfilter,1,nil,1-tp)
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
...@@ -53,7 +53,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,g) Duel.SSet(tp,g)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then elseif Duel.GetMZoneCount(tp)<=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
end end
end end
\ No newline at end of file
...@@ -28,7 +28,7 @@ function cm.filter(c,e,tp) ...@@ -28,7 +28,7 @@ function cm.filter(c,e,tp)
end end
function cm.setfilter(c,e,tp) function cm.setfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND+LOCATION_DECK) then return false end if c:IsLocation(LOCATION_HAND+LOCATION_DECK) then return false end
if c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then return true end if c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then return true end
if (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable() then return true end if (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable() then return true end
return false return false
end end
......
...@@ -104,7 +104,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -104,7 +104,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if not tc or tc:GetFlagEffect(m)==0 or not tc:IsAbleToExtra() then return false end if not tc or tc:GetFlagEffect(m)==0 or not tc:IsAbleToExtra() then return false end
local ft=0 local ft=0
if tc:IsControler(tp) then ft=-1 end if tc:IsControler(tp) then ft=-1 end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=ft then return false end if Duel.GetMZoneCount(tp)<=ft then return false end
if not Duel.IsExistingMatchingCard(cm.f2,tp,LOCATION_EXTRA,0,1,tc,e,tp,tc) then return false end if not Duel.IsExistingMatchingCard(cm.f2,tp,LOCATION_EXTRA,0,1,tc,e,tp,tc) then return false end
return tc==Duel.GetAttacker() or tc==Duel.GetAttackTarget() return tc==Duel.GetAttacker() or tc==Duel.GetAttackTarget()
end end
......
...@@ -224,12 +224,12 @@ function cm.CopySpellChainingFilter(c,e,tp,eg,ep,ev,re,r,rp) ...@@ -224,12 +224,12 @@ function cm.CopySpellChainingFilter(c,e,tp,eg,ep,ev,re,r,rp)
return true return true
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) then if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_EFFECT) c:AddMonsterAttribute(TYPE_EFFECT)
......
...@@ -59,13 +59,13 @@ function cm.ssfilter(c,e,tp) ...@@ -59,13 +59,13 @@ function cm.ssfilter(c,e,tp)
return c:IsType(TYPE_TRAP) and c.Senya_desc_with_nanahira and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT) return c:IsType(TYPE_TRAP) and c.Senya_desc_with_nanahira and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),0,0x21,7,2850,2100,RACE_FAIRY,ATTRIBUTE_LIGHT)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():GetOverlayGroup():IsExists(cm.ssfilter,1,nil,e,tp) and e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():GetOverlayGroup():IsExists(cm.ssfilter,1,nil,e,tp) and e:GetHandler():IsType(TYPE_XYZ) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_MZONE)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local gg=c:GetOverlayGroup() local gg=c:GetOverlayGroup()
if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) and gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) and gg:IsExists(cm.ssfilter,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp):GetFirst() local sc=gg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp):GetFirst()
if sc then if sc then
......
...@@ -34,7 +34,7 @@ function cm.sfilter(c,e,tp) ...@@ -34,7 +34,7 @@ function cm.sfilter(c,e,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil,e) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil,e)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Senya.CheckGroup(g,cm.gcheck,nil,3,3,ft) end if chk==0 then return Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Senya.CheckGroup(g,cm.gcheck,nil,3,3,ft) end
local tg=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,g,cm.gcheck,nil,3,3,ft) local tg=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,g,cm.gcheck,nil,3,3,ft)
...@@ -52,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not g or g:FilterCount(cm.chkfilter,nil,e,tp)~=3 then return end if not g or g:FilterCount(cm.chkfilter,nil,e,tp)~=3 then return end
local v=g:GetSum(cm.val) local v=g:GetSum(cm.val)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
......
...@@ -33,14 +33,14 @@ function cm.otcon(e,c,minc) ...@@ -33,14 +33,14 @@ function cm.otcon(e,c,minc)
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,0,nil)
return c:GetLevel()>6 and minc<=2 return c:GetLevel()>6 and minc<=2
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2 and (Duel.GetMZoneCount(tp)>0 and mg:GetCount()>=2
or Duel.CheckTribute(c,1) and mg:GetCount()>=1) or Duel.CheckTribute(c,1) and mg:GetCount()>=1)
or c:GetLevel()>4 and c:GetLevel()<=6 and minc<=1 or c:GetLevel()>4 and c:GetLevel()<=6 and minc<=1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=1 and Duel.GetMZoneCount(tp)>0 and mg:GetCount()>=1
end end
function cm.otop(e,tp,eg,ep,ev,re,r,rp,c) function cm.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,0,nil)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2 local b1=Duel.GetMZoneCount(tp)>0 and mg:GetCount()>=2
local b2=Duel.CheckTribute(c,1) local b2=Duel.CheckTribute(c,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=mg:Select(tp,1,1,nil) local g=mg:Select(tp,1,1,nil)
......
...@@ -64,14 +64,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -64,14 +64,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -91,14 +91,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -91,14 +91,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -82,7 +82,7 @@ end ...@@ -82,7 +82,7 @@ end
function cm.retop(e,tp,eg,ep,ev,re,r,rp) function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject():Filter(cm.rfilter,nil,e,tp) local g=e:GetLabelObject():Filter(cm.rfilter,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then if Duel.GetMZoneCount(tp)<g:GetCount() then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end end
e:Reset() e:Reset()
...@@ -132,14 +132,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -132,14 +132,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -98,14 +98,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -98,14 +98,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -60,14 +60,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -60,14 +60,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -62,13 +62,13 @@ function cm.filter(c,e,tp,mg) ...@@ -62,13 +62,13 @@ function cm.filter(c,e,tp,mg)
end end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=e:GetHandler():GetMaterial() local mg=e:GetHandler():GetMaterial()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp) function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local mg=e:GetHandler():GetMaterial() local mg=e:GetHandler():GetMaterial()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=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_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -109,14 +109,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -109,14 +109,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -71,7 +71,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +71,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
--if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end --if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,e:GetHandler(),e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,e:GetHandler(),e,tp)
if chk==0 then if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
return ft>0 and g:CheckWithSumEqual(Card.GetLevel,4,1,ft) return ft>0 and g:CheckWithSumEqual(Card.GetLevel,4,1,ft)
end end
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) --Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -80,7 +80,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,7 +80,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetMZoneCount(tp)
if not (ft>0 and g:CheckWithSumEqual(Card.GetLevel,4,1,ft)) then return end if not (ft>0 and g:CheckWithSumEqual(Card.GetLevel,4,1,ft)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectWithSumEqual(tp,Card.GetLevel,4,1,ft) local sg=g:SelectWithSumEqual(tp,Card.GetLevel,4,1,ft)
...@@ -98,14 +98,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -98,14 +98,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -70,7 +70,7 @@ function cm.filter1(c,e,tp) ...@@ -70,7 +70,7 @@ function cm.filter1(c,e,tp)
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -94,14 +94,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -94,14 +94,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -60,14 +60,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -60,14 +60,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -44,7 +44,7 @@ function cm.spcon(e,c) ...@@ -44,7 +44,7 @@ function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetMZoneCount(c:GetControler())>0
end end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp) function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=e:GetHandler():GetReasonCard()
...@@ -75,14 +75,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -75,14 +75,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -50,14 +50,14 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,14 +50,14 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil) return eg:IsExists(cm.cfilter,1,nil)
end end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp) function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetMZoneCount(tp)<=0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
end end
...@@ -93,14 +93,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -93,14 +93,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -61,14 +61,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -61,14 +61,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -70,14 +70,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -70,14 +70,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -63,14 +63,14 @@ function cm.spfilter(c,e,tp,m) ...@@ -63,14 +63,14 @@ function cm.spfilter(c,e,tp,m)
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 if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetMZoneCount(tp)<=0 then return false end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
return cm.spfilter(e:GetHandler(),e,tp,mg) return cm.spfilter(e:GetHandler(),e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(cm.mtfilter,tp,LOCATION_GRAVE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......
...@@ -143,7 +143,7 @@ end ...@@ -143,7 +143,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local loc=0 local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end if Duel.GetMZoneCount(tp)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end if loc==0 then return false end
local g=nil local g=nil
...@@ -159,7 +159,7 @@ end ...@@ -159,7 +159,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) then return end if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) then return end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local ft1=math.max(Duel.GetLocationCount(tp,LOCATION_MZONE),2) local ft1=math.max(Duel.GetMZoneCount(tp),2)
local ft2=math.max(Duel.GetLocationCountFromEx(tp),2) local ft2=math.max(Duel.GetLocationCountFromEx(tp),2)
local ft=math.max(Duel.GetUsableMZoneCount(tp),2) local ft=math.max(Duel.GetUsableMZoneCount(tp),2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then if Duel.IsPlayerAffectedByEffect(tp,59822133) then
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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