; Constants and state file of Iori Yagami

[Data]
life = 1000
power = 3000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 20
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 50
FloatPersistIndex = 40


[Size]
xscale = 1
yscale = 1
ground.back = 25
ground.front = 30
air.back = 12
air.front = 12
height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -4, -98
mid.pos = -0, -60
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.5    ; Orochi, 4.13
walk.back = -2     ; Orochi, -3.25
run.fwd  = 4.625, 0; Orochi, 6.625
run.back = -5.375,-4;Orochi, -6.125
jump.neu = 0,-8.7648649
jump.back = -3.0859375,-8.7648649
jump.fwd = 2.98046875,-8.7648649
runjump.back = -2.55,-8.1
runjump.fwd = 4.44140625,-8.7648649
; When super jump back, the X vel is the same (except negative).
; Ordinary Super jump Y vel is -10.1818182
; Short Jump = -6.6206897
airjump.neu = 0,-8.1
airjump.back = -2.55
airjump.fwd = 2.5

; Evade vel X = 5.5

; Vel X on Hard Punch (the headbutt) = 2.5

; KOF proj Vel, Yami Barai, Light = 4 Hard = 7 Don't forget to add
; some floats to piss of K.O.D.

; Oni Yaki, Light Vel X = 1 , Medium Vel X = 1.5, Hard Vel X = 2
; Oni Yaki, Light Vel Y = -6.3636364, Medium Vel Y = -10.0740741, Hard Vel Y = -14.4516129

; 212 Shiki: Koto Tsuki In stuff:
; Light, stop after 23 ticks, Medium, stop after 38 ticks. Hard, stop after 54 ticks.
; Damage. Light, 184, 1470. Medium, 184, 1562. Hard, 184, 1654.
; Vel X. 6.
; P2 hitvel. X = 6. Y = 2. Y is not as accurate.

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .5
stand.friction = .85
crouch.friction = .85

;---------------------------------------------------------------------------
; Variables


;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy
triggerall = !var(50)
triggerall = time = 0
trigger1 = enemy, name = "Kyo"
trigger2 = enemy, name = "Kyo Kusanagi"
trigger3 = enemy, name = "cvskyo"
value = 183

[State 180, 1]
type = ChangeState
trigger1 = Time = 1
value = IfElse(var(50),181,IfElse(random < 500,181,182))

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 180+var(50)
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 180+var(50),0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win pose 2
; CNS difficulty: basic
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 6
value = 181,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 72
value = 181,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 150
value = 181,2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover


[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 183]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(5) = 0
value = 180,0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 1 && !var(50)
value = IfElse(random < 500,194,190)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 1 && var(50)
value = 10190

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy
triggerall = !(var(50)) && (anim = 190 || anim = 194)
trigger1 = (P2Name = "cvskyo") && (EnemyNear, PalNo = [1,6]) && (EnemyNear, AuthorName = "warusaki3")
trigger2 = (P4Name = "cvskyo") && (EnemyNear, PalNo = [1,6]) && (EnemyNear, AuthorName = "warusaki3")
value = 192

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy
triggerall = !(var(50)) && (anim = 190 || anim = 194)
trigger1 = (P2Name = "Kyo Kusanagi") && (EnemyNear, AuthorName = "K.O.D")
trigger2 = (P4Name = "Kyo Kusanagi") && (EnemyNear, AuthorName = "K.O.D")
value = 193

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 190 || anim = 194
trigger1 = IfElse(teamside = 1,time = 20, time = 55)
value = 190,IfElse(random < 500,0,1)
channel = 20

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 10190
trigger1 = time = 20
value = 10190,0
channel = 20

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 192]
type = S
ctrl = 0
velset = 0,0
anim = 191

[State 0, ChangeState]
type = ChangeState
trigger1 = var(50) && time = 1
value = 190
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(5) = 1 && anim = 191
anim = 8002
ID = 8002
pos = -9,-52
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(6) = 1 && anim = 191
anim = 8003
ID = 8003
pos = -4,-48
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = animelem = 7
ID = 8003
pos = 4,-43
postype = p1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = animelem = 8
ID = 8003
pos = 10,-42
postype = p1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 9
id = 8003

[State 0, Explod]
type = Explod
trigger1 = animelem = 9 && anim = 191
anim = 8000
ID = 8000
pos = 12,-37
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !animtime && anim = 191
id = 8000

[State 0, Explod]
type = Explod
trigger1 = !animtime && anim = 191
anim = 8004
ID = 8004
pos = 12,-30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(5) = 1 && anim = 191
value = 1010,0
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3 && anim = 191
value = 190,4
channel = 20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !animtime && anim = 191
value = 190,5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !animtime && anim = 191
value = 192

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0 && anim = 192
value = 0
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 193]
type = S
ctrl = 0
velset = 0,0
anim = 193

[State 0, ChangeState]
type = ChangeState
trigger1 = var(50) && time = 1
value = 190
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(5) = 1 && anim = 193
anim = 8002
ID = 8002
pos = -9,-52
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(6) = 1 && anim = 193
anim = 8003
ID = 8003
pos = -4,-48
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = animelem = 7
ID = 8003
pos = 4,-43
postype = p1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = animelem = 8
ID = 8003
pos = 10,-42
postype = p1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 9
id = 8003

[State 0, Explod]
type = Explod
trigger1 = animelem = 9 && anim = 193
anim = 8000
ID = 8000
pos = 12,-37
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !animtime && anim = 193
id = 8000

[State 0, Explod]
type = Explod
trigger1 = !animtime && anim = 193
anim = 8004
ID = 8004
pos = 12,-30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 0.5,0.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(5) = 1 && anim = 193
value = 1010,0
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3 && anim = 193
value = 190,4
channel = 20


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !animtime && anim = 193
value = 190,5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !animtime && anim = 193
value = 192

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 193

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0 && anim = 192
value = 0
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy
triggerall = !var(50)
trigger1 = p2name = "Kyo" || p2name = "Kyo Kusanagi"
trigger2 = p4name = "Kyo" || p4name = "Kyo Kusanagi"
trigger3 = p2name = "cvskyo" || p4name = "cvskyo" && (EnemyNear, PalNo = [1,6])
value = 196
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 20
value = 195,IfElse(random < 500,0,1)
channel = 20

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Special Taunt
; CNS difficulty: easy
[Statedef 196]
type = S
ctrl = 0
anim = 196
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 11
value = 195,2
channel = 20

[State 0, Explod]
type = Explod
trigger1 = animelemtime(21) = 0
anim = 197
ID = 197
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Special Taunt
; CNS difficulty: easy
[Statedef 197]
type = S
ctrl = 0
anim = 10195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 10195,0
channel = 20

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


