Skip to content

Commit d6657a2

Browse files
authored
Added new card scripts
1 parent d1562f9 commit d6657a2

File tree

5 files changed

+341
-0
lines changed

5 files changed

+341
-0
lines changed

pre-release/c100443101.lua

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
--超電導戦士 リニア・マグナム±
2+
--Conduction Warrior Linear Magnum ±
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetType(EFFECT_TYPE_FIELD)
10+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
11+
e0:SetCode(EFFECT_SPSUMMON_PROC)
12+
e0:SetRange(LOCATION_HAND)
13+
e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e0:SetCondition(s.spcon)
15+
e0:SetTarget(s.sptg)
16+
e0:SetOperation(s.spop)
17+
c:RegisterEffect(e0)
18+
--Gains ATK equal to half of the ATK 1 other EARTH monster on the field
19+
local e1=Effect.CreateEffect(c)
20+
e1:SetDescription(aux.Stringid(id,0))
21+
e1:SetCategory(CATEGORY_ATKCHANGE)
22+
e1:SetType(EFFECT_TYPE_IGNITION)
23+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
24+
e1:SetRange(LOCATION_MZONE)
25+
e1:SetCountLimit(1,{id,1})
26+
e1:SetTarget(s.atktg)
27+
e1:SetOperation(s.atkop)
28+
c:RegisterEffect(e1)
29+
--Add this card to your hand
30+
local e2=Effect.CreateEffect(c)
31+
e2:SetDescription(aux.Stringid(id,1))
32+
e2:SetCategory(CATEGORY_TOHAND)
33+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
34+
e2:SetCode(EVENT_TO_GRAVE)
35+
e2:SetCountLimit(1,{id,2})
36+
e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end)
37+
e2:SetTarget(s.thtg)
38+
e2:SetOperation(s.thop)
39+
c:RegisterEffect(e2)
40+
end
41+
s.listed_series={SET_MAGNET_WARRIOR}
42+
function s.spconfilter(c)
43+
return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4
44+
and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
45+
end
46+
function s.spcon(e,c)
47+
if c==nil then return true end
48+
local tp=c:GetControler()
49+
local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil)
50+
return aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0)
51+
end
52+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
53+
local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil)
54+
local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE)
55+
if #g>0 then
56+
g:KeepAlive()
57+
e:SetLabelObject(g)
58+
return true
59+
end
60+
return false
61+
end
62+
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
63+
local g=e:GetLabelObject()
64+
if not g then return end
65+
Duel.SendtoGrave(g,REASON_COST)
66+
g:DeleteGroup()
67+
end
68+
function s.atkfilter(c)
69+
return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack()
70+
end
71+
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
72+
local c=e:GetHandler()
73+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end
74+
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
75+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
76+
local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst()
77+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2)
78+
end
79+
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
80+
local tc=Duel.GetFirstTarget()
81+
local c=e:GetHandler()
82+
if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
83+
--Gains ATK equal to half of that monster's ATK
84+
local e1=Effect.CreateEffect(c)
85+
e1:SetType(EFFECT_TYPE_SINGLE)
86+
e1:SetCode(EFFECT_UPDATE_ATTACK)
87+
e1:SetValue(tc:GetAttack()//2)
88+
e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END)
89+
c:RegisterEffect(e1)
90+
end
91+
end
92+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
93+
if chk==0 then return true end
94+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,0)
95+
end
96+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
97+
local c=e:GetHandler()
98+
if c:IsRelateToEffect(e) then
99+
Duel.SendtoHand(c,nil,REASON_EFFECT)
100+
end
101+
end

pre-release/c100443102.lua

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
--錬金釜-カオス・ディスティル
2+
--Chaos Distill
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+
--Any card sent to your GY is banished instead
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetType(EFFECT_TYPE_FIELD)
14+
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
15+
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
16+
e1:SetRange(LOCATION_SZONE)
17+
e1:SetTargetRange(LOCATION_ALL,0)
18+
e1:SetValue(LOCATION_REMOVED)
19+
c:RegisterEffect(e1)
20+
--Activate 1 of these effects
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,0))
23+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
24+
e2:SetType(EFFECT_TYPE_IGNITION)
25+
e2:SetRange(LOCATION_SZONE)
26+
e2:SetCountLimit(1,id)
27+
e2:SetTarget(s.efftg)
28+
e2:SetOperation(s.effop)
29+
c:RegisterEffect(e2)
30+
end
31+
local CARD_MACRO_COSMOS=30241314
32+
s.listed_names={CARD_MACRO_COSMOS,id}
33+
function s.macrofilter(c)
34+
return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand()
35+
end
36+
function s.monsterfilter(c)
37+
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand()
38+
end
39+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil)
41+
local c=e:GetHandler()
42+
local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
43+
and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil)
44+
if chk==0 then return b1 or b2 end
45+
local op=Duel.SelectEffect(tp,
46+
{b1,aux.Stringid(id,1)},
47+
{b2,aux.Stringid(id,2)})
48+
e:SetLabel(op)
49+
if op==2 then
50+
Duel.Remove(c,POS_FACEUP,REASON_COST)
51+
end
52+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
53+
end
54+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
55+
local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter)
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
57+
local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil)
58+
if #g>0 then
59+
Duel.SendtoHand(g,nil,REASON_EFFECT)
60+
Duel.ConfirmCards(1-tp,g)
61+
end
62+
end

