Skip to content

Commit 8b5e3d5

Browse files
committed
added new rush cards
1 parent 74ed768 commit 8b5e3d5

3 files changed

Lines changed: 158 additions & 1 deletion

File tree

proc_rush.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local LEGEND_LIST={160001000,160205001,160418001,160002000,160421015,160404001,1
1111
160320038,160018036,160212004,160212003,160402044,160212075,160212001,160402045,160019063,160019064,160019065,
1212
160213078,160213082,160402047,160213084,160020059,160213076,160020001,160020040,160020000,160214052,160323029,
1313
160214020,160021065,160021027,160402052,160215086,160324001,160402055,160324022,160023000,160217058,160024000,
14-
160024029,160402062,160402064}
14+
160024029,160402062,160402064,160219001}
1515
-- Returns if a card is a Legend. Can be updated if a GetOT function is added to the core
1616
function Card.IsLegend(c)
1717
return c:IsHasEffect(EFFECT_IS_LEGEND) or c:IsOriginalCode(table.unpack(LEGEND_LIST))

rush/c160219001.lua

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
--リリーフカー・D
2+
--Chaos Emperor Dragon - Envoy of the End
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon procedure
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:SetCondition(s.spcon)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
e1:SetValue(1)
17+
c:RegisterEffect(e1)
18+
--to grave
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,0))
21+
e2:SetCategory(CATEGORY_TOGRAVE|CATEGORY_DAMAGE)
22+
e2:SetType(EFFECT_TYPE_IGNITION)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetCountLimit(1)
25+
e2:SetCondition(s.tgcon)
26+
e2:SetCost(s.tgcost)
27+
e2:SetTarget(s.tgtg)
28+
e2:SetOperation(s.tgop)
29+
c:RegisterEffect(e2)
30+
aux.GlobalCheck(s,function()
31+
local ge1=Effect.CreateEffect(c)
32+
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
33+
ge1:SetCode(EVENT_CHAIN_SOLVED)
34+
ge1:SetOperation(s.checkop)
35+
Duel.RegisterEffect(ge1,0)
36+
end)
37+
end
38+
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
39+
if re:GetHandler():IsControler(rp) then
40+
Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1)
41+
end
42+
end
43+
function s.spcostfilter(c,att)
44+
return c:IsAttribute(att) and c:IsAbleToDeck()
45+
end
46+
function s.spcon(e,c)
47+
if c==nil then return true end
48+
local tp=c:GetControler()
49+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
50+
and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK)
51+
and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT)
52+
end
53+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,c)
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
55+
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)
56+
local sg=aux.SelectUnselectGroup(g,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_TODECK,nil,nil,true)
57+
local g2=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)
58+
local sg2=aux.SelectUnselectGroup(g2,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_TODECK,nil,nil,true)
59+
sg:Merge(sg2)
60+
if #sg>1 then
61+
sg:KeepAlive()
62+
e:SetLabelObject(sg)
63+
return true
64+
end
65+
return false
66+
end
67+
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
68+
local g=e:GetLabelObject()
69+
if not g then return end
70+
Duel.HintSelection(g)
71+
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
72+
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK)
73+
if #og>0 then Duel.SortDeckbottom(tp,tp,#og) end
74+
g:DeleteGroup()
75+
end
76+
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
77+
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 and Duel.GetFlagEffect(tp,id)==0
78+
end
79+
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
80+
if chk==0 then return Duel.CheckLPCost(tp,1000) end
81+
end
82+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
83+
local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD)
84+
if chk==0 then return #g>0 end
85+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
86+
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,300)
87+
end
88+
function s.sgfilter(c,p)
89+
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p) and not c:WasMaximumModeSide()
90+
end
91+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
92+
--Requirement
93+
Duel.PayLPCost(tp,1000)
94+
--Effect
95+
local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD)
96+
Duel.SendtoGrave(g,REASON_EFFECT)
97+
local og=Duel.GetOperatedGroup()
98+
local ct=og:FilterCount(s.sgfilter,nil,1-tp)
99+
if ct>0 then
100+
Duel.BreakEffect()
101+
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
102+
end
103+
end

rush/c160219034.lua

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
--リリーフカー・D
2+
--Reliefcar D
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Draw
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DRAW)
10+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
11+
e1:SetType(EFFECT_TYPE_IGNITION)
12+
e1:SetRange(LOCATION_MZONE)
13+
e1:SetCountLimit(1)
14+
e1:SetCondition(function(e)return e:GetHandler():IsStatus(STATUS_SUMMON_TURN)end)
15+
e1:SetCost(s.cost)
16+
e1:SetTarget(s.target)
17+
e1:SetOperation(s.operation)
18+
c:RegisterEffect(e1)
19+
end
20+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
21+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end
22+
end
23+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
24+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
25+
Duel.SetTargetPlayer(tp)
26+
Duel.SetTargetParam(1)
27+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
28+
end
29+
function s.fupfilter(c)
30+
return c:IsFaceup() and c:IsCode(CARD_SPIRIT_STADIUM)
31+
end
32+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
33+
--Requirement
34+
local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil)
35+
if Duel.SendtoGrave(g,REASON_COST)<=0 then return end
36+
--Effect
37+
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
38+
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(s.fupfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
39+
Duel.BreakEffect()
40+
Duel.Draw(tp,1,REASON_EFFECT)
41+
end
42+
local e1=Effect.CreateEffect(e:GetHandler())
43+
e1:SetDescription(aux.Stringid(id,1))
44+
e1:SetType(EFFECT_TYPE_FIELD)
45+
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
46+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
47+
e1:SetTargetRange(1,0)
48+
e1:SetValue(s.aclimit)
49+
e1:SetReset(RESET_PHASE|PHASE_END)
50+
Duel.RegisterEffect(e1,tp)
51+
end
52+
function s.aclimit(e,re,tp)
53+
return re:GetHandler():IsCode(id)
54+
end

0 commit comments

Comments
 (0)