;===============================================================================
;EN ESTA SECCION SE ENCUENTRABN TODOS LOS JESTOS BASICOS DEL CHAR
;LA MODIFICACION SIN AUTORIZACION PUEDE SIGNIFICAR UNA FALLA TOTAL
;EN EL MISMO
;===============================================================================
;-------------------------------------------------------------------------------
[Data]
life              = 1000
power             = 5000
attack            = 120
defence           = 100
fall.defence_up   = 50
liedown.time      = 50
airjuggle         = 15
sparkno           = 1
guard.sparkno     = 40
KO.echo           = 0
volume            = 0
intpersistindex   = 5,20
floatpersistindex = 40

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

;---------------------------------------------------------------------------
[Velocity]
walk.fwd     = 2.6
walk.back    = -2.5
run.fwd      = 6.6, 0
run.back     = -5.8,-4
jump.neu     = 0,-9
jump.back    = -3.6
jump.fwd     = 3.7
runjump.back = -2.55,-8.1
runjump.fwd  = 5.2
airjump.neu  = 0,-8.1
airjump.back = -2.5
airjump.fwd  = 2.55

;---------------------------------------------------------------------------
[Movement]
airjump.num     = 0
airjump.height  = 35
yaccel          = .56
stand.friction  = .85
crouch.friction = .82
;---------------------------------------------------------------------------
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 1000, ]
type = Varset
trigger1 = 1
var(33) = 0

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

;---------------------------------------------------------------------------
[Statedef 180]
type = S

[State 180,]
type = VarRandom
trigger1 = 1
v = 21
range = 0,3

[State 180,]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(21) = 0
value = 181

[State 180,]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(21) = 1
value = 182

[State 180,]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(21) = 2
value = 183

[State 180,]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(21) = 3
value = 184

;---------------------------------------------------------------------------

[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 6
trigger1 = Alive
value = 10,9

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = time = [0,200]
flag = roundnotover

;---------------------------------------------------------------------------
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Alive
value = 10,4

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = Alive
value = 10,5

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = time = [0,200]
flag = roundnotover

;---------------------------------------------------------------------------
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 8
trigger1 = Alive
value = 12,0

[State 700, エフェクト表示]
type = Explod
trigger1 = AnimElem = 4
anim = 184
postype = P1
pos = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = time = [0,240]
flag = roundnotover
;-------------------------------------------------------------------------------
[Statedef 184]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Alive
value = 10,30

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 8
trigger1 = Alive
value = 10,31

[State 700, エフェクト表示]
type = Explod
trigger1 = AnimElem = 3
anim = 186
postype = P1
pos = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = time = [0,200]
flag = roundnotover
;-------------------------------------------------------------------------------
;Estados de Intro
[Statedef 190]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 190,Intro Vs Shingo]
type = ChangeState
trigger1 = p2name = "Shingo" | p4name = "shingo"
trigger2 = p2name = "Shingo-98" | p4name = "shingo-98"
trigger3 = p2name = "Shingo98" | p4name = "shingo98"
value = 192

[State 190,Intro Vs Benimaru]
type = ChangeState
trigger1 = p2name = "Benimaru Nikaido" | p4name = "Benimaru Nikaido"
trigger2 = p2name = "Benimaru" | p4name = "Benimaru"
value = 193

[State 190,Intro Vs Iori]
type = ChangeState
trigger1 = p2name = "Iori-98" | p4name = "Iori-98"
trigger2 = p2name = "Shin iori" | p4name = "Shin iori"
value = 194

[State 190,]
type = ChangeState
trigger1 = Time = 1
value = 191

;---------------------------------------------------------------------------
;Normal Intro
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 6
value = s10,6

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

[State 700, エフェクト表示]
type = Explod
trigger1 = AnimElem = 3
anim = 191
postype = P1
pos = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1

