Skip to content

Commit ed2601e

Browse files
authored
Added new card scripts
1 parent f9b894c commit ed2601e

32 files changed

+2619
-0
lines changed

pre-release/c100200265.lua

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--うかのみつねのたまゆら
2+
--Ukanomitsune-no-Tamayura
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand
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+
--A monster Synchro Summoned using this card as material gains an effect
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
20+
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
21+
e2:SetCode(EVENT_BE_MATERIAL)
22+
e2:SetCountLimit(1,{id,1})
23+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_SYNCHRO)==REASON_SYNCHRO end)
24+
e2:SetOperation(s.effop)
25+
c:RegisterEffect(e2)
26+
end
27+
function s.spconfilter(c)
28+
return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsFaceup()
29+
end
30+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
31+
return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil)
32+
end
33+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
34+
local c=e:GetHandler()
35+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
36+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
37+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
38+
end
39+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
40+
local c=e:GetHandler()
41+
if c:IsRelateToEffect(e) then
42+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
43+
end
44+
end
45+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
46+
local c=e:GetHandler()
47+
local rc=c:GetReasonCard()
48+
if not rc:IsType(TYPE_EFFECT) then
49+
--It becomes an Effect Monster if it's not one already
50+
local e0=Effect.CreateEffect(c)
51+
e0:SetType(EFFECT_TYPE_SINGLE)
52+
e0:SetCode(EFFECT_ADD_TYPE)
53+
e0:SetValue(TYPE_EFFECT)
54+
e0:SetReset(RESET_EVENT|RESETS_STANDARD)
55+
rc:RegisterEffect(e0,true)
56+
end
57+
--Gains 500 DEF
58+
local e1=Effect.CreateEffect(rc)
59+
e1:SetDescription(aux.Stringid(id,1))
60+
e1:SetType(EFFECT_TYPE_SINGLE)
61+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
62+
e1:SetCode(EFFECT_UPDATE_DEFENSE)
63+
e1:SetRange(LOCATION_MZONE)
64+
e1:SetValue(500)
65+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
66+
rc:RegisterEffect(e1,true)
67+
--Your opponent cannot target this Defense Position card with card effects
68+
local e2=e1:Clone()
69+
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
70+
e2:SetCondition(function(e) return e:GetHandler():IsDefensePos() end)
71+
e2:SetValue(aux.tgoval)
72+
rc:RegisterEffect(e2,true)
73+
end

pre-release/c101207082.lua

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
--Japanese name
2+
--Vulcarrion the Rotting Phoenix
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special summon this card from your hand
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(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_ZOMBIE),tp,LOCATION_MZONE,0,1,nil) end)
14+
e1:SetTarget(s.selfsptg)
15+
e1:SetOperation(s.selfspop)
16+
c:RegisterEffect(e1)
17+
--Return this card from the field to the hand, then you can Special Summon 1 Zombie monster from your hand
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.thtg)
25+
e2:SetOperation(s.thop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
29+
local c=e:GetHandler()
30+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
31+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
32+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
33+
end
34+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
35+
local c=e:GetHandler()
36+
if c:IsRelateToEffect(e) then
37+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
38+
end
39+
end
40+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
41+
local c=e:GetHandler()
42+
if chk==0 then return c:IsAbleToHand() end
43+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0)
44+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
45+
end
46+
function s.spfilter(c,e,tp)
47+
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
48+
end
49+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
50+
local c=e:GetHandler()
51+
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND)
52+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
53+
Duel.ShuffleHand(tp)
54+
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
55+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
57+
local sg=g:Select(tp,1,1,nil)
58+
Duel.BreakEffect()
59+
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
60+
end
61+
end
62+
end

pre-release/c101207084.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--Japanese name
2+
--Minimalian
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand
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:SetCost(s.selfspcost)
14+
e1:SetTarget(s.selfsptg)
15+
e1:SetOperation(s.selfspop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 monster from your Deck with the same original Type and Attribute that the banished monster had on the field, but 1 or 2 Levels lower than its original Level
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(s.deckspcost)
25+
e2:SetTarget(s.decksptg)
26+
e2:SetOperation(s.deckspop)
27+
c:RegisterEffect(e2)
28+
end
29+
function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk)
30+
local c=e:GetHandler()
31+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,c) end
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
33+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,c)
34+
Duel.Remove(g,POS_FACEUP,REASON_COST)
35+
end
36+
function s.selfsptg(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.selfspop(e,tp,eg,ep,ev,re,r,rp)
43+
local c=e:GetHandler()
44+
if c:IsRelateToEffect(e) then
45+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
46+
end
47+
end
48+
function s.deckspcostfilter(c,e,tp)
49+
return c:IsAbleToRemoveAsCost() and c:IsLevelBelow(4) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
50+
and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalAttribute(),c:GetOriginalLevel())
51+
end
52+
function s.deckspfilter(c,e,tp,rac,att,lvl)
53+
return c:IsOriginalRace(rac) and c:IsOriginalAttribute(att) and c:IsLevel(lvl-1,lvl-2)
54+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
55+
end
56+
function s.deckspcost(e,tp,eg,ep,ev,re,r,rp,chk)
57+
if chk==0 then return Duel.IsExistingMatchingCard(s.deckspcostfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
59+
local sc=Duel.SelectMatchingCard(tp,s.deckspcostfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
60+
e:SetLabel(sc:GetOriginalRace(),sc:GetOriginalAttribute(),sc:GetOriginalLevel())
61+
Duel.Remove(sc,POS_FACEUP,REASON_COST)
62+
end
63+
function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk)
64+
if chk==0 then return true end
65+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
66+
end
67+
function s.deckspop(e,tp,eg,ep,ev,re,r,rp)
68+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
69+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
70+
local rac,att,lvl=e:GetLabel()
71+
local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,rac,att,lvl)
72+
if #g>0 then
73+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
74+
end
75+
end

