Skip to content

Commit cbe771f

Browse files
authored
Added new card scripts
1 parent 3995ad6 commit cbe771f

File tree

8 files changed

+699
-0
lines changed

8 files changed

+699
-0
lines changed

pre-release/c101303083.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--JP name
2+
--Mischief of the Wolves
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Apply these effects in sequence
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_LVCHANGE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.activate)
14+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
15+
c:RegisterEffect(e1)
16+
--During your Main Phase, if this card is in your GY because it was sent there this turn: You can target 1 face-up card you control; destroy it, and if you do, add this card to your hand
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetRange(LOCATION_GRAVE)
23+
e2:SetCountLimit(1,id)
24+
e2:SetCondition(function(e) return e:GetHandler():GetTurnID()==Duel.GetTurnCount() end)
25+
e2:SetTarget(s.destg)
26+
e2:SetOperation(s.desop)
27+
c:RegisterEffect(e2)
28+
end
29+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
30+
if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLevelAbove,3),tp,0,LOCATION_MZONE,1,nil)
31+
or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,1,nil) end
32+
Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,nil,1,PLAYER_ALL,LOCATION_MZONE)
33+
end
34+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
35+
local c=e:GetHandler()
36+
local break_chk=false
37+
local opp_g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelAbove,3),tp,0,LOCATION_MZONE,nil)
38+
if #opp_g>0 then
39+
break_chk=true
40+
for opp_c in opp_g:Iter() do
41+
--● Reduce the Levels of all monsters your opponent controls by 2
42+
opp_c:UpdateLevel(-2,nil,c)
43+
end
44+
end
45+
local your_g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,0,nil)
46+
if #your_g>0 then
47+
if break_chk then Duel.BreakEffect() end
48+
for your_c in your_g:Iter() do
49+
--● Increase the Levels of all monsters you control by 2
50+
your_c:UpdateLevel(2,nil,c)
51+
end
52+
end
53+
end
54+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
55+
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end
56+
local c=e:GetHandler()
57+
if chk==0 then return c:IsAbleToHand() and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) end
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
59+
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil)
60+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
61+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0)
62+
end
63+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
64+
local c=e:GetHandler()
65+
local tc=Duel.GetFirstTarget()
66+
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
67+
Duel.SendtoHand(c,nil,REASON_EFFECT)
68+
end
69+
end

pre-release/c101303087.lua

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--JP name
2+
--Flux Ochsenfeld
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 1 Level 5 or higher EARTH monster + 1 Rock monster
8+
Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ROCK))
9+
--If this card is Fusion Summoned: You can Special Summon 1 Rock monster from your hand or GY, except "Flux Ochsenfeld"
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,{id,0})
17+
e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end)
18+
e1:SetCost(Cost.HardOncePerChain(id))
19+
e1:SetTarget(s.sptg)
20+
e1:SetOperation(s.spop)
21+
c:RegisterEffect(e1)
22+
--(Quick Effect): You can target 1 EARTH monster you control and 1 card your opponent controls; return them to the hand
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
25+
e2:SetCategory(CATEGORY_TOHAND)
26+
e2:SetType(EFFECT_TYPE_QUICK_O)
27+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
28+
e2:SetCode(EVENT_FREE_CHAIN)
29+
e2:SetRange(LOCATION_MZONE)
30+
e2:SetCountLimit(1,{id,1})
31+
e2:SetCost(Cost.HardOncePerChain(id))
32+
e2:SetTarget(s.rthtg)
33+
e2:SetOperation(s.rthop)
34+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
35+
c:RegisterEffect(e2)
36+
end
37+
s.listed_names={id}
38+
function s.matfilter(c,fc,sumtype,tp)
39+
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_EARTH,fc,sumtype,tp)
40+
end
41+
function s.spfilter(c,e,tp)
42+
return c:IsRace(RACE_ROCK) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
43+
end
44+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
46+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end
47+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE)
48+
end
49+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
50+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
52+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp)
53+
if #g>0 then
54+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
55+
end
56+
end
57+
function s.rthfilter(c,opp)
58+
return (c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()) or c:IsControler(opp)
59+
end
60+
function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
61+
if chkc then return false end
62+
local g=Duel.GetMatchingGroup(s.rthfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp)
63+
if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end
64+
local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RTOHAND)
65+
Duel.SetTargetCard(tg)
66+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,2,tp,0)
67+
end
68+
function s.rthop(e,tp,eg,ep,ev,re,r,rp)
69+
local tg=Duel.GetTargetCards(e)
70+
if #tg>0 then
71+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
72+
end
73+
end

