Skip to content

Commit c125ec5

Browse files
authored
Added new card scripts
1 parent 4e70ee2 commit c125ec5

File tree

3 files changed

+300
-0
lines changed

3 files changed

+300
-0
lines changed

pre-release/c101301024.lua

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
--超量妖精ゼータン
2+
--Super Quantal Fairy Zetan
3+
--scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card, then you can make its Level become the Level of 1 "Super Quant" monster you control
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCondition(s.hspcon)
14+
e1:SetTarget(s.hsptg)
15+
e1:SetOperation(s.hspop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 "Super Quant" monster from your Deck, except "Super Quantal Fairy Zetan"
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCost(Cost.AND(Cost.SelfTribute,s.dspcost))
25+
e2:SetTarget(s.dsptg)
26+
e2:SetOperation(s.dspop)
27+
c:RegisterEffect(e2)
28+
end
29+
s.listed_names={id}
30+
s.listed_series={SET_SUPER_QUANT}
31+
function s.hspconfilter(c)
32+
return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id)
33+
end
34+
function s.hspcon(e,tp,eg,ep,ev,re,r,rp)
35+
return Duel.IsExistingMatchingCard(s.hspconfilter,tp,LOCATION_MZONE,0,1,nil)
36+
end
37+
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
38+
local c=e:GetHandler()
39+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
40+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
41+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
42+
Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0)
43+
end
44+
function s.lvfilter(c,lv)
45+
return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and c:HasLevel() and not c:IsLevel(lv)
46+
end
47+
function s.hspop(e,tp,eg,ep,ev,re,r,rp)
48+
local c=e:GetHandler()
49+
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
50+
local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,c,c:GetLevel())
51+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
53+
local sc=g:Select(tp,1,1,nil):GetFirst()
54+
if sc then
55+
Duel.HintSelection(sc)
56+
Duel.BreakEffect()
57+
--This card's Level becomes that monster's
58+
local e1=Effect.CreateEffect(c)
59+
e1:SetType(EFFECT_TYPE_SINGLE)
60+
e1:SetCode(EFFECT_CHANGE_LEVEL)
61+
e1:SetValue(sc:GetLevel())
62+
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
63+
c:RegisterEffect(e1)
64+
end
65+
end
66+
function s.dspcostfilter(c,e,tp)
67+
return c:IsSetCard(SET_SUPER_QUANT) and not c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost()
68+
and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,c,e,tp)
69+
end
70+
function s.dspfilter(c,e,tp)
71+
return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
72+
end
73+
function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk)
74+
if chk==0 then return Duel.IsExistingMatchingCard(s.dspcostfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
75+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
76+
local g=Duel.SelectMatchingCard(tp,s.dspcostfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
77+
Duel.SendtoGrave(g,REASON_COST)
78+
end
79+
function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk)
80+
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 end
81+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
82+
end
83+
function s.dspop(e,tp,eg,ep,ev,re,r,rp)
84+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
85+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
86+
local g=Duel.SelectMatchingCard(tp,s.dspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
87+
if #g>0 then
88+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
89+
end
90+
end

pre-release/c101301025.lua

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
--超量士ブラックレイヤー
2+
--Super Quantum Black Layer
3+
--scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Discard 1 other card, and if you do, Special Summon this card from your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_QUICK_O)
11+
e1:SetCode(EVENT_CHAINING)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id)
14+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsMonsterEffect() end)
15+
e1:SetTarget(s.selfsptg)
16+
e1:SetOperation(s.selfspop)
17+
c:RegisterEffect(e1)
18+
--Special Summon 1 "Super Quantal Mech Beast" Xyz Monster from your Extra Deck
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
22+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
23+
e2:SetProperty(EFFECT_FLAG_DELAY)
24+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetTarget(s.xyzsptg)
27+
e2:SetOperation(s.xyzspop)
28+
c:RegisterEffect(e2)
29+
--Add 1 "Super Quant" Spell from your Deck to your hand
30+
local e3=Effect.CreateEffect(c)
31+
e3:SetDescription(aux.Stringid(id,2))
32+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
33+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
34+
e3:SetProperty(EFFECT_FLAG_DELAY)
35+
e3:SetCode(EVENT_TO_GRAVE)
36+
e3:SetCountLimit(1,{id,2})
37+
e3:SetTarget(s.thtg)
38+
e3:SetOperation(s.thop)
39+
c:RegisterEffect(e3)
40+
end
41+
s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST}
42+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
43+
local c=e:GetHandler()
44+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT)
45+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
46+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)end
47+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
48+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
49+
end
50+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
51+
local c=e:GetHandler()
52+
local exc=c:IsRelateToEffect(e) and c or nil
53+
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,exc)>0 and c:IsRelateToEffect(e) then
54+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
55+
end
56+
end
57+
function s.xyzspfilter(c,e,tp,mc,chk_att)
58+
return c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and mc:IsCanBeXyzMaterial(c,tp)
59+
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
60+
and (not chk_att or Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c))
61+
end
62+
function s.attachfilter(c,tp,xc)
63+
return c:IsSetCard(SET_SUPER_QUANT) and c:IsMonster() and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT)
64+
end
65+
function s.xyzsptg(e,tp,eg,ep,ev,re,r,rp,chk)
66+
if chk==0 then
67+
local c=e:GetHandler()
68+
local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ)
69+
return (#pg<=0 or (#pg==1 and pg:IsContains(c)))
70+
and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,true)
71+
end
72+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
73+
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
74+
end
75+
function s.xyzspop(e,tp,eg,ep,ev,re,r,rp)
76+
local c=e:GetHandler()
77+
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
78+
local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ)
79+
if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end
80+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
81+
local xc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,false):GetFirst()
82+
if not xc then return end
83+
xc:SetMaterial(c)
84+
Duel.Overlay(xc,c)
85+
if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end
86+
xc:CompleteProcedure()
87+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH)
88+
local ac=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,xc):GetFirst()
89+
if ac then
90+
Duel.Overlay(xc,ac)
91+
end
92+
end
93+
function s.thfilter(c)
94+
return c:IsSetCard(SET_SUPER_QUANT) and c:IsSpell() and c:IsAbleToHand()
95+
end
96+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
97+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
98+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
99+
end
100+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
101+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
102+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
103+
if #g>0 then
104+
Duel.SendtoHand(g,nil,REASON_EFFECT)
105+
Duel.ConfirmCards(1-tp,g)
106+
end
107+
end

