Skip to content

Commit 52f6fab

Browse files
authored
Added new card scripts
1 parent 10eea35 commit 52f6fab

10 files changed

Lines changed: 1054 additions & 0 deletions

pre-release/c100458016.lua

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
--レイズ・ムーンの帳 シエロ
2+
--Raise Moon Veil Cielo
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When you draw this card: You can reveal it; Special Summon it
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetCode(EVENT_DRAW)
12+
e1:SetCost(Cost.SelfReveal)
13+
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
14+
local c=e:GetHandler()
15+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
16+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
17+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
18+
end)
19+
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
20+
local c=e:GetHandler()
21+
if c:IsRelateToEffect(e) then
22+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
23+
end
24+
end)
25+
c:RegisterEffect(e1)
26+
--If this card is in your hand: You can place 1 other card from your hand or face-up field on the bottom of the Deck; Special Summon this card
27+
local e2=e1:Clone()
28+
e2:SetDescription(aux.Stringid(id,1))
29+
e2:SetType(EFFECT_TYPE_IGNITION)
30+
e2:SetRange(LOCATION_HAND)
31+
e2:SetCost(s.selfspcost)
32+
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
33+
local c=e:GetHandler()
34+
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
35+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
36+
end)
37+
c:RegisterEffect(e2)
38+
--During the Main Phase (Quick Effect): You can draw 1 card. You cannot add cards from the Deck to the hand the turn you activate this effect, except by drawing them. You can only use this effect of "Raise Moon Veil Cielo" once per turn
39+
local e3=Effect.CreateEffect(c)
40+
e3:SetDescription(aux.Stringid(id,2))
41+
e3:SetCategory(CATEGORY_DRAW)
42+
e3:SetType(EFFECT_TYPE_QUICK_O)
43+
e3:SetCode(EVENT_FREE_CHAIN)
44+
e3:SetRange(LOCATION_MZONE)
45+
e3:SetCountLimit(1,id)
46+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
47+
return Duel.IsMainPhase()
48+
end)
49+
e3:SetCost(s.drcost)
50+
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
51+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
52+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
53+
end)
54+
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
55+
Duel.Draw(tp,1,REASON_EFFECT)
56+
end)
57+
e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
58+
c:RegisterEffect(e3)
59+
--Keep track of cards being added to a player's hand, except by drawing them
60+
aux.GlobalCheck(s,function()
61+
local ge1=Effect.CreateEffect(c)
62+
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
63+
ge1:SetCode(EVENT_TO_HAND)
64+
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
65+
for ec in eg:Iter() do
66+
if ec:IsPreviousLocation(LOCATION_DECK) and not ec:IsReason(REASON_DRAW) then
67+
Duel.RegisterFlagEffect(ec:GetReasonPlayer(),id,RESET_PHASE|PHASE_END,0,1)
68+
end
69+
end
70+
end)
71+
Duel.RegisterEffect(ge1,0)
72+
end)
73+
end
74+
function s.selfspcostfilter(c,tp)
75+
return Duel.GetMZoneCount(tp,c)>0 and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToDeckAsCost()
76+
end
77+
function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk)
78+
local c=e:GetHandler()
79+
if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end
80+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
81+
local sc=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp):GetFirst()
82+
if sc:IsOnField() then Duel.HintSelection(sc) end
83+
Duel.SendtoDeck(sc,nil,SEQ_DECKBOTTOM,REASON_COST)
84+
end
85+
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
86+
if chk==0 then return not Duel.HasFlagEffect(tp,id) end
87+
--You cannot add cards from the Deck to the hand the turn you activate this effect, except by drawing them
88+
local e1=Effect.CreateEffect(e:GetHandler())
89+
e1:SetDescription(aux.Stringid(id,3))
90+
e1:SetType(EFFECT_TYPE_FIELD)
91+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
92+
e1:SetCode(EFFECT_CANNOT_TO_HAND)
93+
e1:SetTargetRange(1,0)
94+
e1:SetTarget(function(e,c,tp,re)
95+
return c:IsLocation(LOCATION_DECK)
96+
end)
97+
e1:SetReset(RESET_PHASE|PHASE_END)
98+
Duel.RegisterEffect(e1,tp)
99+
end

