Commit 4f8f3f9a authored by POLYMER's avatar POLYMER

fix

parent c2cc1bde
......@@ -42,9 +42,9 @@ function cm.costfilter(c)
return c:IsSetCard(0x705) and c:IsAbleToGraveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -40,9 +40,9 @@ function cm.costfilter(c)
return c:IsSetCard(0x3705) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SSet(tp,g)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -72,6 +72,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,nil)
local g1=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=g:CancelableSelect(tp,1,#g,nil)
......@@ -79,9 +80,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
elseif Duel.GetMatchingGroupCount(nil,tp,LOCATION_ONFIELD,0,nil)==0 then
elseif #g==0 and #g1>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:CancelableSelect(tp,1,1,nil)
local tg=g1:CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
......
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