Skip to content

Commit c6b06ee

Browse files
authored
Added new card scripts
1 parent 0b429fb commit c6b06ee

File tree

6 files changed

+482
-0
lines changed

6 files changed

+482
-0
lines changed

pre-release/c101303007.lua

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
--ジャンク・ウォリアー/バスター
2+
--Junk Warrior/Assault Mode
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
c:AddMustBeSpecialSummoned()
8+
--Gains 1000 ATK for each "/Assault Mode" monster you control
9+
local e1=Effect.CreateEffect(c)
10+
e1:SetType(EFFECT_TYPE_SINGLE)
11+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
12+
e1:SetCode(EFFECT_UPDATE_ATTACK)
13+
e1:SetRange(LOCATION_MZONE)
14+
e1:SetValue(function(e,c) return 1000*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ASSAULT_MODE),c:GetControler(),LOCATION_MZONE,0,nil) end)
15+
c:RegisterEffect(e1)
16+
--If this card battles a monster, any battle damage it inflicts to your opponent is doubled
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetType(EFFECT_TYPE_SINGLE)
19+
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
20+
e2:SetCondition(function(e) return e:GetHandler():GetBattleTarget() end)
21+
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
22+
c:RegisterEffect(e2)
23+
--Unaffected by your opponent's activated monster effects
24+
local e3=Effect.CreateEffect(c)
25+
e3:SetType(EFFECT_TYPE_SINGLE)
26+
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
27+
e3:SetCode(EFFECT_IMMUNE_EFFECT)
28+
e3:SetRange(LOCATION_MZONE)
29+
e3:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and te:IsMonsterEffect() end)
30+
c:RegisterEffect(e3)
31+
--Return 1 "Junk Warrior" from your GY to the Extra Deck, then you can Special Summon it (this is treated as a Synchro Summon)
32+
local e4=Effect.CreateEffect(c)
33+
e4:SetDescription(aux.Stringid(id,0))
34+
e4:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
35+
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
36+
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
37+
e4:SetCode(EVENT_DESTROYED)
38+
e4:SetTarget(s.texsptg)
39+
e4:SetOperation(s.texspop)
40+
c:RegisterEffect(e4)
41+
end
42+
s.listed_names={CARD_ASSAULT_MODE,CARD_JUNK_WARRIOR}
43+
s.listed_series={SET_ASSAULT_MODE}
44+
s.assault_mode=CARD_JUNK_WARRIOR
45+
function s.texfilter(c)
46+
return c:IsCode(CARD_JUNK_WARRIOR) and c:IsAbleToExtra()
47+
end
48+
function s.texsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
49+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.texfilter(chkc) end
50+
if chk==0 then return Duel.IsExistingTarget(s.texfilter,tp,LOCATION_GRAVE,0,1,nil) end
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
52+
local g=Duel.SelectTarget(tp,s.texfilter,tp,LOCATION_GRAVE,0,1,1,nil)
53+
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,tp,0)
54+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
55+
end
56+
function s.texspop(e,tp,eg,ep,ev,re,r,rp)
57+
local tc=Duel.GetFirstTarget()
58+
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_EXTRA) then
59+
local forcedg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,tc,nil,REASON_SYNCHRO)
60+
if #forcedg==0 and Duel.GetLocationCountFromEx(tp,tp,nil,tc)>0
61+
and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
62+
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
63+
tc:SetMaterial(nil)
64+
Duel.BreakEffect()
65+
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
66+
tc:CompleteProcedure()
67+
end
68+
end
69+
end
70+
end

