Skip to content

Commit e5bb214

Browse files
authored
Added new card scripts
1 parent 8f1575d commit e5bb214

File tree

10 files changed

+829
-0
lines changed

10 files changed

+829
-0
lines changed

pre-release/c100442031.lua

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
--K9-17号 イヅナ
2+
--K9 - #17 Izuna
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_SINGLE)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SUMMON_PROC)
12+
e1:SetCondition(s.ntcon)
13+
c:RegisterEffect(e1)
14+
--Special Summon this card from your hand
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetDescription(aux.Stringid(id,1))
17+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
18+
e2:SetType(EFFECT_TYPE_QUICK_O)
19+
e2:SetCode(EVENT_FREE_CHAIN)
20+
e2:SetRange(LOCATION_HAND)
21+
e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end)
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
28+
--Send 1 "K9" card from your Deck to the GY, except "K9 - #17 Izuna"
29+
local e3=Effect.CreateEffect(c)
30+
e3:SetDescription(aux.Stringid(id,2))
31+
e3:SetCategory(CATEGORY_TOGRAVE)
32+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
33+
e3:SetProperty(EFFECT_FLAG_DELAY)
34+
e3:SetCode(EVENT_SUMMON_SUCCESS)
35+
e3:SetCountLimit(1,{id,1})
36+
e3:SetTarget(s.tgtg)
37+
e3:SetOperation(s.tgop)
38+
c:RegisterEffect(e3)
39+
local e4=e3:Clone()
40+
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
41+
c:RegisterEffect(e4)
42+
end
43+
s.listed_series={SET_K9}
44+
s.listed_names={id}
45+
function s.chainfilter(re,tp,cid)
46+
return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0)
47+
end
48+
function s.ntcon(e,c,minc)
49+
if c==nil then return true end
50+
local tp=c:GetControler()
51+
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
52+
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2
53+
end
54+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
55+
local c=e:GetHandler()
56+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
57+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
58+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
59+
end
60+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
61+
local c=e:GetHandler()
62+
if c:IsRelateToEffect(e) then
63+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
64+
end
65+
end
66+
function s.tgfilter(c)
67+
return c:IsSetCard(SET_K9) and c:IsAbleToGrave() and not c:IsCode(id)
68+
end
69+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
70+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
71+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
72+
end
73+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
74+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
75+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
76+
if #g>0 then
77+
Duel.SendtoGrave(g,REASON_EFFECT)
78+
end
79+
end

pre-release/c100442032.lua

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
--K9-66a号 ヨクル
2+
--K9 - #66a Jokull
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_SINGLE)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SUMMON_PROC)
12+
e1:SetCondition(s.ntcon)
13+
c:RegisterEffect(e1)
14+
--Special Summon both this card and 1 other Level 5 monster from your hand
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetDescription(aux.Stringid(id,1))
17+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
18+
e2:SetType(EFFECT_TYPE_IGNITION)
19+
e2:SetRange(LOCATION_HAND)
20+
e2:SetCountLimit(1,id)
21+
e2:SetCost(s.spcost)
22+
e2:SetTarget(s.sptg)
23+
e2:SetOperation(s.spop)
24+
c:RegisterEffect(e2)
25+
--Add 1 non-Aqua "K9" monster from your Deck to your hand
26+
local e3=Effect.CreateEffect(c)
27+
e3:SetDescription(aux.Stringid(id,2))
28+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
29+
e3:SetType(EFFECT_TYPE_IGNITION)
30+
e3:SetRange(LOCATION_MZONE)
31+
e3:SetCountLimit(1,{id,1})
32+
e3:SetTarget(s.thtg)
33+
e3:SetOperation(s.thop)
34+
c:RegisterEffect(e3)
35+
end
36+
s.listed_series={SET_K9}
37+
function s.ntcon(e,c,minc)
38+
if c==nil then return true end
39+
local tp=c:GetControler()
40+
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2
42+
end
43+
function s.spcostfilter(c,e,tp)
44+
return c:IsLevel(5) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
45+
end
46+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
47+
local c=e:GetHandler()
48+
if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
50+
local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst()
51+
Duel.ConfirmCards(1-tp,Group.FromCards(c,rc))
52+
e:SetLabelObject(rc)
53+
Duel.ShuffleHand(tp)
54+
end
55+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
local c=e:GetHandler()
57+
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
58+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
59+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
60+
local rc=e:GetLabelObject()
61+
Duel.SetTargetCard(rc)
62+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,rc),2,tp,0)
63+
end
64+
function s.spfilter(c,e,tp)
65+
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
66+
end
67+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
68+
local c=e:GetHandler()
69+
local g=Group.FromCards(c,Duel.GetFirstTarget())
70+
if g:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
71+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
72+
and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then
73+
for sc in g:Iter() do
74+
--They cannot be used as material for the Xyz Summon of a LIGHT monster
75+
local e1=Effect.CreateEffect(c)
76+
e1:SetDescription(aux.Stringid(id,3))
77+
e1:SetType(EFFECT_TYPE_SINGLE)
78+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
79+
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
80+
e1:SetValue(function(e,c) return c and c:IsAttribute(ATTRIBUTE_LIGHT) end)
81+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
82+
sc:RegisterEffect(e1)
83+
end
84+
end
85+
end
86+
function s.thfilter(c)
87+
return not c:IsRace(RACE_AQUA) and c:IsSetCard(SET_K9) and c:IsMonster() and c:IsAbleToHand()
88+
end
89+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
90+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
91+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
92+
end
93+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
94+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
95+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
96+
if #g>0 then
97+
Duel.SendtoHand(g,nil,REASON_EFFECT)
98+
Duel.ConfirmCards(1-tp,g)
99+
end
100+
end

