Skip to content

Commit c378e7f

Browse files
committed
added Cyber Dragon Nachster
1 parent 7ac4240 commit c378e7f

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

rush/c160321009.lua

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
--サイバー・ドラゴン・ネクステア
2+
--Cyber Dragon Nachster
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Name change
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,1))
9+
e1:SetCategory(CATEGORY_ATKCHANGE)
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={CARD_CYBER_DRAGON}
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
22+
end
23+
function s.costfilter(c)
24+
return c:IsMonster() and c:IsAbleToGraveAsCost()
25+
end
26+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
27+
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
28+
end
29+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
30+
local c=e:GetHandler()
31+
if chk==0 then return not c:IsCode(CARD_CYBER_DRAGON) end
32+
end
33+
function s.spfilter(c,e,tp)
34+
return c:IsRace(RACE_MACHINE) and (c:IsAttack(2100) or c:IsDefense(2100)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
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.costfilter,tp,LOCATION_HAND,0,1,1,nil)
40+
if Duel.SendtoGrave(g,REASON_COST)==0 then return end
41+
--Effect
42+
local c=e:GetHandler()
43+
--Name becomes "Cyber Dragon"
44+
local e1=Effect.CreateEffect(c)
45+
e1:SetType(EFFECT_TYPE_SINGLE)
46+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
47+
e1:SetCode(EFFECT_CHANGE_CODE)
48+
e1:SetValue(CARD_CYBER_DRAGON)
49+
e1:SetReset(RESETS_STANDARD_PHASE_END)
50+
c:RegisterEffect(e1)
51+
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
52+
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
54+
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
55+
if #sg>0 then
56+
Duel.BreakEffect()
57+
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
58+
end
59+
end
60+
end

0 commit comments

Comments
 (0)