Commit 3b487301 authored by Huangnan's avatar Huangnan

fix

parent d94ca6b7
Pipeline #38260 failed with stages
in 38 minutes and 53 seconds
......@@ -47,7 +47,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
--[[While this card is a Continuous Spell, it gains this effect.
● Each time your opponent adds a card(s) from their Deck to their hand, they can choose to reveal 1 other card in their hand and keep it revealed until the end of your next turn. If they do not, place that added card(s) to the bottom of your Deck.]]
aux.RegisterMaxxCEffect(c,id+100,nil,LOCATION_SZONE,EVENT_TO_HAND,s.reccon,s.recopOUT,s.recopOUT,s.flaglabel,false,false,nil,aux.AddThisCardInSZoneAlreadyCheck(c))
aux.RegisterMaxxCEffect(c,id+100,nil,LOCATION_SZONE,EVENT_TO_HAND,s.reccon,s.recopOUT,s.recopIN,s.flaglabel,false,false,nil,aux.AddThisCardInSZoneAlreadyCheck(c))
aux.RegisterTriggeringArchetypeCheck(c,ARCHE_SEPIALIFE)
if not s.global_check then
s.global_check=true
......@@ -161,6 +161,43 @@ function s.flaglabel(e,tp,eg,ep,ev,re,r,rp)
return 0
end
function s.recopOUT(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,tp,id)
local sg=Duel.Group(s.cfilter,tp,0,LOCATION_HAND,nil,1-tp)
local g=Duel.Group(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,sg)
if #g==0 or not Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then
Duel.SendtoDeck(sg,tp,SEQ_DECKTOP,REASON_EFFECT)
local rg=Duel.GetOperatedGroup()
local og=rg:Filter(Card.IsLocation,nil,LOCATION_DECK)
local ct1=og:FilterCount(Card.IsControler,nil,tp)
local ct2=og:FilterCount(Card.IsControler,nil,1-tp)
if ct1>0 then
if ct1>1 then
Duel.SortDecktop(tp,tp,ct1)
end
for i=1,ct1 do
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tc,SEQ_DECKBOTTOM)
end
end
if ct2>0 then
if ct2>1 then
Duel.SortDecktop(tp,1-tp,ct2)
end
for i=1,ct2 do
local tc=Duel.GetDecktopGroup(1-tp,1):GetFirst()
Duel.MoveSequence(tc,SEQ_DECKBOTTOM)
end
end
else
local tc=g:Select(1-tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESETS_STANDARD_PHASE_END,Duel.GetNextPhaseCount(nil,tp))
tc:RegisterEffect(e1)
end
end
function s.recopIN(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,tp,id)
local fid=e:GetHandler():GetFieldID()
local sg=Duel.Group(Card.HasFlagEffectLabel,tp,0,LOCATION_HAND,nil,id+100,fid)
......
......@@ -84,17 +84,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
if Duel.GetActivityCount(p,ACTIVITY_ATTACK)==0 and Duel.GetMZoneCount(p,nil,p)>0
and Duel.IsExists(false,aux.Necro(Card.IsCanBeSpecialSummoned),p,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,0,tp,false,false) and Duel.SelectYesNo(p,aux.Stringid(id,4)) then
and Duel.IsExists(false,aux.Necro(Card.IsCanBeSpecialSummoned),p,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,0,p,false,false) and Duel.SelectYesNo(p,aux.Stringid(id,4)) then
if brk then
Duel.BreakEffect()
brk=false
end
local tc=Duel.Select(HINTMSG_SPSUMMON,false,p,aux.Necro(Card.IsCanBeSpecialSummoned),p,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,0,tp,false,false):GetFirst()
local tc=Duel.Select(HINTMSG_SPSUMMON,false,p,aux.Necro(Card.IsCanBeSpecialSummoned),p,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,0,p,false,false):GetFirst()
if tc and Duel.SpecialSummon(tc,0,p,p,false,false,POS_FACEUP)>0 then
brk=true
end
end
if Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 then
if Duel.GetCustomActivityCount(id,p,ACTIVITY_CHAIN)==0 then
if brk then
Duel.BreakEffect()
end
......
......@@ -496,7 +496,7 @@ function Auxiliary.ThisCardInLocationAlreadyCheckReg(setf,getf,ignore_reason)
--condition of continous effect will be checked before other effects
--Debug.Message("RE: "..tostring(re))
--Debug.Message("GETF: "..tostring(getf(e)))
if re==nil then return false end
if re==nil or aux.GetValueType(re)~="Effect" then return false end
if getf(e)~=nil then return false end
--Debug.Message("r: "..tostring(r))
if (r&REASON_EFFECT)>0 or ignore_reason then
......
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