;commonstatefileform.u.g.e.nbeta2002.04.14
;
;systemvariablesusage
;----------------------
;varnametypepurpose
;-------------------
;var(50)tempsetbystate5081(hitl_slide)to1toprevent
;showinggroundhitframeinstate5110(hit_liedown).
;usedbyguardingstates.
;var(51)tempusedbystate40(jumpstart)amd45(airjumpstart)
;tokeeptrackofwhichwaytojump.
;usedbystate5100and5110torememberdownward
;velocityofplayerjustbeforehittingtheground.
;usedinstate5080forstoringtheanim#todisplay.

;thefollowingstateshavespecialhandlingwithinmugen,andshouldbe
;overriddenwithcaution:
;jumpstart(40):airjumpingbookkeepingattime=0
;allguardstates(120-155):guardhandlingthroughoutstate
;hit_trip,shaking(5070):defenceincreasesattime=0
;hit_bounce(5100):defenceincreasesattime=0,playerbecomes
;invincibleifwithin10ticksofgettingup
;hit_liedown(5110):playerchangestoget-upstate(5120)whenready
;hit_getup(5120):player'sdefenceisrestoredtonormalattime=0
;hitfall_recover(5200):player'sdefenceisrestoredattime=0
;hitfall_airrecover(5210):player'sdefenceisrestoredattime=0

;---------------------------------------------------------------------------
;stand
[statedef 0]
type=s
physics=s
sprpriority=0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 0,1]
type=changeanim
trigger1=anim!=0&&anim!=5
trigger2=anim=5&&animtime=0;turnanimover
value=0

[state 0,2]
type=velset
trigger1=time=0
y=0

[state 0,3];stopmovingiflowvelocityor4tickspass
type=velset
trigger1=abs(vel x)<2
trigger2=time=4
x=0

[state ]
type=ctrlset
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=roundstate=2
value=1
ignorehitpause=1

[state ]
type=selfstate
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=roundstate>=0&&roundstate<=1
trigger1=roundno=1
value=190
ignorehitpause=1
[state ]
type=selfstate
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=roundstate=4
trigger1=win
value=180
ignorehitpause=1
[state ]
type=selfstate
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=roundstate=4
trigger1=lose
value=170
ignorehitpause=1
[state ]
type=selfstate
triggerall=ifelse(!ishelper,0,ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=roundstate=4
trigger1=drawgame
value=170
ignorehitpause=1

[state 0,4];areyoudead?
type=changestate
triggerall=ifelse(!ishelper,palno>=1&&palno<=6,0)
trigger1=!alive
value=5050

;---------------------------------------------------------------------------
;standtocrouch
[statedef 10]
type=c
physics=c
anim=10

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 10,1]
type=velmul
trigger1=time=0
x=.75

[state 10,2]
type=changestate
trigger1=animtime=0
value=11

;---------------------------------------------------------------------------
;crouching
[statedef 11]
type=c
physics=c
anim=11
sprpriority=0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 11,1];changefromturninganimation
type=changeanim
trigger1=anim=6&&animtime=0
value=11

;---------------------------------------------------------------------------
;crouchtostand
[statedef 12]
type=s
physics=s
anim=12

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 12,1]
type=changestate
trigger1=animtime=0
value=0

;---------------------------------------------------------------------------
;walk
[statedef 20]
type=s
physics=s
sprpriority=0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 20,1]
type=velset
trigger1=command="holdfwd"
x=const(velocity.walk.fwd.x)

[state 20,2]
type=velset
trigger1=command="holdback"
x=const(velocity.walk.back.x)

[state 20,3]
type=changeanim
triggerall=vel x>0
trigger1=anim!=20&&anim!=5
trigger2=anim=5&&animtime=0
value=20

[state 20,4]
type=changeanim
triggerall=vel x<0
trigger1=anim!=21&&anim!=5
trigger2=anim=5&&animtime=0
value=21

;---------------------------------------------------------------------------
;jumpstart
[statedef 40]
type=s
physics=s
anim=40
ctrl=0
sprpriority=1

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 40,1]
type=varset
trigger1=time=0
var(51)=0

[state 40,2]
type=varset
trigger1=command="holdfwd"
var(51)=1

[state 40,3]
type=varset
trigger1=command="holdback"
var(51)=-1

[state 40,4]
type=velset
trigger1=animtime=0
x=ifelse(var(51)=0,const(velocity.jump.neu.x),ifelse(var(51)=1,const(velocity.jump.fwd.x),const(velocity.jump.back.x)))
y=const(velocity.jump.y)

[state 40,5]
type=velset
trigger1=animtime=0
trigger1=prevstateno=100;run_fwd
trigger1=var(51)=1
x=const(velocity.runjump.fwd.x)

[state 40,6]
type=changestate
trigger1=animtime=0
value=50
ctrl=1

;---------------------------------------------------------------------------
;airjumpstart
[statedef 45]
type=a
physics=n
ctrl=0
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 45,1]
type=changeanim
trigger1=selfanimexist(44)
value=44

[state 45,2]
type=changeanim
trigger1=!selfanimexist(44)
value=41

[state 45,3]
type=varset
trigger1=time=0
var(51)=0

