Commit 72ed41de authored by POLYMER's avatar POLYMER

fix

parent fca91818
...@@ -34,11 +34,11 @@ function c49811222.spfilter(c,e,tp) ...@@ -34,11 +34,11 @@ function c49811222.spfilter(c,e,tp)
return c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c49811222.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c49811222.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c49811222.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c49811222.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c49811222.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c49811222.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c49811222.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c49811222.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -30,12 +30,15 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,12 +30,15 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
{b3,aux.Stringid(m,2)}) {b3,aux.Stringid(m,2)})
if op==1 then if op==1 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
e:SetCategory(CATEGORY_TOGRAVE)
e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1)
elseif op==2 then elseif op==2 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:GetHandler():RegisterFlagEffect(2,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(2,RESET_PHASE+PHASE_END,0,1)
elseif op==3 then elseif op==3 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:GetHandler():RegisterFlagEffect(3,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(3,RESET_PHASE+PHASE_END,0,1)
end end
end end
......
...@@ -33,6 +33,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,6 +33,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if op==1 then if op==1 then
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1)
elseif op==2 then elseif op==2 then
......
...@@ -39,6 +39,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,6 +39,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if op==1 then if op==1 then
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.HintSelection(g) Duel.HintSelection(g)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1)
elseif op==2 then elseif op==2 then
......
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