Skip to content

Commit cf93bfe

Browse files
authored
Added new card scripts
1 parent acc0ba7 commit cf93bfe

8 files changed

Lines changed: 668 additions & 0 deletions

File tree

pre-release/c101303101.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--ヴァレット・ローダー
2+
--Rokket Loader
3+
--Scripted by Eerie Code
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 Level 7 DARK Dragon monster from your Deck to your hand
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1a:SetProperty(EFFECT_FLAG_DELAY)
12+
e1a:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1a:SetCountLimit(1,{id,0})
14+
e1a:SetTarget(s.thtg)
15+
e1a:SetOperation(s.thop)
16+
c:RegisterEffect(e1a)
17+
local e1b=e1a:Clone()
18+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e1b)
20+
--Make 1 face-up monster on the field become DARK until the end of this turn
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetType(EFFECT_TYPE_IGNITION)
24+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
25+
e2:SetRange(LOCATION_GRAVE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCost(Cost.SelfBanish)
28+
e2:SetTarget(s.attrtg)
29+
e2:SetOperation(s.attrop)
30+
c:RegisterEffect(e2)
31+
end
32+
function s.thfilter(c)
33+
return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
34+
end
35+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
37+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
38+
end
39+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
41+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
42+
if #g>0 then
43+
Duel.SendtoHand(g,nil,REASON_EFFECT)
44+
Duel.ConfirmCards(1-tp,g)
45+
end
46+
local c=e:GetHandler()
47+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters
48+
local e1=Effect.CreateEffect(c)
49+
e1:SetDescription(aux.Stringid(id,2))
50+
e1:SetType(EFFECT_TYPE_FIELD)
51+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
52+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
53+
e1:SetTargetRange(1,0)
54+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsAttribute(ATTRIBUTE_DARK) end)
55+
e1:SetReset(RESET_PHASE|PHASE_END)
56+
Duel.RegisterEffect(e1,tp)
57+
--"Clock Lizard" check
58+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalAttribute(ATTRIBUTE_DARK) end)
59+
end
60+
function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
61+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttributeExcept(ATTRIBUTE_DARK) and chkc:IsFaceup() end
62+
if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
63+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
64+
Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
65+
end
66+
function s.attrop(e,tp,eg,ep,ev,re,r,rp)
67+
local tc=Duel.GetFirstTarget()
68+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
69+
--It becomes DARK until the end of this turn
70+
local e1=Effect.CreateEffect(e:GetHandler())
71+
e1:SetType(EFFECT_TYPE_SINGLE)
72+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
73+
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
74+
e1:SetValue(ATTRIBUTE_DARK)
75+
e1:SetReset(RESETS_STANDARD_PHASE_END)
76+
tc:RegisterEffect(e1)
77+
end
78+
end

pre-release/c101303102.lua

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
--ホロウヴァレット・ドラゴン
2+
--Hollowrokket Dragon
3+
--Scripted by ahtelel
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Destroy this card, then excavate up to 6 cards from the top of your opponent's Deck, and if you do, banish 1 excavated card, also place the rest on top of the Deck in the same order
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
10+
e1:SetType(EFFECT_TYPE_QUICK_O)
11+
e1:SetCode(EVENT_CHAINING)
12+
e1:SetRange(LOCATION_MZONE)
13+
e1:SetCountLimit(1,id)
14+
e1:SetCondition(s.rmcon)
15+
e1:SetTarget(s.rmtg)
16+
e1:SetOperation(s.rmop)
17+
c:RegisterEffect(e1)
18+
--Special Summon 1 "Rokket" monster from your Deck, except "Hollowrokket Dragon"
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
22+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
23+
e2:SetCode(EVENT_PHASE+PHASE_END)
24+
e2:SetRange(LOCATION_GRAVE)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetCondition(function(e) local c=e:GetHandler() return c:GetTurnID()==Duel.GetTurnCount() and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end)
27+
e2:SetTarget(s.sptg)
28+
e2:SetOperation(s.spop)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_names={id}
32+
s.listed_series={SET_ROKKET}
33+
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
34+
if not (re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and re:IsActiveType(TYPE_LINK)) then return false end
35+
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
36+
return tg and tg:IsContains(e:GetHandler())
37+
end
38+
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>5 and Duel.IsPlayerCanRemove(tp) end
40+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK)
41+
end
42+
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
43+
local c=e:GetHandler()
44+
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
45+
local ct=math.min(6,Duel.GetFieldGroupCount(tp,0,LOCATION_DECK))
46+
if ct==0 then return end
47+
local ac=ct==1 and ct or Duel.AnnounceNumberRange(tp,1,ct)
48+
Duel.BreakEffect()
49+
Duel.ConfirmDecktop(1-tp,ac)
50+
local g=Duel.GetDecktopGroup(1-tp,ac)
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
52+
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
53+
if #sg>0 then
54+
Duel.DisableShuffleCheck(true)
55+
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
56+
end
57+
end
58+
end
59+
function s.spfilter(c,e,tp)
60+
return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
61+
end
62+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
63+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
64+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
65+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
66+
end
67+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
68+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
69+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
70+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
71+
if #g>0 then
72+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
73+
end
74+
end

