Skip to content

Commit 0ac0c37

Browse files
authored
Added new card scripts
1 parent 08b7948 commit 0ac0c37

File tree

13 files changed

+1005
-0
lines changed

13 files changed

+1005
-0
lines changed

pre-release/c101208000.lua

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
--超究極魔導竜王
2+
--Dragon Master Lord
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Xyz Summon procedure: 2 Level 12 monsters
8+
Xyz.AddProcedure(c,nil,12,2)
9+
--While you control this Xyz Summoned card, your opponent cannot target it with card effects, also it cannot be destroyed by your opponent's 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:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end)
16+
e1:SetValue(aux.tgoval)
17+
c:RegisterEffect(e1)
18+
local e2=e1:Clone()
19+
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
20+
e2:SetValue(aux.indoval)
21+
c:RegisterEffect(e2)
22+
--If this cards attacks a Defense Position monster while you have 25 or more cards in your GY, inflict double piercing battle damage to your opponent
23+
local e3=Effect.CreateEffect(c)
24+
e3:SetType(EFFECT_TYPE_SINGLE)
25+
e3:SetCode(EFFECT_PIERCE)
26+
e3:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_GRAVE,0)>=25 end)
27+
e3:SetValue(DOUBLE_DAMAGE)
28+
c:RegisterEffect(e3)
29+
--Special Summon 1 monster from your Deck, Extra Deck, or GY
30+
local e4=Effect.CreateEffect(c)
31+
e4:SetDescription(aux.Stringid(id,0))
32+
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
33+
e4:SetType(EFFECT_TYPE_IGNITION)
34+
e4:SetRange(LOCATION_MZONE)
35+
e4:SetCountLimit(1)
36+
e4:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=25 end)
37+
e4:SetCost(aux.dxmcostgen(1,1))
38+
e4:SetTarget(s.sptg)
39+
e4:SetOperation(s.spop)
40+
c:RegisterEffect(e4)
41+
end
42+
function s.spfilter(c,e,tp)
43+
if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end
44+
if c:IsLocation(LOCATION_EXTRA) then
45+
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
46+
else
47+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
48+
end
49+
end
50+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
51+
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end
52+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE)
53+
end
54+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
55+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
56+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp)
57+
if #g>0 then
58+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
59+
end
60+
end

pre-release/c101208006.lua

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
--妖精獣レグルス
2+
--Regulus the Fairy Beast
3+
--Scripted by Eerie Code
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 Spell/Trap the mentions "Ancient Fairy Dragon" from your Deck to your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.thtg)
15+
e1:SetOperation(s.thop)
16+
c:RegisterEffect(e1)
17+
local e2=e1:Clone()
18+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e2)
20+
--Special Summon 1 Level 4 or lower LIGHT Beast, Plant, or Fairy monster from your hand in Defense Position
21+
local e3=Effect.CreateEffect(c)
22+
e3:SetDescription(aux.Stringid(id,1))
23+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
24+
e3:SetType(EFFECT_TYPE_IGNITION)
25+
e3:SetRange(LOCATION_MZONE)
26+
e3:SetCountLimit(1,{id,1})
27+
e3:SetTarget(s.sptg)
28+
e3:SetOperation(s.spop)
29+
c:RegisterEffect(e3)
30+
--Place 1 Field Spell from your GY on the bottom of the Deck, then draw 1 card
31+
local e4=Effect.CreateEffect(c)
32+
e4:SetDescription(aux.Stringid(id,2))
33+
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
34+
e4:SetType(EFFECT_TYPE_IGNITION)
35+
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
36+
e4:SetRange(LOCATION_GRAVE)
37+
e4:SetCountLimit(1,{id,2})
38+
e4:SetCost(aux.SelfBanishCost)
39+
e4:SetTarget(s.tdtg)
40+
e4:SetOperation(s.tdop)
41+
c:RegisterEffect(e4)
42+
end
43+
s.listed_names={CARD_ANCIENT_FAIRY_DRAGON}
44+
function s.thfilter(c)
45+
return c:IsSpellTrap() and c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) and c:IsAbleToHand()
46+
end
47+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
48+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
49+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
50+
end
51+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
53+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
54+
if #g>0 then
55+
Duel.SendtoHand(g,nil,REASON_EFFECT)
56+
Duel.ConfirmCards(1-tp,g)
57+
end
58+
end
59+
function s.spfilter(c,e,tp)
60+
return c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevelBelow(4)
61+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
62+
end
63+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
64+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
65+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
66+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
67+
end
68+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
69+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
71+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
72+
if #g>0 then
73+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
74+
end
75+
end
76+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
77+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsFieldSpell() and chkc:IsAbleToDeck() end
78+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
79+
and Duel.IsExistingTarget(aux.AND(Card.IsFieldSpell,Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,1,nil) end
80+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
81+
local g=Duel.SelectTarget(tp,aux.AND(Card.IsFieldSpell,Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,1,1,nil)
82+
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0)
83+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0)
84+
end
85+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
86+
local tc=Duel.GetFirstTarget()
87+
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0
88+
and tc:IsLocation(LOCATION_DECK) and Duel.IsPlayerCanDraw(tp) then
89+
Duel.BreakEffect()
90+
Duel.Draw(tp,1,REASON_EFFECT)
91+
end
92+
end