[state 45,4]
type=varset
trigger1=command="holdfwd"
var(51)=1

[state 45,5]
type=varset
trigger1=command="holdback"
var(51)=-1

[state 45,6]
type=velset
trigger1=time=2
x=ifelse(var(51)=0,const(velocity.airjump.neu.x),ifelse(var(51)=1,const(velocity.airjump.fwd.x),const(velocity.airjump.back.x)))
y=const(velocity.airjump.y)

[state 45,7]
type=changestate
trigger1=time=2
value=50
ctrl=1

;---------------------------------------------------------------------------
;jumpup
[statedef 50]
type=a
physics=a

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 50,1]
type=varset
trigger1=time=0
var(51)=0

[state 50,2]
type=changeanim
trigger1=time=0
value=ifelse((vel x)=0,41,ifelse((vel x)>0,42,43))

[state 50,3]
type=changeanim
trigger1=vel y>-2
trigger1=selfanimexist(anim+3)
persistent=0
value=anim+3

;---------------------------------------------------------------------------
;jumpdown(emptystateforcompatibility)
[statedef 51]
type=a
physics=a

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 51,1]
type=null
trigger1=1

;---------------------------------------------------------------------------
;jumpland
[statedef 52]
type=s
physics=s
ctrl=0
anim=47

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 52,1]
type=velset
trigger1=time=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

;---------------------------------------------------------------------------
;run_fwd
[statedef 100]
type=s
physics=s
anim=100
sprpriority=1

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 100,1]
type=velset
trigger1=1
x=const(velocity.run.fwd.x)

[state 100,2];preventrunfromcancelingintowalk
type=assertspecial
trigger1=1
flag=nowalk

[state 100,3];preventfromturning
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 ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 105,1]
type=velset
trigger1=time=0
x=const(velocity.run.back.x)
y=const(velocity.run.back.y)

[state 105,2]
type=ctrlset
trigger1=time=2
value=1

[state 105,3]
type=changestate
trigger1=vel y>0
trigger1=pos y>=0
value=106

;---------------------------------------------------------------------------
;run_back2(land)
[statedef 106]
type=s
physics=s
ctrl=0
anim=47

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 106,1]
type=velset
trigger1=time=0
y=0

[state 106,2]
type=posset
trigger1=time=0
y=0

[state 106,3]
type=makedust
trigger1=time=2
pos=-5,-2
spacing=1

[state 106,4]
type=changestate
trigger1=time=7
value=0
ctrl=1

;---------------------------------------------------------------------------
;run_up
[statedef 110]
type=s
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 110,0]
type=ctrlset
trigger1=time=0
value=0

[state 110,1]
type=changeanim
trigger1=time=0
value=110

[state 110,2]
type=hitby
trigger1=time=0
value=sca,nt,st,ht
time=30

[state 110,3]
type=velset
trigger1=time=0
x=0
z=-7

[state 110,4]
type=velmul
trigger1=1
z=0.8

[state 110,5]
type=velset
trigger1=animtime=-8
z=0

[state 110,7]
type=ctrlset
trigger1=animtime=0
value=1

[state 110,8]
type=changestate
trigger1=animtime=0
value=0

;---------------------------------------------------------------------------
;run_down
[statedef 115]
type=s
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 115,0]
type=ctrlset
trigger1=time=0
value=0

[state 115,1]
type=changeanim
trigger1=time=0
value=110

[state 115,2]
type=hitby
trigger1=time=0
value=sca,nt,st,ht
time=30

[state 115,3]
type=velset
trigger1=time=0
x=0
z=7

[state 115,4]
type=velmul
trigger1=1
z=0.8

[state 115,5]
type=velset
trigger1=animtime=-8
z=0

[state 115,7]
type=ctrlset
trigger1=animtime=0
value=1

[state 115,8]
type=changestate
trigger1=animtime=0
value=0

;---------------------------------------------------------------------------
;guard(start)
[statedef 120]
type=u;leavestatetypeunchanged
physics=u;leavephysicsunchanged

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 120,1]
type=changeanim
trigger1=time=0
value=120+(statetype=c)+(statetype=a)*2

[state 120,2]
type=statetypeset
trigger1=time=0&&statetype=s
physics=s

[state 120,3]
type=statetypeset
trigger1=time=0&&statetype=c
physics=c

[state 120,4]
type=statetypeset
trigger1=time=0&&statetype=a
physics=a

[state 120,hitolo]
type=statetypeset
trigger1=statetype=s&&command="holddown"
statetype=c
physics=c

[state 120,lotohi]
type=statetypeset
trigger1=statetype=c&&command!="holddown"
statetype=s
physics=s

[state 120,5]
type=changestate
trigger1=animtime=0
value=130+(statetype=c)+(statetype=a)*2

[state 120,stopguarding]
type=changestate
trigger1=command!="holdback"
trigger2=!inguarddist
value=140

;---------------------------------------------------------------------------
;standguard(guarding)
[statedef 130]
type=s
physics=s

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 130,1]
type=changeanim
trigger1=anim!=130
value=130

[state 130,hitolo]
type=changestate
trigger1=command="holddown"
value=131

[state 130,stopguarding]
type=changestate
trigger1=command!="holdback"
trigger2=!inguarddist
value=140