pre-release/c101301068.lua

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
--第19層『襲来干渉!漆黒の超量士!!』
2+
--Layer 19: "Preventing the Invasion! The Pitch-Black Super Quantum!!"
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate 1 of these effects
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E)
12+
e1:SetCost(s.effcost)
13+
e1:SetTarget(s.efftg)
14+
e1:SetOperation(s.effop)
15+
c:RegisterEffect(e1)
16+
end
17+
s.listed_series={SET_SUPER_QUANT}
18+
function s.spfilter(c,e,tp)
19+
return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
20+
and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalAttribute,c:GetOriginalAttribute()),tp,LOCATION_MZONE,0,1,nil)
21+
end
22+
function s.setfilter(c)
23+
return c:IsSetCard(SET_SUPER_QUANT) and c:IsTrap() and c:IsSSetable()
24+
end
25+
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
26+
e:SetLabel(-100)
27+
local b1=not Duel.HasFlagEffect(tp,id)
28+
and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
29+
local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
30+
and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil)
31+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
32+
local b3=not Duel.HasFlagEffect(tp,id+200)
33+
and (e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2)
34+
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
35+
if chk==0 then return b1 or b2 or b3 end
36+
end
37+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
38+
if chkc then return e:GetLabel()==1 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() and chkc:IsCanChangePosition() end
39+
local cost_skip=e:GetLabel()~=-100
40+
local b1=(cost_skip or not Duel.HasFlagEffect(tp,id))
41+
and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
42+
local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+100)
43+
and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil)))
44+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
45+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
46+
local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200))
47+
and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2)
48+
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
49+
if chk==0 then e:SetLabel(0) return b1 or b2 or b3 end
50+
local op=Duel.SelectEffect(tp,
51+
{b1,aux.Stringid(id,1)},
52+
{b2,aux.Stringid(id,2)},
53+
{b3,aux.Stringid(id,3)})
54+
e:SetLabel(op)
55+
if op==1 then
56+
e:SetCategory(CATEGORY_POSITION)
57+
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
58+
if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
60+
local g=Duel.SelectTarget(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
61+
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0)
62+
elseif op==2 then
63+
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
64+
e:SetProperty(0)
65+
if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end
66+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
67+
elseif op==3 then
68+
e:SetCategory(0)
69+
e:SetProperty(0)
70+
if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end
71+
end
72+
end
73+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
74+
local op=e:GetLabel()
75+
if op==1 then
76+
--Change 1 Attack Position monster on the field to Defense Position
77+
local tc=Duel.GetFirstTarget()
78+
if tc:IsRelateToEffect(e) then
79+
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
80+
end
81+
elseif op==2 then
82+
--Special Summon 1 "Super Quant" monster from your Deck in Defense Position, with a different original Attribute from the monsters you control
83+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
84+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
85+
if #g>0 then
86+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
87+
end
88+
elseif op==3 then
89+
--Set 1 "Super Quant" Trap from your Deck
90+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
91+
local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
92+
if sc and Duel.SSet(tp,sc)>0 then
93+
--It can be activated this turn
94+
local e1=Effect.CreateEffect(e:GetHandler())
95+
e1:SetDescription(aux.Stringid(id,4))
96+
e1:SetType(EFFECT_TYPE_SINGLE)
97+
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
98+
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
99+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
100+
sc:RegisterEffect(e1)
101+
end
102+
end
103+
end

0 commit comments

Comments
 (0)