Commit 5d167738 authored by Huangnan's avatar Huangnan

fix

parent 872150fd
Pipeline #40585 failed with stages
in 3 minutes and 59 seconds
......@@ -42,6 +42,7 @@ function s.cfilter(c,tp)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,s.cfilter,1,REASON_SPSUMMON,true,c,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
......
......@@ -27,15 +27,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAttackPos() and not c:IsHasEffect(EFFECT_SET_POSITION) end
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
function s.filter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if #sg>0 then
Duel.HintSelection(sg)
local tc=sg:GetFirst()
......
......@@ -2,7 +2,7 @@
function c16311005.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c16311005.matfilter,2,2,c16311005.lcheck)
aux.AddLinkProcedure(c,c16311005.matfilter,2,2)
--extra material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
......@@ -37,9 +37,6 @@ function c16311005.initial_effect(c)
e2:SetOperation(c16311005.operation)
c:RegisterEffect(e2)
end
function c16311005.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x5dc6)
end
function c16311005.matfilter(c)
return c:IsLinkSetCard(0x5dc6) and c:IsType(TYPE_EFFECT) or c:IsCode(16311000)
end
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.atktg)
......@@ -34,7 +34,6 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+1)
e3:SetCost(cm.descost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
......@@ -73,45 +72,22 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.filter2(c,e,tp)
function cm.disable(e,c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_GRAVE)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter2,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter2,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.disable)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_MONSTER)
......
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