-
Notifications
You must be signed in to change notification settings - Fork 132
/
c10282757.lua
37 lines (37 loc) · 1.07 KB
/
c10282757.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
--プランクスケール
---@param c Card
function c10282757.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c10282757.activate)
c:RegisterEffect(e1)
end
function c10282757.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(500)
e1:SetTarget(c10282757.filter1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(c10282757.filter2)
Duel.RegisterEffect(e3,tp)
end
function c10282757.filter1(e,c)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(3)
end
function c10282757.filter2(e,c)
return c:IsType(TYPE_XYZ) and c:IsRankAbove(4)
end