forked from Fluorohydride/ygopro-scripts
-
Notifications
You must be signed in to change notification settings - Fork 6
/
c10248389.lua
48 lines (48 loc) · 1.35 KB
/
c10248389.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
47
48
--サイバー・ブレイダー
---@param c Card
function c10248389.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,97023549,11460577,false,false)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c10248389.indcon)
e1:SetValue(1)
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_SET_ATTACK_FINAL)
e2:SetCondition(c10248389.atkcon)
e2:SetValue(c10248389.atkval)
c:RegisterEffect(e2)
--disable effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c10248389.discon)
e4:SetOperation(c10248389.disop)
c:RegisterEffect(e4)
end
function c10248389.indcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==1
end
function c10248389.atkcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==2
end
function c10248389.discon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==3
end
function c10248389.atkval(e,c)
return c:GetAttack()*2
end
function c10248389.disop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp then
Duel.NegateEffect(ev)
end
end