Commit 6912c3e6 authored by mercury233's avatar mercury233

fix

parent e1090339
Pipeline #22283 passed with stages
in 59 seconds
......@@ -60,10 +60,10 @@ function s.filter(c)
end
function s.hlpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function s.hlptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end
......
......@@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(tc:GetCode())
e1:SetTarget(s.limit)
e1:SetValue(s.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
......
......@@ -3,6 +3,7 @@
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_BRAINWASHING_CHECK)
c:EnableReviveLimit()
c:SetSPSummonOnce(id)
--material
......@@ -74,6 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then Duel.SendtoGrave(tc,REASON_EFFECT) end
......@@ -97,20 +99,10 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.rettg)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetLabelObject(e1)
e2:SetOperation(s.reset)
Duel.RegisterEffect(e2,tp)
Duel.AdjustAll()
c:ResetFlagEffect(id)
e1:Reset()
end
function s.rettg(e,c)
return c==e:GetLabelObject() and c:GetFlagEffect(id)>0
end
function s.reset(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
local tc=e1:GetLabelObject()
tc:ResetFlagEffect(id)
e1:Reset()
e:Reset()
end
......@@ -50,7 +50,7 @@ function s.sop(e,tp,eg,ep,ev,re,r,rp)
if not tc then return end
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false)
local op=aux.SelectFromOptions(tp,{b1,1192},{b2,1152})
local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1152})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -86,6 +86,13 @@ end
function c101202047.pcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101202047)<=0 then return false end
local c=e:GetHandler()
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if lpz==nil or rpz==nil then return false end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
......@@ -95,16 +102,9 @@ function c101202047.pcon(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local eset={e1}
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if lpz==nil or rpz==nil then return false end
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local g=Duel.GetFieldGroup(tp,loc,0)
local res=g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
e1:Reset()
......@@ -145,7 +145,10 @@ function c101202047.pop(e,tp,eg,ep,ev,re,r,rp)
aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,aux.TRUE,true,1,math.min(#tg,ft))
aux.GCheckAdditional=nil
if not g then return end
if not g then
e1:Reset()
return
end
local sg=Group.CreateGroup()
sg:Merge(g)
Duel.HintSelection(Group.FromCards(lpz))
......
......@@ -43,10 +43,10 @@ end
function c101202058.intg(e,c)
return c:IsFaceup() and c:IsSetCard(0x29c)
end
function c101202058.efilter(e,re,rp)
function c101202058.efilter(e,re,rp,c)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g:IsContains(e:GetHandler())
return not g or not g:IsContains(c)
end
function c101202058.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment