Commit 1e325032 authored by fallenstardust's avatar fallenstardust
parent 37ef3351
...@@ -14,9 +14,9 @@ function s.initial_effect(c) ...@@ -14,9 +14,9 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate without draw --Activate without draw
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e2:SetCondition(s.dcon) e2:SetCondition(s.dcon)
e2:SetTarget(s.dtarget) e2:SetTarget(s.dtarget)
e2:SetOperation(s.dactivate) e2:SetOperation(s.dactivate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -31,7 +31,7 @@ function s.ndcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function s.ndcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.dcon(e,tp,eg,ep,ev,re,r,rp) function s.dcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function s.filter(c) function s.filter(c)
return aux.IsCodeListed(c,101204051) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return aux.IsCodeListed(c,101204051) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
...@@ -63,18 +63,15 @@ function s.dactivate(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,18 +63,15 @@ function s.dactivate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local th=Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if th>0 then end
local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=6-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local ct2=6-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if ct1>0 then if ct1>0 then
Duel.ShuffleDeck(tp)
Duel.Draw(tp,ct1,REASON_EFFECT) Duel.Draw(tp,ct1,REASON_EFFECT)
end
if ct2>0 then
Duel.Draw(1-tp,ct2,REASON_EFFECT)
end
end end
if ct2>0 then
Duel.Draw(1-tp,ct2,REASON_EFFECT)
end end
end end
\ No newline at end of file
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