pre-release/c100458017.lua

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
--レイズ・ムーンの雅 キャロル
2+
--Raise Moon Elegance Carol
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When you draw this card: You can reveal it; Special Summon it
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetCode(EVENT_DRAW)
12+
e1:SetCost(Cost.SelfReveal)
13+
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
14+
local c=e:GetHandler()
15+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
16+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
17+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
18+
end)
19+
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
20+
local c=e:GetHandler()
21+
if c:IsRelateToEffect(e) then
22+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
23+
end
24+
end)
25+
c:RegisterEffect(e1)
26+
--You can Normal Summon this card without Tributing, but its original ATK becomes 700
27+
local e2=Effect.CreateEffect(c)
28+
e2:SetDescription(aux.Stringid(id,1))
29+
e2:SetType(EFFECT_TYPE_SINGLE)
30+
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
31+
e2:SetCode(EFFECT_SUMMON_PROC)
32+
e2:SetCondition(function(e,c,minc)
33+
if c==nil then return true end
34+
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
35+
end)
36+
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,c)
37+
--But its original ATK becomes 700
38+
local e1=Effect.CreateEffect(c)
39+
e1:SetType(EFFECT_TYPE_SINGLE)
40+
e1:SetCode(EFFECT_SET_BASE_ATTACK)
41+
e1:SetValue(700)
42+
e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE&~RESET_TOFIELD))
43+
c:RegisterEffect(e1)
44+
end)
45+
c:RegisterEffect(e2)
46+
--If this card is Normal or Special Summoned from the hand: You can draw 1 card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except LIGHT Xyz Monsters. You cannot add cards from the Deck to the hand the turn you activate this effect, except by drawing them
47+
local e3a=Effect.CreateEffect(c)
48+
e3a:SetDescription(aux.Stringid(id,2))
49+
e3a:SetCategory(CATEGORY_DRAW)
50+
e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
51+
e3a:SetProperty(EFFECT_FLAG_DELAY)
52+
e3a:SetCode(EVENT_SUMMON_SUCCESS)
53+
e3a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
54+
return e:GetHandler():IsSummonLocation(LOCATION_HAND)
55+
end)
56+
e3a:SetCost(s.drcost)
57+
e3a:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
58+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
59+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
60+
end)
61+
e3a:SetOperation(s.drop)
62+
c:RegisterEffect(e3a)
63+
local e3b=e3a:Clone()
64+
e3b:SetCode(EVENT_SPSUMMON_SUCCESS)
65+
c:RegisterEffect(e3b)
66+
--Keep track of cards being added to a player's hand, except by drawing them
67+
aux.GlobalCheck(s,function()
68+
local ge1=Effect.CreateEffect(c)
69+
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
70+
ge1:SetCode(EVENT_TO_HAND)
71+
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
72+
for ec in eg:Iter() do
73+
if ec:IsPreviousLocation(LOCATION_DECK) and not ec:IsReason(REASON_DRAW) then
74+
Duel.RegisterFlagEffect(ec:GetReasonPlayer(),id,RESET_PHASE|PHASE_END,0,1)
75+
end
76+
end
77+
end)
78+
Duel.RegisterEffect(ge1,0)
79+
end)
80+
end
81+
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
82+
if chk==0 then return not Duel.HasFlagEffect(tp,id) end
83+
--You cannot add cards from the Deck to the hand the turn you activate this effect, except by drawing them
84+
local e1=Effect.CreateEffect(e:GetHandler())
85+
e1:SetDescription(aux.Stringid(id,3))
86+
e1:SetType(EFFECT_TYPE_FIELD)
87+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
88+
e1:SetCode(EFFECT_CANNOT_TO_HAND)
89+
e1:SetTargetRange(1,0)
90+
e1:SetTarget(function(e,c,tp,re)
91+
return c:IsLocation(LOCATION_DECK)
92+
end)
93+
e1:SetReset(RESET_PHASE|PHASE_END)
94+
Duel.RegisterEffect(e1,tp)
95+
end
96+
function s.drop(e,tp,eg,ep,ev,re,r,rp)
97+
Duel.Draw(tp,1,REASON_EFFECT)
98+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except LIGHT Xyz Monsters
99+
local e1=Effect.CreateEffect(e:GetHandler())
100+
e1:SetDescription(aux.Stringid(id,4))
101+
e1:SetType(EFFECT_TYPE_FIELD)
102+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
103+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
104+
e1:SetTargetRange(1,0)
105+
e1:SetTarget(function(e,c)
106+
return c:IsLocation(LOCATION_EXTRA) and not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsXyzMonster())
107+
end)
108+
e1:SetReset(RESET_PHASE|PHASE_END)
109+
Duel.RegisterEffect(e1,tp)
110+
end

