Commit 0212fc23 authored by TanakaKotoha's avatar TanakaKotoha

foo foo

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