Skip to content

Commit 3b7370c

Browse files
committed
added Necromaid Doctor
1 parent 37c5450 commit 3b7370c

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

rush/c160023015.lua

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
--ネクメイド・ドクター
2+
--Necromaid Doctor
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCondition(s.condition)
14+
e1:SetCost(s.cost)
15+
e1:SetTarget(s.target)
16+
e1:SetOperation(s.operation)
17+
c:RegisterEffect(e1)
18+
end
19+
s.listed_names={160008065,160023063}
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
local c=e:GetHandler()
22+
return c:IsSummonPhaseMain() and c:IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
23+
end
24+
function s.cfilter(c)
25+
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost()
26+
end
27+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
28+
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
29+
end
30+
function s.setfilter(c)
31+
return c:IsCode(160008065,160023063) and c:IsSSetable()
32+
end
33+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
34+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
35+
end
36+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
37+
--Requirement
38+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
39+
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
40+
if Duel.SendtoGrave(g,REASON_COST)<1 then return end
41+
--Effect
42+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
43+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
44+
if #g==0 then return end
45+
Duel.SSet(tp,g)
46+
end

0 commit comments

Comments
 (0)