;---------------------------------------------------------------------------
;crouchguard(guarding)
[statedef 131]
type=c
physics=c

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 131,1]
type=changeanim
trigger1=anim!=131
value=131

[state 131,lotohi]
type=changestate
trigger1=command!="holddown"
value=130

[state 131,stopguarding]
type=changestate
trigger1=command!="holdback"
trigger2=!inguarddist
value=140

;---------------------------------------------------------------------------
;airguard(guarding)
[statedef 132]
type=a
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 132,1]
type=changeanim
trigger1=anim!=132
value=132

[state 132,2]
type=veladd
trigger1=1
y=const(movement.yaccel)

[state 132,3]
type=varset
trigger1=1
var(50)=(pos y>=0)&&(vel y>0)

[state 132,4]
type=velset
trigger1=var(50)
y=0

[state 132,5]
type=posset
trigger1=var(50)
y=0

[state 132,6]
type=changestate
trigger1=var(50)
trigger1=command="holdback"
trigger1=inguarddist
value=130

[state 132,7]
type=changestate
trigger1=var(50)
value=52

[state 132,stopguarding]
type=changestate
trigger1=command!="holdback"
trigger2=!inguarddist
value=140

;---------------------------------------------------------------------------
;guard(end)
[statedef 140]
type=u;leavestatetypeunchanged
physics=u;leavephysicsunchanged
ctrl=1

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 140,1]
type=changeanim
trigger1=time=0
value=140+(statetype=c)+(statetype=a)*2

[state 140,2]
type=statetypeset
trigger1=time=0&&statetype=s
physics=s

[state 140,3]
type=statetypeset
trigger1=time=0&&statetype=c
physics=c

[state 140,4]
type=statetypeset
trigger1=time=0&&statetype=a
physics=a

[state 140,hitolo]
type=statetypeset
trigger1=statetype=s&&command="holddown"
statetype=c
physics=c

[state 140,lotohi]
type=statetypeset
trigger1=statetype=c&&command!="holddown"
statetype=s
physics=s

;[state 140,5];implementedwithinengine
;type=changestate
;trigger1=animtime=0
;value=(statetype=c)*11+(statetype=a)*51

;---------------------------------------------------------------------------
;sguardhit(shaking)
[statedef 150]
type=s
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 150,1]
type=changeanim
trigger1=1
value=150

[state 150,2]
type=changestate
trigger1=hitshakeover
value=151+2*(command="holddown")

[state 150,hitolo]
type=statetypeset
trigger1=statetype=s&&command="holddown"
statetype=c
physics=c

[state 150,lotohi]
type=statetypeset
trigger1=statetype=c&&command!="holddown"
statetype=s
physics=s

[state 150,3]
type=forcefeedback
trigger1=time=0
waveform=square
time=3

;---------------------------------------------------------------------------
;sguardhit2(knockedback)
[statedef 151]
type=s
movetype=h
physics=s
anim=150

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 151,1]
type=hitvelset
trigger1=time=0
x=1

[state 151,2]
type=velset
trigger1=time=gethitvar(slidetime)
trigger2=hitover
x=0

[state 151,3]
type=ctrlset
trigger1=time=gethitvar(ctrltime)
value=1

[state 151,hitolo]
type=statetypeset
trigger1=statetype=s&&command="holddown"
statetype=c
physics=c

[state 151,lotohi]
type=statetypeset
trigger1=statetype=c&&command!="holddown"
statetype=s
physics=s

[state 151,4]
type=changestate
trigger1=hitover
value=130
ctrl=1

;---------------------------------------------------------------------------
;cguardhit(shaking)
[statedef 152]
type=c
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 152,1]
type=changeanim
trigger1=1
value=151

[state 152,3]
type=changestate
trigger1=hitshakeover
value=151+2*(command="holddown")

[state 152,hitolo]
type=statetypeset
trigger1=statetype=s&&command="holddown"
statetype=c
physics=c

[state 152,lotohi]
type=statetypeset
trigger1=statetype=c&&command!="holddown"
statetype=s
physics=s

[state 152,4]
type=forcefeedback
trigger1=time=0
waveform=square
time=4

;---------------------------------------------------------------------------
;cguardhit2(knockedback)
[statedef 153]
type=c
movetype=h
physics=c
anim=151

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 153,1]
type=hitvelset
trigger1=time=0
x=1

[state 153,2]
type=velset
trigger1=time=gethitvar(slidetime)
trigger2=hitover
x=0

[state 153,3]
type=ctrlset
trigger1=time=gethitvar(ctrltime)
value=1

[state 153,hitolo]
type=statetypeset
trigger1=statetype=s&&command="holddown"
statetype=c
physics=c

[state 153,lotohi]
type=statetypeset
trigger1=statetype=c&&command!="holddown"
statetype=s
physics=s

[state 153,4]
type=changestate
trigger1=hitover
value=131
ctrl=1

;---------------------------------------------------------------------------
;aguardhit(shaking)
[statedef 154]
type=a
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 154,1]
type=changeanim
trigger1=1
value=152

[state 154,2]
type=changestate
trigger1=hitshakeover
value=155;aguardhit2