pre-release/c101207085.lua

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
--Japanese name
2+
--Shadow Severing Strike
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
c:RegisterEffect(e0)
11+
--Apply 1 of the following effects based on 1 of the card types banished
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetDescription(aux.Stringid(id,0))
14+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
15+
e1:SetProperty(EFFECT_FLAG_DELAY)
16+
e1:SetCode(EVENT_CUSTOM+id)
17+
e1:SetRange(LOCATION_SZONE)
18+
e1:SetCountLimit(1,id)
19+
e1:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end)
20+
e1:SetTarget(s.efftg)
21+
e1:SetOperation(s.effop)
22+
e1:SetLabel(0)
23+
c:RegisterEffect(e1)
24+
--Register cards banished
25+
local e1a=Effect.CreateEffect(c)
26+
e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
27+
e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
28+
e1a:SetCode(EVENT_REMOVE)
29+
e1a:SetRange(LOCATION_SZONE)
30+
e1a:SetLabelObject(e1)
31+
e1a:SetOperation(s.regop)
32+
c:RegisterEffect(e1a)
33+
e1:SetLabelObject(e1a)
34+
--Add 1 of your other banished cards to your hand
35+
local e2=Effect.CreateEffect(c)
36+
e2:SetDescription(aux.Stringid(id,1))
37+
e2:SetCategory(CATEGORY_TOHAND)
38+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
39+
e2:SetProperty(EFFECT_FLAG_DELAY)
40+
e2:SetCode(EVENT_REMOVE)
41+
e2:SetCountLimit(1,{id,1})
42+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsMonsterEffect() end)
43+
e2:SetTarget(s.thtg)
44+
e2:SetOperation(s.thop)
45+
c:RegisterEffect(e2)
46+
end
47+
function s.regfilter(c)
48+
return c:IsFaceup() and c:IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) and c:IsReason(REASON_COST)
49+
end
50+
function s.regop(e,tp,eg,ep,ev,re,r,rp)
51+
if not (re and re:IsActivated() and re:IsMonsterEffect()) then return false end
52+
local og=eg:Filter(s.regfilter,nil)
53+
if #og>0 then
54+
local types=0
55+
for tc in og:Iter() do
56+
types=types|tc:GetType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)
57+
end
58+
local label=e:GetLabel()
59+
e:SetLabel(label|types)
60+
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0)
61+
end
62+
end
63+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
64+
local types=e:GetLabelObject():GetLabel()>0 and e:GetLabelObject():GetLabel() or e:GetLabel()
65+
local b1=types&TYPE_MONSTER>0 and Duel.IsExistingMatchingCard(Card.IsNegatableSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
66+
local b2=types&TYPE_SPELL>0 and Duel.IsPlayerCanDraw(tp,2)
67+
local b3=types&TYPE_TRAP>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
68+
e:GetLabelObject():SetLabel(0)
69+
e:SetLabel(types)
70+
if chk==0 then return (b1 or b2 or b3) end
71+
local cat=0
72+
if types&TYPE_MONSTER>0 then
73+
cat=cat|CATEGORY_DISABLE
74+
Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
75+
end
76+
if types&TYPE_SPELL>0 then
77+
Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
78+
end
79+
if types&TYPE_TRAP>0 then
80+
cat=cat|CATEGORY_REMOVE
81+
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
82+
Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
83+
end
84+
e:SetCategory(cat)
85+
end
86+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
87+
local types=e:GetLabel()
88+
local b1=types&TYPE_MONSTER>0 and Duel.IsExistingMatchingCard(Card.IsNegatableSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
89+
local b2=types&TYPE_SPELL>0 and Duel.IsPlayerCanDraw(tp,2)
90+
local b3=types&TYPE_TRAP>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
91+
if not (b1 or b2 or b3) then return end
92+
local op=Duel.SelectEffect(tp,
93+
{b1,aux.Stringid(id,2)},
94+
{b2,aux.Stringid(id,3)},
95+
{b3,aux.Stringid(id,4)})
96+
if op==1 then
97+
--Negate the effects of 1 face-up Spell/Trap on the field until the end of this turn
98+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
99+
local tc=Duel.SelectMatchingCard(tp,Card.IsNegatableSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
100+
if tc then
101+
Duel.HintSelection(tc)
102+
tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END)
103+
end
104+
elseif op==2 then
105+
--Draw 2 cards
106+
Duel.Draw(tp,2,REASON_EFFECT)
107+
elseif op==3 then
108+
--Banish 1 monster on the field
109+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
110+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
111+
if #g>0 then
112+
Duel.HintSelection(g)
113+
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
114+
end
115+
end
116+
end
117+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
118+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
119+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
120+
end
121+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
122+
local c=e:GetHandler()
123+
local exc=c:IsRelateToEffect(e) and c or nil
124+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
125+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_REMOVED,0,1,1,exc)
126+
if #g>0 then
127+
Duel.SendtoHand(g,nil,REASON_EFFECT)
128+
Duel.ConfirmCards(1-tp,g)
129+
end
130+
end

0 commit comments

Comments
 (0)