Skip to content

Commit b149582

Browse files
committed
added new rush cards
1 parent 50ed917 commit b149582

File tree

5 files changed

+229
-0
lines changed

5 files changed

+229
-0
lines changed

rush/c160023023.lua

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
--オプション
2+
--Gradius' Option
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Gain ATK
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_ATKCHANGE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCost(s.cost)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
c:RegisterEffect(e1)
17+
end
18+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
19+
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
20+
end
21+
function s.filter(c)
22+
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4) and c:GetBaseDefense()==800 and c:GetBaseAttack()>0 and not c:IsMaximumModeSide()
23+
end
24+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
25+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end
26+
end
27+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
28+
--Requirement
29+
if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end
30+
--Effect
31+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
32+
local sg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
33+
Duel.HintSelection(sg)
34+
local atk=sg:GetFirst():GetBaseAttack()
35+
--Increase ATK
36+
local c=e:GetHandler()
37+
local e1=Effect.CreateEffect(c)
38+
e1:SetType(EFFECT_TYPE_SINGLE)
39+
e1:SetCode(EFFECT_UPDATE_ATTACK)
40+
e1:SetValue(atk)
41+
e1:SetReset(RESETS_STANDARD_PHASE_END,2)
42+
c:RegisterEffect(e1)
43+
end

rush/c160023042.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--ビック・バイパー フルカスタム
2+
--Vic Viper Full Custom
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--fusion material
7+
c:EnableReviveLimit()
8+
Fusion.AddProcMixN(c,false,false,10992251,1,14291024,2)
9+
Fusion.AddContactProc(c,s.contactfil,s.contactop,nil,nil,SUMMON_TYPE_FUSION,nil,false)
10+
--Cannot be destroyed
11+
local e1=Effect.CreateEffect(c)
12+
e1:SetDescription(3001)
13+
e1:SetType(EFFECT_TYPE_SINGLE)
14+
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
15+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CLIENT_HINT)
16+
e1:SetRange(LOCATION_MZONE)
17+
e1:SetValue(1)
18+
c:RegisterEffect(e1)
19+
--Inflict piercing battle damage
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetType(EFFECT_TYPE_SINGLE)
22+
e2:SetCode(EFFECT_PIERCE)
23+
c:RegisterEffect(e2)
24+
end
25+
function s.contactfil(tp)
26+
return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToDeckOrExtraAsCost),tp,LOCATION_ONFIELD,0,nil)
27+
end
28+
function s.contactop(g,tp)
29+
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL)
30+
end

rush/c160023054.lua

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
--パワーアップゲージ
2+
--Power Meter
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
local params = {s.fusfilter,s.matfilter}
7+
--Add 1 monster from the grave to the hand
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCategory(CATEGORY_TOHAND)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetCost(s.cost)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.operation(Fusion.SummonEffTG(table.unpack(params)),Fusion.SummonEffOP(table.unpack(params))))
15+
c:RegisterEffect(e1)
16+
end
17+
function s.fusfilter(c)
18+
return c:IsRace(RACE_MACHINE) and c:IsLevel(4) and c:IsDefense(800)
19+
end
20+
function s.matfilter(c)
21+
return c:IsLocation(LOCATION_HAND|LOCATION_MZONE) and c:IsAbleToGrave()
22+
end
23+
function s.cfilter(c)
24+
return c:IsFaceup() and c:IsAbleToDeckOrExtraAsCost()
25+
end
26+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
27+
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
28+
end
29+
function s.thfilter(c)
30+
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and c:IsDefense(800) and c:IsAbleToHand()
31+
end
32+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
33+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
34+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
35+
end
36+
function s.operation(fustg,fusop)
37+
return function(e,tp,eg,ep,ev,re,r,rp)
38+
--Requirement
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
40+
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
41+
if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)<1 then return end
42+
--Effect
43+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
44+
local dg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
45+
if #dg>0 then
46+
Duel.SendtoHand(dg,nil,REASON_EFFECT)
47+
Duel.ConfirmCards(1-tp,dg)
48+
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,160023056) and fustg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
49+
Duel.BreakEffect()
50+
fusop(e,tp,eg,ep,ev,re,r,rp)
51+
end
52+
end
53+
end
54+
end

