-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc80863132.lua
More file actions
26 lines (26 loc) · 850 Bytes
/
c80863132.lua
File metadata and controls
26 lines (26 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--Null and Void
function c80863132.initial_effect(c)
--change effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c80863132.condition)
e1:SetOperation(c80863132.activate)
c:RegisterEffect(e1)
end
function c80863132.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET) then return false end
if Duel.GetOperationCount(ev)~=1 then return false end
local ex,cg,cc,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DRAW)
return ex and cv>0
end
function c80863132.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c80863132.repop)
end
function c80863132.repop(e,tp,eg,ep,ev,re,r,rp)
local ex,cg,cc,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DRAW)
if cp<2 then
Duel.DiscardDeck(cp,cv,REASON_EFFECT)
end
end