-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathc37564050.lua
46 lines (45 loc) · 1.46 KB
/
c37564050.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
38
39
40
41
42
43
44
45
46
--元灵的幻影·Kano
local m=37564050
local cm=_G["c"..m]
cm.Senya_name_with_elem=true
function cm.initial_effect(c)
Senya.AddXyzProcedureCustom(c,cm.mfilter,cm.gfilter,2,63)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetCost(cm.tdcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
cm.prim_replace_att=true
function cm.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,4)
end
function cm.gfilter(g)
return g:IsExists(Senya.check_set_elem,1,nil)
end
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.tdfilter(c)
return true
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.tdfilter(chkc) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,0,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end