Commit e89a9441 authored by wind2009's avatar wind2009

Update Emボール・ライダー

parent 709f5592
No preview for this file type
...@@ -65,6 +65,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,6 +65,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.SelectYesNo(tp,aux.Stringid(id,8)) then and Duel.SelectYesNo(tp,aux.Stringid(id,8)) then
Duel.BreakEffect()
local ct=tc:GetLeftScale() local ct=tc:GetLeftScale()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -103,8 +104,8 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -103,8 +104,8 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local sel=0 local sel=0
if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil) then sel=sel+1 end if Duel.IsExistingMatchingCard(s.schfilter,tp,LOCATION_DECK,0,1,nil) then sel=sel+1 end
if Duel.IsExistingMatchingCard(s.schfilter,tp,LOCATION_DECK,0,1,nil) then sel=sel+2 end if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil) then sel=sel+2 end
e:SetLabel(sel) e:SetLabel(sel)
return sel~=0 return sel~=0
end end
...@@ -114,23 +115,29 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -114,23 +115,29 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
sel=Duel.SelectOption(tp,aux.Stringid(id,5),aux.Stringid(id,6))+1 sel=Duel.SelectOption(tp,aux.Stringid(id,5),aux.Stringid(id,6))+1
elseif sel==1 then elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(id,5)) Duel.SelectOption(tp,aux.Stringid(id,5))
else elseif sel==2 then
Duel.SelectOption(tp,aux.Stringid(id,6)) Duel.SelectOption(tp,aux.Stringid(id,6))
end end
e:SetLabel(sel) e:SetLabel(sel)
if sel==1 then if sel==1 then
e:SetCategory(CATEGORY_TOEXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
elseif sel==2 then
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,0,nil)
e:SetCategory(CATEGORY_DESTROY) e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
e:SetCategory(CATEGORY_TOEXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end end
end end
function s.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sel=e:GetLabel() local sel=e:GetLabel()
if sel==1 then if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,7))
local g=Duel.SelectMatchingCard(tp,s.schfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
elseif sel==2 then
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
...@@ -138,12 +145,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,12 +145,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(dg) Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,7))
local g=Duel.SelectMatchingCard(tp,s.schfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
end end
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp) function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
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