Skip to content

Commit a8992d2

Browse files
authored
Added new card scripts
1 parent 1494929 commit a8992d2

File tree

4 files changed

+314
-0
lines changed

4 files changed

+314
-0
lines changed

pre-release/c101303018.lua

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
--堕天使グルガルタ
2+
--Darklord Gulgalta
3+
--scripted by Naim
4+
local s,id=GetID()
5+
local TOKEN_DARKLORD=id+100
6+
function s.initial_effect(c)
7+
--You can only Special Summon "Darklord Gulgalta(s)" once per turn
8+
c:SetSPSummonOnce(id)
9+
--Special Summon 2 "Darklord Tokens"
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetTarget(s.sptg)
17+
e1:SetOperation(s.spop)
18+
c:RegisterEffect(e1)
19+
--Add 1 "Darklord" card or "Forbidden" Quick-Play Spell from your Deck to your hand
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,1))
22+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
23+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24+
e2:SetProperty(EFFECT_FLAG_DELAY)
25+
e2:SetCode(EVENT_TO_GRAVE)
26+
e2:SetCountLimit(1,id)
27+
e2:SetTarget(s.thtg)
28+
e2:SetOperation(s.thop)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_names={id,TOKEN_DARKLORD} -- "Darklord Token"
32+
s.listed_series={SET_DARKLORD,SET_FORBIDDEN}
33+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
34+
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
35+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
36+
and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DARKLORD,SET_DARKLORD,TYPES_TOKEN,0,0,6,RACE_FAIRY,ATTRIBUTE_DARK) end
37+
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,tp,0)
38+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0)
39+
end
40+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
41+
local c=e:GetHandler()
42+
--You cannot Special Summon for the rest of this turn, except Fairy monsters
43+
local e1=Effect.CreateEffect(c)
44+
e1:SetDescription(aux.Stringid(id,2))
45+
e1:SetType(EFFECT_TYPE_FIELD)
46+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
47+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
48+
e1:SetTargetRange(1,0)
49+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_FAIRY) end)
50+
e1:SetReset(RESET_PHASE|PHASE_END)
51+
Duel.RegisterEffect(e1,tp)
52+
--Clock Lizard check
53+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_FAIRY) end)
54+
--Special Summon 2 "Darklord Tokens"
55+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2
56+
or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DARKLORD,SET_DARKLORD,TYPES_TOKEN,0,0,6,RACE_FAIRY,ATTRIBUTE_DARK) then return end
57+
for i=1,2 do
58+
local token=Duel.CreateToken(tp,TOKEN_DARKLORD)
59+
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
60+
end
61+
Duel.SpecialSummonComplete()
62+
end
63+
function s.thfilter(c)
64+
return (c:IsSetCard(SET_DARKLORD) or (c:IsSetCard(SET_FORBIDDEN) and c:IsQuickPlaySpell())) and c:IsAbleToHand() and not c:IsCode(id)
65+
end
66+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
67+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
68+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
69+
end
70+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
72+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
73+
if #g>0 then
74+
Duel.SendtoHand(g,nil,REASON_EFFECT)
75+
Duel.ConfirmCards(1-tp,g)
76+
end
77+
end