[State 191, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;Intro Vs Shingo
[Statedef 192]
type = S
ctrl = 0
anim = 196
velset = 0,0

[State 191, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 4
value = s10,20

[State 191, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;Intro Vs Benimaru
[Statedef 193]
type = S
ctrl = 0
anim = 197
velset = 0,0

[State 191, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,7

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 8
value = s10,8

[State 191, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Intro Vs Iori 98
[Statedef 194]
type = S
ctrl = 0
anim = 194
velset = 0,0

[State 1000, Explod]
type = Explod
trigger1 = animelem = 4
anim = 192
Id = 192
pos = -23,-108
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
sprpriority = -1

[State 1000, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 5
id = 192

[State 10000, Helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
ID = 1000
stateno = 19300
velset = 0,0
pos = 0,0
sprpriority = 5
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 185, iori1]
type = PlaySnd
trigger1 = AnimElem = 4, = 20
value = 10,33

[State 185, iori2]
type = PlaySnd
trigger1 = AnimElem = 4, = 80
value = 10,34

[State 191, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State 191, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
[Statedef 195]
type     = S
movetype = I
physics  = S
anim     = 195
velset   = 0,0
ctrl     = 0
sprpriority = 2
facep2 = 1

[State 195, コントロール可否]
type = CtrlSet
triggerall = !winko
trigger1 = AnimElem = 16
value = 1

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,3

[State 195, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10

[State 10, 1]
type = VelMul
trigger1 = Time = 0
x = 0

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 11, 0]
type = VelSet
trigger1 = Time = 0
x = 0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 1

[State 100, 1]
type = VelSet
trigger1 = AnimElemtime(2) >= 0
x = const(velocity.run.fwd.x)

[State 191,]
type = PlaySnd
triggerall = time = 1
trigger1 = Alive
loop = 1
value = s5,0
channel = 6

[State 100,]
type = StopSnd
trigger1 = command != "holdfwd"
trigger2 = Anim != 100
channel = 6

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 191,]
type = PlaySnd
triggerall = AnimElem = 2
trigger1 = Alive
value = s5,1

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 2
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 3]
type = ChangeState
trigger1 = AnimElemtime(2) >= 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106

[State 191,]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = Alive
value = s4,0

[State 106, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 106, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 3]
type = MakeDust
trigger1 = Time = 0
pos = -5,-2
spacing = 1

[State 106, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = time = 0
var(4) = 0

[State 40, 1];小ジャンプ
type = VarSet
trigger1 = command != "holdup"
var(4) = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = Var(4) = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 4];小ジャンプ
type = VelSet
trigger1 = AnimTime = 0
trigger1 = Var(4) = 1
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = -6

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 191,]
type = PlaySnd
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
trigger1 = Alive
value = s3,2
channel = 4

[State 191,]
type = PlaySnd
triggerall = time = 0
;triggerall = Var(4) = 0
triggerall = Var(3) != 0
trigger1 = Alive
value = s3,2
channel = 4

[State 191,]
type = PlaySnd
triggerall = time = 0
triggerall = Var(4) = 0
triggerall = Var(3) = 0
trigger1 = Alive
value = s3,1
channel = 4

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 191,]
type = PlaySnd
triggerall = time = 0
triggerall = Var(4) = 1
triggerall = Var(3) = 0
trigger1 = Alive
value = s3,1
channel = 4

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
;trigger1 = Var(4) = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 2];小ジャンプ
type = null;ChangeAnim
trigger1 = Time = 0
trigger1 = Var(4) = 1
value = 49

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3
;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47
veladd = 0,0

[State 191,]
type = PlaySnd
trigger1 = time = 0
value = s4,0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ふっとばし
[Statedef 300]
type     = S
movetype = A
physics  = S
juggle   = ifelse(P2movetype=H,8,15)
poweradd = 0
ctrl     = 0
velset   = 0,0
anim     = 300
sprpriority = 3

[State 1000, Explod]
type = Explod
trigger1 = prevstateno = [150,151]
trigger1 = time = 0
anim = 7015
pos = 11,-43
postype = p1
bindtime = 1
removetime = -2
supermove = 1
pausemove = 1
ownpal = 1
sprpriority = 5
removeongethit = 1

[State 300,]
type = PowerAdd
trigger1 = prevstateno = [150,151]
trigger1 = time = 0
value = -1000

[State 300,]
type = NotHitBy
trigger1 = prevstateno = [150,151]
trigger1 = 1
value = SCA

[state 300,]
type = Posset
trigger1 = time = 0
y = 0

[State 2100, 移動終了]
type = VelSet
trigger1 = AnimElem = 5
x = 4.5

[State 2100, 移動終了]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 300,]
type = palfx
trigger1 = prevstateno = [150,151]
trigger1 = time = 0
time = 5
add = 230,230,230

[State 300, ステート変更]
type = ChangeAnim
trigger1 = prevstateno = [150,151]
trigger1 = time = 0
value = 305

[State 300, ヒット定義]
type = HitDef
trigger1 = prevstateno = [150,151]
trigger1 = Time = 0
attr = S, NA
animtype  = Diagup
damage    = 0
pausetime = 16,18
sparkno = s4010
sparkxy = -20,-75
hitsound   = s1,4
ground.type = High
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -5,-5
air.velocity = -5,-5
fall = 1
fall.recover = 0
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 300 , 1]
type = HitDef
trigger1 = prevstateno != [150,151]
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 80
priority = 5
pausetime = 13,14
sparkno = s4010
guard.sparkno = s4110
sparkxy = -20,-75
hitsound = s1,4
hitflag = MAF
guardflag = MA
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5,-5
air.velocity = -5,-5
air.animtype = Back
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 300, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 4
value = s0,4

