-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc67750322.lua
More file actions
31 lines (31 loc) · 1.01 KB
/
c67750322.lua
File metadata and controls
31 lines (31 loc) · 1.01 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
--Skull Meister
function c67750322.initial_effect(c)
--Inactivate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67750322,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c67750322.discon)
e1:SetCost(c67750322.discost)
e1:SetTarget(c67750322.distg)
e1:SetOperation(c67750322.disop)
c:RegisterEffect(e1)
end
function c67750322.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and Duel.IsChainNegatable(ev) and loc==LOCATION_GRAVE
end
function c67750322.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c67750322.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c67750322.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end