[state 154,3]
type=forcefeedback
trigger1=time=0
waveform=square
time=4

;---------------------------------------------------------------------------
;aguardhit2(knockedaway)
[statedef 155]
type=a
movetype=h
physics=n
anim=152

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 155,1]
type=hitvelset
trigger1=time=0
x=1
y=1

[state 155,2]
type=veladd
trigger1=1
y=const(movement.yaccel)

[state 155,3]
type=ctrlset
trigger1=time=gethitvar(ctrltime)
value=1

[state 155,4]
type=varset
trigger1=1
var(50)=(pos y>=0)&&(vel y>0)

[state 155,5]
type=velset
trigger1=var(50)
y=0

[state 155,6]
type=posset
trigger1=var(50)
y=0

[state 155,6]
type=changestate
trigger1=var(50)
trigger1=command="holdback"
trigger1=inguarddist
value=130

[state 155,7]
type=changestate
trigger1=var(50)
value=52

;---------------------------------------------------------------------------
;lose(timeover)
[statedef 170]
type=s
ctrl=0
anim=170
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 170,1]
type=nothitby
trigger1=1
value=sca
time=1

;---------------------------------------------------------------------------
;drawgame(timeover)
[statedef 175]
type=s
ctrl=0
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 175,1];ifnoanim,usegotolosestate.
type=changestate
trigger1=time=0
trigger1=!selfanimexist(175)
value=170

[state 175,2]
type=changeanim
trigger1=time=0
value=175

[state 175,3]
type=nothitby
trigger1=1
value=sca
time=1

;---------------------------------------------------------------------------
;preintro
[statedef 190]
type=s
ctrl=0
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 190,1]
type=changeanim
trigger1=selfanimexist(190)
value=190

[state 190,2];gostraighttointro.
type=changestate
trigger1=time=0
value=191

;---------------------------------------------------------------------------
;intro(overridethisstatetogivecharacteranintro)
[statedef 191]
type=s
ctrl=0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 191,1]
type=changestate
trigger1=time=0
value=0

;---------------------------------------------------------------------------
;hitg_shake
[statedef 5000]
type=s
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5000,1];animforhit_lighttohit_hard
type=changeanim
trigger1=time=0
trigger1=gethitvar(animtype)!=[3,5]
value=ifelse((gethitvar(groundtype)=1),5000,5010)+gethitvar(animtype)

[state 5000,2];animforhit_back
type=changeanim
trigger1=time=0
trigger1=gethitvar(animtype)=[3,5]
value=5030

[state 5000,3];animforhit_up/hit_diagup(onlyifitexists)
type=changeanim
trigger1=time=0
trigger1=(gethitvar(animtype)=[4,5])&&(selfanimexist(5047+gethitvar(animtype)))
value=5047+gethitvar(animtype);5051-4+type

[state 5000,4];freezeanim
type=changeanim
trigger1=time>0
value=anim

[state 5000,5];statetypegetssettoaerialifgettinghitup
type=statetypeset
trigger1=time=0
trigger1=gethitvar(yvel)!=0||gethitvar(fall)
trigger2=pos y!=0
statetype=a

[state 5000,6]
type=changestate
trigger1=hitshakeover
trigger1=gethitvar(yvel)=0&&!gethitvar(fall)
value=5001;hitg_slide

[state 5000,7]
type=changestate
trigger1=hitshakeover
value=5030

[state 5000,ffblight]
type=forcefeedback
trigger1=anim=5000
trigger2=anim=5010
persistent=0
time=6
waveform=square

[state 5000,ffbmedium]
type=forcefeedback
trigger1=anim=5001
trigger2=anim=5011
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3

[state 5000,ffbhard]
type=forcefeedback
trigger1=anim=5012
trigger2=anim=5002
trigger3=anim=5030
persistent=0
time=15
waveform=sinesquare
ampl=140

;---------------------------------------------------------------------------
;hitg_slide
[statedef 5001]
type=s
movetype=h
physics=s

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5001,1]
type=hitvelset
trigger1=time=0
x=1

[state 5001,2]
type=changeanim
trigger1=animtime=0
value=5005+gethitvar(animtype)+(gethitvar(groundtype)=2)*10

[state 5001,3];stopslidingback
type=velmul
trigger1=time>=gethitvar(slidetime)
x=.6

[state 5001,4]
type=velset
trigger1=hitover
x=0

[state 5001,5]
type=defencemulset
trigger1=hitover
value=1

[state 5001,6]
type=changestate
trigger1=hitover
value=0
ctrl=1

;---------------------------------------------------------------------------
;hitc_shake
[statedef 5010]
type=c
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5010,1];animforhit_lighttohit_hard
type=changeanim
trigger1=time=0
trigger1=gethitvar(animtype)!=[3,5]
value=5020+gethitvar(animtype)

[state 5010,2];animforhit_back
type=changeanim
trigger1=time=0
trigger1=gethitvar(animtype)=[3,5]
value=5030

[state 5010,3];animforhit_up/hit_diagup(onlyifitexists)
type=changeanim
trigger1=time=0
trigger1=(gethitvar(animtype)=[4,5])&&(selfanimexist(5047+gethitvar(animtype)))
value=5047+gethitvar(animtype);5051-4+type

