-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathc100000084.lua
More file actions
37 lines (37 loc) · 1.27 KB
/
c100000084.lua
File metadata and controls
37 lines (37 loc) · 1.27 KB
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
27
28
29
30
31
32
33
34
35
36
37
--失楽園
function c100000084.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100000084,2))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e2:SetCountLimit(1)
e2:SetCondition(c100000084.drcon)
e2:SetTarget(c100000084.drtg)
e2:SetOperation(c100000084.drop)
c:RegisterEffect(e2)
end
function c100000084.filter1(c)
return c:IsFaceup() and c:GetCode()==69890967 or c:GetCode()==6007213 or c:GetCode()==32491822
end
function c100000084.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100000084.filter1,tp,LOCATION_MZONE,0,1,nil)
end
function c100000084.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c100000084.drop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c100000084.filter1,tp,LOCATION_MZONE,0,1,nil) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end