pre-release/c101208007.lua

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--妖精胞スポーア
2+
--Spore the Fairy Cell
3+
--Scripted by Eerie Code
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Increase this card's Level by up to the number of monsters you control
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_LVCHANGE)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
13+
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():HasLevel() end end)
14+
e1:SetOperation(s.lvop)
15+
c:RegisterEffect(e1)
16+
--Special Summon this card
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:SetRange(LOCATION_GRAVE)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCondition(s.spcon)
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
end
28+
s.listed_names={CARD_ANCIENT_FAIRY_DRAGON}
29+
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
30+
local c=e:GetHandler()
31+
if c:IsRelateToEffect(e) and c:IsFaceup() and c:HasLevel() then
32+
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
33+
local lv=Duel.AnnounceLevel(tp,1,ct)
34+
--Increase its Level by the selected number
35+
local e1=Effect.CreateEffect(c)
36+
e1:SetType(EFFECT_TYPE_SINGLE)
37+
e1:SetCode(EFFECT_UPDATE_LEVEL)
38+
e1:SetValue(lv)
39+
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
40+
c:RegisterEffect(e1)
41+
end
42+
end
43+
function s.spconfilter(c)
44+
return c:IsFaceup() and (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON)
45+
or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsMonster()))
46+
end
47+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
48+
return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil)
49+
end
50+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
51+
local c=e:GetHandler()
52+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
53+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
54+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
55+
end
56+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
if c:IsRelateToEffect(e) then
59+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
60+
end
61+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters
62+
local e1=Effect.CreateEffect(c)
63+
e1:SetDescription(aux.Stringid(id,2))
64+
e1:SetType(EFFECT_TYPE_FIELD)
65+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
66+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
67+
e1:SetTargetRange(1,0)
68+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end)
69+
e1:SetReset(RESET_PHASE|PHASE_END)
70+
Duel.RegisterEffect(e1,tp)
71+
--"Clock Lizard" check
72+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end)
73+
end

pre-release/c101208008.lua

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
--妖精霊クリボン
2+
--Kuribon the Fairy Spirit
3+
--Scripted by Eerie Code
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand, and if you do, it is treated as a Tuner
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCondition(s.spcon)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--If another "Ancient Fairy Dragon", or monster(s) that mentions it, that you control would be destroyed by card effect, you can return this card from the field to the hand instead
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
20+
e2:SetCode(EFFECT_DESTROY_REPLACE)
21+
e2:SetRange(LOCATION_MZONE)
22+
e2:SetCountLimit(1,{id,1})
23+
e2:SetTarget(s.reptg)
24+
e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) and c~=e:GetHandler() end)
25+
e2:SetOperation(function(e) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT|REASON_REPLACE) end)
26+
c:RegisterEffect(e2)
27+
end
28+
s.listed_names={CARD_ANCIENT_FAIRY_DRAGON}
29+
function s.spconfilter(c)
30+
return c:IsFaceup() and (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON)
31+
or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsMonster()))
32+
end
33+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
34+
return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil)
35+
end
36+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
local c=e:GetHandler()
38+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
40+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
41+
end
42+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
43+
local c=e:GetHandler()
44+
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
45+
--It is treated as a Tuner
46+
local e1=Effect.CreateEffect(c)
47+
e1:SetType(EFFECT_TYPE_SINGLE)
48+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
49+
e1:SetCode(EFFECT_ADD_TYPE)
50+
e1:SetValue(TYPE_TUNER)
51+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
52+
c:RegisterEffect(e1)
53+
end
54+
Duel.SpecialSummonComplete()
55+
end
56+
function s.repfilter(c,tp)
57+
return (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or (c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) and c:IsMonster()))
58+
and c:IsControler(tp) and c:IsFaceup() and c:IsOnField()
59+
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
60+
end
61+
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
62+
local c=e:GetHandler()
63+
if chk==0 then return c:IsAbleToHand() and not eg:IsContains(c) and eg:IsExists(s.repfilter,1,c,tp) end
64+
return Duel.SelectEffectYesNo(tp,c,96)
65+
end

0 commit comments

Comments
 (0)