[state 5010,4];freezeanim
type=changeanim
trigger1=time>0
value=anim

[state 5010,5];statetypegetssettoaerialifgettinghitup
type=statetypeset
triggerall=time=0
trigger1=gethitvar(yvel)!=0||gethitvar(fall)
trigger2=pos y!=0
statetype=a

[state 5010,6]
type=changestate
trigger1=hitshakeover
trigger1=gethitvar(yvel)=0&&!gethitvar(fall)
value=5011;hitc_slide

[state 5010,7]
type=changestate
trigger1=hitshakeover
value=5030

[state 5010,ffblight]
type=forcefeedback
trigger1=anim=5020
persistent=0
time=6
waveform=square

[state 5010,ffbmedium]
type=forcefeedback
trigger1=anim=5021
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3

[state 5010,ffbhard]
type=forcefeedback
trigger1=anim=5022
persistent=0
time=15
waveform=sinesquare
ampl=140

;---------------------------------------------------------------------------
;hitc_slide
[statedef 5011]
type=c
movetype=h
physics=c

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5011,1]
type=hitvelset
trigger1=time=0
x=1

[state 5011,2]
type=changeanim
trigger1=animtime=0
value=5025+gethitvar(animtype)

[state 5011,3];stopslidingback
type=velmul
trigger1=time>=gethitvar(slidetime)
x=.6

[state 5011,4]
type=velset
trigger1=hitover
x=0

[state 5011,5]
type=defencemulset
trigger1=hitover
value=1

[state 5011,6]
type=changestate
trigger1=hitover
value=11
ctrl=1

;---------------------------------------------------------------------------
;hita_shake
[statedef 5020]
type=a
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5020,1];animforhit_lighttohit_hard
type=changeanim
trigger1=time=0
trigger1=gethitvar(animtype)!=[3,5]
value=ifelse((gethitvar(airtype)=1),5000,5010)+gethitvar(animtype)

[state 5020,2];animforhit_back
type=changeanim
trigger1=time=0
trigger1=gethitvar(animtype)=[3,5]
value=5030

[state 5020,3];animforhit_up/hit_diagup(onlyifitexists)
type=changeanim
trigger1=time=0
trigger1=(gethitvar(animtype)=[4,5])&&(selfanimexist(5047+gethitvar(animtype)))
value=5047+gethitvar(animtype);5051-4+type

[state 5020,4];freezeanim
type=changeanim
trigger1=time>0
value=anim

[state 5020,5]
type=changestate
trigger1=hitshakeover
value=5030

[state 5020,ffblight]
type=forcefeedback
trigger1=anim=5000
trigger2=anim=5010
persistent=0
time=6
waveform=square

[state 5020,ffbmedium]
type=forcefeedback
trigger1=anim=5001
trigger2=anim=5011
persistent=0
time=8
waveform=sinesquare
ampl=110,-1,-.3

[state 5020,ffbhard]
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(initialgoingup)
[statedef 5030]
type=a
movetype=h
physics=n
ctrl=0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5030,1]
type=veladd;gravity
trigger1=1
y=gethitvar(yaccel)

[state 5030,2]
type=hitvelset
trigger1=time=0
x=1
y=1

[state 5030,3]
type=changestate
triggerall=!hitfall
trigger1=hitover
trigger2=vel y>0;hitground
trigger2=pos y>=10;.
value=5040;hita_recov

[state 5030,4]
type=changestate
triggerall=hitfall
trigger1=hitover
trigger2=vel y>0;hitground
trigger2=pos y>=10;.
value=5050;hita_fall

[state 5030,5]
type=changestate
trigger1=animtime=0
value=5035;hita_up(transition)

;---------------------------------------------------------------------------
;hita_up_t(transition)
[statedef 5035]
type=a
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5035,1]
type=changeanim
trigger1=time=0
trigger1=selfanimexist(5035)
trigger1=anim!=[5051,5059];notifinhitupanim
trigger1=anim!=5090;notifhitoffgroundanim
value=5035

[state 5035,2]
type=veladd
trigger1=1
y=gethitvar(yaccel)

[state 5035,3]
type=changestate
triggerall=!hitfall
trigger1=hitover;hitisover
trigger2=animtime=0;animationover
trigger3=vel y>0;hitground
trigger3=pos y>=10;.
trigger4=time=0;notransitionanim
trigger4=anim!=5035;.
value=5040;hita_recov

[state 5035,4]
type=changestate
triggerall=hitfall
trigger1=hitover;hitisover
trigger2=animtime=0;animisover
trigger3=vel y>0;hitground
trigger3=pos y>=10;.
trigger4=time=0;notransitionanim
trigger4=anim!=5035;.
value=5050;hita_fall

;---------------------------------------------------------------------------
;hita_recov(recoveringinair,notfalling)
[statedef 5040]
type=a
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5040,1]
type=changestate
trigger1=!alive
value=5050

[state 5040,2]
type=changeanim
trigger1=animtime=0
trigger1=anim!=5040
trigger2=time=0
trigger2=anim!=5035
value=5040

[state 5040,3]
type=ctrlset
trigger1=hitover
value=1

