Skip to content

Commit 43ea320

Browse files
authored
Added new card scripts
1 parent 62d35c7 commit 43ea320

File tree

7 files changed

+488
-0
lines changed

7 files changed

+488
-0
lines changed

pre-release/c101301090.lua

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--
2+
--R.B. Ga10 Driller
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetCondition(s.spcon)
15+
c:RegisterEffect(e1)
16+
--Destroy both 1 monster your opponent controls and this card
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_DESTROY)
20+
e2:SetType(EFFECT_TYPE_QUICK_O)
21+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetCode(EVENT_FREE_CHAIN)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
26+
e2:SetCondition(s.descon)
27+
e2:SetCost(Cost.PayLP(500))
28+
e2:SetTarget(s.destg)
29+
e2:SetOperation(s.desop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_RB}
33+
function s.spcon(e,c)
34+
if c==nil then return true end
35+
local tp=e:GetHandlerPlayer()
36+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
37+
and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil)
38+
end
39+
function s.desconfilter(c,ec,lg)
40+
return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec))
41+
end
42+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
43+
local c=e:GetHandler()
44+
return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup())
45+
end
46+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
47+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
48+
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
50+
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil,tp)+e:GetHandler()
51+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0)
52+
end
53+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
54+
local c=e:GetHandler()
55+
local tc=Duel.GetFirstTarget()
56+
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsMonster() then
57+
Duel.Destroy(Group.FromCards(tc,c),REASON_EFFECT)
58+
end
59+
end

pre-release/c101301091.lua

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
--
2+
--R.B. Ga10 Cutter
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetCondition(s.spcon)
15+
c:RegisterEffect(e1)
16+
--Destroy this card, and if you do, negate a Spell/Trap Card or effect activated by your opponent, and if you do that, destroy that card
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
20+
e2:SetType(EFFECT_TYPE_QUICK_O)
21+
e2:SetCode(EVENT_CHAINING)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCondition(s.descon)
25+
e2:SetCost(Cost.PayLP(700))
26+
e2:SetTarget(s.destg)
27+
e2:SetOperation(s.desop)
28+
c:RegisterEffect(e2)
29+
end
30+
s.listed_series={SET_RB}
31+
function s.spcon(e,c)
32+
if c==nil then return true end
33+
local tp=e:GetHandlerPlayer()
34+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
35+
and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil)
36+
end
37+
function s.desconfilter(c,ec,lg)
38+
return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec))
39+
end
40+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
41+
local c=e:GetHandler()
42+
return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev)
43+
and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup())
44+
end
45+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
46+
if chk==0 then return true end
47+
local c=e:GetHandler()
48+
local rc=re:GetHandler()
49+
if rc:IsRelateToEffect(re) and rc:IsDestructable() then
50+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg+c,2,tp,0)
51+
else
52+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0)
53+
end
54+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0)
55+
end
56+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0
59+
and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
60+
Duel.Destroy(eg,REASON_EFFECT)
61+
end
62+
end

pre-release/c101301092.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
--
2+
--R.B. VALCan Rocket
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetCondition(s.spcon)
15+
c:RegisterEffect(e1)
16+
--Destroy up to 2 cards your opponent controls, also this card, and if you do, inflict 500 damage to your opponent for each card destroyed
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCondition(s.descon)
25+
e2:SetCost(Cost.PayLP(1000))
26+
e2:SetTarget(s.destg)
27+
e2:SetOperation(s.desop)
28+
c:RegisterEffect(e2)
29+
end
30+
s.listed_series={SET_RB}
31+
function s.spcon(e,c)
32+
if c==nil then return true end
33+
local tp=e:GetHandlerPlayer()
34+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
35+
and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil)
36+
end
37+
function s.desconfilter(c,ec,lg)
38+
return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec))
39+
end
40+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
41+
local c=e:GetHandler()
42+
return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup())
43+
end
44+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
45+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
46+
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
48+
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil,tp)+e:GetHandler()
49+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0)
50+
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500)
51+
end
52+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
53+
local c=e:GetHandler()
54+
local tg=Duel.GetTargetCards(e)
55+
if c:IsRelateToEffect(e) then tg:AddCard(c) end
56+
if #tg==0 then return end
57+
local dam=Duel.Destroy(tg,REASON_EFFECT)*500
58+
if dam>0 then
59+
Duel.Damage(1-tp,dam,REASON_EFFECT)
60+
end
61+
end

