Skip to content

Commit 5ac4d4b

Browse files
authored
Added new card scripts
1 parent 174b530 commit 5ac4d4b

14 files changed

+996
-0
lines changed

pre-release/c101208081.lua

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
--暁天使カムビン
2+
--Dawn Angel Kambi
3+
--scripted by pyrQ
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.selfspcon)
14+
e1:SetTarget(s.selfsptg)
15+
e1:SetOperation(s.selfspop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 Fairy monster from your Deck whose Level equals the total Levels the Tributed monsters had on the field
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+
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_FAIRY) end)
29+
end
30+
function s.selfspconfilter(c)
31+
return c:IsFacedown() or not c:IsRace(RACE_FAIRY)
32+
end
33+
function s.selfspcon(e,tp,eg,ep,ev,re,r,rp)
34+
return not Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,0,1,nil)
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)
49+
return c:IsRace(RACE_FAIRY) and c:HasLevel()
50+
end
51+
function s.rescon(sg,tp,exg,e,handler)
52+
return sg:IsContains(handler) and Duel.GetMZoneCount(tp,sg)>0
53+
and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sg:GetSum(Card.GetLevel)),not sg:IsContains(handler)
54+
end
55+
function s.deckspfilter(c,e,tp,lv)
56+
return c:IsRace(RACE_FAIRY) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
57+
end
58+
function s.deckspcost(e,tp,eg,ep,ev,re,r,rp,chk)
59+
e:SetLabel(-100)
60+
local c=e:GetHandler()
61+
if chk==0 then return c:IsReleasable() and c:HasLevel() and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
62+
and Duel.CheckReleaseGroupCost(tp,s.deckspcostfilter,1,false,s.rescon,nil,e,c) end
63+
local g=Duel.SelectReleaseGroupCost(tp,s.deckspcostfilter,1,99,false,s.rescon,nil,e,c)
64+
g:AddCard(c)
65+
e:SetLabel(g:GetSum(Card.GetLevel))
66+
Duel.Release(g,REASON_COST)
67+
--You cannot Special Summon the turn you activate this effect, except Fairy monsters
68+
local e1=Effect.CreateEffect(c)
69+
e1:SetDescription(aux.Stringid(id,2))
70+
e1:SetType(EFFECT_TYPE_FIELD)
71+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
72+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
73+
e1:SetTargetRange(1,0)
74+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_FAIRY) end)
75+
e1:SetReset(RESET_PHASE|PHASE_END)
76+
Duel.RegisterEffect(e1,tp)
77+
end
78+
function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk)
79+
if chk==0 then
80+
local res=e:GetLabel()==-100
81+
e:SetLabel(0)
82+
return res
83+
end
84+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
85+
end
86+
function s.deckspop(e,tp,eg,ep,ev,re,r,rp)
87+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
88+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
89+
local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel())
90+
if #g>0 then
91+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
92+
end
93+
end

pre-release/c101208082.lua

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--久遠の神徒フリムニル
2+
--Hrimnir the Divine Follower
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 Continuous Spell from your Deck, but send it to the GY during your opponent's End Phase
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCost(s.setcost)
14+
e1:SetTarget(s.settg)
15+
e1:SetOperation(s.setop)
16+
c:RegisterEffect(e1)
17+
--Special Summon this card, but banish it when it leaves the field
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_TO_GRAVE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end)
26+
e2:SetTarget(s.sptg)
27+
e2:SetOperation(s.spop)
28+
c:RegisterEffect(e2)
29+
end
30+
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
31+
if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,3,true,nil,nil,RACE_FAIRY) end
32+
local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,3,3,true,nil,nil,RACE_FAIRY)
33+
Duel.Release(g,REASON_COST)
34+
end
35+
function s.setfilter(c)
36+
return c:IsContinuousSpell() and c:IsSSetable()
37+
end
38+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
40+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_STZONE)
41+
end
42+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
43+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
44+
local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
45+
if sc and Duel.SSet(tp,sc)>0 then
46+
--Send it to the GY during your opponent's End Phase
47+
aux.DelayedOperation(sc,PHASE_END,id,e,tp,
48+
function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end,
49+
function() return Duel.IsTurnPlayer(1-tp) end,
50+
0,1,aux.Stringid(id,2)
51+
)
52+
end
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) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
63+
--Banish it when it leaves the field
64+
local e1=Effect.CreateEffect(c)
65+
e1:SetDescription(3300)
66+
e1:SetType(EFFECT_TYPE_SINGLE)
67+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
68+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
69+
e1:SetValue(LOCATION_REMOVED)
70+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
71+
c:RegisterEffect(e1,true)
72+
end
73+
end

