-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathc13474291.lua
More file actions
78 lines (78 loc) · 2.55 KB
/
Copy pathc13474291.lua
File metadata and controls
78 lines (78 loc) · 2.55 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--雲魔物-ストーム・ドラゴン
function c13474291.initial_effect(c)
c:EnableReviveLimit()
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c13474291.sdcon)
c:RegisterEffect(e2)
--spsummon proc
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(c13474291.spcon)
e3:SetTarget(c13474291.sptg)
e3:SetOperation(c13474291.spop)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13474291,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c13474291.cttg)
e4:SetOperation(c13474291.ctop)
c:RegisterEffect(e4)
end
c13474291.mentioned_counter={
[0x1019]=true,
}
function c13474291.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c13474291.cfilter(c)
return c:IsSetCard(0x18) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c13474291.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13474291.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c13474291.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c13474291.cfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c13474291.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c13474291.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1019,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1019,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x1019,1)
end
function c13474291.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x1019,1)
end
end