pre-release/c100442033.lua

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
--K9-66b号 ランタン
2+
--K9 - #66b Lantern
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If your opponent has 2 or more cards in their hand, you can Normal Summon this card without Tributing
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_SINGLE)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SUMMON_PROC)
12+
e1:SetCondition(s.ntcon)
13+
c:RegisterEffect(e1)
14+
--Special Summon both this card and 1 other Level 5 monster from your hand
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetDescription(aux.Stringid(id,1))
17+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
18+
e2:SetType(EFFECT_TYPE_IGNITION)
19+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
20+
e2:SetRange(LOCATION_HAND)
21+
e2:SetCountLimit(1,id)
22+
e2:SetTarget(s.sptg)
23+
e2:SetOperation(s.spop)
24+
c:RegisterEffect(e2)
25+
--Add 1 "K9" Spell/Trap from your Deck to your hand
26+
local e3=Effect.CreateEffect(c)
27+
e3:SetDescription(aux.Stringid(id,2))
28+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
29+
e3:SetType(EFFECT_TYPE_IGNITION)
30+
e3:SetRange(LOCATION_MZONE)
31+
e3:SetCountLimit(1,{id,1})
32+
e3:SetTarget(s.thtg)
33+
e3:SetOperation(s.thop)
34+
c:RegisterEffect(e3)
35+
end
36+
s.listed_series={SET_K9}
37+
function s.ntcon(e,c,minc)
38+
if c==nil then return true end
39+
local tp=c:GetControler()
40+
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2
42+
end
43+
function s.spfilter(c,e,tp)
44+
return not c:IsRace(RACE_PYRO) and c:IsLevel(5) and c:IsSetCard(SET_K9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
45+
end
46+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
47+
local c=e:GetHandler()
48+
if chkc then return s.spfilter(chkc,e,tp) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) end
49+
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
50+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
51+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
52+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
54+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
55+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0)
56+
end
57+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
58+
local c=e:GetHandler()
59+
local tc=Duel.GetFirstTarget()
60+
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
61+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
62+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
63+
local g=Group.FromCards(c,tc)
64+
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=2 then return end
65+
for sc in g:Iter() do
66+
--They cannot be used as material for the Xyz Summon of a LIGHT monster
67+
local e1=Effect.CreateEffect(c)
68+
e1:SetDescription(aux.Stringid(id,3))
69+
e1:SetType(EFFECT_TYPE_SINGLE)
70+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
71+
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
72+
e1:SetValue(function(e,c) return c and c:IsAttribute(ATTRIBUTE_LIGHT) end)
73+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
74+
sc:RegisterEffect(e1)
75+
end
76+
end
77+
end
78+
function s.thfilter(c)
79+
return c:IsSetCard(SET_K9) and c:IsSpellTrap() and c:IsAbleToHand()
80+
end
81+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
82+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
83+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
84+
end
85+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
86+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
87+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
88+
if #g>0 then
89+
Duel.SendtoHand(g,nil,REASON_EFFECT)
90+
Duel.ConfirmCards(1-tp,g)
91+
end
92+
end

pre-release/c100442034.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--K9-ØØ号 ルプス
2+
--K9 - #ØØ Lupus
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand or GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_QUICK_O)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetRange(LOCATION_HAND|LOCATION_GRAVE)
13+
e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
14+
e1:SetCountLimit(1,id)
15+
e1:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end)
16+
e1:SetTarget(s.sptg)
17+
e1:SetOperation(s.spop)
18+
c:RegisterEffect(e1)
19+
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
20+
--Immediately after this effect resolves, Xyz Summon using this card you control
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
24+
e2:SetType(EFFECT_TYPE_QUICK_O)
25+
e2:SetCode(EVENT_FREE_CHAIN)
26+
e2:SetRange(LOCATION_MZONE)
27+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end)
30+
e2:SetTarget(s.xyztg)
31+
e2:SetOperation(s.xyzop)
32+
c:RegisterEffect(e2)
33+
--An Xyz Monster that has this card as material gains this effect: ● Your opponent cannot target this card with card effects
34+
local e3=Effect.CreateEffect(c)
35+
e3:SetType(EFFECT_TYPE_XMATERIAL)
36+
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
37+
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
38+
e3:SetRange(LOCATION_MZONE)
39+
e3:SetValue(aux.tgoval)
40+
c:RegisterEffect(e3)
41+
end
42+
function s.chainfilter(re,tp,cid)
43+
return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0)
44+
end
45+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
local c=e:GetHandler()
47+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
48+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
49+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
50+
end
51+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
52+
local c=e:GetHandler()
53+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
54+
--Banish it when it leaves the field
55+
local e1=Effect.CreateEffect(c)
56+
e1:SetDescription(3300)
57+
e1:SetType(EFFECT_TYPE_SINGLE)
58+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
59+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
60+
e1:SetValue(LOCATION_REMOVED)
61+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
62+
c:RegisterEffect(e1,true)
63+
end
64+
end
65+
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
66+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
67+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
68+
end
69+
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
70+
local c=e:GetHandler()
71+
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
72+
local g=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,c)
73+
if #g>0 then
74+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
75+
local sg=g:Select(tp,1,1,nil)
76+
Duel.XyzSummon(tp,sg:GetFirst(),c)
77+
end
78+
end

0 commit comments

Comments
 (0)