Commit aa969273 authored by Tachibana's avatar Tachibana

ndyd

parent 02d089fd
...@@ -10,6 +10,7 @@ function cm.initial_effect(c) ...@@ -10,6 +10,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return return
end end
end end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_EXTRA,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_EXTRA,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
......
...@@ -84,7 +84,7 @@ function c50218305.drawcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c50218305.drawcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c50218305.drawtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218305.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -96,7 +96,7 @@ function c50218310.daop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +96,7 @@ function c50218310.daop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c50218310.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218310.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -106,7 +106,7 @@ function c50218315.limit(c) ...@@ -106,7 +106,7 @@ function c50218315.limit(c)
end end
end end
function c50218315.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218315.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -100,7 +100,7 @@ function c50218320.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +100,7 @@ function c50218320.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c50218320.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218320.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -102,7 +102,7 @@ function c50218325.btop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,7 +102,7 @@ function c50218325.btop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c50218325.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218325.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -111,7 +111,7 @@ function c50218330.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,7 +111,7 @@ function c50218330.effop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c50218330.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218330.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -99,7 +99,7 @@ function c50218335.dop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,7 +99,7 @@ function c50218335.dop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
function c50218335.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218335.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -97,7 +97,7 @@ function c50218340.exop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,7 +97,7 @@ function c50218340.exop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end end
function c50218340.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218340.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -173,7 +173,7 @@ function c50218345.hdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -173,7 +173,7 @@ function c50218345.hdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end end
function c50218345.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218345.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -131,7 +131,7 @@ function c50218350.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -131,7 +131,7 @@ function c50218350.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
function c50218350.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218350.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -131,7 +131,7 @@ function c50218355.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -131,7 +131,7 @@ function c50218355.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
function c50218355.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218355.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -143,7 +143,7 @@ function c50218360.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +143,7 @@ function c50218360.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
function c50218360.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218360.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -27,22 +27,22 @@ end ...@@ -27,22 +27,22 @@ end
function c50221305.matfilter(c) function c50221305.matfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsLinkSetCard(0xcb3) return c:IsType(TYPE_RITUAL) and c:IsLinkSetCard(0xcb3)
end end
function c50221305.pfilter(c,e,tp) function c50221305.pfilter(c,e,tp,zone)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xcb3) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xcb3)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false,zone)
end end
function c50221305.ptg(e,tp,eg,ep,ev,re,r,rp,chk) function c50221305.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local zone=e:GetHandler():GetLinkedZone() local zone=e:GetHandler():GetLinkedZone(tp)
return zone~=0 and Duel.IsExistingMatchingCard(c50221305.pfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) return zone~=0 and Duel.IsExistingMatchingCard(c50221305.pfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,zone)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c50221305.pop(e,tp,eg,ep,ev,re,r,rp) function c50221305.pop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone() local zone=e:GetHandler():GetLinkedZone(tp)
if zone~=0 then if zone~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c50221305.pfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c50221305.pfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP,zone) Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP,zone)
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