Skip to content

Commit 940e810

Browse files
authored
Added new card scripts
1 parent ed14bd3 commit 940e810

File tree

12 files changed

+880
-0
lines changed

12 files changed

+880
-0
lines changed

pre-release/c101303010.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--耀聖の花詩ルキナ
2+
--Elvennotes Lucina
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You can Special Summon this card (from your hand) to your center Main Monster Zone
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetValue(function() return 0,ZONE_CENTER_MMZ end)
15+
c:RegisterEffect(e1)
16+
--Add 1 "Elvennotes" monster from your Deck to your hand, except "Elvennotes Lucina"
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_MZONE)
22+
e2:SetCountLimit(1,{id,1})
23+
e2:SetTarget(s.thtg)
24+
e2:SetOperation(s.thop)
25+
c:RegisterEffect(e2)
26+
--Switch the locations of this card in your Main Monster Zone and the monster in your center Main Monster Zone
27+
local e3=Effect.CreateEffect(c)
28+
e3:SetDescription(aux.Stringid(id,2))
29+
e3:SetCategory(CATEGORY_TOHAND)
30+
e3:SetType(EFFECT_TYPE_QUICK_O)
31+
e3:SetCode(EVENT_FREE_CHAIN)
32+
e3:SetRange(LOCATION_MMZONE)
33+
e3:SetCountLimit(1,{id,2})
34+
e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end)
35+
e3:SetTarget(s.swtg)
36+
e3:SetOperation(s.swop)
37+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
38+
c:RegisterEffect(e3)
39+
end
40+
s.listed_names={id}
41+
s.listed_series={SET_ELVENNOTES}
42+
function s.thfilter(c)
43+
return c:IsSetCard(SET_ELVENNOTES) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand()
44+
end
45+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
47+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
48+
end
49+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
50+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
51+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
52+
if #g>0 then
53+
Duel.SendtoHand(g,nil,REASON_EFFECT)
54+
Duel.ConfirmCards(1-tp,g)
55+
end
56+
end
57+
function s.swtg(e,tp,eg,ep,ev,re,r,rp,chk)
58+
if chk==0 then return not e:GetHandler():IsSequence(2) and Duel.GetFieldCard(tp,LOCATION_MZONE,2) end
59+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_MZONE)
60+
end
61+
function s.rthfilter(c)
62+
return c:IsLevelBelow(6) and c:IsFaceup() and c:IsAbleToHand()
63+
end
64+
function s.swop(e,tp,eg,ep,ev,re,r,rp)
65+
local c=e:GetHandler()
66+
local cc=Duel.GetFieldCard(tp,LOCATION_MZONE,2)
67+
if c:IsRelateToEffect(e) and c:IsInMainMZone(tp) and cc and c~=cc and Duel.SwapSequence(c,cc) then
68+
local g=Duel.GetMatchingGroup(s.rthfilter,tp,0,LOCATION_MZONE,nil)
69+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
71+
local sg=g:Select(tp,1,1,nil)
72+
if #sg>0 then
73+
Duel.HintSelection(sg)
74+
Duel.BreakEffect()
75+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
76+
end
77+
end
78+
end

