Commit 93718ebd authored by wind2009's avatar wind2009

Fix

parent 9c3f6d8a
......@@ -72,6 +72,6 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
Duel.ShuffleDeck(1-tp)
end
Duel.ShuffleDeck(1-tp)
end
......@@ -43,7 +43,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.cfilter(c,tp,g)
return c:GetOwner()==1-tp and g:IsExists(Card.IsRace,1,c,RACE_ILLUSION)
return c:GetOwner()==1-tp and c:IsFaceup() and g:IsExists(Card.IsRace,1,c,RACE_ILLUSION)
end
function s.fselect(g,tp,ec)
return g:IsExists(s.cfilter,1,nil,tp,g) and Duel.GetLocationCountFromEx(tp,tp,g,ec)>0
......@@ -66,7 +66,8 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON|REASON_MATERIAL)
g:DeleteGroup()
end
function s.thfilter(c)
......
......@@ -10,6 +10,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
......@@ -41,8 +42,7 @@ function s.ffilter(c)
return c:IsFusionSetCard(0x2d4)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
return Duel.IsMainPhase()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_EXTRA,2,nil) end
......@@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA):Filter(Card.IsFacedown,nil)
local g=hg:RandomSelect(tp,2)
if g:GetCount()<1 then return end
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(tp,g)
if g:IsExists(s.spfilter,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -85,6 +85,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.GetControl(g,tp)
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