pre-release/c101208083.lua

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
--ヴィンゴルヴの祝福
2+
--Vingolf's Blessing
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When this card is activated: You can send 1 LIGHT Fairy monster from your Deck to the GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
--Fairy monsters you control gain 100 ATK for each Fairy monster in your field and GY
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetType(EFFECT_TYPE_FIELD)
19+
e2:SetCode(EFFECT_UPDATE_ATTACK)
20+
e2:SetRange(LOCATION_SZONE)
21+
e2:SetTargetRange(LOCATION_MZONE,0)
22+
e2:SetTarget(function(e,c) return c:IsRace(RACE_FAIRY) end)
23+
e2:SetValue(function(e,c) return 100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_FAIRY),c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,nil) end)
24+
c:RegisterEffect(e2)
25+
--Special Summon 1 Level 4 or lower Fairy monster from your GY
26+
local e3=Effect.CreateEffect(c)
27+
e3:SetDescription(aux.Stringid(id,1))
28+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
29+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
30+
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
31+
e3:SetCode(EVENT_TO_GRAVE)
32+
e3:SetCountLimit(1,{id,1})
33+
e3:SetTarget(s.sptg)
34+
e3:SetOperation(s.spop)
35+
c:RegisterEffect(e3)
36+
end
37+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
38+
if chk==0 then return true end
39+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
40+
end
41+
function s.tgfilter(c)
42+
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToGrave()
43+
end
44+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
45+
if Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
46+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
48+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
49+
if #g>0 then
50+
Duel.SendtoGrave(g,REASON_EFFECT)
51+
end
52+
end
53+
end
54+
function s.spfilter(c,e,tp)
55+
return c:IsLevelBelow(4) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
56+
end
57+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
58+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end
59+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
60+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
62+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
63+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
64+
end
65+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
66+
local tc=Duel.GetFirstTarget()
67+
if tc:IsRelateToEffect(e) then
68+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
69+
end
70+
end

pre-release/c101208084.lua

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
--アスピスクール
2+
--Aspischool
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon 1 Level 6 or lower Fish monster from your hand in Defense Position, but banish it when it leaves the field
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1:SetTarget(s.handsptg)
13+
e1:SetOperation(s.handspop)
14+
c:RegisterEffect(e1)
15+
--Special Summon this card in Defense Position
16+
local e2=Effect.CreateEffect(c)
17+
e2:SetDescription(aux.Stringid(id,1))
18+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
19+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
20+
e2:SetProperty(EFFECT_FLAG_DELAY)
21+
e2:SetCode(EVENT_REMOVE)
22+
e2:SetCountLimit(1,id)
23+
e2:SetTarget(s.selfsptg)
24+
e2:SetOperation(s.selfspop)
25+
c:RegisterEffect(e2)
26+
end
27+
function s.handspfilter(c,e,tp)
28+
return c:IsLevelBelow(6) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
29+
end
30+
function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk)
31+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
32+
and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
33+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
34+
end
35+
function s.handspop(e,tp,eg,ep,ev,re,r,rp)
36+
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
38+
local sc=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
39+
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
40+
--Banish it when it leaves the field
41+
local e1=Effect.CreateEffect(e:GetHandler())
42+
e1:SetDescription(3300)
43+
e1:SetType(EFFECT_TYPE_SINGLE)
44+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
45+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
46+
e1:SetValue(LOCATION_REMOVED)
47+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
48+
sc:RegisterEffect(e1,true)
49+
end
50+
Duel.SpecialSummonComplete()
51+
end
52+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
53+
local c=e:GetHandler()
54+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
55+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
56+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
57+
end
58+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
59+
local c=e:GetHandler()
60+
if c:IsRelateToEffect(e) then
61+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
62+
end
63+
end

pre-release/c101208085.lua

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--トックス・ボックス
2+
--Toxic Boxfish
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
9+
--Banish 1 card in either GY
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_REMOVE)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,id)
17+
e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end)
18+
e1:SetTarget(s.rmtg)
19+
e1:SetOperation(s.rmop)
20+
c:RegisterEffect(e1)
21+
--Negate the effects of 1 face-up card your opponent controls until the end of this turn
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_DISABLE)
25+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
26+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
27+
e2:SetCode(EVENT_REMOVE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetTarget(s.distg)
30+
e2:SetOperation(s.disop)
31+
c:RegisterEffect(e2)
32+
end
33+
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
34+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end
35+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
36+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
37+
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
38+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
39+
end
40+
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
41+
local tc=Duel.GetFirstTarget()
42+
if tc:IsRelateToEffect(e) then
43+
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
44+
end
45+
end
46+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
47+
if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end
48+
if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
50+
local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil)
51+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0)
52+
end
53+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
54+
local tc=Duel.GetFirstTarget()
55+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
56+
--Negate its effects until the end of this turn
57+
tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END,true)
58+
end
59+
end

0 commit comments

Comments
 (0)