pre-release/c101303103.lua

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
--ヴァレット・デトネイター
2+
--Rokket Detonator
3+
--Scripted by ahtelel
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control a DARK Dragon Link Monster, you can Special Summon this card (from your hand)
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:SetCondition(s.selfspcon)
15+
c:RegisterEffect(e1)
16+
--Special Summon 1 DARK Dragon Monster Card from your Spell & Trap Zone
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.selfspconfilter(c)
29+
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and c:IsLinkMonster() and c:IsFaceup()
30+
end
31+
function s.selfspcon(e,c)
32+
if c==nil then return true end
33+
local tp=c:GetControler()
34+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
35+
and Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,0,1,nil)
36+
end
37+
function s.spfilter(c,e,tp)
38+
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and c:IsMonsterCard() and c:IsFaceup()
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
40+
end
41+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
42+
if chkc then return chkc:IsLocation(LOCATION_STZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
43+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
44+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_STZONE,0,1,nil,e,tp) end
45+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
46+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_STZONE,0,1,1,nil,e,tp)
47+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
48+
end
49+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
50+
local c=e:GetHandler()
51+
local tc=Duel.GetFirstTarget()
52+
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
53+
--It cannot attack
54+
local e1=Effect.CreateEffect(c)
55+
e1:SetDescription(3206)
56+
e1:SetType(EFFECT_TYPE_SINGLE)
57+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
58+
e1:SetCode(EFFECT_CANNOT_ATTACK)
59+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
60+
tc:RegisterEffect(e1,true)
61+
--Its effects are negated
62+
tc:NegateEffects(c)
63+
end
64+
Duel.SpecialSummonComplete()
65+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters
66+
local e2=Effect.CreateEffect(c)
67+
e2:SetDescription(aux.Stringid(id,2))
68+
e2:SetType(EFFECT_TYPE_FIELD)
69+
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
70+
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
71+
e2:SetTargetRange(1,0)
72+
e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsAttribute(ATTRIBUTE_DARK) end)
73+
e2:SetReset(RESET_PHASE|PHASE_END)
74+
Duel.RegisterEffect(e2,tp)
75+
--"Clock Lizard" check
76+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalAttribute(ATTRIBUTE_DARK) end)
77+
end

pre-release/c101303104.lua

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
--ヴァレルロード・FF・ドラゴン
2+
--Borreload Fatal Flare Dragon
3+
--Scripted by Eerie Code
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 1 DARK Link Monster + 1 DARK monster
8+
Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK))
9+
--Add 1 "Rokket" monster from your Deck to your hand
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,{id,0})
17+
e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end)
18+
e1:SetTarget(s.thtg)
19+
e1:SetOperation(s.thop)
20+
c:RegisterEffect(e1)
21+
--Equip 1 DARK Link MOnster from your GY or banishment to 1 DARK monster you control as an Equip Spell that gives it 500 ATK
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_EQUIP)
25+
e2:SetType(EFFECT_TYPE_IGNITION)
26+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
27+
e2:SetRange(LOCATION_MZONE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetTarget(s.eqtg)
30+
e2:SetOperation(s.eqop)
31+
c:RegisterEffect(e2)
32+
--Destroy 1 card on the field
33+
local e3=Effect.CreateEffect(c)
34+
e3:SetDescription(aux.Stringid(id,2))
35+
e3:SetCategory(CATEGORY_DESTROY)
36+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
37+
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
38+
e3:SetCode(EVENT_BE_MATERIAL)
39+
e3:SetCountLimit(1,{id,2})
40+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end)
41+
e3:SetTarget(s.destg)
42+
e3:SetOperation(s.desop)
43+
c:RegisterEffect(e3)
44+
end
45+
s.listed_series={SET_ROKKET}
46+
function s.matfilter(c,sc,st,tp)
47+
return c:IsAttribute(ATTRIBUTE_DARK,sc,st,tp) and c:IsType(TYPE_LINK,sc,st,tp)
48+
end
49+
function s.thfilter(c)
50+
return c:IsSetCard(SET_ROKKET) and c:IsMonster() and c:IsAbleToHand()
51+
end
52+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
53+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
54+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
55+
end
56+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
58+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
59+
if #g>0 then
60+
Duel.SendtoHand(g,nil,REASON_EFFECT)
61+
Duel.ConfirmCards(1-tp,g)
62+
end
63+
end
64+
function s.eqfilter(c,tp)
65+
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsLinkMonster() and c:IsFaceup() and c:CheckUniqueOnField(tp)
66+
and not c:IsForbidden()
67+
end
68+
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
69+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttribute(ATTRIBUTE_DARK) and chkc:IsFaceup() end
70+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
71+
and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,nil)
72+
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,tp) end
73+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
74+
Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,1,nil)
75+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED)
76+
end
77+
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
78+
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
79+
local tc=Duel.GetFirstTarget()
80+
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
81+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
82+
local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,tp):GetFirst()
83+
if ec and Duel.Equip(tp,ec,tc) then
84+
--The equipped monster gains 500 ATK
85+
local e1=Effect.CreateEffect(ec)
86+
e1:SetType(EFFECT_TYPE_EQUIP)
87+
e1:SetCode(EFFECT_UPDATE_ATTACK)
88+
e1:SetValue(500)
89+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
90+
ec:RegisterEffect(e1)
91+
--Equip limit
92+
local e2=Effect.CreateEffect(ec)
93+
e2:SetType(EFFECT_TYPE_SINGLE)
94+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
95+
e2:SetCode(EFFECT_EQUIP_LIMIT)
96+
e2:SetValue(function(e,c) return c==tc end)
97+
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
98+
ec:RegisterEffect(e2)
99+
end
100+
end
101+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
102+
if chkc then return chkc:IsOnField() end
103+
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
104+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
105+
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
106+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
107+
end
108+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
109+
local tc=Duel.GetFirstTarget()
110+
if tc:IsRelateToEffect(e) then
111+
Duel.Destroy(tc,REASON_EFFECT)
112+
end
113+
end

0 commit comments

Comments
 (0)