Commit 0212fc23 authored by TanakaKotoha's avatar TanakaKotoha

foo foo

parent 6b8d38c8
...@@ -110,7 +110,7 @@ end ...@@ -110,7 +110,7 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp) function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
......
...@@ -46,6 +46,7 @@ function cm.filter(c) ...@@ -46,6 +46,7 @@ function cm.filter(c)
end end
function cm.hspcon(e,c) function cm.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=e:GetHandler()
return not Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,1,nil) and Duel.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_MZONE,0,1,1,nil,4) return not Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,1,nil) and Duel.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_MZONE,0,1,1,nil,4)
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
\ No newline at end of file
...@@ -26,30 +26,34 @@ function c16101101.initial_effect(c) ...@@ -26,30 +26,34 @@ function c16101101.initial_effect(c)
e2:SetOperation(c16101101.thop) e2:SetOperation(c16101101.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c16101101.tdfilter(c) function c16101101.tdfilter(c,mc)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and (c:IsAbleToDeck() or mc:IsType(TYPE_XYZ))
end end
function c16101101.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16101101.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c16101101.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c16101101.tdfilter(chkc,e:GetHandler()) end
if chk==0 then return Duel.IsExistingTarget(c16101101.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c16101101.tdfilter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16101101.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) Duel.SelectTarget(tp,c16101101.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end end
function c16101101.tdop(e,tp,eg,ep,ev,re,r,rp) function c16101101.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
local op==2
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if not tc:IsAbleToDeck() then if not c:IsType(TYPE_XYZ) and tc:IsAbleToDeck() then
Duel.Overlay(c,tc) op=Duel.SelectOption(tp,aux.Stringid(16101101,1))
elseif not tc:IsAbleToDeck() and c:IsType(TYPE_XYZ) then
op=Duel.SelectOption(tp,aux.Stringid(16101101,2))
op=1
else else
local op=Duel.SelectOption(tp,aux.Stringid(16101101,1),aux.Stringid(16101101,2)) op=Duel.SelectOption(tp,aux.Stringid(16101101,1),aux.Stringid(16101101,2))
if op==0 then if op==0 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end else
if op==1 then Duel.Overlay(c,tc)
Duel.Overlay(c,tc) end
end
end end
end end
end end
......
...@@ -34,7 +34,7 @@ function c16101103.tdfilter(c) ...@@ -34,7 +34,7 @@ function c16101103.tdfilter(c)
end end
function c16101103.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16101103.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return (chkc:IsLocation(LOCATION_ONFIELD) or chkc:IsLocation(LOCATION_REMOVED)) and c16101103.tdfilter(chkc) and chkc:IsFaceup() end if chkc then return (chkc:IsLocation(LOCATION_ONFIELD) or chkc:IsLocation(LOCATION_REMOVED)) and c16101103.tdfilter(chkc) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16101103.tdfilter,tp,LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_REMOVED,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c16101103.tdfilter,tp,LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_REMOVED,1,e:GetHandler()) and e:GetHandler():IsType(TYPE_XYZ) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16101103.tdfilter,tp,LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_REMOVED,1,1,e:GetHandler()) Duel.SelectTarget(tp,c16101103.tdfilter,tp,LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_REMOVED,1,1,e:GetHandler())
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