pre-release/c101303019.lua

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
--堕天使ジェフティ
2+
--Darklord Djehuty
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon 1 "Darklord" monster from your Deck in Defense Position
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetCategory(CATEGORY_SPECIAL_SUMMON)
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.sptg)
15+
e1a:SetOperation(s.spop)
16+
c:RegisterEffect(e1a)
17+
local e1b=e1a:Clone()
18+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e1b)
20+
--Add 1 "Darklord" card or "Forbidden" Quick-Play Spell from your GY to your hand
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_TOHAND)
24+
e2:SetType(EFFECT_TYPE_IGNITION)
25+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
26+
e2:SetRange(LOCATION_GRAVE)
27+
e2:SetCountLimit(1,{id,1})
28+
e2:SetCondition(s.thcon)
29+
e2:SetCost(Cost.SelfBanish)
30+
e2:SetTarget(s.thtg)
31+
e2:SetOperation(s.thop)
32+
c:RegisterEffect(e2)
33+
end
34+
s.listed_names={id}
35+
s.listed_series={SET_DARKLORD,SET_FORBIDDEN}
36+
function s.spfilter(c,e,tp)
37+
return c:IsSetCard(SET_DARKLORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id)
38+
end
39+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
42+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
43+
end
44+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
45+
local c=e:GetHandler()
46+
--You cannot Special Summon for the rest of this turn, except Fairy monsters
47+
local e1=Effect.CreateEffect(c)
48+
e1:SetDescription(aux.Stringid(id,2))
49+
e1:SetType(EFFECT_TYPE_FIELD)
50+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
51+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
52+
e1:SetTargetRange(1,0)
53+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_FAIRY) end)
54+
e1:SetReset(RESET_PHASE|PHASE_END)
55+
Duel.RegisterEffect(e1,tp)
56+
--Clock Lizard check
57+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_FAIRY) end)
58+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
60+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
61+
if #g>0 then
62+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
63+
end
64+
end
65+
function s.thconfilter(c)
66+
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsFusionMonster() and c:IsFaceup()
67+
end
68+
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
69+
return Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_MZONE,0,1,nil)
70+
end
71+
function s.thfilter(c)
72+
return (c:IsSetCard(SET_DARKLORD) or (c:IsSetCard(SET_FORBIDDEN) and c:IsQuickPlaySpell())) and c:IsAbleToHand()
73+
end
74+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
75+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
76+
local c=e:GetHandler()
77+
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end
78+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
79+
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
80+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
81+
end
82+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
83+
local tc=Duel.GetFirstTarget()
84+
if tc:IsRelateToEffect(e) then
85+
Duel.SendtoHand(tc,nil,REASON_EFFECT)
86+
end
87+
end

