Commit a90d5e61 authored by Tachibana's avatar Tachibana

ndyd

parent 90220c8b
Pipeline #4337 passed with stages
in 30 minutes and 11 seconds
...@@ -30,10 +30,10 @@ function c33700101.filter(c) ...@@ -30,10 +30,10 @@ function c33700101.filter(c)
return c:IsSetCard(0x442) return c:IsSetCard(0x442)
end end
function c33700101.filter2(c) function c33700101.filter2(c)
return not c:IsSetCard(0x442) return not c:IsSetCard(0x442)
end end
function c33700101.con(e) function c33700101.con(e)
local g=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)<g:GetCount() or not Duel.IsExistingMatchingCard(c33700101.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) return g:GetClassCount(Card.GetCode)<g:GetCount() or not Duel.IsExistingMatchingCard(c33700101.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end end
function c33700101.thcon(e,tp,eg,ep,ev,re,r,rp) function c33700101.thcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -42,10 +42,10 @@ function c33700101.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,10 +42,10 @@ function c33700101.thcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c33700101.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700101.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0 local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result return result
end end
local dt=Duel.GetDrawCount(tp) local dt=Duel.GetDrawCount(tp)
if dt~=0 then if dt~=0 then
_replace_count=0 _replace_count=0
...@@ -63,35 +63,35 @@ function c33700101.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,35 +63,35 @@ function c33700101.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c33700101.thop(e,tp,eg,ep,ev,re,r,rp) function c33700101.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
_replace_count=_replace_count+1 _replace_count=_replace_count+1
if _replace_count<=_replace_max then if _replace_count<=_replace_max then
Duel.ConfirmDecktop(tp,3) Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then if g:GetCount()>0 then
local sg2=g:Filter(tp,c33700101.filter2,nil) local sg2=g:Filter(c33700101.filter2,nil)
if g:IsExists(c33700101.filter,1,nil) then if g:IsExists(c33700101.filter,1,nil) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Filter(tp,c33700101.filter,nil) local sg=g:Filter(c33700101.filter,nil)
if sg:GetFirst():IsAbleToHand() then if sg:GetFirst():IsAbleToHand() then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
if sg:GetClassCount(Card.GetCode)<sg:GetCount() then if sg:GetClassCount(Card.GetCode)<sg:GetCount() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_SKIP_DP) e1:SetCode(EFFECT_SKIP_DP)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
else else
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end
end end
end Duel.MoveSequence(sg2,1)
Duel.MoveSequence(sg2,1) end
end end
end
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