Skip to content

Commit 02cddec

Browse files
committed
added Delirium Rosalia
1 parent 94fb387 commit 02cddec

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

rush/c160020034.lua

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
--夢中のロザリア
2+
--Delirium Rosalia
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+CATEGORY_TOHAND)
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(s.condition)
15+
e1:SetCost(s.cost)
16+
e1:SetTarget(s.target)
17+
e1:SetOperation(s.operation)
18+
c:RegisterEffect(e1)
19+
end
20+
s.listed_names={160213055} --Delirium Sylvix
21+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
22+
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=10
23+
end
24+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
25+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
26+
end
27+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
28+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
29+
Duel.SetTargetPlayer(tp)
30+
Duel.SetTargetParam(1)
31+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
32+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
33+
end
34+
function s.thfilter(c)
35+
return c:IsCode(160213055) and c:IsAbleToHand()
36+
end
37+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
38+
--Requirement
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
40+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
41+
if Duel.SendtoGrave(g,REASON_COST)<1 then return end
42+
--Effect
43+
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
44+
if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil)
45+
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
47+
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
48+
if #g2>0 then
49+
Duel.BreakEffect()
50+
Duel.SendtoHand(g2,nil,REASON_EFFECT)
51+
Duel.ConfirmCards(1-tp,g2)
52+
end
53+
end
54+
end

0 commit comments

Comments
 (0)