Skip to content

Commit 2443a46

Browse files
authored
Added new card scripts
1 parent 5964520 commit 2443a46

File tree

2 files changed

+130
-0
lines changed

2 files changed

+130
-0
lines changed

pre-release/c101208029.lua

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
--ワンモア・ザ・ワイト
2+
--Moissa Wight
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--This card's name becomes "Skull Servant" while in the GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
10+
e1:SetCode(EFFECT_CHANGE_CODE)
11+
e1:SetRange(LOCATION_GRAVE)
12+
e1:SetValue(CARD_SKULL_SERVANT)
13+
c:RegisterEffect(e1)
14+
--Add 1 "Skull Servant" or 1 card that mentions it from your Deck to your hand, except "Moissa Wight"
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetDescription(aux.Stringid(id,0))
17+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
18+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
19+
e2:SetProperty(EFFECT_FLAG_DELAY)
20+
e2:SetCode(EVENT_SUMMON_SUCCESS)
21+
e2:SetCountLimit(1,id)
22+
e2:SetTarget(s.thtg)
23+
e2:SetOperation(s.thop)
24+
c:RegisterEffect(e2)
25+
local e3=e2:Clone()
26+
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
27+
c:RegisterEffect(e3)
28+
--During your Main Phase, you can Normal Summon 1 Level 4 or lower Zombie monster in addition to your Normal Summon/Set
29+
local e4=Effect.CreateEffect(c)
30+
e4:SetDescription(aux.Stringid(id,1))
31+
e4:SetType(EFFECT_TYPE_FIELD)
32+
e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
33+
e4:SetRange(LOCATION_MZONE)
34+
e4:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0)
35+
e4:SetTarget(function(e,c) return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) end)
36+
c:RegisterEffect(e4)
37+
end
38+
s.listed_names={CARD_SKULL_SERVANT,id}
39+
function s.thfilter(c)
40+
return (c:IsCode(CARD_SKULL_SERVANT) or c:ListsCode(CARD_SKULL_SERVANT)) and c:IsAbleToHand() and not c:IsCode(id)
41+
end
42+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
43+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
44+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
45+
end
46+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
48+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
49+
if #g>0 then
50+
Duel.SendtoHand(g,nil,REASON_EFFECT)
51+
Duel.ConfirmCards(1-tp,g)
52+
end
53+
--You cannot Special Summon for the rest of this turn, except Zombie monsters
54+
local e1=Effect.CreateEffect(e:GetHandler())
55+
e1:SetDescription(aux.Stringid(id,2))
56+
e1:SetType(EFFECT_TYPE_FIELD)
57+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
58+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
59+
e1:SetTargetRange(1,0)
60+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_ZOMBIE) end)
61+
e1:SetReset(RESET_PHASE|PHASE_END)
62+
Duel.RegisterEffect(e1,tp)
63+
end

pre-release/c101208065.lua

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
--ワイト・マスター
2+
--Wight Master
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
c:RegisterEffect(e0)
11+
--If your "King of the Skull Servants" attacks a Defense Position monster, inflict piercing battle damage to your opponent
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetType(EFFECT_TYPE_FIELD)
14+
e1:SetCode(EFFECT_PIERCE)
15+
e1:SetRange(LOCATION_SZONE)
16+
e1:SetTargetRange(LOCATION_MZONE,0)
17+
e1:SetTarget(function(e,c) return c:IsCode(36021814) end)
18+
c:RegisterEffect(e1)
19+
--Send 1 "Skull Servant" or 1 monster that mentions it from your Deck to the GY and Special Summon 1 "Skull Servant" or "King of the Skull Servants" from your GY
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,0))
22+
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
23+
e2:SetType(EFFECT_TYPE_IGNITION)
24+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
25+
e2:SetRange(LOCATION_SZONE)
26+
e2:SetCountLimit(1)
27+
e2:SetTarget(s.tgsptg)
28+
e2:SetOperation(s.tgspop)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_names={CARD_SKULL_SERVANT,36021814} --"King of the Skull Servants"
32+
function s.spfilter(c,e,tp)
33+
return c:IsCode(CARD_SKULL_SERVANT,36021814) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
34+
end
35+
function s.tgfilter(c)
36+
return (c:IsCode(CARD_SKULL_SERVANT) or (c:IsMonster() and c:ListsCode(CARD_SKULL_SERVANT))) and c:IsAbleToGrave()
37+
end
38+
function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
39+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
40+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
42+
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
43+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
44+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
45+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
46+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
47+
end
48+
function s.tgspop(e,tp,eg,ep,ev,re,r,rp)
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
50+
local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
51+
if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then
52+
local tc=Duel.GetFirstTarget()
53+
if tc:IsRelateToEffect(e) then
54+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
55+
end
56+
end
57+
--You cannot Special Summon for the rest of this turn, except Zombie monsters
58+
local e1=Effect.CreateEffect(e:GetHandler())
59+
e1:SetDescription(aux.Stringid(id,1))
60+
e1:SetType(EFFECT_TYPE_FIELD)
61+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
62+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
63+
e1:SetTargetRange(1,0)
64+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_ZOMBIE) end)
65+
e1:SetReset(RESET_PHASE|PHASE_END)
66+
Duel.RegisterEffect(e1,tp)
67+
end

0 commit comments

Comments
 (0)