Skip to content

Commit 8513a4e

Browse files
authored
Added new card scripts
1 parent 46d1a3f commit 8513a4e

13 files changed

Lines changed: 1140 additions & 0 deletions

pre-release/c101302008.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--終刻竜機ⅩⅡ-ドラスティア
2+
--Doom-Z Zero - Drastia
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Destroy 1 "Doom-Z" card you control, and if you do, Special Summon this card from the hand then you can equip 1 Equip Spell from your Deck to it
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.destg)
15+
e1:SetOperation(s.desop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_QUICK_O)
22+
e2:SetCode(EVENT_FREE_CHAIN)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end)
27+
e2:SetTarget(s.sptg)
28+
e2:SetOperation(s.spop)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_series={SET_DOOM_Z}
32+
function s.desfilter(c,tp)
33+
return c:IsSetCard(SET_DOOM_Z) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
34+
end
35+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
36+
local c=e:GetHandler()
37+
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end
38+
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
41+
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
42+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
44+
Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
45+
end
46+
function s.eqsfilter(c,tp,ec)
47+
return c:IsEquipSpell() and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp)
48+
end
49+
function s.desop(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.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e)
53+
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
54+
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
55+
and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK,0,1,nil,tp,c)
56+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
58+
local eqc=Duel.SelectMatchingCard(tp,s.eqsfilter,tp,LOCATION_DECK,0,1,1,nil,tp,c):GetFirst()
59+
if eqc then
60+
Duel.BreakEffect()
61+
Duel.Equip(tp,eqc,c)
62+
end
63+
end
64+
end
65+
function s.spfilter(c,e,tp,lv)
66+
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv)
67+
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
68+
end
69+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
70+
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) end
71+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
72+
end
73+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
74+
local c=e:GetHandler()
75+
if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
77+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()):GetFirst()
78+
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then
79+
sc:CompleteProcedure()
80+
Duel.Overlay(sc,c+c:GetEquipGroup(),true)
81+
end
82+
end

pre-release/c101302009.lua

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
--終刻竜機Ⅴ-アマルテ
2+
--Doom-Z Five - Amalthe
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 "Doom-Z" monster from your Deck to your hand
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
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)
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+
local e1c=e1a:Clone()
21+
e1c:SetCode(EVENT_DESTROYED)
22+
e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end)
23+
c:RegisterEffect(e1c)
24+
--Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster
25+
local e2=Effect.CreateEffect(c)
26+
e2:SetDescription(aux.Stringid(id,1))
27+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
28+
e2:SetType(EFFECT_TYPE_QUICK_O)
29+
e2:SetCode(EVENT_FREE_CHAIN)
30+
e2:SetRange(LOCATION_MZONE)
31+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
32+
e2:SetCountLimit(1,{id,1})
33+
e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end)
34+
e2:SetTarget(s.sptg)
35+
e2:SetOperation(s.spop)
36+
c:RegisterEffect(e2)
37+
end
38+
s.listed_series={SET_DOOM_Z}
39+
s.listed_names={id}
40+
function s.thfilter(c)
41+
return c:IsSetCard(SET_DOOM_Z) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id)
42+
end
43+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
45+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
46+
end
47+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
48+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
49+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
50+
if #g>0 then
51+
Duel.SendtoHand(g,nil,REASON_EFFECT)
52+
Duel.ConfirmCards(1-tp,g)
53+
end
54+
end
55+
function s.spfilter(c,e,tp,lv)
56+
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv)
57+
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
58+
end
59+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
60+
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) end
61+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
62+
end
63+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
64+
local c=e:GetHandler()
65+
if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
67+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()):GetFirst()
68+
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then
69+
sc:CompleteProcedure()
70+
Duel.Overlay(sc,c+c:GetEquipGroup(),true)
71+
end
72+
end