pre-release/c101303011.lua

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
--耀聖の波詩ディーナ
2+
--Elvennotes Dyina
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You can Special Summon this card (from your hand) to your center Main Monster Zone
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetValue(function() return 0,ZONE_CENTER_MMZ end)
15+
c:RegisterEffect(e1)
16+
--Place 1 "Elvennotes" Continuous Spell from your Deck face-up on your field
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetType(EFFECT_TYPE_IGNITION)
20+
e2:SetRange(LOCATION_MZONE)
21+
e2:SetCountLimit(1,{id,1})
22+
e2:SetTarget(s.pltg)
23+
e2:SetOperation(s.plop)
24+
c:RegisterEffect(e2)
25+
--Switch the locations of this card in your Main Monster Zone and the monster in your center Main Monster Zone
26+
local e3=Effect.CreateEffect(c)
27+
e3:SetDescription(aux.Stringid(id,2))
28+
e3:SetCategory(CATEGORY_REMOVE)
29+
e3:SetType(EFFECT_TYPE_QUICK_O)
30+
e3:SetCode(EVENT_FREE_CHAIN)
31+
e3:SetRange(LOCATION_MMZONE)
32+
e3:SetCountLimit(1,{id,2})
33+
e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end)
34+
e3:SetTarget(s.swtg)
35+
e3:SetOperation(s.swop)
36+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
37+
c:RegisterEffect(e3)
38+
end
39+
s.listed_series={SET_ELVENNOTES}
40+
function s.plfilter(c,tp)
41+
return c:IsSetCard(SET_ELVENNOTES) and c:IsContinuousSpell() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
42+
end
43+
function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
45+
and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end
46+
end
47+
function s.plop(e,tp,eg,ep,ev,re,r,rp)
48+
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
50+
local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
51+
if sc then
52+
Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
53+
end
54+
end
55+
function s.swtg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then return not e:GetHandler():IsSequence(2) and Duel.GetFieldCard(tp,LOCATION_MZONE,2) end
57+
Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
58+
end
59+
function s.swop(e,tp,eg,ep,ev,re,r,rp)
60+
local c=e:GetHandler()
61+
local cc=Duel.GetFieldCard(tp,LOCATION_MZONE,2)
62+
if c:IsRelateToEffect(e) and c:IsInMainMZone(tp) and cc and c~=cc and Duel.SwapSequence(c,cc) then
63+
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
64+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
65+
local rg=g:RandomSelect(tp,1)
66+
if #rg>0 then
67+
Duel.BreakEffect()
68+
--Banish 1 random card from your opponent's hand face-up until the End Phase
69+
aux.RemoveUntil(rg,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(ag,e,tp) Duel.SendtoHand(ag,nil,REASON_EFFECT) end)
70+
end
71+
end
72+
end