pre-release/c101301093.lua

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
--
2+
--R.B. VALCan Booster
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Link Summon procedure: 2 Machine monsters
8+
Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2,2)
9+
--Add 1 "R.B." Spell from your Deck to your hand
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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)
17+
e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end)
18+
e1:SetTarget(s.thtg)
19+
e1:SetOperation(s.thop)
20+
c:RegisterEffect(e1)
21+
--Special Summon 1 "R.B." monster from your hand or GY in Defense Position, then you can move this card you control to another of your Main Monster Zones
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
25+
e2:SetType(EFFECT_TYPE_IGNITION)
26+
e2:SetRange(LOCATION_EMZONE)
27+
e2:SetCountLimit(1,{id,1})
28+
e2:SetTarget(s.sptg)
29+
e2:SetOperation(s.spop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_RB}
33+
function s.thfilter(c)
34+
return c:IsSetCard(SET_RB) and c:IsSpell() and c:IsAbleToHand()
35+
end
36+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
38+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
39+
end
40+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
42+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
43+
if #g>0 then
44+
Duel.SendtoHand(g,nil,REASON_EFFECT)
45+
Duel.ConfirmCards(1-tp,g)
46+
end
47+
end
48+
function s.spfilter(c,e,tp)
49+
return c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
50+
end
51+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
52+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
53+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end
54+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE)
55+
end
56+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
60+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp)
61+
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0
62+
and c:IsRelateToEffect(e) and c:IsControler(tp)
63+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
64+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
65+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
66+
local seq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2)
67+
Duel.BreakEffect()
68+
Duel.MoveSequence(c,seq)
69+
end
70+
end
71+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters with 1500 or less ATK
72+
local e1=Effect.CreateEffect(c)
73+
e1:SetDescription(aux.Stringid(id,3))
74+
e1:SetType(EFFECT_TYPE_FIELD)
75+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
76+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
77+
e1:SetTargetRange(1,0)
78+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1500)) end)
79+
e1:SetReset(RESET_PHASE|PHASE_END)
80+
Duel.RegisterEffect(e1,tp)
81+
--"Clock Lizard" check
82+
aux.addTempLizardCheck(c,tp,function(e,c)
83+
local atk=c:GetTextAttack()
84+
return not c:IsOriginalRace(RACE_MACHINE) or atk==-2 or atk>1500
85+
end)
86+
end

pre-release/c101301094.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--JP Name
2+
--R.B. The Brute Blues
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Link Summon procedure: 2+ Machine monsters
8+
Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2)
9+
--Gains total original ATK of "R.B." monsters this card points to while it points to a "R.B." monster
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetType(EFFECT_TYPE_SINGLE)
12+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
13+
e1:SetCode(EFFECT_UPDATE_ATTACK)
14+
e1:SetRange(LOCATION_MZONE)
15+
e1:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end)
16+
e1:SetValue(s.atkval)
17+
c:RegisterEffect(e1)
18+
--Can make a second attack during each Battle Phase while it points to a "R.B." monster
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetType(EFFECT_TYPE_SINGLE)
21+
e2:SetCode(EFFECT_EXTRA_ATTACK)
22+
e2:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end)
23+
e2:SetValue(1)
24+
c:RegisterEffect(e2)
25+
--Cannot be destroyed by battle or card effects while it points to a "R.B." monster
26+
local e3=Effect.CreateEffect(c)
27+
e3:SetType(EFFECT_TYPE_SINGLE)
28+
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
29+
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
30+
e3:SetRange(LOCATION_MZONE)
31+
e3:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end)
32+
e3:SetValue(1)
33+
c:RegisterEffect(e3)
34+
local e4=e3:Clone()
35+
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
36+
c:RegisterEffect(e4)
37+
--Add 1 "R.B." card from your Deck to your hand
38+
local e5=Effect.CreateEffect(c)
39+
e5:SetDescription(aux.Stringid(id,0))
40+
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
41+
e5:SetType(EFFECT_TYPE_IGNITION)
42+
e5:SetRange(LOCATION_MZONE)
43+
e5:SetCountLimit(1,id)
44+
e5:SetTarget(s.thtg)
45+
e5:SetOperation(s.thop)
46+
c:RegisterEffect(e5)
47+
end
48+
s.listed_series={SET_RB}
49+
function s.atkfilter(c)
50+
return c:IsFaceup() and c:IsSetCard(SET_RB) and c:GetBaseAttack()>=0
51+
end
52+
function s.atkval(e,c)
53+
return c:GetLinkedGroup():Filter(s.atkfilter,nil):GetSum(Card.GetBaseAttack)
54+
end
55+
function s.thfilter(c)
56+
return c:IsSetCard(SET_RB) and c:IsAbleToHand()
57+
end
58+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
59+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
60+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
61+
end
62+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
63+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
64+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
65+
if #g>0 then
66+
Duel.SendtoHand(g,nil,REASON_EFFECT)
67+
Duel.ConfirmCards(1-tp,g)
68+
end
69+
end

0 commit comments

Comments
 (0)