rush/c160023055.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--パワーカプセル ブルー
2+
--Power Capsule Blue
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetCategory(CATEGORY_DESTROY)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetCondition(s.condition)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.activate)
14+
c:RegisterEffect(e1)
15+
end
16+
s.listed_names={10992251}
17+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
18+
return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,10992251),tp,LOCATION_ONFIELD,0,1,nil)
19+
end
20+
function s.rescon(sg,e,tp,mg)
21+
return sg:GetSum(Card.GetLevel)<=8
22+
end
23+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
24+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsNotMaximumModeSide),tp,0,LOCATION_MZONE,nil)
25+
if chk==0 then return #g>0 and aux.SelectUnselectGroup(g,e,tp,1,3,s.rescon,0) end
26+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,LOCATION_MZONE)
27+
end
28+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
29+
--Effect
30+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsNotMaximumModeSide),tp,0,LOCATION_MZONE,nil)
31+
if #g>0 then
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
33+
local sg=aux.SelectUnselectGroup(g,e,tp,1,3,s.rescon,1,tp,HINTMSG_DESTROY)
34+
local sg2=sg:AddMaximumCheck()
35+
Duel.HintSelection(sg2)
36+
Duel.Destroy(sg,REASON_EFFECT)
37+
end
38+
--Prevent attacking
39+
local e1=Effect.CreateEffect(e:GetHandler())
40+
e1:SetType(EFFECT_TYPE_FIELD)
41+
e1:SetCode(EFFECT_CANNOT_ATTACK)
42+
e1:SetProperty(EFFECT_FLAG_OATH)
43+
e1:SetTargetRange(LOCATION_MZONE,0)
44+
e1:SetTarget(s.ftarget)
45+
e1:SetReset(RESET_PHASE|PHASE_END)
46+
Duel.RegisterEffect(e1,tp)
47+
end
48+
function s.ftarget(e,c)
49+
return not c:IsRace(RACE_MACHINE) or c:GetBaseDefense()~=800
50+
end

rush/c160023056.lua

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
--パワーカプセル レッド
2+
--Power Capsule Red
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
-- Add excavated monster to hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.operation)
14+
c:RegisterEffect(e1)
15+
end
16+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
17+
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=4 end
18+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
19+
end
20+
function s.sfilter(c)
21+
return (c:IsCode(10992251) or s.sfilter2(c)) and c:IsAbleToHand()
22+
end
23+
function s.sfilter2(c)
24+
return c:IsMonster() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_EFFECT) and c:IsDefense(800)
25+
end
26+
function s.rescon(sg,e,tp,mg)
27+
return sg:FilterCount(Card.IsCode,nil,10992251)<2 and sg:FilterCount(s.sfilter2,nil)<2
28+
end
29+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
30+
--Effect
31+
local c=e:GetHandler()
32+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end
33+
Duel.ConfirmDecktop(tp,4)
34+
local g=Duel.GetDecktopGroup(tp,4)
35+
Duel.DisableShuffleCheck()
36+
local sg=g:Filter(s.sfilter,nil)
37+
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
38+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
39+
local tg=aux.SelectUnselectGroup(sg,1,tp,1,2,s.rescon,1,tp)
40+
if #tg>0 then
41+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
42+
Duel.ConfirmCards(1-tp,tg)
43+
Duel.ShuffleHand(tp)
44+
g:RemoveCard(tg)
45+
end
46+
end
47+
local ct=#g
48+
if ct>0 then
49+
Duel.MoveToDeckBottom(ct,tp)
50+
Duel.SortDeckbottom(tp,tp,ct)
51+
end
52+
end

0 commit comments

Comments
 (0)