pre-release/c101303012.lua

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
--耀聖の月詩フォルトナ
2+
--Elvennotes Fortona
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You can Special Summon this card (from your hand) to your center Main Monster Zone
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetValue(function() return 0,ZONE_CENTER_MMZ end)
15+
c:RegisterEffect(e1)
16+
--Place 1 "Elvennotes" Continuous Trap from your hand or Deck face-up on your field
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetType(EFFECT_TYPE_IGNITION)
20+
e2:SetRange(LOCATION_MZONE)
21+
e2:SetCountLimit(1,{id,1})
22+
e2:SetTarget(s.pltg)
23+
e2:SetOperation(s.plop)
24+
c:RegisterEffect(e2)
25+
--Switch the locations of this card in your Main Monster Zone and the monster in your center Main Monster Zone
26+
local e3=Effect.CreateEffect(c)
27+
e3:SetDescription(aux.Stringid(id,2))
28+
e3:SetCategory(CATEGORY_TOHAND)
29+
e3:SetType(EFFECT_TYPE_QUICK_O)
30+
e3:SetCode(EVENT_FREE_CHAIN)
31+
e3:SetRange(LOCATION_MMZONE)
32+
e3:SetCountLimit(1,{id,2})
33+
e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end)
34+
e3:SetTarget(s.swtg)
35+
e3:SetOperation(s.swop)
36+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
37+
c:RegisterEffect(e3)
38+
end
39+
s.listed_series={SET_ELVENNOTES}
40+
function s.plfilter(c,tp)
41+
return c:IsSetCard(SET_ELVENNOTES) and c:IsContinuousTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
42+
end
43+
function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
45+
and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end
46+
end
47+
function s.plop(e,tp,eg,ep,ev,re,r,rp)
48+
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
50+
local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst()
51+
if sc then
52+
Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
53+
end
54+
end
55+
function s.swtg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then return not e:GetHandler():IsSequence(2) and Duel.GetFieldCard(tp,LOCATION_MZONE,2) end
57+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_EITHER,LOCATION_ONFIELD)
58+
end
59+
function s.rthfilter(c)
60+
return c:IsSpellTrap() and c:IsFaceup() and c:IsAbleToHand()
61+
end
62+
function s.swop(e,tp,eg,ep,ev,re,r,rp)
63+
local c=e:GetHandler()
64+
local cc=Duel.GetFieldCard(tp,LOCATION_MZONE,2)
65+
if c:IsRelateToEffect(e) and c:IsInMainMZone(tp) and cc and c~=cc and Duel.SwapSequence(c,cc) then
66+
local g=Duel.GetMatchingGroup(s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
67+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
68+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
69+
local sg=g:Select(tp,1,1,nil)
70+
if #sg>0 then
71+
Duel.HintSelection(sg)
72+
Duel.BreakEffect()
73+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
74+
end
75+
end
76+
end

pre-release/c101303013.lua

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
--燿ける聖詩の獄神精
2+
--Elvennotes Power Patron
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You cannot Special Summon from the Extra Deck, except Synchro Monsters
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_FIELD)
9+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
10+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetTargetRange(1,0)
13+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end)
14+
c:RegisterEffect(e1)
15+
aux.addContinuousLizardCheck(c,LOCATION_MZONE,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end)
16+
--Increase the Level of the monster in your center Main Monster Zone by 3 (until the end of this turn), then immediately after this effect resolves, you can Synchro Summon 1 "Elvennotes" monster or "Junora the Power Patron of Tuning"
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,0))
19+
e2:SetCategory(CATEGORY_LVCHANGE+CATEGORY_SPECIAL_SUMMON)
20+
e2:SetType(EFFECT_TYPE_QUICK_O)
21+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetCode(EVENT_FREE_CHAIN)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetCountLimit(1,id)
25+
e2:SetCondition(function() return Duel.IsMainPhase() end)
26+
e2:SetTarget(s.lvtg)
27+
e2:SetOperation(s.lvop)
28+
e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
29+
c:RegisterEffect(e2)
30+
--Add 1 "Elvennotes" card from your Deck to your hand
31+
local e3=Effect.CreateEffect(c)
32+
e3:SetDescription(aux.Stringid(id,1))
33+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
34+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
35+
e3:SetProperty(EFFECT_FLAG_DELAY)
36+
e3:SetCode(EVENT_BE_MATERIAL)
37+
e3:SetCountLimit(1,{id,1})
38+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end)
39+
e3:SetTarget(s.thtg)
40+
e3:SetOperation(s.thop)
41+
c:RegisterEffect(e3)
42+
end
43+
s.listed_series={SET_ELVENNOTES}
44+
s.listed_names={101303039} --"Junora the Power Patron of Tuning"
45+
function s.lvfilter(c)
46+
return c:IsSequence(2) and c:HasLevel() and c:IsFaceup()
47+
end
48+
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
49+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MMZONE) and s.lvfilter(chkc) end
50+
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MMZONE,0,1,nil) end
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
52+
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MMZONE,0,1,1,nil)
53+
Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,3)
54+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
55+
end
56+
function s.synchrofilter(c)
57+
return (c:IsSetCard(SET_ELVENNOTES) or c:IsCode(101303039)) and c:IsSynchroSummonable()
58+
end
59+
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
60+
local tc=Duel.GetFirstTarget()
61+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
62+
local prev_lv=tc:GetLevel()
63+
--Increase its Level by 3
64+
local e1=Effect.CreateEffect(e:GetHandler())
65+
e1:SetType(EFFECT_TYPE_SINGLE)
66+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
67+
e1:SetCode(EFFECT_UPDATE_LEVEL)
68+
e1:SetValue(3)
69+
e1:SetReset(RESETS_STANDARD_PHASE_END)
70+
tc:RegisterEffect(e1)
71+
Duel.AdjustInstantly(tc)
72+
if not tc:IsLevel(prev_lv+3) then return end
73+
local g=Duel.GetMatchingGroup(s.synchrofilter,tp,LOCATION_EXTRA,0,1,nil)
74+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
75+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
76+
local sc=g:Select(tp,1,1,nil):GetFirst()
77+
Duel.SynchroSummon(tp,sc)
78+
end
79+
end
80+
end
81+
function s.thfilter(c)
82+
return c:IsSetCard(SET_ELVENNOTES) and c:IsAbleToHand()
83+
end
84+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
85+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
86+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
87+
end
88+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
89+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
90+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
91+
if #g>0 then
92+
Duel.SendtoHand(g,nil,REASON_EFFECT)
93+
Duel.ConfirmCards(1-tp,g)
94+
end
95+
end

0 commit comments

Comments
 (0)