[State 300, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 4
value = s10,1

[State 300, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;空中ふっとばし
[Statedef 650]
type     = A
movetype = A
physics  = A
juggle   = 7
poweradd = 0
ctrl     = 0
anim     = 650
sprpriority = 3

[State 240 , 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
animtype  = Hard
damage    = 80
priority = 5
pausetime = 11,12
sparkno = s4010
guard.sparkno = s4110
sparkxy = -25,-60
hitsound = s1,4
hitflag = MAF
guardflag = MA
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5,-5
air.velocity = -5,-5
air.animtype = Back
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = s0,4

[State 300, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,38

;---------------------------------------------------------------------------
;緊急回避前

[Statedef 700]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 700
ctrl     = 0
velset   = 0,0
sprpriority = -2

[State 1000, Explod]
type = Explod
trigger1 = prevstateno = [150,151]
trigger1 = time = 0
anim = 7015
pos = 11,-43
postype = p1
bindtime = 1
removetime = -2
supermove = 1
pausemove = 1
ownpal = 1
sprpriority = 5
removeongethit = 1

[State 700,]
type = Poweradd
triggerall = time = 0
trigger1 = prevstateno = [150,151]
value = -1000

[State 700,]
type = palfx
triggerall = time = 0
trigger1 = prevstateno = [150,151]
time = 5
add = 256,256,256

[State 1000, Afterimage]
type = Afterimage
triggerall = prevstateno = 100
trigger1 = time = 0
time = 2
length = 7
PalBright = 0,0,0
PalContrast = 255,255,255
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3

[State 2041, 2]
type = Afterimagetime
trigger1 = stateno = 700
trigger1 = time%2 = 0 && Time < 20
time = 2

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,13
channel = 4

[State 2100, 非無敵]
type = HitBy
trigger1 = AnimElem = 8, <= 0
value = SC, NT, ST, HT

[State 2110, ]
type = Varset
trigger1 = time = 0
trigger1 = prevstateno = 100
var(6) = 1

[State 2110, ]
type = Varset
trigger1 = Animtime = 0
var(6) = 0

[State 2100, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(8) < 0
x = 4.6

[State 2100, 移動終了]
type = VelSet
trigger1 = AnimElem = 8
x = 0

[State 2110, 移動量]
type = VelSet
triggerall = var(6) = 1
trigger1 = AnimElemtime(2) >= 0 && AnimElemtime(8) <= 0
x = 6.2

[State 2110, 移動量]
type = VelSet
triggerall = var(6) = 1
trigger1 = AnimElem = 8
x = 0

[State 2100, 相手と重なった場合]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 2100, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 710]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 710
ctrl     = 0
velset   = 0,0
sprpriority = -2

[State 1000, Explod]
type = Explod
trigger1 = prevstateno = [150,151]
trigger1 = time = 0
anim = 7015
pos = 11,-43
postype = p1
bindtime = 1
removetime = -2
supermove = 1
pausemove = 1
ownpal = 1
sprpriority = 5
removeongethit = 1

[State 700,]
type = Poweradd
triggerall = time = 0
trigger1 = prevstateno = [150,151]
value = -1000

[State 700,]
type = palfx
triggerall = time = 0
trigger1 = prevstateno = [150,151]
time = 5
add = 256,256,256

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,13
channel = 4

[State 2110, 非無敵]
type = HitBy
trigger1 = AnimElem = 8, <= 0
value = SC, NT, ST, HT

[State 2110, 移動量]
type = VelSet
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(8) < 0
x = -4.6

[State 2110, 移動終了]
type = VelSet
trigger1 = AnimElem = 8
x = 0

[State 2110, 相手と重なった時の処理]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 2110, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype= H
physics = S
anim = 5200
velset = 0,0

[State 5200]
type = Posset
trigger1 = time = 0
y = 0

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 1
value = s10,13
channel = 4

[State 2110, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2110, ]
type = Varset
trigger1 = time = 0
trigger1 = command = "holdfwd"
var(6) = 1

[State 2110, ]
type = Varset
trigger1 = Animtime = 0
var(6) = 0

[State 2110, 移動量]
type = VelSet
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(4) <= 0
x = -4.8

[state 300,]
type = Veladd
triggerall = var(6) = 0
trigger1 = AnimElemtime(2) >= 0 && AnimElemtime(4) <= 0
x = .021

[State 2110, 移動量]
type = VelSet
triggerall = var(6) = 1
trigger1 = AnimElemtime(2) >= 0 && AnimElemtime(7) <= 0
x = 6

[State 2110, ]
type = ChangeAnim
triggerall = var(6) = 1
trigger1 = time = 0
value = 700

[State 2110, 移動終了]
type = VelSet
triggerall = var(6) = 0
trigger1 = AnimElem = 5
x = 0

[State 2110, 移動終了]
type = VelSet
triggerall = var(6) = 1
trigger1 = AnimElem = 8
x = 0

[State 2110, 相手と重なった時の処理]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 2110, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;この下、一行以上空ける事！
;-------------------------------Power up (start)
;KOF Memorial Poweradd by Zelgadis
[Statedef 910]
type = S
movetype = I
physics = S
anim = 910
velset = 0
ctrl = 0

[State 301, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = s9,3
channel = 11

[State 301, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = s10,21
channel = 12

[State 730, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 911

; Power up
[Statedef 911]
type = S
movetype = I
physics = S
anim = 911

[State 705, 2]
type = Explod
trigger1 = time = 0
anim = f130
ID = 911
sprpriority = 3
postype = p1
pos = 0,0
bindtime = -1
removeongethit = 1

[State 735, 1]
type = ChangeState
trigger1 = command != "hold_a"
trigger3 = command != "hold_y"
value = 912

[State 735, 2]
type = PowerAdd
trigger1 = Time = [0,12]
value = 9

[State 735, 2]
type = ChangeState
trigger1 = Power >= 3000
value = 313

[State 735, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 911

; Power up (end)
[Statedef 912]
type = S
movetype = I
physics = S
anim = 912

[State 912, StopSnd]
type = StopSnd
trigger1 = animtime = 0
channel = 8

[State 912, StopSnd]
type = StopSnd
trigger1 = animtime = 0
channel = 9

[State 1100, 1]
type = RemoveExplod
trigger1 = AnimElem = 1
ID = 911

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

; Power up (maxed out)
[Statedef 313]
type = S
movetype = I
physics = S
anim = 912

[State 1100, 1]
type = RemoveExplod
trigger1 = AnimElem = 1
ID = 911

[State 313, Explod]
type = Explod
trigger1 = time = 0
anim = f140
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 7

[State 1000, EnvShake]
type = EnvShake
trigger1 = AnimElem = 1
time = 15
freq = 90
ampl = -5
phase = 90

[State 1100, 1]
type = RemoveExplod
trigger1 = AnimElem = 1
ID = 910

[State 741, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------
;--------------------------------------------------------

[Statedef 6010]
type = S
physics = S
;anim = 6010
poweradd = 0
sprpriority = 8
velset = 0,0
ctrl = 0
facep2 = 1

[State 6010, PlaySound]
type = PlaySnd
trigger1 = time = 34
value = s5000,0

[State 6010, Explod]
type = Explod
trigger1 = time = 71
anim = f61
pos = 25,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
sprpriority = -9

[State 6010, PlaySound]
type = PlaySnd
trigger1 = time = 71
value = f7,1

[State 6010, EnvShake]
type = EnvShake
trigger1 = time = 71
time = 10
freq = 110
ampl = -4

[State 6010, PalFX]
type = PalFX
trigger1 = time = 0
time = 0

[State 6010, anim]
type = Changeanim2
trigger1 = time = 0
value = 6010

[State 6010, air]
type = Changestate
trigger1 = pos Y != 0
value = 5000

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 5150

; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1]
type = ChangeAnim
triggerall = 1
trigger1 = Prevstateno = 6010
value = 6011

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = var(22) = 0
triggerall = Prevstateno != 6010
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
triggerall = var(22) = 0
triggerall = Prevstateno != 6010
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
triggerall = var(22) = 0
triggerall = Prevstateno != 6010
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
triggerall = var(22) = 0
triggerall = Prevstateno != 6010
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = var(22) != 0
triggerall = Prevstateno != 6010
triggerall = Time = 0
triggerall = SelfAnimExist(15140)
trigger1 = (anim != [15111,15119]) && (anim != [15171,15179])
trigger2 = !SelfAnimExist(15140 + (anim % 10))
value = 15140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
triggerall = var(22) != 0
triggerall = Prevstateno != 6010
trigger1 = Time = 0
trigger1 = (anim = [15111,15119]) || (anim = [15171,15179])
trigger1 = SelfAnimExist(15140 + (anim % 10))
value = 15140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
triggerall = var(22) != 0
triggerall = Prevstateno != 6010
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [15140,15149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
triggerall = var(22) != 0
triggerall = Prevstateno != 6010
trigger1 = Time = 0
trigger1 = Anim != [15140,15159]
trigger1 = Anim != [15110,15119]
value = 15110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 8]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;-------------------------------------------------------------------------------
;Guard Crush KOFM
[Statedef 5255]
type    = S
movetype= H
physics = N
velset = 0,0

[State 1000, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 5255, EnvColor]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 1
under = 1
persistent = 0

[State 5255, VelSet]
type = VelSet
trigger1 = time = 0
x = -4.5

[State 5255, VelSet]
type = VelSet
trigger1 = time = 15
x = 0

[State 5255, ChangeAnim]
type = ChangeAnim
Trigger1 = Time = 0
trigger1 = SelfAnimExist(5255)
value = 5255

[State 5255, ChangeAnim2]
type = ChangeAnim2
Trigger1 = Time = 0
trigger1 = !SelfAnimExist(5255)
value = 5256

;Guard Crush Cartel
[State 5255, Critical Hits]
type = Explod
trigger1 = numexplod(4195) <= 0 && teamside = 1
ignorehitpause = 1
persistent = 0
anim = f4200
id = 4195
pos = 4,196
postype = left
bindtime = -1
ontop = 1
ownpal = 1

[State 5255, Critical Hits]
type = Explod
trigger1 = numexplod(4195) <= 0 && teamside = 2
ignorehitpause = 1
persistent = 0
anim = f4200
id = 4195
pos = -89,196
postype = right
bindtime = -1
ontop = 1
ownpal = 1

[State 5255]
type = SelfState
trigger1 = Animtime = 0
value = 0
ctrl = 1



[StateDef 4130]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4130
poweradd = 0
sprpriority = 9999



[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0


[StateDef 4135]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4135
poweradd = 0
sprpriority = 9999



[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0


[StateDef 4140]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4140
poweradd = 0
sprpriority = 9999



[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

[StateDef 19300]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 193
poweradd = 0
sprpriority = 9999


[State 1007]
type = BindToRoot
trigger1 = 1
pos = 10,0
ignorehitpause = 1


[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0


[StateDef 100500]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1005
poweradd = 0
sprpriority = 9999

[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

[StateDef 32300]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3230
poweradd = 0
sprpriority = 9999

[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

[StateDef 4145]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4145
poweradd = 0
sprpriority = 9999



[State 1000, AfterImage]
type = AfterImage
trigger1 = time = 0
trans = add
PalMul = 0.9,0.9,0.9
PalBright = 10,-100,-120
paladd = 10,0,-50
time = -1
length  = 13
TimeGap = 1
FrameGap = 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0



[Statedef 4820]
type = A
movetype = H
physics = N

[State 2000, 15]
type = EnvColor
trigger1 = time = 0
time = 1
value = 255,255,255
under = 1
ignorehitpause = 1

[State 123, 4]
type = Explod
trigger1 = time = 0 && var(13) = 2 && var(11) = 0
trigger1 = NumExplod(2000) = 0
id = 2000
anim = F2000
pos = 32,207
postype = Left
ontop = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 123, 4]
type = Explod
trigger1 = time = 0 && var(13) = 1 && var(11) = 0
trigger1 = NumExplod(2000) = 0
id = 2000
anim = F2000
pos = 214,207
postype = Left
ontop = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 8140, 1]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 8145, 2]
type = ChangeAnim
Trigger1 = Time >= 0
value = 5012

[State 8140, 4]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 4071


[Statedef 4070]
type = A
movetype = H
physics = N

[State 8140, 1]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 8145, 2]
type = ChangeAnim
Trigger1 = Time >= 0
value = 5012

[State 8140, 4]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 4071

;---------------------------
[Statedef 4071]
type = A
movetype = H
physics = N
velset = -2,-6.5

[State 8145, 1]
type = Velset
trigger1 = p2dist X >= 0
trigger1 = Time = 0
x = -2
y = -9

[State 8145, 1]
type = Velset
trigger1 = p2dist X < 0
trigger1 = Time = 0
x = 2
y = -9

[State 1500, 2]
type = PosAdd
trigger1 = Time = 2
y = -30

[State 1281, 1]
type = VelAdd
trigger1 = Time < 2
y = .9

[State 1281, 1]
type = VelAdd
trigger1 = Time > 5
y = .4

[State 1281, 1]
type = VelAdd
trigger1 = Time > 35
y = .5

[State 1280, 2]
type = ChangeAnim
Trigger1 = Time = 1
value = 5015

[State 1280, 2]
type = ChangeAnim
Trigger1 = Time = 4
value = 5030

[State 8145, 2]
type = ChangeAnim
trigger1 = AnimExist(5061)
trigger1 = Time = 15
value = 5061

[State 8145, 2]
type = ChangeAnim
trigger1 = !AnimExist(5061)
trigger1 = Time = 15
value = 5050

[State 2160, 33]
type = Explod
trigger1 = Vel Y > 0 && Pos Y >= 0
anim = F61
sprpriority = -2
postype = p1
pos = 0,0
bindtime = 1

[State 8145, 4]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5100


[Statedef 4065]
type = A
movetype = H
physics = N

[State 8140, 1]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 8145, 2]
type = ChangeAnim
Trigger1 = Time >= 0
value = 5012

[State 8140, 4]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 4066

;---------------------------
[Statedef 4066]
type = A
movetype = H
physics = N
velset = -2,-6.5

[State 8145, 1]
type = Velset
trigger1 = p2dist X >= 0
trigger1 = Time = 0
x = -2
y = -9

[State 8145, 1]
type = Velset
trigger1 = p2dist X < 0
trigger1 = Time = 0
x = 2
y = -9

[State 1500, 2]
type = PosAdd
trigger1 = Time = 2
y = -30

[State 1281, 1]
type = VelAdd
trigger1 = Time < 2
y = .9

[State 1281, 1]
type = VelAdd
trigger1 = Time > 5
y = .4

[State 1281, 1]
type = VelAdd
trigger1 = Time > 35
y = .5

[State 800, 1]
type = HitBy
trigger1 = time >= 30
value = SCA, ST
time = 1

[State 1280, 2]
type = ChangeAnim
Trigger1 = Time = 1
value = 5015

[State 1280, 2]
type = ChangeAnim
Trigger1 = Time = 4
value = 5030

[State 8145, 2]
type = ChangeAnim
trigger1 = AnimExist(5061)
trigger1 = Time = 15
value = 5061

[State 8145, 2]
type = ChangeAnim
trigger1 = !AnimExist(5061)
trigger1 = Time = 15
value = 5050

[State 2160, 33]
type = Explod
trigger1 = Vel Y > 0 && Pos Y >= 0
anim = F61
sprpriority = -2
postype = p1
pos = 0,0
bindtime = 1

[State 8145, 4]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5100