pre-release/c101303089.lua

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
--JP name
2+
--Storm-Bane Dragon Destorbim
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1+ non Tuners
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
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+
--You can banish any number of DARK monsters from your GY that cannot be Normal Summoned/Set; banish that many cards your opponent controls. This is a Quick Effect if your opponent controls more cards than you do
18+
local e2a=Effect.CreateEffect(c)
19+
e2a:SetDescription(aux.Stringid(id,0))
20+
e2a:SetCategory(CATEGORY_REMOVE)
21+
e2a:SetType(EFFECT_TYPE_IGNITION)
22+
e2a:SetRange(LOCATION_MZONE)
23+
e2a:SetCountLimit(1,{id,0})
24+
e2a:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)<=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end)
25+
e2a:SetCost(s.bancost)
26+
e2a:SetTarget(s.bantg)
27+
e2a:SetOperation(s.banop)
28+
c:RegisterEffect(e2a)
29+
local e2b=e2a:Clone()
30+
e2b:SetType(EFFECT_TYPE_QUICK_O)
31+
e2b:SetCode(EVENT_FREE_CHAIN)
32+
e2b:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end)
33+
e2b:SetHintTiming(TIMING_SPSUMMON,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
34+
c:RegisterEffect(e2b)
35+
--If this card is sent to the GY: You can Special Summon 1 of your banished Dragon monsters
36+
local e3=Effect.CreateEffect(c)
37+
e3:SetDescription(aux.Stringid(id,1))
38+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
39+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
40+
e3:SetProperty(EFFECT_FLAG_DELAY)
41+
e3:SetCode(EVENT_TO_GRAVE)
42+
e3:SetCountLimit(1,{id,1})
43+
e3:SetTarget(s.sptg)
44+
e3:SetOperation(s.spop)
45+
c:RegisterEffect(e3)
46+
end
47+
function s.bancostfilter(c)
48+
return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsSummonableCard() and c:IsAbleToRemoveAsCost()
49+
end
50+
function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk)
51+
if chk==0 then return Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,nil)
52+
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
53+
local max_count=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
55+
local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil)
56+
Duel.Remove(g,POS_FACEUP,REASON_COST)
57+
e:SetLabel(#g)
58+
end
59+
function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk)
60+
if chk==0 then return true end
61+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetLabel(),1-tp,LOCATION_ONFIELD)
62+
end
63+
function s.banop(e,tp,eg,ep,ev,re,r,rp)
64+
local banish_count=e:GetLabel()
65+
if Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)<banish_count then return end
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
67+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,banish_count,banish_count,nil)
68+
if #g==banish_count then
69+
Duel.HintSelection(g)
70+
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
71+
end
72+
end
73+
function s.spfilter(c,e,tp)
74+
return c:IsRace(RACE_DRAGON) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
75+
end
76+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
77+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
78+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
79+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
80+
end
81+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
82+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
83+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
84+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
85+
if #g>0 then
86+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
87+
end
88+
end

pre-release/c101303090.lua

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
--JP name
2+
--GMX Researcher Selande
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card is Normal Summoned: You can Special Summon 1 non-Warrior "GMX" monster or 1 Level 3 or lower Dinosaur monster from your Deck
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:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1:SetCountLimit(1,{id,0})
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--If this card is Special Summoned by a monster effect: You can add 1 "GMX" Spell/Trap from your Deck to your hand
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
c:RegisterEffect(e2)
29+
--If a Dinosaur Fusion Monster is on the field: You can shuffle this card from the field into the Deck, and if you do, negate the effects of 1 face-up card on the field until the end of this turn
30+
local e3=Effect.CreateEffect(c)
31+
e3:SetDescription(aux.Stringid(id,2))
32+
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE)
33+
e3:SetType(EFFECT_TYPE_IGNITION)
34+
e3:SetRange(LOCATION_MZONE)
35+
e3:SetCountLimit(1,{id,2})
36+
e3:SetCondition(s.discon)
37+
e3:SetTarget(s.distg)
38+
e3:SetOperation(s.disop)
39+
c:RegisterEffect(e3)
40+
end
41+
s.listed_series={SET_GMX}
42+
function s.spfilter(c,e,tp)
43+
return ((c:IsRaceExcept(RACE_WARRIOR) and c:IsSetCard(SET_GMX)) or (c:IsLevelBelow(3) and c:IsRace(RACE_DINOSAUR)))
44+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
45+
end
46+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
47+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
48+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
49+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
50+
end
51+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
52+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
54+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
55+
if #g>0 then
56+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
57+
end
58+
end
59+
function s.thfilter(c)
60+
return c:IsSetCard(SET_GMX) and c:IsSpellTrap() and c:IsAbleToHand()
61+
end
62+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
63+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
64+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
65+
end
66+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
68+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
69+
if #g>0 then
70+
Duel.SendtoHand(g,nil,REASON_EFFECT)
71+
Duel.ConfirmCards(1-tp,g)
72+
end
73+
end
74+
function s.disconfilter(c)
75+
return c:IsRace(RACE_DINOSAUR) and c:IsFusionMonster() and c:IsFaceup()
76+
end
77+
function s.discon(e,tp,eg,ep,ev,re,r,rp)
78+
return Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
79+
end
80+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
81+
local c=e:GetHandler()
82+
if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
83+
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0)
84+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,PLAYER_EITHER,LOCATION_ONFIELD)
85+
end
86+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
87+
local c=e:GetHandler()
88+
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then
89+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
90+
local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
91+
if sc then
92+
Duel.HintSelection(sc)
93+
--Negate its effects until the end of this turn
94+
sc:NegateEffects(c,RESET_PHASE|PHASE_END,true)
95+
end
96+
end
97+
end

0 commit comments

Comments
 (0)