pre-release/c101302010.lua

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
--終刻竜機Ⅶ-エララ
2+
--Doom-Z Seven - Elara
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 "Doom-Z" Spell/Trap directly from your Deck
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
10+
e1a:SetProperty(EFFECT_FLAG_DELAY)
11+
e1a:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1a:SetCountLimit(1,id)
13+
e1a:SetTarget(s.settg)
14+
e1a:SetOperation(s.setop)
15+
c:RegisterEffect(e1a)
16+
local e1b=e1a:Clone()
17+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
18+
c:RegisterEffect(e1b)
19+
local e1c=e1a:Clone()
20+
e1c:SetCode(EVENT_DESTROYED)
21+
e1c:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT>0 end)
22+
c:RegisterEffect(e1c)
23+
--Special Summon 1 WIND Machine Xyz Monster from your Extra Deck and attach this card and all cards equipped to it to that monster
24+
local e2=Effect.CreateEffect(c)
25+
e2:SetDescription(aux.Stringid(id,1))
26+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
27+
e2:SetType(EFFECT_TYPE_QUICK_O)
28+
e2:SetCode(EVENT_FREE_CHAIN)
29+
e2:SetRange(LOCATION_MZONE)
30+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
31+
e2:SetCountLimit(1,{id,1})
32+
e2:SetCondition(function(e) return e:GetHandler():GetEquipCount()>0 end)
33+
e2:SetTarget(s.sptg)
34+
e2:SetOperation(s.spop)
35+
c:RegisterEffect(e2)
36+
end
37+
s.listed_series={SET_DOOM_Z}
38+
function s.setfilter(c)
39+
return c:IsSetCard(SET_DOOM_Z) and c:IsSpellTrap() and c:IsSSetable()
40+
end
41+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
43+
end
44+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
45+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
46+
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
47+
if #g>0 then
48+
Duel.SSet(tp,g)
49+
end
50+
end
51+
function s.spfilter(c,e,tp,lv)
52+
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsRank(lv)
53+
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
54+
end
55+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetLevel()) end
57+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
58+
end
59+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
60+
local c=e:GetHandler()
61+
if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
63+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()):GetFirst()
64+
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then
65+
sc:CompleteProcedure()
66+
Duel.Overlay(sc,c+c:GetEquipGroup(),true)
67+
end
68+
end

pre-release/c101302011.lua

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
--獄神機Doom-Z
2+
--Power Patron Machine Doom-Z
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You cannot Special Summon from the Extra Deck, except Xyz 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:IsType(TYPE_XYZ) end)
14+
c:RegisterEffect(e1)
15+
aux.addContinuousLizardCheck(c,LOCATION_MZONE,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end)
16+
--Special Summon from your Extra Deck, 1 "Doom-Z" Xyz Monster or "Jupiter the Power Patron of Destruction" by using another Effect monster as material
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,0))
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)
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
--Add 1 "Doom-Z" card from your Deck to your hand
28+
local e3=Effect.CreateEffect(c)
29+
e3:SetDescription(aux.Stringid(id,1))
30+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
31+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
32+
e3:SetProperty(EFFECT_FLAG_DELAY)
33+
e3:SetCode(EVENT_DESTROYED)
34+
e3:SetCountLimit(1,{id,1})
35+
e3:SetTarget(s.thtg)
36+
e3:SetOperation(s.thop)
37+
c:RegisterEffect(e3)
38+
end
39+
s.listed_series={SET_DOOM_Z}
40+
s.listed_names={101302044} --"Jupiter the Power Patron of Destruction"
41+
function s.xyzmatfilter(c,e,tp)
42+
local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ)
43+
return #mustg<=1 and c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel()
44+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel(),mustg)
45+
end
46+
function s.spfilter(c,e,tp,mc,lv,mustg)
47+
return c:IsType(TYPE_XYZ) and (c:IsSetCard(SET_DOOM_Z) or c:IsCode(101302044))
48+
and c:IsRank(lv) and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
49+
and (#mustg<=0 or mustg:IsContains(mc)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
50+
end
51+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
52+
local c=e:GetHandler()
53+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc~=c and s.xyzmatfilter(chkc,e,tp)end
54+
if chk==0 then return Duel.IsExistingTarget(s.xyzmatfilter,tp,LOCATION_MZONE,0,1,c,e,tp) end
55+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
56+
Duel.SelectTarget(tp,s.xyzmatfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp)
57+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
58+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,LOCATION_MZONE)
59+
end
60+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
61+
local tc=Duel.GetFirstTarget()
62+
if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsImmuneToEffect(e)) then return end
63+
local mustg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ)
64+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
65+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetLevel(),mustg):GetFirst()
66+
if sc then
67+
sc:SetMaterial(tc)
68+
Duel.Overlay(sc,tc)
69+
if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end
70+
sc:CompleteProcedure()
71+
local c=e:GetHandler()
72+
if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Equip(tp,c,sc) then
73+
--Equip limit
74+
local e1=Effect.CreateEffect(c)
75+
e1:SetType(EFFECT_TYPE_SINGLE)
76+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
77+
e1:SetCode(EFFECT_EQUIP_LIMIT)
78+
e1:SetValue(1)
79+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
80+
c:RegisterEffect(e1)
81+
end
82+
end
83+
end
84+
function s.thfilter(c)
85+
return c:IsSetCard(SET_DOOM_Z) and c:IsAbleToHand()
86+
end
87+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
88+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
89+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
90+
end
91+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
92+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
93+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
94+
if #g>0 then
95+
Duel.SendtoHand(g,nil,REASON_EFFECT)
96+
Duel.ConfirmCards(1-tp,g)
97+
end
98+
end

0 commit comments

Comments
 (0)