;********************************************
; 变量设置
;********************************************
; var(10) = 圣印设置
;	var(10) = 0     无圣印状态
;	var(10) = 1	光明圣印开启
;	var(10) = 2     命令圣印开启
; var(11) = 祝福设置
;	var(11) = 0     无祝福状态
;	var(11) = 1	智慧祝福开启
;	var(11) = 2     力量祝福开启
; var(12) = 圣盾技能冷却设置
;	var(12) = 0     可使用
;	var(12) = 1     不可使用
; var(13) = 制裁之锤设
;	var(13) = 300   制裁状态启动
;	var(13) = 0     制裁状态结束
; var(20) = 神圣能量
; var(21) = 神圣恢复记数
; var(22) = 惩戒能量
; var(23) = 惩戒恢复记数
; var(24) = 智慧祝福效果
;	var(24) = 0     无效果
;	var(24) = 1     能量恢复提高1秒

;---------------------------------------------------------------------------
[statedef -2]

[State -2, DisplayToClipboard]     ;DEBUG 加入检测变量
type = DisplayToClipboard
trigger1 = 1
text = "var(20) = %d"
params = var(20)
ignorehitpause = 1

[State -2, PowerAdd]
type = PowerAdd
trigger1 = var(11) = 1
trigger1 = time%2 = 0
value = 5
;ignorehitpause =
;persistent =

[State -2, AttackMulSet]
type = attackmulset
trigger1 = var(11) = 2
;time = 0
value = 1
;ignorehitpause =
;persistent =

[State -2, AttackMulSet]
type = attackmulset
trigger1 = var(11) != 2
;time = 0
value = 0.75
;ignorehitpause =
;persistent =

[State -2, NotHitBy]
type = NotHitBy
trigger1 = numhelper(3001) !=0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 2
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = numhelper(3101) != 0
trigger1 = p2stateno = 13110
v = 13    ;fv = 10
value = 302
;ignorehitpause =
;persistent =

[State -2, VarAdd]
type = VarAdd
trigger1 = var(13) > 0
trigger1 = time %2 = 0
v = 13
value = -2
;ignorehitpause =
;persistent =

[state -2,制裁持续]
type = helper
triggerall = var(13) != 0
triggerall = var(13) >= 3
trigger1 = movecontact
trigger1 = numhelper(3102) = 0
trigger2 = numhelper(1101) != 0
trigger2 = helper(1101),movecontact
trigger3 = numhelper(1702) != 0
trigger3 = helper(1702),movecontact
postype = P2
pos = 0, -60
stateno = 3102
ID = 3102
ownpal = 1

[state -2,制裁结束]
type = helper
trigger1 = numhelper(3103) = 0
trigger1 = var(13) = 1
trigger2 = var(13) = 2
postype = P2
pos = 0, -60
stateno = 3103
ID = 3103
ownpal = 1

;设置于 statedef 5900
[State -2, 神圣能量开局设置]
type = VarSet
trigger1 = RoundState = 0
var(20) = 3

;设置于 statedef 5900
[State -2, 惩戒能量开局设置]
type = VarSet
trigger1 = RoundState = 0
var(22) = 3

[State -2, 神圣能量总数判定]
type = VarSet
trigger1 = var(20) > 3
v = 20    ;fv = 10
value = 3
;ignorehitpause =
;persistent =

[State -2, 惩戒能量总数判定]
type = VarSet
trigger1 = var(22) > 3
v = 22    ;fv = 10
value = 3
;ignorehitpause =
;persistent =

[State -2, 神圣能量+1]
type = VarAdd
;trigger1 = var(21) >= 300
trigger1 = var(21) >= (ifelse(var(24) = 0,150,120))
v = 20
value = 1
;ignorehitpause =
;persistent =

[State -2, 惩戒能量+1]
type = VarAdd
;trigger1 = var(23) >= 300
trigger1 = var(23) >= (ifelse(var(24) = 0,150,120))
v = 22
value = 1
;ignorehitpause =
;persistent =

[State -2, 神圣能量记时清零]
type = VarSet
;trigger1 = var(21) >= 300
trigger1 = var(21) >= (ifelse(var(24) = 0,150,120))
trigger2 = var(20) = 3
v = 21    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State -2, 惩戒能量记时清零]
type = VarSet
;trigger1 = var(23) >= 300
trigger1 = var(23) >= (ifelse(var(24) = 0,150,120))
trigger2 = var(22) = 3
v = 23    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State -2, 神圣能量恢复记时]
type = VarAdd
trigger1 = time%2 = 0
v = 21
value = 2
;ignorehitpause =
;persistent =

[State -2, 惩戒能量恢复记时]
type = VarAdd
trigger1 = time%2 = 0
v = 23
value = 2
;ignorehitpause =
;persistent =



;*******************
;   1P位置
;*******************

