Commit e8666bba authored by salix5's avatar salix5

fix

parent a9ba5ab4
...@@ -25,33 +25,43 @@ function c43262273.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,33 +25,43 @@ function c43262273.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_HAND)
end end
function c43262273.activate(e,tp,eg,ep,ev,re,r,rp) function c43262273.activate(e,tp,eg,ep,ev,re,r,rp)
local g0=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,g0)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) local tc=sg:GetFirst()
Duel.ShuffleHand(1-tp) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
tc:RegisterFlagEffect(43262273,RESET_EVENT+0x1fe0000,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
if Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_END then if Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_END then
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) e1:SetReset(RESET_PHASE+PHASE_END,3)
else else
e1:SetLabel(0) e1:SetLabel(0)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
end end
e1:SetLabelObject(tc)
e1:SetCondition(c43262273.retcon) e1:SetCondition(c43262273.retcon)
e1:SetOperation(c43262273.retop) e1:SetOperation(c43262273.retop)
sg:GetFirst():RegisterEffect(e1) Duel.RegisterEffect(e1,tp)
end end
Duel.ShuffleHand(1-tp)
end end
function c43262273.retcon(e,tp,eg,ep,ev,re,r,rp) function c43262273.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() local tc=e:GetLabelObject()
if tc:GetFlagEffect(43262273)==0 then
e:Reset()
return false
else
return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()~=e:GetLabel()
end
end end
function c43262273.retop(e,tp,eg,ep,ev,re,r,rp) function c43262273.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) local tc=e:GetLabelObject()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
end end
...@@ -23,16 +23,29 @@ function c75673220.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,16 +23,29 @@ function c75673220.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local rg=g:RandomSelect(tp,1) local rg=g:RandomSelect(tp,1)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) local tc=rg:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
tc:RegisterFlagEffect(75673220,RESET_EVENT+0x1fe0000,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabelObject(tc)
e1:SetCondition(c75673220.retcon)
e1:SetOperation(c75673220.retop) e1:SetOperation(c75673220.retop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
rg:GetFirst():RegisterEffect(e1) Duel.RegisterEffect(e1,tp)
end
function c75673220.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(75673220)==0 then
e:Reset()
return false
else
return true
end
end end
function c75673220.retop(e,tp,eg,ep,ev,re,r,rp) function c75673220.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) local tc=e:GetLabelObject()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
end end
...@@ -99,21 +99,30 @@ function c77498348.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,21 +99,30 @@ function c77498348.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local rg=g:RandomSelect(tp,1) local rg=g:RandomSelect(tp,1)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT) local tc=rg:GetFirst()
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
tc:RegisterFlagEffect(77498348,RESET_EVENT+0x1fe0000,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCondition(c77498348.retcon) e1:SetCondition(c77498348.retcon)
e1:SetOperation(c77498348.retop) e1:SetOperation(c77498348.retop)
rg:GetFirst():RegisterEffect(e1) Duel.RegisterEffect(e1,tp)
end end
end end
function c77498348.retcon(e,tp,eg,ep,ev,re,r,rp) function c77498348.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=e:GetOwnerPlayer() local tc=e:GetLabelObject()
if tc:GetFlagEffect(77498348)==0 then
e:Reset()
return false
else
return Duel.GetTurnPlayer()==1-tp
end
end end
function c77498348.retop(e,tp,eg,ep,ev,re,r,rp) function c77498348.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) local tc=e:GetLabelObject()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
end 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