pre-release/c101303036.lua

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
--黄昏の堕天使ルシファー
2+
--Lucifer, Darklord of the Evening Twilight
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 2 Level 6 or higher DARK Fairy monsters
8+
Fusion.AddProcMixN(c,true,true,s.matfilter,2)
9+
--Your opponent cannot target this card with card effects
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetType(EFFECT_TYPE_SINGLE)
12+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
13+
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
14+
e1:SetRange(LOCATION_MZONE)
15+
e1:SetValue(aux.tgoval)
16+
c:RegisterEffect(e1)
17+
--Set 1 "Darklord" Spell and 1 "Darklord" Trap from your Deck
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,0))
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY)
22+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
23+
e2:SetCountLimit(1,id)
24+
e2:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end)
25+
e2:SetTarget(s.settg)
26+
e2:SetOperation(s.setop)
27+
c:RegisterEffect(e2)
28+
--Apply the effect of 1 "Darklord" Spell/Trap in your GY, then shuffle it into the Deck
29+
local e3=Effect.CreateEffect(c)
30+
e3:SetDescription(aux.Stringid(id,1))
31+
e3:SetCategory(CATEGORY_TODECK)
32+
e3:SetType(EFFECT_TYPE_QUICK_O)
33+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
34+
e3:SetCode(EVENT_FREE_CHAIN)
35+
e3:SetRange(LOCATION_MZONE)
36+
e3:SetCountLimit(1,{id,1})
37+
e3:SetCost(Cost.PayLP(1000))
38+
e3:SetTarget(s.copytg)
39+
e3:SetOperation(s.copyop)
40+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
41+
c:RegisterEffect(e3)
42+
end
43+
s.listed_series={SET_DARKLORD}
44+
function s.matfilter(c,fc,sumtype,sump)
45+
return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,sump) and c:IsRace(RACE_FAIRY,fc,sumtype,sump)
46+
end
47+
function s.setfilter(c)
48+
return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsSSetable()
49+
end
50+
function s.rescon(stzone_chk)
51+
return function(sg,e,tp,mg)
52+
return #sg==2 and (stzone_chk or sg:IsExists(Card.IsFieldSpell,1,nil)) and sg:IsExists(Card.IsSpell,1,nil) and sg:IsExists(Card.IsTrap,1,nil)
53+
end
54+
end
55+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then
57+
local stzone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>=2
58+
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
59+
return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon(stzone_chk),0)
60+
end
61+
end
62+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
63+
local stzone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>=2
64+
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
65+
local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon(stzone_chk),1,tp,HINTMSG_SET)
66+
if #sg==2 then
67+
Duel.SSet(tp,sg)
68+
end
69+
end
70+
function s.copyfilter(c)
71+
return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil
72+
end
73+
function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
74+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.copyfilter(chkc) end
75+
if chk==0 then return Duel.IsExistingTarget(s.copyfilter,tp,LOCATION_GRAVE,0,1,nil) end
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
77+
local g=Duel.SelectTarget(tp,s.copyfilter,tp,LOCATION_GRAVE,0,1,1,nil)
78+
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0)
79+
end
80+
function s.copyop(e,tp,eg,ep,ev,re,r,rp)
81+
local tc=Duel.GetFirstTarget()
82+
if not tc:IsRelateToEffect(e) then return end
83+
local te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
84+
if not te then return end
85+
local tg=te:GetTarget()
86+
local op=te:GetOperation()
87+
if tg then tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,1) end
88+
Duel.BreakEffect()
89+
tc:CreateEffectRelation(te)
90+
Duel.BreakEffect()
91+
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
92+
for etc in aux.Next(g) do
93+
etc:CreateEffectRelation(te)
94+
end
95+
if op then op(te,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE,1) end
96+
tc:ReleaseEffectRelation(te)
97+
for etc in aux.Next(g) do
98+
etc:ReleaseEffectRelation(te)
99+
end
100+
Duel.BreakEffect()
101+
Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
102+
end

pre-release/c101303063.lua

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
--佚楽の堕天使
2+
--Darklord Pleasure
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e1=Fusion.CreateSummonEff({
8+
handler=c,
9+
fusfilter=s.fusfilter,
10+
matfilter=Card.IsAbleToRemove,
11+
extrafil=s.fextra,
12+
extraop=Fusion.BanishMaterial,
13+
extratg=s.extratg,
14+
stage2=s.stage2
15+
})
16+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
17+
c:RegisterEffect(e1)
18+
end
19+
s.listed_series={SET_DARKLORD}
20+
function s.fusfilter(c)
21+
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY)
22+
end
23+
function s.fcheck(tp,sg,fc)
24+
return fc:IsSetCard(SET_DARKLORD) or not sg:IsExists(Card.IsControler,1,nil,1-tp)
25+
end
26+
function s.fextrafilter(c,tp)
27+
return c:IsMonster() and c:IsAbleToRemove() and (c:IsControler(tp) or (c:IsSetCard(SET_DARKLORD) and c:IsFaceup()))
28+
end
29+
function s.fextra(e,tp,mg)
30+
if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return nil,s.fcheck end
31+
return Duel.GetMatchingGroup(s.fextrafilter,tp,LOCATION_GRAVE,LOCATION_MZONE,nil,tp),s.fcheck
32+
end
33+
function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk)
34+
if chk==0 then return true end
35+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE)
36+
end
37+
function s.stage2(e,fc,tp,sg,chk)
38+
if chk==0 then
39+
--It gains 1000 ATK
40+
local e1=Effect.CreateEffect(e:GetHandler())
41+
e1:SetType(EFFECT_TYPE_SINGLE)
42+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
43+
e1:SetCode(EFFECT_UPDATE_ATTACK)
44+
e1:SetValue(1000)
45+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
46+
fc:RegisterEffect(e1)
47+
end
48+
end

0 commit comments

Comments
 (0)