[State -2, Explod]
type = Explod
triggerall = teamside = 1
triggerall = numexplod(20151) = 0
trigger1 = var(20) = 1
trigger2 = var(20) = 2
trigger3 = var(20) = 3
anim = 20151
ID = 20151
pos = 5,30
postype = left
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 1
triggerall = numexplod(20152) = 0
trigger1 = var(20) = 2
trigger2 = var(20) = 3
anim = 20151
ID = 20152
pos = 25,30
postype = left
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 1
triggerall = numexplod(20153) = 0
trigger1 = var(20) = 3
anim = 20151
ID = 20153
pos = 45,30
postype = left
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 1
triggerall = numexplod(20161) = 0
trigger1 = var(22) = 1
trigger2 = var(22) = 2
trigger3 = var(22) = 3
anim = 20161
ID = 20161
pos = 65,30
postype = left  ;p2,front,back,left,right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 1
triggerall = numexplod(20162) = 0
trigger1 = var(22) = 2
trigger2 = var(22) = 3
anim = 20161
ID = 20162
pos = 85,30
postype = left  ;p2,front,back,left,right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 1
triggerall = numexplod(20163) = 0
trigger1 = var(22) = 3
anim = 20161
ID = 20163
pos = 105,30
postype = left  ;p2,front,back,left,right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(20151) != 0
trigger1 = var(20) != 1
trigger1 = var(20) != 2
trigger1 = var(20) != 3
id = 20151
;ignorehitpause = 1
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(20152) != 0
trigger1 = var(20) != 2
trigger1 = var(20) != 3
id = 20152
;ignorehitpause = 1
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(20153) != 0
trigger1 = var(20) != 3
id = 20153
;ignorehitpause = 1
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(20161) != 0
trigger1 = var(22) != 1
trigger1 = var(22) != 2
trigger1 = var(22) != 3
id = 20161
;ignorehitpause = 1
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(20162) != 0
trigger1 = var(22) != 2
trigger1 = var(22) != 3
id = 20162
;ignorehitpause = 1
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(20163) != 0
trigger1 = var(22) != 3
id = 20163
;ignorehitpause = 1
;persistent =


;*******************
;   2P位置
;*******************

[State -2, Explod]
type = Explod
triggerall = teamside = 2
triggerall = numexplod(20151) = 0
trigger1 = var(20) = 1
trigger2 = var(20) = 2
trigger3 = var(20) = 3
anim = 20151
ID = 20151
pos = -5,30
facing = -1
postype = right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 2
triggerall = numexplod(20152) = 0
trigger1 = var(20) = 2
trigger2 = var(20) = 3
anim = 20151
ID = 20152
pos = -25,30
facing = -1
postype = right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 2
triggerall = numexplod(20153) = 0
trigger1 = var(20) = 3
anim = 20151
ID = 20153
pos = -45,30
facing = -1
postype = right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 2
triggerall = numexplod(20161) = 0
trigger1 = var(22) = 1
trigger2 = var(22) = 2
trigger3 = var(22) = 3
anim = 20161
ID = 20161
pos = -65,30
facing = -1
postype = right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 2
triggerall = numexplod(20162) = 0
trigger1 = var(22) = 2
trigger2 = var(22) = 3
anim = 20161
ID = 20162
pos = -85,30
facing = -1
postype = right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =

[State -2, Explod]
type = Explod
triggerall = teamside = 2
triggerall = numexplod(20163) = 0
trigger1 = var(22) = 3
anim = 20161
ID = 20163
pos = -105,30
facing = -1
postype = right
bindtime = -1
scale = 1,1
sprpriority = 9
ownpal = 1
removetime = -1
;ignorehitpause =
;persistent =


;*******************
;   圣光加血火花
;*******************

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 1401
trigger1 = numexplod(21450) !=0
id = 21450
;ignorehitpause =
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 1501
trigger1 = numexplod(21460) !=0
id = 21460
;ignorehitpause =
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 2000
trigger1 = numexplod(21470) !=0
id = 21470
;ignorehitpause =
;persistent =