pre-release/c100443103.lua

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
--ヒーローズルール1 ファイブ・フリーダムス
2+
--Hero's Rule 1: Five Freedoms
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Banish up to 5 cards from the GYs
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_REMOVE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
14+
e1:SetTarget(s.rmvtg)
15+
e1:SetOperation(s.rmvop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 of your banished "Elemental HERO" monsters
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_QUICK_O)
22+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
23+
e2:SetCode(EVENT_FREE_CHAIN)
24+
e2:SetRange(LOCATION_GRAVE)
25+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
26+
e2:SetCountLimit(1,id)
27+
e2:SetCondition(aux.exccon)
28+
e2:SetCost(Cost.SelfBanish)
29+
e2:SetTarget(s.sptg)
30+
e2:SetOperation(s.spop)
31+
c:RegisterEffect(e2)
32+
end
33+
s.listed_series={SET_ELEMENTAL_HERO}
34+
function s.rmvfilter(c)
35+
return c:IsAbleToRemove() and aux.SpElimFilter(c)
36+
end
37+
function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
38+
if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end
39+
if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
41+
local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil)
42+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0)
43+
end
44+
function s.rmvop(e,tp,eg,ep,ev,re,r,rp)
45+
local tg=Duel.GetTargetCards(e)
46+
if #tg>0 then
47+
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
48+
end
49+
end
50+
function s.spfilter(c,e,tp)
51+
return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
52+
end
53+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
54+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end
55+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
56+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
58+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
59+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
60+
end
61+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
62+
local tc=Duel.GetFirstTarget()
63+
if tc:IsRelateToEffect(e) then
64+
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
65+
end
66+
end

pre-release/c100443104.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--デーモンズ・マタドール
2+
--Archfiend Matador
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador"
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetDescription(aux.Stringid(id,0))
10+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
11+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
12+
e1:SetProperty(EFFECT_FLAG_DELAY)
13+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
14+
e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end)
15+
e1:SetTarget(s.thtg)
16+
e1:SetOperation(s.thop)
17+
c:RegisterEffect(e1)
18+
--Cannot be destroyed by battle, also you take no battle damage from battles involving this card
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetType(EFFECT_TYPE_SINGLE)
21+
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
22+
e2:SetValue(1)
23+
c:RegisterEffect(e2)
24+
local e3=e2:Clone()
25+
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
26+
c:RegisterEffect(e3)
27+
--Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent
28+
local e4=Effect.CreateEffect(c)
29+
e4:SetDescription(aux.Stringid(id,0))
30+
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
31+
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
32+
e4:SetCode(EVENT_BATTLED)
33+
e4:SetTarget(s.destg)
34+
e4:SetOperation(s.desop)
35+
c:RegisterEffect(e4)
36+
end
37+
s.listed_names={100443105,id} --"Ritual of the Matador"
38+
s.listed_series={SET_ARCHFIEND}
39+
function s.thfilter(c)
40+
return c:IsSetCard(SET_ARCHFIEND) and not c:IsCode(id) and c:IsAbleToHand()
41+
end
42+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
43+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end
44+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
45+
end
46+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
48+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil)
49+
if #g==2 then
50+
Duel.SendtoHand(g,nil,REASON_EFFECT)
51+
Duel.ConfirmCards(1-tp,g)
52+
end
53+
local c=e:GetHandler()
54+
if not c:IsRelateToEffect(e) then return end
55+
--This card cannot attack for the rest of this turn
56+
local e1=Effect.CreateEffect(c)
57+
e1:SetDescription(3206)
58+
e1:SetType(EFFECT_TYPE_SINGLE)
59+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
60+
e1:SetCode(EFFECT_CANNOT_ATTACK)
61+
e1:SetReset(RESETS_STANDARD_PHASE_END)
62+
c:RegisterEffect(e1)
63+
end
64+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
65+
local bc=e:GetHandler():GetBattleTarget()
66+
if chk==0 then return bc and bc:IsRelateToBattle() end
67+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0)
68+
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
69+
end
70+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
71+
local bc=e:GetHandler():GetBattleTarget()
72+
if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then
73+
Duel.Damage(1-tp,1000,REASON_EFFECT)
74+
end
75+
end

pre-release/c100443105.lua

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--マタドール降臨の儀式 ダーク・パセオ
2+
--Ritual of the Matador
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Ritual Summon "Archfiend Matador"
7+
Ritual.AddProcGreaterCode(c,6,nil,100443104)
8+
--Special Summon 1 non-Ritual "Archfiend" monster from your hand
9+
local e1=Effect.CreateEffect(c)
10+
e1:SetDescription(aux.Stringid(id,1))
11+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
12+
e1:SetType(EFFECT_TYPE_IGNITION)
13+
e1:SetRange(LOCATION_GRAVE)
14+
e1:SetCountLimit(1,id)
15+
e1:SetCost(Cost.SelfBanish)
16+
e1:SetTarget(s.sptg)
17+
e1:SetOperation(s.spop)
18+
c:RegisterEffect(e1)
19+
end
20+
s.listed_names={100443104} --"Archfiend Matador"
21+
s.listed_series={SET_ARCHFIEND}
22+
function s.spfilter(c,e,tp)
23+
return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
24+
end
25+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
26+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
27+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
28+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
29+
end
30+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
31+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
33+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
34+
if #g>0 then
35+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
36+
end
37+
end

0 commit comments

Comments
 (0)