Commit 4af35d02 authored by Tachibana's avatar Tachibana

sign out

parent 4151834f
No preview for this file type
......@@ -94,7 +94,10 @@ end
function c12301666.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local che=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)
local che=nil
--adjust
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK) and Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK):GetHandlerPlayer()==tp then
che=1 end
local gof=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,nil)
if gof then
local ghfc=Duel.GetMatchingGroupCount(c12301666.filthh,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
......@@ -107,25 +110,23 @@ function c12301666.tdop(e,tp,eg,ep,ev,re,r,rp)
local gh=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
while #gh>0 do
local tc=gh:RandomSelect(1-tp,1):GetFirst()
if #gh==1 then Duel.ConfirmCards(tp,tc)
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
if #gh==1 then Duel.ConfirmCards(tp,tc) end
gh:RemoveCard(tc)
end
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
tc=g:GetMinGroup(Card.GetSequence):GetFirst()
if not tc then return end
Duel.ConfirmCards(1-tp,tc)
tc:ReverseInDeck()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12301666,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_DECK)
e2:SetCountLimit(1)
e2:SetTarget(c12301666.destg)
e2:SetOperation(c12301666.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12301666,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1)
e1:SetTarget(c12301666.destg)
e1:SetOperation(c12301666.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
else Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) end
gh:RemoveCard(tc)
end
end
function c12301666.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsFaceup() 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