-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathc160007021.lua
37 lines (37 loc) · 1.17 KB
/
c160007021.lua
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
-- カルイルカ
-- Light Dolphin
local s,id=GetID()
function s.initial_effect(c)
--Draw 1 card
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.drcon)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
end
s.listed_names={CARD_UMI,CARD_BIG_UMI}
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_THUNDER|RACE_AQUA) and c:IsType(TYPE_NORMAL)
end
function s.filter(c)
return c:IsFaceup() and (c:IsCode(CARD_UMI) or c:IsCode(CARD_BIG_UMI))
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end