pre-release/c101303008.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--クリムゾン・ブレーダー/バスタ
2+
--Crimson Blader/Assault Mode
3+
--scripted by Naim
4+
local s,id=GetID()
5+
local CARD_CRIMSON_BLADER=80321197
6+
function s.initial_effect(c)
7+
c:EnableReviveLimit()
8+
c:AddMustBeSpecialSummoned()
9+
--Add 1 "Assault Mode Activate" or 1 card that mentions it from your Deck to your hand, and if you do, shuffle this card into the Deck
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
13+
e1:SetType(EFFECT_TYPE_IGNITION)
14+
e1:SetRange(LOCATION_HAND)
15+
e1:SetCountLimit(1,id)
16+
e1:SetCost(Cost.SelfReveal)
17+
e1:SetTarget(s.thtg)
18+
e1:SetOperation(s.thop)
19+
c:RegisterEffect(e1)
20+
--Your opponent cannot activate the effects of Level 5 or higher monsters Special Summoned from the Extra Deck
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetType(EFFECT_TYPE_FIELD)
23+
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
24+
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
25+
e2:SetRange(LOCATION_MZONE)
26+
e2:SetTargetRange(0,1)
27+
e2:SetValue(s.cannotactval)
28+
c:RegisterEffect(e2)
29+
--Special Summon 1 "Crimson Blader" from your GY
30+
local e3=Effect.CreateEffect(c)
31+
e3:SetDescription(aux.Stringid(id,1))
32+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
33+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
34+
e3:SetProperty(EFFECT_FLAG_DELAY)
35+
e3:SetCode(EVENT_DESTROYED)
36+
e3:SetTarget(s.sptg)
37+
e3:SetOperation(s.spop)
38+
c:RegisterEffect(e3)
39+
end
40+
s.listed_names={CARD_ASSAULT_MODE,CARD_CRIMSON_BLADER}
41+
s.assault_mode=CARD_CRIMSON_BLADER
42+
function s.thfilter(c)
43+
return (c:IsCode(CARD_ASSAULT_MODE) or c:ListsCode(CARD_ASSAULT_MODE)) and c:IsAbleToHand()
44+
end
45+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
local c=e:GetHandler()
47+
if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
48+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
49+
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0)
50+
end
51+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
52+
local c=e:GetHandler()
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
54+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
55+
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
56+
Duel.ConfirmCards(1-tp,g)
57+
if c:IsRelateToEffect(e) then
58+
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
59+
end
60+
end
61+
end
62+
function s.cannotactval(e,re,tp)
63+
local rc=re:GetHandler()
64+
return re:IsMonsterEffect() and rc:IsOnField() and rc:IsLevelAbove(5) and rc:IsSummonLocation(LOCATION_EXTRA)
65+
end
66+
function s.spfilter(c,e,tp)
67+
return c:IsCode(CARD_CRIMSON_BLADER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
68+
end
69+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
70+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
71+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
72+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
73+
end
74+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
75+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
77+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
78+
if #g>0 then
79+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
80+
end
81+
end

pre-release/c101303009.lua

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
--バスター・リッチー
2+
--Assault Lich
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card you control would be used as Synchro Material, you can treat it as a non-Tuner
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
10+
e1:SetCode(EFFECT_NONTUNER)
11+
e1:SetRange(LOCATION_MZONE)
12+
c:RegisterEffect(e1)
13+
--Special Summon 1 monster that mentions "Assault Mode Activate" or 1 Level 4 or lower Zombie monster from your GY
14+
local e2a=Effect.CreateEffect(c)
15+
e2a:SetDescription(aux.Stringid(id,0))
16+
e2a:SetCategory(CATEGORY_SPECIAL_SUMMON)
17+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
18+
e2a:SetProperty(EFFECT_FLAG_DELAY)
19+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
20+
e2a:SetCountLimit(1,id)
21+
e2a:SetTarget(s.sptg)
22+
e2a:SetOperation(s.spop)
23+
c:RegisterEffect(e2a)
24+
local e2b=e2a:Clone()
25+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
26+
c:RegisterEffect(e2b)
27+
--Add 1 "Assault Slash" or "Assault Counter" from your Deck to your hand
28+
local e3=Effect.CreateEffect(c)
29+
e3:SetDescription(aux.Stringid(id,1))
30+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
31+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
32+
e3:SetProperty(EFFECT_FLAG_DELAY)
33+
e3:SetCode(EVENT_BE_MATERIAL)
34+
e3:SetCountLimit(1,{id,1})
35+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end)
36+
e3:SetTarget(s.thtg)
37+
e3:SetOperation(s.thop)
38+
c:RegisterEffect(e3)
39+
end
40+
s.listed_names={CARD_ASSAULT_MODE,40012727,76407432} --"Assault Slash", "Assault Counter"
41+
function s.spfilter(c,e,tp)
42+
return (c:ListsCode(CARD_ASSAULT_MODE) or (c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE)))
43+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
44+
end
45+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
47+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
48+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
49+
end
50+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
51+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
53+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
54+
if #g>0 then
55+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
56+
end
57+
end
58+
function s.thfilter(c,e,tp)
59+
return c:IsCode(40012727,76407432) and c:IsAbleToHand()
60+
end
61+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
62+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
63+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
64+
end
65+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
67+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
68+
if #g>0 then
69+
Duel.SendtoHand(g,nil,REASON_EFFECT)
70+
Duel.ConfirmCards(1-tp,g)
71+
end
72+
end

