-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathc14306092.lua
More file actions
50 lines (50 loc) · 1.52 KB
/
Copy pathc14306092.lua
File metadata and controls
50 lines (50 loc) · 1.52 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
--牙鮫帝シャーク・カイゼル
function c14306092.initial_effect(c)
c:EnableCounterPermit(0x2e)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3,nil,nil,5)
c:EnableReviveLimit()
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14306092,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c14306092.ctcost)
e1:SetTarget(c14306092.cttg)
e1:SetOperation(c14306092.ctop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c14306092.atkcon)
e2:SetValue(c14306092.atkval)
c:RegisterEffect(e2)
end
c14306092.mentioned_counter={
[0x2e]=true,
}
function c14306092.ctcost(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 c14306092.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x2e,1) end
end
function c14306092.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
c:AddCounter(0x2e,1)
end
end
function c14306092.atkcon(e)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler())
end
function c14306092.atkval(e,c)
return c:GetCounter(0x2e)*1000
end