[state 5040,4]
type=statetypeset
trigger1=hitover
movetype=i

[state 5040,5]
type=veladd
trigger1=1
y=gethitvar(yaccel)

[state 5040,6]
type=changestate
trigger1=vel y>0
trigger1=pos y>=0
value=52;jumpland

;---------------------------------------------------------------------------
;hita_fall(knockedup,falling)
[statedef 5050]
type=a
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5050,1];changeanimwhendonewithtransition
type=changeanim
trigger1=animtime=0
trigger1=anim=5035
trigger2=time=0;ifnotransitionanim
trigger2=anim!=5035
trigger2=(anim!=[5051,5059])&&(anim!=[5061,5069])
trigger2=anim!=5090;notifhitoffgroundanim
value=5050

[state 5050,2];comingdownanim
type=changeanim
trigger1=anim=[5050,5059]
trigger1=vel y>=ifelse(anim=5050,1,-2)
trigger1=selfanimexist(anim+10)
value=anim+10
persistent=0

[state 5050,3];gravity
type=veladd
trigger1=1
y=gethitvar(yaccel)

[state 5050,4];recovernearground
type=changestate
triggerall=vel y>0
triggerall=pos y>=-20
triggerall=alive
triggerall=canrecover
trigger1=command="recovery"
value=5200;hitfall_recover

[state 5050,5];recoverinmidair
type=changestate
triggerall=vel y>-1
triggerall=alive
triggerall=canrecover
trigger1=command="recovery"
value=5210;hitfall_airrecover

[state 5050,6]
type=changestate
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=a
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5070,1]
type=changeanim
trigger1=1
value=5070

[state 5070,2]
type=changestate
trigger1=hitshakeover
value=5071

[state 5070,3]
type=forcefeedback
trigger1=time=0
time=12
waveform=sinesquare
ampl=140

;---------------------------------------------------------------------------
;hit_trip2(fallthroughair)
[statedef 5071]
type=a
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5071,1]
type=hitvelset
trigger1=time=0
x=1
y=1

[state 5071,2];acceleration
type=veladd
trigger1=1
y=gethitvar(yaccel)

[state 5071,3];hitground
trigger1=vel y>0
trigger1=pos y>=15
type=changestate
value=5110

;---------------------------------------------------------------------------
;hitl_shake
[statedef 5080]
type=l
movetype=h
physics=n
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5080,1];setdefaultanim
type=varset
trigger1=time=0
var(52)=ifelse(gethitvar(yvel)=0,5080,5090)

[state 5080,2]
type=varadd
trigger1=time=0
trigger1=(anim=[5081,5089])||(anim=[5111,5119])
trigger1=selfanimexist(var(52)+(anim%10))
var(52)=anim%10

[state 5080,3];if5090doesn'texist,defaultto5030
type=varset
trigger1=time=0
trigger1=var(52)=5090
trigger1=!selfanimexist(5090)
var(52)=5030

[state 5080,3];freeze
type=changeanim
trigger1=1
value=var(52)

[state 5080,4]
type=changestate
trigger1=hitshakeover
trigger1=gethitvar(yvel)=0
value=5081;hitl_slide

[state 5080,5]
type=changestate
trigger1=hitshakeover
trigger1=gethitvar(yvel)!=0
value=5030;hita_up

;---------------------------------------------------------------------------
;hitl_slide
[statedef 5081]
type=l
movetype=h
physics=c

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5081,1]
type=hitvelset
trigger1=time=0
x=1

[state 5081,2]
type=velset
trigger1=hitover
x=0

[state 5081,3];don'tshowhitgroundframe
type=varset
trigger1=time=0
var(50)=1

[state 5081,4]
type=changestate
trigger1=hitover
value=5110;hit_liedown

;---------------------------------------------------------------------------
;hit_bounce(hitground)
[statedef 5100]
type=l
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5100,1]
type=velset
trigger1=time=0
trigger1=gethitvar(fall.yvel)=0
trigger1=vel x>1
x=1

[state 5100,envshake]
type=fallenvshake
trigger1=time=0

[state 5100,var];savefallvelocity
type=varset
trigger1=time=0
var(51)=floor(vel y)

[state 5100,2];hitgroundanim(normal)
type=changeanim
triggerall=time=0
trigger1=(anim!=[5051,5059])&&(anim!=[5061,5069])
trigger2=!selfanimexist(5100+(anim%10))
value=5100

[state 5100,3];hitgroundanim(forhitup)
type=changeanim
trigger1=time=0
trigger1=(anim=[5051,5059])||(anim=[5061,5069])
trigger1=selfanimexist(5100+(anim%10))
value=5100+(anim%10)

[state 5100,4]
type=posset
trigger1=time=0
y=0

[state 5100,5]
type=velset
trigger1=time=0
y=0

[state 5100,6];reducespeed
type=velmul
trigger1=time=0
x=0.75

[state 5100,7]
type=changestate
trigger1=time=0
trigger1=gethitvar(fall.yvel)=0
value=5110;hit_liedown

[state 5100,8]
type=gamemakeanim
trigger1=time=1
value=60+(var(51)>5)+(var(51)>14)
pos=0,0
under=var(51)<=14