pre-release/c101303029.lua

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
--WAKE CUP! アル
2+
--WAKE CUP! Erl
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--FLIP: You can send face-up cards your opponent controls to the GY, up to the number of Flip monsters you control
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCountLimit(1,id)
13+
e1:SetTarget(s.tgtg)
14+
e1:SetOperation(s.tgop)
15+
c:RegisterEffect(e1)
16+
--Discard 1 other Flip monster, and if you do, Special Summon this card in Attack Position or face-down Defense Position
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_HAND)
22+
e2:SetCountLimit(1,{id,1})
23+
e2:SetTarget(s.selfsptg)
24+
e2:SetOperation(s.selfspop)
25+
c:RegisterEffect(e2)
26+
--Special Summon 1 Flip monster from your GY in face-down Defense Position
27+
local e3=Effect.CreateEffect(c)
28+
e3:SetDescription(aux.Stringid(id,2))
29+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
30+
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
31+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
32+
e3:SetCode(EVENT_PHASE+PHASE_END)
33+
e3:SetRange(LOCATION_MZONE)
34+
e3:SetCountLimit(1,{id,2})
35+
e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
36+
e3:SetTarget(s.gysptg)
37+
e3:SetOperation(s.gyspop)
38+
c:RegisterEffect(e3)
39+
end
40+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
41+
if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_FLIP),tp,LOCATION_MZONE,0,1,nil)
42+
and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,nil) end
43+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
44+
end
45+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
46+
local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_FLIP),tp,LOCATION_MZONE,0,nil)
47+
if ct==0 then return end
48+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
49+
local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToGrave),tp,0,LOCATION_ONFIELD,1,ct,nil)
50+
if #g>0 then
51+
Duel.HintSelection(g)
52+
Duel.SendtoGrave(g,REASON_EFFECT)
53+
end
54+
end
55+
function s.selfspdiscardfilter(c)
56+
return c:IsType(TYPE_FLIP) and c:IsDiscardable(REASON_EFFECT)
57+
end
58+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
59+
local c=e:GetHandler()
60+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
61+
and Duel.IsExistingMatchingCard(s.selfspdiscardfilter,tp,LOCATION_HAND,0,1,c)
62+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
63+
end
64+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
65+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
66+
end
67+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
68+
local c=e:GetHandler()
69+
local exc=c:IsRelateToEffect(e) and c or nil
70+
if Duel.DiscardHand(tp,s.selfspdiscardfilter,1,1,REASON_DISCARD|REASON_EFFECT,exc)>0 and c:IsRelateToEffect(e)
71+
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)>0
72+
and c:IsFacedown() then
73+
Duel.ConfirmCards(1-tp,c)
74+
end
75+
end
76+
function s.gyspfilter(c,e,tp)
77+
return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
78+
end
79+
function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
80+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.gyspfilter(chkc,e,tp) end
81+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
82+
and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
83+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
84+
local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
85+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
86+
end
87+
function s.gyspop(e,tp,eg,ep,ev,re,r,rp)
88+
local tc=Duel.GetFirstTarget()
89+
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
90+
Duel.ConfirmCards(1-tp,tc)
91+
end
92+
end

0 commit comments

Comments
 (0)