Commit 52b22055 authored by POLYMER's avatar POLYMER

fix

parent 7061df2f
......@@ -61,14 +61,30 @@ end
function s.ovfilter1(c)
return c:IsFaceup() and c:IsLevel(3) and c:IsRace(RACE_INSECT) and c:IsCanOverlay()
end
function s.spcon(e,c)
function s.spcon(e,c,mg1,min,max)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.ovfilter1,tp,LOCATION_MZONE+LOCATION_SZONE,0,2,nil)
------------------------MustMaterialCheck---------------------------------------
local mg=nil
if mg1 then
mg=mg1:Filter(Card.IsCanBeXyzMaterial,nil,c)
else
mg=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_MZONE+LOCATION_SZONE,0,nil,c)
end
-----------------------------------------------------------------------------------
return mg:Filter(s.ovfilter1,nil):GetCount()>1
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
function s.spop(e,tp,eg,ep,ev,re,r,rp,c,mg1,min,max)
------------------------MustMaterialCheck---------------------------------------
local mg=nil
if mg1 then
mg=mg1:Filter(Card.IsCanBeXyzMaterial,nil,c)
else
mg=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_MZONE+LOCATION_SZONE,0,nil,c)
end
-----------------------------------------------------------------------------------
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local g=Duel.SelectMatchingCard(tp,s.ovfilter1,tp,LOCATION_MZONE+LOCATION_SZONE,0,2,63,nil)
local g=mg:Select(tp,2,63,nil)
for mc in aux.Next(g) do
local mg=mc:GetOverlayGroup()
if mg:GetCount()~=0 then
......
......@@ -110,7 +110,6 @@ function s.thop(e, tp, eg, ep, ev, re, r, rp)
if #g > 0 then
Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
......@@ -160,27 +159,29 @@ function s.spop(e, tp, eg, ep, ev, re, r, rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
-- 限制:自己不是超量怪兽不能从额外卡组特殊召唤
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1, 0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e1, tp)
local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1, 0)
e3:SetTarget(s.splimit)
e3:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e3, tp)
end
function s.splimit(e, c)
......
--幻叙霸皇 红发香克斯
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--c:EnableReviveLimit()
--Spsummon limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
......@@ -22,17 +22,16 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
--e2:SetCondition(s.chcon)
e2:SetCondition(s.chcon)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
--Spsummon from Hand (Effect 3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,id)
e3:SetCondition(s.spcon_add)
e3:SetTarget(s.sptg_add)
......@@ -40,6 +39,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.splimit(e,se,sp,st)
Debug.Message(se:GetHandler():IsSetCard(0x838))
return se:GetHandler():IsSetCard(0x838) or se:GetHandler()==e:GetHandler()
end
function s.immval(e,te)
......@@ -119,7 +119,7 @@ function s.retfilter(c,fid)
end
function s.spcon_add(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_DECK)
return not c:IsPreviousLocation(LOCATION_DECK)
end
function s.sptg_add(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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