-
Notifications
You must be signed in to change notification settings - Fork 1
/
c37564032.lua
36 lines (34 loc) · 1.28 KB
/
c37564032.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
--quesar
local m=37564032
local cm=_G["c"..m]
cm.Senya_name_with_elem=true
function cm.initial_effect(c)
aux.AddXyzProcedure(c,nil,6,4,cm.ovfilter,aux.Stringid(m,0),63)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.atkcon)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:GetOriginalCode()==37564022 and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.filter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,e:GetHandler())
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end
if not Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,e:GetHandler()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,e:GetHandler())
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local tc=sg:GetFirst()
Senya.CopyStatusAndEffect(e,nil,tc,true,2)
end