Commit 8021daf6 authored by POLYMER's avatar POLYMER

fix

parent cda02571
......@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
......@@ -37,6 +38,9 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.splimit(e,se,sp,st)
return se:GetHandler():IsCode(12866600)
end
function s.chainfilter(re,tp,cid)
return not (re:GetHandler():IsCode(12866600))
end
......
......@@ -19,11 +19,13 @@ function c22021820.initial_effect(c)
e2:SetOperation(c22021820.spop)
c:RegisterEffect(e2)
end
function c22021820.cfilter(c)
return c:IsFaceup()
end
function c22021820.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22021820.cfilter,c:GetControler(),LOCATION_PZONE,0,1,nil)
end
function c22021820.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -78,26 +78,25 @@ end
function s.xyzfilter(c, e, tp)
return c:IsRank(6) and s.ForceFighter(c) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
and c:IsCanBeSpecialSummoned(e, 0, tp, true, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.GetLocationCountFromEx(tp) > 0
and Duel.IsExistingMatchingCard(s.xyzfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp) end
if chk == 0 then return Duel.IsExistingMatchingCard(s.xyzfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp) end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if Duel.GetLocationCountFromEx(tp) <= 0 then return end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = Duel.SelectMatchingCard(tp, s.xyzfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp)
local sc = g:GetFirst()
if sc and Duel.SpecialSummon(sc, 0, tp, tp, false, false, POS_FACEUP) > 0 then
if sc and Duel.SpecialSummon(sc, 0, tp, tp, true, false, POS_FACEUP) > 0 then
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_GRAVE) then
Duel.Overlay(sc, Group.FromCards(c))
end
end
end
end
\ No newline at end of file
......@@ -65,24 +65,24 @@ end
function s.spfilter(c, e, tp)
return s.ForceFighter(c) and c:IsRank(4) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
and c:IsCanBeSpecialSummoned(e, 0, tp, true, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.GetLocationCountFromEx(tp) > 0
and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp) end
if chk == 0 then return Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp) end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if Duel.GetLocationCountFromEx(tp) <= 0 then return end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp)
local sc = g:GetFirst()
if sc and Duel.SpecialSummon(sc, 0, tp, tp, false, false, POS_FACEUP) > 0 then
if sc and Duel.SpecialSummon(sc, 0, tp, tp, true, false, POS_FACEUP) > 0 then
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_SZONE) then
Duel.Overlay(sc, Group.FromCards(c))
end
......
......@@ -28,7 +28,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1, id + 100)
--e2:SetCountLimit(1, id + 100)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
......@@ -43,7 +43,7 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1, id + 100)
--e4:SetCountLimit(1, id + 100)
e4:SetCondition(s.leavecon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
......@@ -104,24 +104,23 @@ end
function s.xyzfilter(c, e, tp)
return s.ForceFighter(c) and c:IsRank(8) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
and c:IsCanBeSpecialSummoned(e, 0, tp, true, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.GetLocationCountFromEx(tp) > 0
and Duel.IsExistingMatchingCard(s.xyzfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp) end
if chk == 0 then return Duel.IsExistingMatchingCard(s.xyzfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp) end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if Duel.GetLocationCountFromEx(tp) <= 0 then return end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = Duel.SelectMatchingCard(tp, s.xyzfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp)
local sc = g:GetFirst()
if sc and Duel.SpecialSummon(sc, 0, tp, tp, false, false, POS_FACEUP) > 0 then
if sc and Duel.SpecialSummon(sc, 0, tp, tp, true, false, POS_FACEUP) > 0 then
if c:IsRelateToEffect(e) then
Duel.Overlay(sc, Group.FromCards(c))
......
......@@ -43,6 +43,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
att=att|tc:GetAttribute()
end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,att) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.actfilter(c,tp)
......@@ -50,11 +51,7 @@ function s.actfilter(c,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local att=0
local g=eg:Filter(Card.IsFaceup,nil)
for tc in aux.Next(g) do
att=att|tc:GetAttribute()
end
local att=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,att)
if #g>0 then
......
......@@ -51,7 +51,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Equip(tp,c,tc)
......
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