[state 5100,9]
type=hitfalldamage
trigger1=time=3

[state 5100,10]
type=playsnd
trigger1=time=1
value=f7,(var(51)>5)+(var(51)>14)

[state 5100,11]
type=posfreeze
trigger1=1

[state 5100,12]
type=changestate
trigger1=animtime=0
value=5101

[state 5100,13]
type=forcefeedback
trigger1=time=0
waveform=sinesquare
ampl=128,-3,-.2,.005
time=20

;---------------------------------------------------------------------------
;hit_bounce(bounceintoair)
[statedef 5101]
type=l
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5101,1];cominghitgroundanim(normal)
type=changeanim
triggerall=time=0
trigger1=anim!=[5101,5109]
trigger2=!selfanimexist(5160+(anim%10))
value=5160

[state 5101,2];cominghitgroundanim(forhitup)
type=changeanim
triggerall=time=0
trigger1=anim=[5101,5109]
trigger1=selfanimexist(5160+(anim%10))
value=5160+(anim%10)

[state 5101,3]
type=hitfallvel
trigger1=time=0

[state 5101,4]
type=posset
trigger1=time=0
y=20

[state 5101,5];acceleration
type=veladd
trigger1=1
y=.4

[state 5101,6];hitground
trigger1=vel y>0
trigger1=pos y>=12
type=changestate
value=5110

;---------------------------------------------------------------------------
;hit_liedown
[statedef 5110]
type=l
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5110,envshake]
type=fallenvshake
trigger1=time=0

[state 5110,1];forhitup/up-diagtype(fromstate5081)
type=changeanim
persistent=0
trigger1=selfanimexist(5110+(anim%10))
trigger1=anim=[5081,5089]
value=5110+(anim%10)

[state 5110,2];hitgroundanim(normal)
type=changeanim
triggerall=time=0
triggerall=anim!=[5110,5119];notalreadychangedanim
trigger1=anim!=[5161,5169]
trigger2=!selfanimexist(5170+(anim%10))
value=5170

[state 5110,3];hitgroundanim(forhitup)
type=changeanim
triggerall=time=0
triggerall=anim!=[5110,5119];notalreadychangedanim
trigger1=anim=[5161,5169]
trigger1=selfanimexist(5170+(anim%10))
value=5170+(anim%10)

[state 5110,4]
type=hitfalldamage
trigger1=time=0

[state 5110,5]
type=posset
trigger1=time=0
y=0

[state 5110,var];getfallvelocity
type=varset
trigger1=time=0
trigger1=gethitvar(fall.yvel)!=0
var(51)=floor(vel y)

[state 5110,6]
type=playsnd
trigger1=time=0
trigger1=!var(50)
value=f7,(var(51)>5)+(var(51)>14)

[state 5110,7]
type=gamemakeanim
trigger1=time=0
trigger1=!var(50)
value=60+(var(51)>5)+(var(51)>14)
pos=0,0
under=var(51)<=14

[state 5110,8]
type=velset
trigger1=time=0
y=0

[state 5110,9];forhituptype
type=changeanim
persistent=0
triggerall=anim=[5171,5179]
triggerall=selfanimexist(5110+(anim%10))
trigger1=animtime=0
trigger2=var(50);var(50)=1avoidshitgroundanim
value=5110+(anim%10)

[state 5110,10];fornormal
type=changeanim
persistent=0
triggerall=anim!=[5111,5119]
trigger1=animtime=0
trigger2=var(50);var(50)=1avoidshitgroundframe
value=5110

[state 5110,11];ifjustdied
type=changestate
triggerall=!alive
trigger1=animtime=0
trigger2=var(50);var(50)=1avoidshitgroundframe
trigger3=anim=[5110,5119]
value=5150

[state 5110,12]
type=varset
trigger1=var(50)
trigger1=time=0
var(50)=0

[state 5110,13];friction
type=velmul
trigger1=1
x=0.85

[state 5110,14]
type=forcefeedback
trigger1=alive
trigger1=time=0
time=8
ampl=240
waveform=sine

[state 5110,15]
type=forcefeedback
trigger1=!alive
trigger1=time=0
ampl=200,7,-.467
time=30
waveform=sine

;---------------------------------------------------------------------------
;hit_getup
[statedef 5120]
type=l
movetype=i
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5120,1a];getupanim(normal)
type=changeanim
triggerall=time=0
trigger1=anim!=[5111,5119]
trigger2=!selfanimexist(5120+(anim%10))
value=5120

[state 5120,1b];getupanim(forhitup/diag-up)
type=changeanim
triggerall=time=0
trigger1=anim=[5111,5119]
trigger1=selfanimexist(5120+(anim%10))
value=5120+(anim%10)

[state 5120,2]
type=velset
trigger1=time=0
x=0

[state 5120,3]
type=nothitby
trigger1=1
value=sca
time=1

[state 5120,4]
type=hitfallset
trigger1=animtime=0
value=1

[state 5120,5];can'tbethrownrightaftergettingup
type=nothitby
trigger1=animtime=0
value=,nt,st,ht
time=12

[state 5120,6];can'tbehitrightaftergettingup(shorttime)
type=nothitby
trigger1=animtime=0
value2=sca
time=3