pre-release/c100458018.lua

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
--レイズ・ムーンの翼 ラピ
2+
--Raise Moon Wings Rapi
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When you draw this card: You can reveal it; Special Summon it
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetCode(EVENT_DRAW)
12+
e1:SetCost(Cost.SelfReveal)
13+
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
14+
local c=e:GetHandler()
15+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
16+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
17+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
18+
end)
19+
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
20+
local c=e:GetHandler()
21+
if c:IsRelateToEffect(e) then
22+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
23+
end
24+
end)
25+
c:RegisterEffect(e1)
26+
--If this card is Normal or Special Summoned from the hand: You can draw 1 card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except LIGHT Xyz Monsters. You cannot add cards from the Deck to the hand the turn you activate this effect, except by drawing them
27+
local e2a=Effect.CreateEffect(c)
28+
e2a:SetDescription(aux.Stringid(id,1))
29+
e2a:SetCategory(CATEGORY_DRAW)
30+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
31+
e2a:SetProperty(EFFECT_FLAG_DELAY)
32+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
33+
e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
34+
return e:GetHandler():IsSummonLocation(LOCATION_HAND)
35+
end)
36+
e2a:SetCost(s.drcost)
37+
e2a:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
38+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
39+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
40+
end)
41+
e2a:SetOperation(s.drop)
42+
c:RegisterEffect(e2a)
43+
local e2b=e2a:Clone()
44+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
45+
c:RegisterEffect(e2b)
46+
--Keep track of cards being added to a player's hand, except by drawing them
47+
aux.GlobalCheck(s,function()
48+
local ge1=Effect.CreateEffect(c)
49+
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
50+
ge1:SetCode(EVENT_TO_HAND)
51+
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
52+
for ec in eg:Iter() do
53+
if ec:IsPreviousLocation(LOCATION_DECK) and not ec:IsReason(REASON_DRAW) then
54+
Duel.RegisterFlagEffect(ec:GetReasonPlayer(),id,RESET_PHASE|PHASE_END,0,1)
55+
end
56+
end
57+
end)
58+
Duel.RegisterEffect(ge1,0)
59+
end)
60+
--Once per opponent's turn, you can (Quick Effect): Immediately after this effect resolves, Xyz Summon 1 Rank 7 LIGHT monster
61+
local e3=Effect.CreateEffect(c)
62+
e3:SetDescription(aux.Stringid(id,2))
63+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
64+
e3:SetType(EFFECT_TYPE_QUICK_O)
65+
e3:SetCode(EVENT_FREE_CHAIN)
66+
e3:SetRange(LOCATION_MZONE)
67+
e3:SetCountLimit(1)
68+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
69+
return Duel.IsTurnPlayer(1-tp)
70+
end)
71+
e3:SetTarget(s.xyztg)
72+
e3:SetOperation(s.xyzop)
73+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
74+
c:RegisterEffect(e3)
75+
end
76+
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
77+
if chk==0 then return not Duel.HasFlagEffect(tp,id) end
78+
--You cannot add cards from the Deck to the hand the turn you activate this effect, except by drawing them
79+
local e1=Effect.CreateEffect(e:GetHandler())
80+
e1:SetDescription(aux.Stringid(id,3))
81+
e1:SetType(EFFECT_TYPE_FIELD)
82+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
83+
e1:SetCode(EFFECT_CANNOT_TO_HAND)
84+
e1:SetTargetRange(1,0)
85+
e1:SetTarget(function(e,c,tp,re)
86+
return c:IsLocation(LOCATION_DECK)
87+
end)
88+
e1:SetReset(RESET_PHASE|PHASE_END)
89+
Duel.RegisterEffect(e1,tp)
90+
end
91+
function s.drop(e,tp,eg,ep,ev,re,r,rp)
92+
Duel.Draw(tp,1,REASON_EFFECT)
93+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except LIGHT Xyz Monsters
94+
local e1=Effect.CreateEffect(e:GetHandler())
95+
e1:SetDescription(aux.Stringid(id,4))
96+
e1:SetType(EFFECT_TYPE_FIELD)
97+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
98+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
99+
e1:SetTargetRange(1,0)
100+
e1:SetTarget(function(e,c)
101+
return c:IsLocation(LOCATION_EXTRA) and not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsXyzMonster())
102+
end)
103+
e1:SetReset(RESET_PHASE|PHASE_END)
104+
Duel.RegisterEffect(e1,tp)
105+
end
106+
function s.xyzfilter(c)
107+
return c:IsRank(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsXyzSummonable()
108+
end
109+
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
110+
if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
111+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
112+
end
113+
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
114+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
115+
local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
116+
if sc then
117+
Duel.XyzSummon(tp,sc)
118+
end
119+
end

0 commit comments

Comments
 (0)