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) ...@@ -60,10 +60,10 @@ function s.filter(c)
end end
function s.hlpcon(e,tp,eg,ep,ev,re,r,rp) function s.hlpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() 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 end
function s.hlptg(e,tp,eg,ep,ev,re,r,rp,chk) 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) local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end end
......
...@@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetLabel(tc:GetCode()) e1:SetLabel(tc:GetCode())
e1:SetTarget(s.limit) e1:SetValue(s.limit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
--coded by Lyris --coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_BRAINWASHING_CHECK)
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetSPSummonOnce(id) c:SetSPSummonOnce(id)
--material --material
...@@ -74,6 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(s.retcon) e1:SetCondition(s.retcon)
e1:SetOperation(s.retop) e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then Duel.SendtoGrave(tc,REASON_EFFECT) end 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) ...@@ -97,20 +99,10 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.rettg) e1:SetTarget(s.rettg)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) Duel.AdjustAll()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) c:ResetFlagEffect(id)
e2:SetCode(EVENT_ADJUST) e1:Reset()
e2:SetLabelObject(e1)
e2:SetOperation(s.reset)
Duel.RegisterEffect(e2,tp)
end end
function s.rettg(e,c) function s.rettg(e,c)
return c==e:GetLabelObject() and c:GetFlagEffect(id)>0 return c==e:GetLabelObject() and c:GetFlagEffect(id)>0
end 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) ...@@ -50,7 +50,7 @@ function s.sop(e,tp,eg,ep,ev,re,r,rp)
if not tc then return end if not tc then return end
local b1=tc:IsAbleToHand() local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false) 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 if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
......
...@@ -86,6 +86,13 @@ end ...@@ -86,6 +86,13 @@ end
function c101202047.pcon(e,tp,eg,ep,ev,re,r,rp) function c101202047.pcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101202047)<=0 then return false end if Duel.GetFlagEffect(tp,101202047)<=0 then return false end
local c=e:GetHandler() 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) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON) e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
...@@ -95,16 +102,9 @@ function c101202047.pcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,16 +102,9 @@ function c101202047.pcon(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local eset={e1} 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 lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end 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 g=Duel.GetFieldGroup(tp,loc,0)
local res=g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) local res=g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
e1:Reset() e1:Reset()
...@@ -145,7 +145,10 @@ function c101202047.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -145,7 +145,10 @@ function c101202047.pop(e,tp,eg,ep,ev,re,r,rp)
aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft) aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,aux.TRUE,true,1,math.min(#tg,ft)) local g=tg:SelectSubGroup(tp,aux.TRUE,true,1,math.min(#tg,ft))
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if not g then return end if not g then
e1:Reset()
return
end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
sg:Merge(g) sg:Merge(g)
Duel.HintSelection(Group.FromCards(lpz)) Duel.HintSelection(Group.FromCards(lpz))
......
...@@ -43,10 +43,10 @@ end ...@@ -43,10 +43,10 @@ end
function c101202058.intg(e,c) function c101202058.intg(e,c)
return c:IsFaceup() and c:IsSetCard(0x29c) return c:IsFaceup() and c:IsSetCard(0x29c)
end 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 if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g:IsContains(e:GetHandler()) return not g or not g:IsContains(c)
end end
function c101202058.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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