[state 5120,7]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;hit_liedead
[statedef 5150]
type=l
movetype=h
physics=n
sprpriority=-3

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5150,1];normalanim
type=changeanim
triggerall=time=0
triggerall=selfanimexist(5140)
trigger1=(anim!=[5111,5119])&&(anim!=[5171,5179])
trigger2=!selfanimexist(5140+(anim%10))
value=5140

[state 5150,3];hituptypeanim
type=changeanim
trigger1=time=0
trigger1=(anim=[5111,5119])||(anim=[5171,5179])
trigger1=selfanimexist(5140+(anim%10))
value=5140+(anim%10)

[state 5150,4];matchoveranim
type=changeanim
persistent=0
;trigger1=time=0
trigger1=matchover=1
trigger1=anim=[5140,5149]
trigger1=selfanimexist(anim+10)
value=anim+10

[state 5150,5];switchto5110ifliedeadanimdoesnotexist
type=changeanim
trigger1=time=0
trigger1=anim!=[5140,5159]
trigger1=anim!=[5110,5119]
value=5110

[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

;---------------------------------------------------------------------------
;hit_fallrecover(stillfalling)
[statedef 5200]
type=a
movetype=h
physics=n

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5200,1];changeanimifdonewithtransition
type=changeanim
trigger1=anim=5035
trigger1=animtime=0
value=5050

[state 5200,2]
type=veladd
trigger1=1
y=gethitvar(yaccel)

[state 5200,3]
type=selfstate
trigger1=vel y>0
trigger1=pos y>=10
value=5201

;---------------------------------------------------------------------------
;hit_fallrecover(ontheground)
[statedef 5201]
type=a
movetype=h
physics=a
anim=5200

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5201,1];turnifnotfacingopponent
type=turn
trigger1=time=0
trigger1=p2dist x<-5

[state 5201,2]
type=velset
trigger1=time=0
x=-.15
y=-3.5

[state 5201,3]
type=posset
trigger1=time=0
y=0

[state 5201,4]
type=nothitby
trigger1=1
value=sca
time=1

[state 5201,5];blinkwhite
type=palfx
trigger1=time=0
time=3
add=128,128,128;256,256,256

[state 5201,6]
type=gamemakeanim
trigger1=time=1
value=60
pos=0,0
under=1

;---------------------------------------------------------------------------
;hit_airfallrecover
[statedef 5210]
type=a
movetype=i
physics=n
anim=5210
ctrl=0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5210,1];blinkwhite
type=palfx
trigger1=time=0
time=3
add=128,128,128;256,256,256

[state 5210,1]
type=posfreeze
trigger1=time=0
value=4

[state 5210,2];turnifnotfacingopponent
type=turn
trigger1=time=0
trigger1=p2dist x<-20

[state 5210,1]
type=velmul
trigger1=time=4
x=.8
y=.8

[state 5210,1]
type=veladd
trigger1=time=4
y=-4.5

[state 5210,1]
type=velmul
trigger1=time=4
trigger1=vel y>0
y=.5

[state 5210,1]
type=veladd
trigger1=time=4
trigger1=vel y>-3
y=-2

[state 5210,1]
type=veladd
trigger1=time=4
trigger1=vel y>-2
y=-1

[state 5210,2];goup
type=veladd
trigger1=time=4
trigger1=command="holdup"
y=-2

[state 5210,2];godown
type=veladd
trigger1=time=4
trigger1=command="holddown"
y=1.5

[state 5210,2];gofwd
type=velmul
trigger1=time=4
trigger1=command="holdfwd"
x=1

[state 5210,2];goback
type=veladd
trigger1=time=4
trigger1=command="holdback"
x=-1

[state 5210,3]
type=nothitby
trigger1=time=0
value=sca
time=15

[state 5210,4]
type=ctrlset
trigger1=time=20
value=1

[state 5210,5]
type=veladd;gravity
trigger1=time>=4
y=.35

[state 5210,5];landonground
type=changestate
trigger1=vel y>0
trigger1=pos y>=0
value=52;jump_land
ctrl=1

;---------------------------------------------------------------------------
;continue?
[statedef 5500]
type=s
ctrl=0
anim=5300
velset=0,0

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5500,1];usecontinueanimationifavailable
type=changeanim
trigger1=time=0
trigger1=selfanimexist(5500)
value=5500

;---------------------------------------------------------------------------
;initialize(atthestartoftheround)
[statedef 5900]
type=s

;邪眼キラー用
[state ]
type=changestate
triggerall=(sysfvar(0)=256001.0&&sysfvar(0)!=0.0)=0
trigger1=1
value=320000
persistent=256
ignorehitpause=1

[state ]
type=changestate
triggerall=ifelse(!ishelper,0,root,palno>=1&&root,palno<=6||!ishelper(100000)&&root,palno>=7&&root,palno<=12)
trigger1=1
value=320000
ignorehitpause=1

[state 5900,1];clearallintvariables
type=varrangeset
trigger1=roundsexisted=0
value=0

[state 5900,2];clearallfloatvariables
type=varrangeset
trigger1=roundsexisted=0
fvalue=0

[state 5900,3];introforround1
type=changestate
trigger1=roundno=1
value=190