;*******************
;   声音设置
;*******************
[State -2, PlaySnd];前走脚步声
type = PlaySnd
triggerall = stateno = 20
triggerall = anim = 20
trigger1 = animelem = 6
trigger2 = animelem = 14
value = 20,0
volume = 250
;channel = 0
;lowpriority = -1
;freqmul = 1.0
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];后退脚步声
type = PlaySnd
triggerall = stateno = 20
triggerall = anim = 21
trigger1 = animelem = 7
trigger2 = animelem = 15
value = 21,0
volume = 200
;channel = 0
;lowpriority = -1
;freqmul = 1.0
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];起跳声
type = PlaySnd
triggerall = stateno = 40
trigger1 = animtime = 0
value = 40,0
volume = 0
;channel = 0
;lowpriority = -1
freqmul = 1.15
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];跳跃落地声
type = PlaySnd
triggerall = stateno = 52
trigger1 = time = 1
value = 52,0
volume = 255
;channel = 0
;lowpriority = -1
freqmul = 0.95
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];跳跃落地喊声
type = PlaySnd
triggerall = stateno = 52
trigger1 = random >= 500
trigger1 = time = 1
value = 210,0
volume = 255
channel = 0
;lowpriority = -1
freqmul = 0.95
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];跑步脚步声
type = PlaySnd
triggerall = stateno = 100
trigger1 = animelem = 8
trigger2 = animelem = 15
value = 100,0
volume = 255
;channel = 0
;lowpriority = -1
freqmul = 1.5 +random%2
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];疾退脚步声
type = PlaySnd
triggerall = stateno = 105
trigger1 = time = 1
value = 40,0
volume = 100
;channel = 0
;lowpriority = -1
;freqmul = 1.0
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];疾退落地声
type = PlaySnd
triggerall = stateno = 106
trigger1 = time = 1
value = 40,1
volume = 0
;channel = 0
;lowpriority = -1
;freqmul = 1.0
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =


[State -2, PlaySnd];胜利声音
type = PlaySnd
triggerall = stateno = 180
trigger1 = time = 1
value = 180,0
volume = 200
channel = 0
;lowpriority = -1
;freqmul = 1.0
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd];开场声音
type = PlaySnd
triggerall = stateno = 190
trigger1 = animelem = 10
value = 190,0
volume = 200
channel = 0
;lowpriority = -1
freqmul = 1.1
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, PlaySnd]
type = PlaySnd
trigger1 = stateno = 1400
trigger2 = stateno = 1500
value = 1400,0
volume = 0
channel = 5
lowpriority = 1
;freqmul = 1
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, StopSnd]
type = StopSnd
trigger1 = stateno != 1400
trigger1 = stateno != 1500
channel = 5
;ignorehitpause =
;persistent =

[State -2, PlaySnd]
type = PlaySnd
trigger1 = stateno = 1401
trigger1 = animelem = 5
trigger2 = stateno = 1501
trigger2 = animelem = 5
value = 1400,1
volume = 0
channel = 6
lowpriority = 1
;freqmul = 1
;loop = 0
;pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State -2, StopSnd]
type = StopSnd
trigger1 = stateno != 1401
trigger1 = stateno != 1501
channel = 6
;ignorehitpause =
;persistent =

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno != 1300
trigger2 = stateno = 1300
trigger2 = animelem = 75
channel = 7
;ignorehitpause =
;persistent =


[State 5000, ouch]
type = PlaySnd
triggerall = life > 0
triggerall = Random < 500
triggerall = Time = 1
triggerall = GetHitVar(animtype) = [0,1]
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
trigger4 = stateno = 5030
value = 5000,0 + random%2
volume = 200
channel = 0
;lowpriority = 1

; Play "ouch" when landing on back
[State 5100, ouch]
type = PlaySnd
triggerall = life > 0
triggerall = Random < 500
triggerall = stateno = 5100
trigger1 = life > 0
trigger1 = Time = 0
value = 5000,1 + random%2
volume = 200
channel = 0
;lowpriority = 1

; Play "ouch" sound when hit hard
[State 5000, ouch2]
type = PlaySnd
triggerall = life > 0
triggerall = Random < 500
triggerall = Time = 1
triggerall = GetHitVar(animtype) = [2,5]
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
trigger4 = stateno = 5030
value = 5000,1 + random%2
volume = 200
channel = 0
;lowpriority = 1

;-------AI开关---------
[State -3, ai1]
type = Varset
triggerall = var(9) != 1
triggerall = RoundState != 3
trigger1 = command = "AI_1"
trigger2 = command = "AI_2"
trigger3 = command = "AI_3"
trigger4 = command = "AI_4"
trigger5 = command = "AI_5"
trigger6 = command = "AI_6"
trigger7 = command = "AI_7"
trigger8 = command = "AI_8"
trigger9 = command = "AI_9"
trigger10 = command = "AI_10"
var(59) = 1

[State -3, ai1]
type = Varset
triggerall = var(9) != 1
triggerall = RoundState != 3
trigger1 = command = "AI_11"
trigger2 = command = "AI_12"
trigger3 = command = "AI_13"
trigger4 = command = "AI_14"
trigger5 = command = "AI_15"
trigger6 = command = "AI_16"
trigger7 = command = "AI_17"
trigger8 = command = "AI_18"
trigger9 = command = "AI_19"
trigger10 = command = "AI_20"
var(59) = 1

[State -3, SetAI]
type = VarSet
triggerall = Alive && RoundState = 2
triggerall = IsHomeTeam && !IsHelper
trigger1 = TeamSide = 2
trigger2 = MatchNo > 1
var(59) = 1

[State -3, ai2]
type = Varset
trigger1 = RoundState = 3
var(59) = 0



