Skip to content

Commit a4fe11f

Browse files
committed
added Jar of Greed
1 parent 0f0141f commit a4fe11f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

rush/c160402061.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--強欲な瓶
2+
--Jar of Greed
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Draw 1 card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DRAW)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.operation)
14+
c:RegisterEffect(e1)
15+
local e2=e1:Clone()
16+
e2:SetCode(EVENT_DRAW)
17+
e2:SetCondition(s.condition)
18+
c:RegisterEffect(e2)
19+
end
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
return ep==tp and Duel.IsTurnPlayer(tp)
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.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
26+
end
27+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
28+
Duel.Draw(tp,1,REASON_EFFECT)
29+
end

0 commit comments

Comments
 (0)