; 基本ステート
;---------------------------------------------------------------------------
; 立ちモーション
[Statedef 0]
type=U
Physics=N
movetype=U
sprpriority=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=Selfstate
trigger1=Numenemy&&Name!="HD"&&(enemy,name="HD"||p4name="HD")
trigger1=enemy(enemy,name!="HD"&&numenemy>0),sysvar(0)=0
trigger2=Name="HD"&&Numexplod(9600)=0&&Prevstateno!=0
value=0
ctrl=1
Persistent=256
Ignorehitpause=1
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
value=ifelse(!Ishelper,26480+3*(Hitpausetime>0),IFelse(Name="HD",5900,500000000))
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=ChangeAnim
triggerall=name="HD"
trigger1=Anim !=var(1) && Anim !=5
trigger2=Anim=5 && AnimTime=0 ;Turn anim over
value=0+(var(1))
[State ]
type=VelSet
trigger1=1
y=0
[State ]
type=VelSet
trigger1=abs(vel x)<2
x=0
[State ]
type=VelMul
trigger1=1
x=.75
[State ]
type = Selfstate
trigger1 = !Alive&&!Ishelper&&Name="HD"
value=var(9):=5050+(var(8):=0)
Ignorehitpause=1
[State ]
type=destroyself
trigger1=ishelper
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; 
[Statedef 10]
type=U
Physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=C
movetype=I
[State ]
type=changeanim
trigger1=anim!=10
value=10
[State ]
type=VelMul
trigger1=1
x=.75
[State ]
type=ChangeState
trigger1=AnimTime=0
value=var(9):=11+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type=U
Physics=N
movetype=U
anim=11
sprpriority=0
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=C
movetype=I
[State ] ;Change from turning animation
type=ChangeAnim
trigger1=Anim=6 && AnimTime=0
value=11
[State ]
type=ctrlset
trigger1=1
value=0
[State ]
type=ChangeState
trigger1=Command!="holddown"&&!var(59)
trigger2=Roundstate>2
value=var(9):=12+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type=U
Physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=C
movetype=I
[State ]
type=changeanim
trigger1=anim!=12
value=12
[State ]
type=ChangeState
trigger1=AnimTime=0
value=var(9):=0+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; 歩き
[Statedef 20]
type=U
Physics=N
movetype=U
sprpriority=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=VelSet
trigger1=command="holdfwd"
x=const(velocity.walk.fwd.x)
[State ]
type=VelSet
trigger1=command="holdback"
x=const(velocity.walk.back.x)
[State ]
type=ChangeAnim
triggerall=vel x>0
trigger1=Anim !=20 && Anim !=5
trigger2=Anim=5 && AnimTime=0
value=20
[State ]
type=ChangeAnim
triggerall=vel x<0
trigger1=Anim !=21 && Anim !=5
trigger2=Anim=5 && AnimTime=0
value=21
[State ]
type=ChangeState
trigger1=!(Command="holdback"^^Command="holdfwd")
value=var(9):=0+(var(8):=0)
ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; 歩き AI
[Statedef 21]
type=U
Physics=N
movetype=U
sprpriority=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=turn
trigger1=p2dist x<-5
[State ]
type=VelSet
trigger1=1
x=const(velocity.walk.fwd.x)
[State ]
type=ChangeAnim
triggerall=vel x>0
trigger1=Anim !=20 && Anim !=5
trigger2=Anim=5 && AnimTime=0
value=20
[State ]
type=Ctrlset
trigger1=1
value=0
Ignorehitpause=1
[State ]
type=ChangeState
trigger1=p2bodydist X<5
trigger2=RoundState!=2
trigger3=var(59) < 4
trigger3=Enemynear,Movetype=H && Random<Random%70
value=var(9):=0+(var(8):=0)
ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; 歩き AI
[Statedef 22]
type=U
Physics=N
movetype=U
sprpriority=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=VelSet
trigger1=1
x=const(velocity.walk.back.x)
[State ]
type=turn
trigger1=p2dist x<-5
[State ]
type=ChangeAnim
trigger1=Anim !=21 && Anim !=5
trigger2=Anim=5 && AnimTime=0
value=21
[State ]
type=Ctrlset
trigger1=1
value=0
Ignorehitpause=1
[State ]
type=ChangeState
trigger1=p2bodydist X>180 && enemynear,Movetype!=H
trigger2=RoundState!=2
trigger3=var(59) < 4
trigger3=Enemynear,Movetype=H && Random<Random%70
value=var(9):=0+(var(8):=0)
ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; ジャンプ開始
[Statedef 40]
type=U
Physics=N
sprpriority=1
movetype=U
ctrl=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=Nothitby
trigger1=Animtime
value=,AT
[State ]
type=changeanim
trigger1=anim!=[38,40]
value=39+(command="holdfwd")-(command="holdback")
[State ]
type=changeanim
trigger1=command="holdfwd"^^command="holdback"
trigger1=animtime && var(59) < 4
value=39+(command="holdfwd")-(command="holdback")
elem=animelemno(0)
[State ]
type=VelSet
trigger1=AnimTime=0
x=ifelse(anim=39, const(velocity.jump.neu.x), ifelse(anim=40, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y=const(velocity.jump.y)
[State ];大or中ジャンプ
type=velset
trigger1=animtime=0&&!sysvar(0)
trigger1=var(15)>=1
x=Vel X*1.2
[State ];大ジャンプ
type=veladd
trigger1=animtime=0&&!sysvar(0)
trigger1=var(15)>=1
y=-1
[State ];中or小ジャンプ
type=veladd
trigger1=animtime=0&&!sysvar(0)
trigger1=var(16)=1
y=2.5
[State ];ジャンプ音
type=PlaySnd
triggerall=animtime=0
trigger1=var(15)<=0 || sysvar(0)
value=40, 1
[State ];ジャンプ音
type=PlaySnd
triggerall=animtime=0&&!sysvar(0)
trigger1=var(15)>=1
value=40, 2
[State ]
type=Explod
trigger1=!AnimTime
anim=7030
sprpriority=-6
pos=0, 0
ownpal=1
[State ]
type=ChangeState
trigger1=Animtime=0
value=var(9):=50+(var(8):=0)
ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; AirJump Start
[Statedef 45]
type=U
physics=N
movetype=U
ctrl=0
velset=0,0
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Changestate
trigger1=1
value=0
ctrl=1
persistent=256
Ignorehitpause=1
;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type=U
Physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=A
movetype=I
physics=A
[State ]
type=Statetypeset
trigger1=sysvar(0)
physics=n
[State ]
type=ChangeAnim
trigger1=Anim!=[41,46]
value=ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
[State ]
type=ChangeAnim
trigger1=Vel y>-2
trigger1=SelfAnimExist(anim + 3)
persistent=0
value=Anim + 3
[State ]
type=ChangeState
trigger1=Pos Y>0&&Vel Y>0
value=var(9):=52+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=vel y+const(movement.yaccel)||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type=U
Physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=A
movetype=I
physics=A
[State ]
type=Statetypeset
trigger1=sysvar(0)
physics=n
[State ]
type=ChangeState
trigger1=Pos Y>0&&Vel Y>0
value=var(9):=52+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=vel y+const(movement.yaccel)||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type=U
Physics=N
movetype=U
ctrl=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=changeanim
trigger1=anim!=47
value=47
[State ]
type=Turn
trigger1= AnimElem=1||!AnimTime
trigger1=p2dist x<-5
[State ]
type=velmul
trigger1=!sysvar(0)
x=0.8
[State ]
type=VelMul
trigger1=1
x=.75
[State ]
type=PlaySnd
trigger1=AnimElem=1
value=52,0
[State ]
type=VelSet
trigger1=AnimElem=1
y=0
[State ]
type=PosSet
trigger1=AnimElem=1
y=0
[State ]
type=CtrlSet
trigger1=1
value=1
[State ]
type=Explod
trigger1=AnimElem=1
anim=7030
sprpriority=-6
pos=0, 0
ownpal=1
[State ]
type=assertspecial
trigger1=1
flag=noautoturn
ignorehitpause=1
[State ]
type=offset
trigger1=AnimElem=1&&AnimTime
x=0
y=0
[State ]
type=ChangeState
trigger1=AnimTime=-1
trigger2=var(59) &&AnimElemTime(1)=3
value=var(9):=0+(var(8):=0)
ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; ダッシュ
[Statedef 100]
type=U
Physics=N
movetype=U
sprpriority=1
ctrl=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=changeanim
trigger1=anim!=100
value=100
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=PlaySnd
trigger1=1
value=100, 0
loop=1
channel=1
lowpriority=1
[State ]
type=VelSet
trigger1=1
x=const(velocity.run.fwd.x)
[State ]
type=Ctrlset
trigger1=1
value=0
[State ]
type=ChangeState
trigger1=command !="holdfwd" &&!var(59)
trigger2=var(59) < 4 && var(59)
trigger2=Random<Random%50
trigger3=p2bodydist X<-10 && var(59)
trigger4=Roundstate!=2
value=var(9):=101+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; ダッシュ停止
[Statedef 101]
type=U
Physics=N
movetype=U
sprpriority=1
ctrl=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
physics=S
[State ]
type=changeanim
trigger1=anim!=101
value=101
[State ]
type=Stopsnd
trigger1=AnimElem=1
channel=1
[State ]
type=Playsnd
trigger1=AnimElem=1 || AnimElemTime(1) = 2
value=52,0
freqmul=1.2
[State ]
type=VelSet
trigger1=AnimElem=1
x=const(velocity.run.fwd.x) * 0.7
[State ]
type=ChangeState
trigger1=!AnimTime
value=var(9):=0+(var(8):=0)
Ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x*0.85||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; バックステップ
[Statedef 105]
type=U
physics=N
movetype=U
ctrl=0
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=changeanim
trigger1=anim!=104
value=104
[State ]
type=Nothitby
trigger1=1
value=SCA
[State ]
type=Playsnd
trigger1=AnimElemTime(1)=2
value=105,0
[State ]
type=ChangeState
trigger1=AnimElemTime(1)=2
value=var(9):=106+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=0||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
; 空中
[Statedef 106]
type=U
physics=N
movetype=U
sprpriority=1
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=A
movetype=I
[State ]
type=changeanim
trigger1=anim!=105
value=105
[State ]
type=VelSet
trigger1=AnimElem=1
x=-9.5
y=-4.4
[State ]
type=veladd
trigger1=1
x=0.23
y=0.46
[State ]
type=Nothitby
trigger1=1
value=,AT
[State ]
type=ChangeState
trigger1=Vel Y>0
trigger1=Pos Y>0
value=var(9):=107+(var(8):=0)
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=vel x||fvar(1):=vel y||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
; 着地
[Statedef 107]
type=U
physics=N
movetype=U
ctrl=0
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=S
movetype=I
[State ]
type=changeanim
trigger1=anim!=106
value=106
[State ]
type=Ctrlset
trigger1=AnimElemTime(1)>=3
value=1
[State ]
type=Playsnd
trigger1=animelem=1
value=52 ,0
[State ]
type=VelSet
trigger1=1
x=0
y=0
[State ]
type=PosSet
trigger1=1
y=0
[State ]
type=Explod
trigger1=animelem=1
anim=7030
sprpriority=-6
pos=0, 0
ownpal=1
[State ]
type=ChangeState
trigger1=animtime=0
value=var(9):=0+(var(8):=0)
ctrl=1
[State ]
type=Null
trigger1=sysvar(0)
trigger1=fvar(0):=0||fvar(1):=0||1
ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=1
sysvar(3)=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
; 空中前ダッシュ
[Statedef 110]
type=U
physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=ChangeState
trigger1=1
value=0
ctrl=1
Persistent=256
ignorehitpause=1
;---------------------------------------------------------------------------
; 使用しないステート[空中後ろダッシュ]
[Statedef 115]
type=U
physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=ChangeState
trigger1=1
value=0
ctrl=1
Persistent=256
ignorehitpause=1
;---------------------------------------------------------------------------
; ガード開始
[Statedef 120]
type=U
physics=U
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=ChangeAnim
trigger1=Time=0 &&!Sysvar(0)
value=120 + (statetype=C) + (statetype=A)*2
[State ]
type=StateTypeSet
trigger1=Time=0 && statetype=S &&!Sysvar(0)
physics=S
[State ]
type=StateTypeSet
trigger1=Time=0 && statetype=C &&!Sysvar(0)
physics=C
[State ]
type=StateTypeSet
trigger1=Time=0 && statetype=A &&!Sysvar(0)
physics=A
[State ]
type=StateTypeSet
triggerall=Statetype=S&&!Sysvar(0)
trigger1=!var(59) && command="holddown"
trigger2=Var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=C
physics=C
[State ]
type=StateTypeSet
triggerall=Statetype=C&&!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=S
physics=S
[State ]
type=Assertspecial
trigger1=1
flag=nowalk
ignorehitpause=1
[State ]
type=Ctrlset
trigger1=1
value=0
[State ]
type=ChangeState
trigger1=AnimTime=0&&!Sysvar(0)
value=130 + (statetype=C) + (statetype=A)*2
[State ]
type=ChangeState
triggerall=!Sysvar(0)
trigger1=command !="holdback" && !var(59)
trigger2=!inguarddist &&(!Enemynear,Movetype=A||var(59)<8)
trigger3=var(59)
trigger3=P2BodyDist X<0&&var(59) < 7
trigger3=Random<=(10-var(59))*40
value=140
;---------------------------------------------------------------------------
; STAND GUARD (guarding)
[Statedef 130]
type=U
Physics=N
movetype=U
hitdefpersist=1*(name!="HD"||ishelper)
movehitpersist=1*(name!="HD"||ishelper)
hitcountpersist=1*(name!="HD"||ishelper)
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)&&Time
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=!Sysvar(0)&&!Ishelper
Statetype=S
movetype=I
[State ]
type=Assertspecial
trigger1=1
flag=nowalk
ignorehitpause=1
[State ]
type=Velset
trigger1=Time=0&&!sysvar(0)&&!Ishelper
x=0
y=0
[State ]
type=Ctrlset
trigger1=1
value=0
[State ]
type=ChangeAnim
trigger1=Anim !=130 &&!Sysvar(0)&&!Ishelper
value=130
ignorehitpause=1
[State ]
type=ChangeState
triggerall= !Sysvar(0)&&!Ishelper
trigger1=!var(59) && command="holddown"
trigger2=var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
value=131
[State ]
type=ChangeState
triggerall=!Sysvar(0)&&!Ishelper
trigger1=command !="holdback" && !var(59)
trigger2=!inguarddist &&(!Enemynear,Movetype=A||var(59)<8)
trigger3=var(59)
trigger3=P2BodyDist X<0&&var(59) < 7
trigger3=Random<=(10-var(59))*40
value=140
[State ]
type=Null
trigger1=Ishelper
trigger1=var(59):=(var(59)|1)
Ignorehitpause=1
;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type=U
Physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=!Sysvar(0)
Statetype=c
movetype=I
[State ]
type=Assertspecial
trigger1=1
flag=nowalk
ignorehitpause=1
[State ]
type=Velset
trigger1=Time=0&&!sysvar(0)
x=0
y=0
[State ]
type=Ctrlset
trigger1=1
value=0
[State ]
type=ChangeAnim
trigger1=Anim !=131 &&!Sysvar(0)
value=131
[State ]
type=ChangeState
triggerall=!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
value=130
[State ]
type=ChangeState
triggerall=!Sysvar(0)
trigger1=command !="holdback" && !var(59)
trigger2=!inguarddist &&(!Enemynear,Movetype=A||var(59)<8)
trigger3=var(59)
trigger3=P2BodyDist X<0&&var(59) < 7
trigger3=Random<=(10-var(59))*40
value=140
;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type=U
physics=N
movetype=U
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=!Sysvar(0)
Statetype=a
movetype=I
[State ]
type=Assertspecial
trigger1=1
flag=nowalk
ignorehitpause=1
[State ]
type=ChangeAnim
trigger1=Anim !=132&&!Sysvar(0)
value=132
[State ]
type=VelAdd
trigger1=!Sysvar(0)
y=Const(movement.yaccel)
[State ]
type=VelSet
trigger1=(pos y>=0) && (vel y>0)&&!Sysvar(0)
y=0
[State ]
type=PosSet
trigger1=(pos y>=0)&&!Sysvar(0)
y=0
[State ]
type=Ctrlset
trigger1=1
value=0
[State ]
type=ChangeState
trigger1=(pos y>=0)&&!Sysvar(0)
trigger1=command="holdback"
trigger1=inguarddist
value=130
[State ]
type=ChangeState
trigger1=(pos y>=0)&&!Sysvar(0)
value=52
[State ]
type=ChangeState
triggerall=!Sysvar(0)
trigger1=command !="holdback" && !var(59)
trigger2=!inguarddist
trigger3=var(59)
trigger3=P2BodyDist X<0&&var(59) < 7
trigger3=Random<=(10-var(59))*40
value=140
;---------------------------------------------------------------------------
; GUARD (end)
[Statedef 140]
type=U
physics=U
movetype=U
ctrl=1
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=ChangeAnim
trigger1=Time=0&&!Sysvar(0)
value=140 + (statetype=C) + (statetype=A)*2
ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=Time=0 && statetype=S&&!Sysvar(0)
physics=S
[State ]
type=StateTypeSet
trigger1=Time=0 && statetype=C&&!Sysvar(0)
physics=C
[State ]
type=StateTypeSet
trigger1=Time=0 && statetype=A&&!Sysvar(0)
physics=A
[State ]
type=StateTypeSet
triggerall=Statetype=S&&!Sysvar(0)
trigger1=!var(59) && command="holddown"
trigger2=Var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=C
physics=C
[State ]
type=StateTypeSet
triggerall=Statetype=C&&!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=S
physics=S
[State ] ;Implemented within engine
type=ChangeState
trigger1=(AnimTime=[-1,0])&&!Sysvar(0)
value=(statetype=C)*11 + (statetype=A)*51
;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=Time=0&&!Sysvar(0)
Statetype=S
physics=S
movetype=H
[State ]
type=ChangeAnim
trigger1=!Sysvar(0)
value=150
ignorehitpause=1
[State ]
type=Velset
trigger1=!Sysvar(0)
x=0
y=0
[State ]
type=ChangeState
trigger1=HitShakeOver&&!Sysvar(0)
value=151 + 2*ifelse((!var(59)),(command="holddown"),(fvar(38)=1))
[State ]
type=StateTypeSet
triggerall=Statetype=S&&!Sysvar(0)
trigger1=!var(59) && command="holddown"
trigger2=Var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=C
physics=C
[State ]
type=StateTypeSet
triggerall=Statetype=C&&!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=S
physics=S
;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type=U
movetype=U
Physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=Time=0&&!Sysvar(0)
Statetype=S
physics=S
movetype=H
[State ]
type=ChangeAnim
trigger1=!Sysvar(0)
value=150
ignorehitpause=1
[State ]
type=HitVelSet
trigger1=Time=0&&!Sysvar(0)
x=1
[State ]
type=VelSet
trigger1=Time=GetHitVar(slidetime)&&!Sysvar(0)
trigger2=HitOver
x=0
[State ]
type=CtrlSet
trigger1=Time=GetHitVar(ctrltime)&&!Sysvar(0)
value=1
[State ]
type=StateTypeSet
triggerall=Statetype=S&&!Sysvar(0)
trigger1=!var(59) && command="holddown"
trigger2=Var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=C
physics=C
[State ]
type=StateTypeSet
triggerall=Statetype=C&&!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=S
physics=S
[State ]
type=ChangeState
trigger1=HitOver&&!Sysvar(0)
value=130
ctrl=1
;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=Time=0&&!Sysvar(0)
Statetype=S
physics=C
movetype=H
[State ]
type=velset
trigger1=!Sysvar(0)
x=0
y=0
[State ]
type=ChangeAnim
trigger1=!Sysvar(0)
value=151
[State ]
type=ChangeState
trigger1=HitShakeOver&&!Sysvar(0)
value=151 + 2*ifelse(!var(59),(command="holddown"),(EnemyNear,StateType!=A))
[State ]
type=StateTypeSet
triggerall=Statetype=S&&!Sysvar(0)
trigger1=!var(59) && command="holddown"
trigger2=Var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=C
physics=C
[State ]
type=StateTypeSet
triggerall=Statetype=C&&!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=S
physics=S
;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type=U
movetype=U
Physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=Time=0&&!Sysvar(0)
Statetype=S
physics=C
[State ]
type=HitVelSet
trigger1=Time=0&&!Sysvar(0)
x=1
[State ]
type=VelSet
triggerall=!Sysvar(0)
trigger1=Time=GetHitVar(slidetime)
trigger2=HitOver
x=0
[State ]
type=CtrlSet
trigger1=Time=GetHitVar(ctrltime)&&!Sysvar(0)
value=1
[State ]
type=StateTypeSet
triggerall=Statetype=S&&!Sysvar(0)
trigger1=!var(59) && command="holddown"
trigger2=Var(59) && EnemyNear,StateType!=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=C
physics=C
[State ]
type=StateTypeSet
triggerall=Statetype=C&&!Sysvar(0)
trigger1=!var(59) && command !="holddown"
trigger2=Var(59) && EnemyNear,StateType=A
trigger2=Random<=var(59)*Random%30||var(59)>7
statetype=S
physics=S
[State ]
type=ChangeState
trigger1=HitOver&&!Sysvar(0)
value=131
ctrl=1
;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=!Sysvar(0)
Statetype=A
movetype=H
[State ]
type=ChangeAnim
trigger1=!Sysvar(0)
value=152
[State ]
type=Velset
trigger1=!Sysvar(0)
x=0
y=0
[State ]
type=ChangeState
trigger1=HitShakeOver&&!Sysvar(0)
value=155 ;AGUARDHIT2
;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=StateTypeSet
trigger1=!Sysvar(0)
Statetype=A
movetype=H
[State ]
type=Changeanim
trigger1=!Sysvar(0)
value=152
[State ]
type=HitVelSet
trigger1=Time=0&&!Sysvar(0)
x=1
y=1
[State ]
type=VelAdd
trigger1=!Sysvar(0)
y=Const(movement.yaccel)
[State ]
type=CtrlSet
trigger1=Time=GetHitVar(ctrltime)&&!Sysvar(0)
value=1
[State ]
type=PosSet
trigger1=(pos y>=0) && (vel y>0)&&!Sysvar(0)
y=0
[State ]
type=VelSet
trigger1=(pos y>=0) && (vel y>0)&&!Sysvar(0)
y=0
[State ]
type=ChangeState
trigger1=(pos y=0) && (vel y=0)&&!Sysvar(0)
trigger1=command="holdback"
trigger1=inguarddist
value=130
[State ]
type=ChangeState
trigger1=(pos y=0) && (vel y=0)&&!Sysvar(0)
value=52
;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type=U
physics=N
movetype=U
ctrl=0
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=ChangeState
trigger1=1
value=170
persistent=256
Ignorehitpause=1
;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type=U
movetype=U
physics=N
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=s
movetype=h
physics=s
[State ] ;Anim for HIT_LIGHT to HIT_HARD
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype) !=[3,5]
value=ifelse((GetHitVar(groundtype)=1),5000,5010) + GetHitVar(animtype)
[State ] ;Anim for HIT_BACK
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype)=[3,5]
value=5030
[State ] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type=ChangeAnim
trigger1=Time=0
trigger1=(GetHitVar(animtype)=[4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value=5047 + GetHitVar(animtype) ;5051 - 4 + type
[State ] ;Freeze anim
type=ChangeAnim
trigger1=Time>0
value=anim
[State ] ;State typegets set to aerial if getting hit up
type=StateTypeSet
trigger1=Time=0
trigger1=GetHitVar(yvel) !=0 || GetHitVar(fall)
trigger2=Pos Y !=0
statetype=a
[State ]
type=ChangeState
trigger1=HitShakeOver
trigger1=GetHitVar(yvel)=0 && !GetHitVar(fall)
value=5001 ;HITG_SLIDE
[State ]
type=ChangeState
trigger1=HitShakeOver
value=5030
[State ]
type=ForceFeedback
trigger1=anim=5000
trigger2=anim=5010
persistent=0
time=6
waveform=square
[State ]
type=ForceFeedback
trigger1=anim=5001
trigger2=anim=5011
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3
[State ]
type=ForceFeedback
trigger1=anim=5012
trigger2=anim=5002
trigger3=anim=5030
persistent=0
time=15
waveform=sinesquare
ampl=140
;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]
type=U
movetype=U
Physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=s
movetype=h
physics=s
[State ]
type=HitVelSet
trigger1=Time=0
x=1
[State ]
type=ChangeAnim
trigger1=AnimTime=0
value=5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10
[State ] ;Stop sliding back
type=VelMul
trigger1=Time>=GetHitVar(slidetime)
x=.6
[State ]
type=VelSet
trigger1=HitOver
x=0
[State ]
type=DefenceMulSet
trigger1=HitOver
value=1
[State ]
type=ChangeState
trigger1=HitOver
value=0
ctrl=1
;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type=U
movetype=U
physics=N
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=c
movetype=h
physics=c
[State ] ;Anim for HIT_LIGHT to HIT_HARD
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype) !=[3,5]
value=5020 + GetHitVar(animtype)
[State ] ;Anim for HIT_BACK
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype)=[3,5]
value=5030
[State ] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type=ChangeAnim
trigger1=Time=0
trigger1=(GetHitVar(animtype)=[4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value=5047 + GetHitVar(animtype) ;5051 - 4 + type
[State ] ;Freeze anim
type=ChangeAnim
trigger1=Time>0
value=anim
[State ] ;State typegets set to aerial if getting hit up
type=StateTypeSet
triggerall=Time=0
trigger1=GetHitVar(yvel) !=0 || GetHitVar(fall)
trigger2=Pos Y !=0
statetype=a
[State ]
type=ChangeState
trigger1=HitShakeOver
trigger1=GetHitVar(yvel)=0 && !GetHitVar(fall)
value=5011 ;HITC_SLIDE
[State ]
type=ChangeState
trigger1=HitShakeOver
value=5030
[State ]
type=ForceFeedback
trigger1=anim=5020
persistent=0
time=6
waveform=square
[State ]
type=ForceFeedback
trigger1=anim=5021
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3
[State ]
type=ForceFeedback
trigger1=anim=5022
persistent=0
time=15
waveform=sinesquare
ampl=140
;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type=U
movetype=U
Physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=c
movetype=h
physics=c
[State ]
type=Statetypeset
trigger1=1
Statetype=s
movetype=h
[State ]
type=HitVelSet
trigger1=Time=0
x=1
[State ]
type=ChangeAnim
trigger1=AnimTime=0
value=5025 + GetHitVar(animtype)
[State ] ;Stop sliding back
type=VelMul
trigger1=Time>=GetHitVar(slidetime)
x=.6
[State ]
type=VelSet
trigger1=HitOver
x=0
[State ]
type=DefenceMulSet
trigger1=HitOver
value=1
[State ]
type=ChangeState
trigger1=HitOver
value=11
ctrl=1
;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type=U
movetype=U
physics=N
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ] ;Anim for HIT_LIGHT to HIT_HARD
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype) !=[3,5]
value=ifelse((GetHitVar(airtype)=1),5000,5010) + GetHitVar(animtype)
[State ] ;Anim for HIT_BACK
type=ChangeAnim
trigger1=Time=0
trigger1=GetHitVar(animtype)=[3,5]
value=5030
[State ] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type=ChangeAnim
trigger1=Time=0
trigger1=(GetHitVar(animtype)=[4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value=5047 + GetHitVar(animtype) ;5051 - 4 + type
[State ] ;Freeze anim
type=ChangeAnim
trigger1=Time>0
value=anim
[State ]
type=ChangeState
trigger1=HitShakeOver
value=5030
[State ]
type=ForceFeedback
trigger1=anim=5000
trigger2=anim=5010
persistent=0
time=6
waveform=square
[State ]
type=ForceFeedback
trigger1=anim=5001
trigger2=anim=5011
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3
[State ]
type=ForceFeedback
trigger1=anim=5012
trigger2=anim=5002
trigger3=anim=5030
trigger4=anim=[5051,5059]
persistent=0
time=15
waveform=sinesquare
ampl=140
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type=U
movetype=U
physics=N
ctrl=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ]
type=VelAdd;Gravity
trigger1=1
y=GetHitVar(yaccel)
[State ]
type=HitVelSet
trigger1=Time=0
x=1
y=1
[State ]
type=ChangeState
triggerall=!HitFall
trigger1=HitOver
trigger2=Vel Y>0    ;Hit ground
trigger2=Pos Y>=10  ;.
value=5040 ;HITA_RECOV
[State ]
type=ChangeState
triggerall=HitFall
trigger1=HitOver
trigger2=Vel Y>0    ;Hit ground
trigger2=Pos Y>=10  ;.
value=5050 ;HITA_FALL
[State ]
type=ChangeState
trigger1=AnimTime=0
value=5035 ;HITA_UP (transition)
;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ]
type=ChangeAnim
trigger1=Time=0
trigger1=SelfAnimExist(5035)
trigger1=Anim !=[5051,5059] ;Not if in hit up anim
trigger1=Anim !=5090 ;Not if hit off ground anim
value=5035
[State ]
type=VelAdd
trigger1=1
y=GetHitVar(yaccel)
[State ]
type=ChangeState
triggerall=!HitFall
trigger1=HitOver  ;Hit is over
trigger2=AnimTime=0 ;Animation over
trigger3=Vel Y>0    ;Hit ground
trigger3=Pos Y>=10  ;.
trigger4=Time=0     ;No transition anim
trigger4=Anim !=5035 ;.
value=5040 ;HITA_RECOV
[State ]
type=ChangeState
triggerall=HitFall
trigger1=HitOver  ;Hit is over
trigger2=AnimTime=0 ;Anim is over
trigger3=Vel Y>0    ;Hit ground
trigger3=Pos Y>=10  ;.
trigger4=Time=0     ;No transition anim
trigger4=Anim !=5035 ;.
value=5050 ;HITA_FALL
;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ]
type=ChangeState
trigger1=!Alive
value=5050
[State ]
type=ChangeAnim
trigger1=AnimTime=0
trigger1=Anim !=5040
trigger2=Time=0
trigger2=Anim !=5035
value=5040
[State ]
type=CtrlSet
trigger1=HitOver
value=1
[State ]
type=StateTypeSet
trigger1=HitOver
movetype=I
[State ]
type=VelAdd
trigger1=1
y=GetHitVar(yaccel)
[State ]
type=ChangeState
trigger1=Vel Y>0
trigger1=Pos Y>=0
value=52 ;JUMPLAND
;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ] ;Change anim when done with transition
type=ChangeAnim
triggerall=anim !=5055
trigger1=AnimTime=0
trigger1=Anim=5035
trigger2=Time=0     ;If no transition anim
trigger2=Anim !=5035
trigger2=(Anim !=[5051, 5059]) && (Anim !=[5061, 5069])
trigger2=Anim !=5090 ;Not if hit off ground anim
value=5050
[State ] ;Coming down anim
type=ChangeAnim
triggerall=anim!=5055
trigger1=anim=[5050,5059]
trigger1=Vel Y>=ifelse(anim=5050, 1, -2)
trigger1=SelfAnimExist(anim+10)
value=anim+10
persistent=0
[State ] ;Gravity
type=VelAdd
trigger1=1
y=GetHitVar(yaccel)
[State ] ;Recover near ground
type=SelfState
triggerall=Vel Y>0
triggerall=Pos Y>=-20
triggerall=alive
triggerall=CanRecover
triggerall=anim!=5055
trigger1=!var(59) && command="recovery"
trigger2=var(59) && Random<=var(59)*100
value=5200
ctrl=0
[State ]; Recover in mid air
type=ChangeState
triggerall=Vel Y>-1
triggerall=alive
triggerall=CanRecover
triggerall=anim!=5055
trigger1=!var(59) && command="recovery"
trigger2=var(59) && Random<=var(59)*100
value=5210 ;HITFALL_AIRRECOVER
[State ]
type=ChangeState
triggerall=anim!=5055
trigger1=Vel Y>0
trigger1=Pos Y>=ifelse((anim=[5051,5059]) || (anim=[5061,5069]), 0, 25)
value=5100 ;HIT_BOUNCE
;---------------------------------------------------------------------------
; HIT_TRIP (shaking)
[Statedef 5070]
type=U
movetype=U
physics=N
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ]
type=ChangeAnim 
trigger1=1
value=5070
[State ]
type=ChangeState
trigger1=HitShakeOver
value=5071
[State ]
type=ForceFeedback
trigger1=time=0
time=12
waveform=sinesquare
ampl=140
;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ]
type=HitVelSet
trigger1=Time=0
x=1
y=1
[State ] ;Acceleration
type=VelAdd
trigger1=1
y=GetHitVar(yaccel)
[State ] ;Hit ground
trigger1=Vel Y>0
trigger1=Pos Y>=15
type=ChangeState
value=5110
;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type=U
movetype=U
physics=N
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=l
movetype=h
[State ] ;Set default anim
type=Changeanim
trigger1=time=0
value=ifelse (GetHitVar(yvel)=0, 5080, 5090)
[State ]
type=ChangeState
trigger1=HitShakeOver
trigger1=GetHitVar(yvel)=0
value=5081 ;HITL_SLIDE
[State ]
type=ChangeState
trigger1=HitShakeOver
trigger1=GetHitVar(yvel) !=0
value=5030 ;HITA_UP
;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]
type=U
movetype=U
Physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=l
movetype=h
[State ]
type=HitVelSet
trigger1=Time=0
x=1
[State ]
type=VelSet
trigger1=HitOver
x=0
[State ]
type=ChangeState
trigger1=HitOver
value=5110 ;HIT_LIEDOWN
;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=l
movetype=h
[State ]
type=VelSet
trigger1=Time=0
trigger1=GetHitVar(fall.yvel)=0
trigger1=vel x>1
x=1
[State ]
type=FallEnvShake
trigger1=Time=0
[State ] ;Hit ground anim (normal)
type=ChangeAnim
triggerall=time=0
trigger1=(anim !=[5051,5059]) && (anim !=[5061,5069])
trigger2=!SelfAnimExist(5100 + (anim % 10))
value=5100
[State ] ;Hit ground anim (for hit up)
type=ChangeAnim
trigger1=time=0
trigger1=(anim=[5051,5059]) || (anim=[5061,5069])
trigger1=SelfAnimExist(5100 + (anim % 10))
value=5100 + (anim % 10)
[State ]
type=Explod
trigger1=Time=0
trigger1=Prevstateno !=5081
trigger1=GetHitVar(fall.yvel) !=0
anim=7030 + (vel y>10)
sprpriority=-6
pos=0, 0
[State ]
type=Explod
trigger1=Time=0
trigger1=Prevstateno !=5081
trigger1=GetHitVar(fall.yvel) !=0
trigger1=vel y>10
anim=7032
pos=0, 0
sprpriority=6
[State ]
type=PlaySnd
trigger1=Time=0
trigger1=Prevstateno !=5081
trigger1=GetHitVar(fall.yvel) !=0
value=F7, (vel y>5) + (vel y>10)
[State ]
type=PosSet
trigger1=Time=0
y=0
[State ]
type=VelSet
trigger1=Time=0
y=0
[State ] ;Reduce speed
type=VelMul
trigger1=Time=0
x=0.75
[State ]
type=ChangeState
trigger1=Time=0
trigger1=GetHitVar(fall.yvel)=0
value=5110 ;HIT_LIEDOWN
[State ]
type=HitFallDamage
triggerall=name!="HD"||name="HD"&&!sysvar(0)
trigger1=Time=3
[State ]
type=PosFreeze
trigger1=1
[State ]
type=ChangeState
trigger1=AnimTime=0
value=5101
[State ]
type=ForceFeedback
trigger1=Time=0
waveform=sinesquare
ampl=128,-3,-.2,.005
time=20
;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=l
movetype=h
[State ] ;Coming hit ground anim (normal)
type=ChangeAnim
triggerall=time=0
trigger1=anim !=[5101,5109]
trigger2=!SelfAnimExist(5160 + (anim % 10))
value=5160
[State ] ;Coming hit ground anim (for hit up)
type=ChangeAnim
triggerall=time=0
trigger1=anim=[5101,5109]
trigger1=SelfAnimExist(5160 + (anim % 10))
value=5160 + (anim % 10)
[State ]
type=HitFallVel
trigger1=Time=0
[State ]
type=PosSet
trigger1=Time=0
y=20
[State ] ;Acceleration
type=VelAdd
trigger1=1
y=.4
[State ] ;Acceleration
type=VelSet
trigger1=time=5
trigger1=var(1)=2
trigger1=alive=0
y=4
[State ] ;Hit ground
trigger1=Vel Y>0
trigger1=Pos Y>=12
type=ChangeState
value=5110
;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=l
movetype=h
[State ]
type=FallEnvShake
trigger1=Time=0
[State ] ;For hit up/up-diag type(from state 5081)
type=ChangeAnim
persistent=0
trigger1=SelfAnimExist(5110 + (anim % 10))
trigger1=anim=[5081,5089]
value=5110 + (anim % 10)
[State ] ;Hit ground anim (normal)
type=ChangeAnim
triggerall=time=0
triggerall=anim !=[5110,5119] ;Not already changed anim
trigger1=anim !=[5161,5169]
trigger2=!SelfAnimExist(5170 + (anim % 10))
value=5170
[State ] ;Hit ground anim (for hit up)
type=ChangeAnim
triggerall=time=0
triggerall=anim !=[5110,5119] ;Not already changed anim
trigger1=anim=[5161,5169]
trigger1=SelfAnimExist(5170 + (anim % 10))
value=5170 + (anim % 10)
[State ]
type=HitFallDamage
triggerall=name!="HD"||name="HD"&&!sysvar(0)
trigger1=Time=0
[State ]
type=PosSet
trigger1=Time=0
y=0
[State ]
type=PlaySnd
trigger1=Time=0
trigger1=Prevstateno !=5081
trigger1=GetHitVar(fall.yvel) !=0
value=F7, (vel y>5) + (vel y>10)
[State ]
type=Explod
trigger1=Time=0
trigger1=Prevstateno !=5081
trigger1=GetHitVar(fall.yvel) !=0
anim=7030 + (vel y>10)
sprpriority=-6
pos=0, 0
[State ]
type=Explod
trigger1=Time=0
trigger1=Prevstateno !=5081
trigger1=GetHitVar(fall.yvel) !=0
trigger1=vel y>10
anim=7032
pos=0, 0
sprpriority=6
[State ]
type=VelSet
trigger1=Time=0
y=0
[State ] ;For hit up type
type=ChangeAnim
persistent=0
triggerall=anim=[5171,5179]
triggerall=SelfAnimExist(5110 + (anim % 10))
trigger1=AnimTime=0
trigger2=Prevstateno !=5081
value=5110 + (anim % 10)
[State ] ;For normal
type=ChangeAnim
persistent=0
triggerall=Anim !=[5111,5119]
trigger1=AnimTime=0
trigger2=Prevstateno !=5081
value=5110
[State ] ;If just died
type=changeState
triggerall=!alive
trigger1=AnimTime=0
trigger2=Prevstateno !=5081
trigger3=Anim=[5110,5119]
value=5150
[State ] ;Friction
type=VelMul
trigger1=1
x=0.85
[State ]
type=ForceFeedback
trigger1=alive
trigger1=Time=0
time=8
ampl=240
waveform=sine
[State ]
type=ForceFeedback
trigger1=!alive
trigger1=Time=0
ampl=200, 7, -.467
time=30
waveform=sine
;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5900)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=L
movetype=I
[State ] ;Get up anim (normal)
type=ChangeAnim
triggerall=time=0
trigger1=anim !=[5111,5119]
trigger2=!SelfAnimExist(5120 + (anim % 10))
value=5120
[State ] ;Get up anim (for hit up/diag-up)
type=ChangeAnim
triggerall=time=0
trigger1=anim=[5111,5119]
trigger1=SelfAnimExist(5120 + (anim % 10))
value=5120 + (anim % 10)
[State ]
type=VelSet
trigger1=Time=0
x=0
[State ]
type=NotHitBy
trigger1=time<23
value=SCA
time=1
[State ]
type=HitFallSet
trigger1=AnimTime=0
value=1
[State ]
type=Playsnd
trigger1=Time=2
value=5120,Random%2
volume=255
[State ]
type=NotHitBy
trigger1=time>=23
value2=SCA
time=4
[State ]
type=selfState
trigger1=AnimTime=0
value=0
ctrl=1
;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type=U
movetype=U
physics=U
hitdefpersist=1
movehitpersist=1
hitcountpersist=1
[State ]
type=changestate
trigger1=Name!="HD"&&!Ishelper&&Alive
trigger2=Name!="HD"&&Ishelper
value=0+500000000*Ishelper
Persistent=256
Ignorehitpause=1
[State ]
type=changestate
trigger1=Name="HD"&&Ishelper
trigger1=Root,sysvar(0)&&Time
value=5900
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=name !="HD"
trigger2=name="HD"&&!Ishelper
statetype=L
movetype=H
physics=N
ignorehitpause=1
[State ]
type=Sprpriority
trigger1=!ishelper
value=-5
ignorehitpause=1
[State ]
type=ChangeAnim
triggerall=name !="HD" || name="HD"&&!Ishelper
triggerall=Time=0
triggerall=SelfAnimExist(5140)
trigger1=(anim !=[5111,5119]) && (anim !=[5171,5179])
trigger2=!SelfAnimExist(5140 + (anim % 10))
value=5140
[State ]
type=ChangeAnim
triggerall=name !="HD" || name="HD"&&!Ishelper
trigger1=Time=0
trigger1=Anim !=[5140,5159]
value=5110
[State ]
type=VelMul
trigger1=alive && !ishelper
x=0.85
[State ]
type=VelSet
trigger1=Vel x<.05 && alive && !ishelper
persistent=0
x=0
[State ]
type=HitBy
trigger1=Name="HD"&& !Ishelper
value=
time=1
[State ]
type=posset
trigger1=Name !="HD"|| !Ishelper
trigger1=!alive
y=0
[State ]
type=velset
trigger1=Name !="HD"|| !Ishelper
trigger1=!alive
x=0
y=0
[State ]
type=displaytoclipboard
trigger1=1
text="%d,%d"
params=prevstateno,playeridexist(id)
;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]
type=U
movetype=U
physics=N
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5150)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ] ;Change anim if done with transition
type=ChangeAnim
trigger1=Anim=5035
trigger1=AnimTime=0
value=5050
[State ]
type=VelAdd
trigger1=1
y=GetHitVar(yaccel)
[State ]
type=SelfState
trigger1=Vel Y>0
trigger1=Pos Y>=10
value=5201
;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type=U
movetype=U
Physics=N
anim=5200
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5150)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=h
[State ] ;Turn if not facing opponent
type=Turn
trigger1=Time=0
trigger1=p2dist X<-5
[State ]
type=VelSet
trigger1=Time=0
x=-.15
y=-3.5
[State ]
type=PosSet
trigger1=Time=0
y=0
[State ]
type=Playsnd
trigger1=Time=2
value=5120,Random%2
volume=255
[State ]
type=NotHitBy
trigger1=1
value=SCA
time=1
[State ] ;Blink white
type=PalFX
trigger1=Time=0
time=3
add=128,128,128 ;256,256,256
[State ]
type=GameMakeAnim
trigger1=Time=1
value=60
pos=0, 0
under=1
;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type=U
movetype=U
physics=N
anim=5210
ctrl=0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5150)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=a
movetype=I
[State ] ;Blink white
type=PalFX
trigger1=Time=0
time=3
add=128,128,128 ;256,256,256
[State ]
type=PosFreeze
trigger1=Time=0
value=4
[State ] ;Turn if not facing opponent
type=Turn
trigger1=Time=0
trigger1=p2dist X<-20
[State ]
type=Playsnd
trigger1=Time=2
value=5120,Random%2
volume=255
[State ] 
type=VelMul
trigger1=Time=4
x=.8
y=.8
[State ]
type=VelAdd
trigger1=Time=4
y=-4.5
[State ] 
type=VelMul
trigger1=Time=4
trigger1=Vel Y>0
y=.5
[State ]
type=VelAdd
trigger1=Time=4
trigger1=Vel Y>-3
y=-2
[State ]
type=VelAdd
trigger1=Time=4
trigger1=Vel Y>-2
y=-1
[State ] ;Go up
type=VelAdd
trigger1=Time=4
trigger1=Command="holdup"
y=-2
[State ] ;Go down
type=VelAdd
trigger1=Time=4
trigger1=Command="holddown"
y=1.5
[State ] ;Go fwd
type=VelMul
trigger1=Time=4
trigger1=Command="holdfwd"
x=1
[State ] ;Go back
type=VelAdd
trigger1=Time=4
trigger1=Command="holdback"
x=-1
[State ]
type=NotHitBy
trigger1=Time=0
value=SCA
time=15
[State ]
type=CtrlSet
trigger1=Time=20
value=1
[State ]
type=VelAdd;Gravity
trigger1=Time>=4
y=.35
[State ] ;Land on ground
type=ChangeState
trigger1=Vel Y>0
trigger1=Pos Y>=0
value=52 ;JUMP_LAND
ctrl=1
[State ]
type=destroyself
trigger1=ishelper
;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type=U
physics=N
movetype=U
ctrl=0
anim=5300
velset=0,0
hitdefpersist=1*(name!="HD")
movehitpersist=1*(name!="HD")
hitcountpersist=1*(name!="HD")
[State ]
type=changestate
trigger1=Name!="HD"
trigger2=Name="HD"&&Ishelper
trigger2=Root,sysvar(0)
value=ifelse(name!="HD",0,5150)
Persistent=256
Ignorehitpause=1
[State ]
type=Statetypeset
trigger1=1
Statetype=s
movetype=h
[State ] ;Use continue animation if available
type=ChangeAnim
trigger1=AnimElem=1
trigger1=SelfAnimExist(5500)
value=5500
;---------------------------------------------------------------------------
; Varのラウンド持ち越し
[Statedef 5900]
type=U
physics=N
movetype=U
ctrl=0
hitdefpersist=1
movehitpersist=1
hitcountpersist=1
[State ]
type=changestate
trigger1=Name!="HD"
value=ifelse(name!="HD",0,5150)
Persistent=256
Ignorehitpause=1
[State ]
type=ChangeState
trigger1=!Ishelper
value=var(9):=190*(!roundsexisted)+(var(8):=0)
persistent=256
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
sysvar(2)=var(8)
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
sysvar(3)=var(9)
Ignorehitpause=1
[State ]
type=Screenbound
trigger1=Ishelper
value=0
ignorehitpause=1
[State ]
type=PlayerPush
trigger1=Ishelper
value=0
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(9600)
value=9600
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(9650)
value=9650
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(9700)
value=9700
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(30000)
value=30000
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(30100)
value=30100
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(30200)
value=30200
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(31000)
value=31000
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(31901)+Ishelper(31902)+Ishelper(31903)+Ishelper(31904)+Ishelper(31905)+Ishelper(31906)+Ishelper(31907)+Ishelper(31908)+Ishelper(31909)+Ishelper(31910)+Ishelper(31911)+Ishelper(31912)+Ishelper(31913)
trigger2=Ishelper(31914)+Ishelper(31915)+Ishelper(31916)+Ishelper(31917)+Ishelper(31918)+Ishelper(31919)+Ishelper(31920)+Ishelper(31921)+Ishelper(31922)+Ishelper(31923)+Ishelper(31924)+Ishelper(31925)
value=31900
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(37000)
value=37000
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(38000)
value=38000
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(39000)
value=39000
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=Ishelper&&sysvar(1)
value=sysvar(1)
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(1310)
value=1310
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(1311)
value=1311
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(2310)
value=2310
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(1355)
value=1355
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(1160)
value=1160
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&(Ishelper(1620)||Ishelper(1621))
value=1620
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(8000)
value=1110
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(8100)
value=1410
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(2510)
value=2510
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(2520)
value=2520
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(2515)
value=2515
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&(Ishelper(3120)||Ishelper(3121))
value=3120
persistent=256
ignorehitpause=1
[State ]
type=selfstate
trigger1=name="HD"&&Ishelper(3110)
value=3110
persistent=256
ignorehitpause=1
