Skip to content

Commit b88c791

Browse files
committed
added Dead Line the Mad Fiend of Despair
1 parent 7dab3df commit b88c791

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

rush/c160020035.lua

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
--絶望狂魔デッド・ライン
2+
--Dead Line the Mad Fiend of Despair
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send the top 2 cards of your Deck to the GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCondition(function(e)return e:GetHandler():IsStatus(STATUS_SUMMON_TURN)end)
14+
e1:SetCost(s.cost)
15+
e1:SetTarget(s.target)
16+
e1:SetOperation(s.operation)
17+
c:RegisterEffect(e1)
18+
end
19+
s.listed_names={160015033} --Dead End the Mad Fiend of Despair
20+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
21+
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
22+
end
23+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
24+
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
25+
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
26+
end
27+
function s.spfilter(c,e,tp)
28+
return c:IsCode(160015033) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
29+
end
30+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
31+
--Requirement
32+
if Duel.SendtoGrave(e:GetHandler(),REASON_COST)<1 then return end
33+
--Effect
34+
if Duel.DiscardDeck(tp,2,REASON_EFFECT)~=2 then return end
35+
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
36+
if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
38+
local ssg=sg:Select(tp,1,1,nil)
39+
if #ssg>0 then
40+
Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP)
41+
end
42+
end
43+
end

0 commit comments

Comments
 (0)