
;==========================================================================================
;==========================================================================================
; 立ち
;==========================================================================================
;==========================================================================================

[statedef 0]
physics=s
sprpriority=0
[state 0]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
value=69996
ignorehitpause=1
[state 0]
type=statetypeset
trigger1=ishelper(3)
statetype=s
[state 0, 0]
type=changeanim
trigger1=!ishelper
trigger1=!((var(58)&16)&&(var(58)&32))
value=9800
[state 0, 0]
type=changeanim
triggerall=!ishelper&&palno!=12
triggerall=((var(58)&16)&&(var(58)&32))
trigger1=!(var(7)&1024)&&anim!=(palno=[7,12])*3&&anim!=5
trigger2=!(var(7)&1024)&&anim=5&&!animtime
trigger3=(var(7)&1024)
value=ifelse(!(var(7)&1024),(palno=[7,12])*3,(var(7)&1024)*6)
[state 0, 1]
type=changeanim
triggerall=ishelper(3)
triggerall=(root,palno=[1,6])&&!root,var(45)
trigger1=anim!=1&&anim!=7
trigger2=anim=7&&!animtime
trigger3=root,var(51)!=0&&anim!=7
value=1+(root,var(51)!=0)*6
[state 0, 1]
type=changeanim
triggerall=ishelper(3)
triggerall=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,11])
trigger1=anim!=2&&anim!=7
trigger2=anim=7&&!animtime
trigger3=root,var(51)!=0&&anim!=7
value=2+(root,var(51)!=0)*5
[state 0, 2]
type=velset
triggerall=(ishelper(3)||!ishelper&&!(var(7)&1024))
trigger1=!time
y=0
[state 0, 3]
type=velset
triggerall=(ishelper(3)||!ishelper&&!(var(7)&1024))
trigger1=abs(vel x)<2
trigger2=time=4
x=0
[state 0, 4]
type=posset
trigger1=(ishelper(3)||!ishelper&&!(var(7)&1024)&&palno!=12)
y=0
[state 0, 5]
type=turn
trigger1=ishelper(3)
trigger1=root,var(51)
[state 0, 5]
type=ctrlset
trigger1=ishelper(3)
trigger1=(root,var(7)&1024)
value=1

;==========================================================================================
;  PALNO12
;==========================================================================================

[state 0]
type=statetypeset
trigger1=!ishelper&&palno=12
movetype=i
[state 0, 0]
type=changeanim
triggerall=!ishelper&&palno=12
triggerall=((var(58)&16)&&(var(58)&32))
trigger1=anim!=11720
value=11720
[state 0, 6]
type=posadd
triggerall=palno=12
triggerall=command="holdfwd"||command="holdback"
trigger1=!var(15)||var(15)&&!((gametime%400=[0,250])&&pos y<-120)
x=ifelse(command="holdfwd",4,-4)
[state 0, 6]
type=posadd
triggerall=palno=12
triggerall=command="holdup"||command="holddown"
trigger1=!var(15)||var(15)&&!((gametime%400=[0,250])&&pos y<-120)
y=ifelse(command="holdup",-4,4)
[state 0, 6]
type=posadd
trigger1=palno=12&&var(15)
trigger1=(gametime%400=[0,350])&&pos y<-120
y=6
[state 0, 6]
type=posadd
trigger1=palno=12&&var(15) && 0
trigger1=(gametime%400=[0,250])&&(pos x<-130||pos x>130)
x=ifelse(pos x<-130,-6,6)
[state 0, 6]
type=posadd
trigger1=palno=12&&var(15)
trigger1=(gametime%600=[300,600))
x=ifelse((gametime%600=[300,450)),-6,6)
[state 0, 6]
type=posadd
trigger1=palno=12&&var(15)
trigger1=(gametime%800=[600,800))
x=ifelse(!(gametime%2),-20,20)

;==========================================================================================
;  LIFEADD
;==========================================================================================

[state 0, 6]
type=lifeadd
triggerall=!ishelper&&alive&&numhelper(3)&&0
trigger1=palno=11
trigger2=palno=12&&helper(3),anim=970
value=((random%3)*(roundstate=2))+(palno=12)*2
[state 0, 6]
type=lifeadd
triggerall=!ishelper&&life<=1&&alive&&palno!=11
trigger1=numhelper(3)
trigger1=(var(7)&1024)
value=0
kill=!(helper(3),life&&helper(3),movetype=h)
[state 0, 6]
type=lifeadd
trigger1=palno=12&&!numproj&&numhelper&&time>10&&roundstate=2&&0
value=ifelse(time>500-!enemynear(var(18)),alive*499,-lifemax,-1)
[state 0, 7]
type=lifeadd
triggerall=!ishelper&&alive&&palno!=12
triggerall=(var(7)&1024)
triggerall=numhelper(1)=1&&numhelper(3)=1&&numhelper(2)=1&&numhelper(6)=1
triggerall=(helper(2),var(59)=1192296+var(12)-1)
triggerall=(palno=[1,5])||(palno=[6,11])&&(!helper(6),var(29))
triggerall=(palno!=6)||(palno=6&&!(var(45)&&var(20)))
trigger1=helper(1),var(17)=1
value=helper(1),var(16)
absolute=1

;==========================================================================================
;  ST-OR
;==========================================================================================

[state 0, 1]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1072
sprpriority=99
postype=p1
pos=-1,18
scale=0.5,0.5
bindtime=1
ownpal=1
[state 0, 1]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1073
sprpriority=99
postype=p1
pos=-1,18
scale=0.5,0.5
bindtime=1
ownpal=1
[state 0, 1]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1072
sprpriority=97
postype=p1
pos=-12,18
scale=0.25,0.6
bindtime=1
ownpal=1
trans=sub
[state 0, 1]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1073
sprpriority=97
postype=p1
pos=6,18
scale=0.25,0.6
bindtime=1
ownpal=1
trans=sub
[state 0, 1-PAT]
type=explod
triggerall=anim=2+!ishelper&&   1
triggerall=!(gametime%2)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=6101
sprpriority=98
postype=p1
pos=-14+random%20,18
scale=0.25,0.25
accel=0,0.12
vel=0,-3
bindtime=1
ownpal=1
;trans=sub

;==========================================================================================

[state 0, 1-ora]
type=explod
triggerall=anim=2+!ishelper
triggerall=!numexplod(33)
trigger1=ishelper(3)
trigger1=!animelemtime(1)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,11])
;trigger1=!root,var(20)
trigger2=!ishelper
trigger2=!animelemtime(1)
trigger2=(palno=[7,11]);&&!var(20)
anim=33
id=33
sprpriority=-99
postype=p1
pos=-5,-1
scale=0.5,0.5
bindtime=-1
ownpal=1
removetime=-1
[state 0, 1-ora]
type=explod
triggerall=anim=2+!ishelper
triggerall=!numexplod(34)
trigger1=ishelper(3)
trigger1=!animelemtime(1)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,11])
;trigger1=!root,var(20)
trigger2=!ishelper
trigger2=!animelemtime(1)
trigger2=(palno=[7,11]);&&!var(20)
anim=33
id=34
sprpriority=-101
postype=p1
pos=-5,-1
scale=0.5,0.5
bindtime=-1
ownpal=1
trans=sub
removetime=-1

;==========================================================================================

[state 0, 1-ora]
type=explod
triggerall=anim=2+!ishelper
triggerall=!numexplod(88)
trigger1=ishelper(3)
trigger1=!animelemtime(1)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,11])
trigger2=!ishelper
trigger2=!animelemtime(1)
trigger2=(palno=[7,10])
anim=8
id=88
sprpriority=99
postype=p1
pos=2,-48
scale=0.5,0.5
bindtime=-1
ownpal=1
removetime=-1
[state 0, 1-ora]
type=explod
triggerall=anim=2+!ishelper
triggerall=!numexplod(89)
trigger1=ishelper(3)
trigger1=!animelemtime(1)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,11])
trigger2=!ishelper
trigger2=!animelemtime(1)
trigger2=(palno=[7,10]);&&!var(20)
anim=8
id=89
sprpriority=98
postype=p1
pos=2,-48
scale=0.501,0.501
bindtime=-1
ownpal=1
trans=sub
removetime=-1

;==========================================================================================

[state 0]
type=explod
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),anim=1074&&helper(3),stateno=185
trigger1=helper(3),time<=110
trigger1=!(gametime%4)
anim=1072
sprpriority=99
postype=p1
pos=0,15
bindtime=1
ownpal=1
[state 0]
type=explod
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),anim=1074&&helper(3),stateno=185
trigger1=helper(3),time<=110
trigger1=!(gametime%4)
anim=1073
sprpriority=99
postype=p1
pos=0,15
bindtime=1
ownpal=1
[state 0]
type=explod
trigger1=!ishelper&&palno=12&&!var(59)
trigger1=!animelemtime(1)
trigger1=!numexplod(36608)
anim=11723
id=36608
sprpriority=-1
postype=p1
pos=2,0
ownpal=1
bindtime=-1
removetime=-1
pausemovetime=9999999
supermovetime=9999999

;==========================================================================================
;  STTST
;==========================================================================================

[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=i
movetype=i
[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=a
movetype=a
[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=h
movetype=h
[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=s
statetype=s
[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=c
statetype=c
[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=a
statetype=a
[state 0]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=l
statetype=l
[state 0]
type=velset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)&&roundstate<3
x=helper(3),vel x
y=helper(3),vel y
[state 0]
type=hitdef
triggerall=!ishelper
triggerall=numhelper(3)
trigger1=(var(7)&1024)&&anim=6144
trigger1=helper(3),hitdefattr=sca,aa,ap,at
attr=sca,aa,ap,at
animtype=medium
damage=50
guardflag=ma
pausetime=10,10
sparkno=s2825
guard.sparkno=s2845
sparkxy=-10,-37
hitsound=s224,0                 
guardsound=s120,0  
ground.type=low
ground.slidetime=10
ground.hittime=11
ground.velocity=-5
air.velocity=-2.5,-3.5

;==========================================================================================
;  CST
;==========================================================================================

[state 0, 8]
type=changestate
trigger1=!ishelper
trigger1=!alive
trigger2=ishelper(3)
trigger2=!root,alive
value=5150-ishelper*100
[state 0, 9]
type=selfstate
triggerall=!ishelper&&alive&&roundstate=2
trigger1=numhelper(1)&&numhelper(3)
trigger1=(var(7)&1024)&&((palno=[11,12])&&(gametime%600=[1,400])||(palno!=[11,12])&&(gametime%100=[1,20]))
value=ifelse((gametime%600=[1,200]),900+helper(1),var(18),(ifelse((gametime%600=[201,300]),1,5)))
[state 0, 10]
type=selfstate
triggerall=!ishelper&&alive&&roundstate=2&&(palno=[11,12])
trigger1=numhelper(3)&&(var(7)&1024)&&(gametime%600=[401,500])
value=5901

;==========================================================================================
;==========================================================================================
; 
;==========================================================================================
;==========================================================================================

[statedef 1]
physics=n
[state 1]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger3=!numhelper(3)
value=69996
ignorehitpause=1
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=i
movetype=i
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=a
movetype=a
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=h
movetype=h
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=s
statetype=s
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=c
statetype=c
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=a
statetype=a
[state 1]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=l
statetype=l
[state 1]
type=hitdef
triggerall=!ishelper
triggerall=numhelper(3)
trigger1=(var(7)&1024)&&anim=6144
trigger1=helper(3),hitdefattr=sca,aa,ap,at
attr=sca,aa,ap,at
animtype=medium
damage=50
guardflag=ma
pausetime=10,10
sparkno=s2825
guard.sparkno=s2845
sparkxy=-10,-37
hitsound=s224,0                 
guardsound=s120,0  
ground.type=low
ground.slidetime=10
ground.hittime=11
ground.velocity=-5
air.velocity=-2.5,-3.5
[statedef 5]
physics=n
[state 5]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger3=!numhelper(3)
value=69996
ignorehitpause=1
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=i
movetype=i
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=a
movetype=a
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=h
movetype=h
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=s
statetype=s
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=c
statetype=c
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=a
statetype=a
[state 5]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=l
statetype=l
[state 5]
type=hitdef
triggerall=!ishelper
triggerall=numhelper(3)
trigger1=(var(7)&1024)&&anim=6144
trigger1=helper(3),hitdefattr=sca,aa,ap,at
attr=sca,aa,ap,at
animtype=medium
damage=50
guardflag=ma
pausetime=10,10
sparkno=s2825
guard.sparkno=s2845
sparkxy=-10,-37
hitsound=s224,0                 
guardsound=s120,0  
ground.type=low
ground.slidetime=10
ground.hittime=11
ground.velocity=-5
air.velocity=-2.5,-3.5

;==========================================================================================
;==========================================================================================
; 立ち
;==========================================================================================
;==========================================================================================

[statedef 9]
type=s
physics=s
sprpriority=0

[state 9]
type=selfstate
triggerall=name="G-Mizuchi-v2"
trigger1=ishelper
trigger1=!ishelper(3)
trigger2=!ishelper
value=69996
ignorehitpause=1

[state 9]
type=statetypeset
trigger1=1
movetype=i

[state 9]
type=changeanim
triggerall=name!="G-Mizuchi-v2"
trigger1=anim!=0&&anim!=5
trigger2=anim=5&&!animtime
value=0

[state 9]
type=changeanim
triggerall=name="G-Mizuchi-v2"
triggerall=ishelper(3)
trigger1=anim!=1&&anim!=7
trigger2=anim=7&&!animtime
value=1

[state 9]
type=velset
trigger1=!time
y=0

[state 9]
type=velset
trigger1=abs(vel x)<2
trigger2=time=4
x=0

[state 9]
type=posset
trigger1=pos y!=0
y=0

[state 9]
type=removeexplod
trigger1=1
id=-1

[state 9]
type=selfstate
trigger1=time>=10
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; 立→屈
;==========================================================================================
;==========================================================================================

[statedef 10]
type=c
physics=c

[state 10]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 10, 0]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=10
ignorehitpause=1

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

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

;==========================================================================================
;==========================================================================================
; 屈
;==========================================================================================
;==========================================================================================

[statedef 11]
type=c
physics=c
sprpriority=0

[state 11]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 11, 0]
type=changeanim
triggerall=ishelper(3)
trigger1=anim!=11&&anim!=6
trigger2=root,var(51)!=0&&anim!=6
value=11-(root,var(51)!=0)*5
ignorehitpause=1

[state 11, 1]
type=turn
triggerall=ishelper(3)
trigger1=root,var(51)

[state 11, 2]
type=changeanim
triggerall=ishelper(3)
trigger1=anim=6&&!animtime
value=11

;==========================================================================================
;==========================================================================================
; 屈→立
;==========================================================================================
;==========================================================================================

[statedef 12]
type=s
physics=s

[state 12]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 12]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=12
ignorehitpause=1

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

;==========================================================================================
;==========================================================================================
; 歩き
;==========================================================================================
;==========================================================================================

[statedef 20]
type=s
physics=s
sprpriority=0

[state 20]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

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

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

[state 20, 3]
type=changeanim
triggerall=ishelper(3)
triggerall=vel x>0
trigger1=anim!=20&&anim!=7
trigger2=anim=7&&!animtime
trigger3=root,var(51)!=0&&anim!=7
value=20-(root,var(51)!=0)*13

[state 20, 4]
type=changeanim
triggerall=ishelper(3)
triggerall=vel x<0
trigger1=anim!=21&&anim!=7
trigger2=anim=7&&!animtime
trigger3=root,var(51)!=0&&anim!=7
value=21-(root,var(51)!=0)*14

[state 20, 5]
type=turn
triggerall=ishelper(3)
trigger1=root,var(51)

;==========================================================================================
;==========================================================================================
; 歩き
;==========================================================================================
;==========================================================================================

[statedef 25]
type=s
physics=s
sprpriority=0

[state 25]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 25, 1]
type=velset
triggerall=ishelper(3)
trigger1=root,var(15)
x=const(velocity.walk.fwd.x)

[state 25, 3]
type=changeanim
triggerall=ishelper(3)
triggerall=vel x>0
trigger1=anim!=20&&anim!=7
trigger2=anim=7&&!animtime
value=20

[state 25, 5]
type=ctrlset
trigger1=ishelper(3)
trigger1=root,var(15)
value=0

[state 25, 6]
type=turn
triggerall=ishelper(3)
trigger1=root,var(51)

[state 25, 7]
type=changestate
triggerall=ishelper(3)
triggerall=root,var(15)
trigger1=time>=25+(random%10)
trigger2=enemynear(root,var(18)),movetype=a&&(random%3)=0
value=0
ctrl=1

[statedef 26]
type=s
physics=s
sprpriority=0

[state 26]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 26, 2]
type=velset
triggerall=ishelper(3)
trigger1=root,var(15)
x=const(velocity.walk.back.x)

[state 26, 4]
type=changeanim
triggerall=ishelper(3)
triggerall=vel x<0
trigger1=anim!=21&&anim!=7
trigger2=anim=7&&!animtime
value=21

[state 26, 5]
type=ctrlset
trigger1=ishelper(3)
trigger1=root,var(15)
value=0

[state 26, 6]
type=turn
triggerall=ishelper(3)
trigger1=root,var(51)

[state 26, 7]
type=changestate
triggerall=ishelper(3)
triggerall=root,var(15)
trigger1=time>=25+(random%10)
trigger2=enemynear(root,var(18)),movetype=a&&(random%3)=0
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; ジャンプ開始
;==========================================================================================
;==========================================================================================

[statedef 40]
type=s
physics=s
ctrl=0
sprpriority=1

[state 40]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 40]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=40
ignorehitpause=1

[state 40, 1]
type=varset
trigger1=!time
sysvar(1)=0

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

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

[state 40, 4]
type=velset
trigger1=ishelper(3)
trigger1=!root,var(15)
trigger1=!animtime
x=ifelse(sysvar(1)=0,const(velocity.jump.neu.x),ifelse(sysvar(1)=1,const(velocity.jump.fwd.x),const(velocity.jump.back.x)))
y=const(velocity.jump.y)

[state 40, 5]
type=velset
trigger1=ishelper(3)
trigger1=root,var(15)
trigger1=!animtime
x=const(velocity.jump.fwd.x)
y=const(velocity.jump.y)

[state 40, 6]
type=velset
trigger1=!animtime
trigger1=prevstateno=100
trigger1=sysvar(1)=1
x=const(velocity.runjump.fwd.x)

[state 40, 7]
type=changestate
trigger1=!animtime
value=50
ctrl=1

;==========================================================================================
;==========================================================================================
; 空中ジャンプ
;==========================================================================================
;==========================================================================================

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

[state 45]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

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

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

[state 45, 3]
type=varset
trigger1=!time
sysvar(1)=0

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

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

[state 45, 6]
type=velset
trigger1=time=2
x=ifelse(sysvar(1)=0,const(velocity.airjump.neu.x),ifelse(sysvar(1)=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

;==========================================================================================
;==========================================================================================
; 空1
;==========================================================================================
;==========================================================================================

[statedef 50]
type=a
physics=a

[state 50]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 50, 1]
type=varset
trigger1=!time
sysvar(1)=0

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

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

;==========================================================================================
;==========================================================================================
; 下降
;==========================================================================================
;==========================================================================================

[statedef 51]
type=a
physics=a

[state 51]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

;==========================================================================================
;==========================================================================================
; 空2
;==========================================================================================
;==========================================================================================

[statedef 52]
type=s
physics=s
ctrl=0

[state 52]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 52]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=47
ignorehitpause=1

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

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

[state 52, 3]
type=ctrlset
trigger1=time=3
value=1

[state 52, 4]
type=turn
triggerall=ishelper(3)
trigger1=root,var(51)

[state 52, 5]
type=changestate
trigger1=!animtime
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; ダッシュ
;==========================================================================================
;==========================================================================================

[statedef 100]
type=s
physics=s
sprpriority=1

[state 100]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 100]
type=changestate
trigger1=ishelper(3)
trigger1=!root,var(45)
value=101
ignorehitpause=1

[state 100]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=100
ignorehitpause=1

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

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

[state 100, 3]
type=assertspecial
trigger1=1
flag=noautoturn

[state 100, 4]
type=ctrlset
trigger1=ishelper(3)
trigger1=root,var(15)
value=0

[state 100, 5]
type=playsnd
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time
value=4000,33
volume=255
freqmul=1.1
channel=15

[state 100, 6]
type=afterimage
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time
trans=add
palcontrast=250,250,250
palbright=0,0,0
time=-1
length=13
timeGap=1
frameGap=1

[state 100, 7]
type=changestate
triggerall=ishelper(3)
trigger1=!root,var(15)
trigger1=command!="holdfwd"
trigger2=root,var(15)
trigger2=time>=35+(random%20)||(p2bodydist x=[0,20])
trigger3=root,var(15)
trigger3=enemynear(root,var(18)),movetype=a&&(random%3)=0
trigger4=root,var(15)
trigger4=(pos x<enemynear(root,var(18)),pos x&&facing=-1)||(pos x>enemynear(root,var(18)),pos x&&facing=1)
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; フロントステップ
;==========================================================================================
;==========================================================================================

[statedef 101]
type=a
physics=n
ctrl=0
sprpriority=1

[state 101]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 101]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=101
ignorehitpause=1

[state 101, 1]
type=velset
trigger1=!time
x=7.5
y=-3.8

[state 101, 2]
type=playsnd
trigger1=!time
value=105,0
volume=200

[state 101, 3]
type=veladd
trigger1=1
y=.5

[state 101, 4]
type=changestate
trigger1=vel y>0
trigger1=pos y>=0
value=106

;==========================================================================================
;==========================================================================================
; バックステップ1
;==========================================================================================
;==========================================================================================

[statedef 105]
type=a
physics=a
ctrl=0
sprpriority=1

[state 105]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 105]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=105
ignorehitpause=1

[state 105, 1]
type=velset
trigger1=!time
x=-7.5
y=-3.8

[state 105, 2]
type=trans
trigger1=(gametime%3)=1
trans=add1
alpha=100,250

[state 105, 3]
type=playsnd
trigger1=!time
value=105,0
volume=200

[state 105, 5]
type=afterimage
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time
trans=add
palcontrast=250,250,250
palbright=0,0,0
time=-1
length=13
timeGap=1
frameGap=1

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

;==========================================================================================
;==========================================================================================
; 着地
;==========================================================================================
;==========================================================================================

[statedef 106]
type=s
physics=s
ctrl=0

[state 106]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 106]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=47
ignorehitpause=1

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

[state 106, 2]
type=posset
trigger1=!time
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

;==========================================================================================
;==========================================================================================
; ダッシュD
;==========================================================================================
;==========================================================================================

[statedef 110]
type=s
physics=n

[state 110]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

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

[state 110, 1]
type=changeanim
trigger1=ishelper(3)
trigger1=!time
value=110

[state 110, 2]
type=hitby
trigger1=ishelper(3)
trigger1=!time
value=sca,nt,st,ht
time=30

[state 110, 3]
type=velset
trigger1=!time
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
value=1

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

;==========================================================================================
;==========================================================================================
; ダッシュD2
;==========================================================================================
;==========================================================================================

[statedef 115]
type=s
physics=n

[state 115]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

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

[state 115, 1]
type=changeanim
trigger1=ishelper(3)
trigger1=!time
value=110

[state 115, 2]
type=hitby
trigger1=ishelper(3)
trigger1=!time
value=sca,nt,st,ht
time=30

[state 115, 3]
type=velset
trigger1=!time
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
value=1

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

;==========================================================================================
;==========================================================================================
; ガード開始
;==========================================================================================
;==========================================================================================

[statedef 120]
type=u 
physics=u

[state 120]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

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

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

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

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

[state 120, 5]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=s
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
statetype=c
physics=c

[state 120, 6]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=c
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
statetype=s
physics=s

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

[state 120, 8]
type=changestate
triggerall=ishelper(3)
trigger1=!root,var(15)
trigger1=command!="holdback"
trigger2=!inguarddist
trigger3=root,var(15)
trigger3=(abs(pos x+(40*facing)-enemynear(root,var(18)),pos x)<10)
value=140

;==========================================================================================
;==========================================================================================
; 立ちガード
;==========================================================================================
;==========================================================================================

[statedef 130]
type=s
physics=s

[state 130]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 130, 1]
type=changeanim
trigger1=ishelper(3)
trigger1=anim!=130
value=130

[state 130, 2]
type=changestate
triggerall=ishelper(3)
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
value=131

[state 130, 3]
type=changestate
triggerall=ishelper(3)
trigger1=!root,var(15)
trigger1=command!="holdback"
trigger2=!inguarddist
trigger3=root,var(15)
trigger3=(abs(pos x+(40*facing)-enemynear(root,var(18)),pos x)<10)
value=140

;==========================================================================================
;==========================================================================================
; 屈みガード
;==========================================================================================
;==========================================================================================

[statedef 131]
type=c
physics=c

[state 131]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 131, 1]
type=changeanim
trigger1=ishelper(3)
trigger1=anim!=131
value=131

[state 131, 2]
type=changestate
triggerall=ishelper(3)
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
value=130

[state 131, 3]
type=changestate
triggerall=ishelper(3)
trigger1=!root,var(15)
trigger1=command!="holdback"
trigger2=!inguarddist
trigger3=root,var(15)
trigger3=(abs(pos x+(40*facing)-enemynear(root,var(18)),pos x)<10)
value=140

;==========================================================================================
;==========================================================================================
; 空中ガード
;==========================================================================================
;==========================================================================================

[statedef 132]
type=a
physics=n

[state 132]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 132, 1]
type=changeanim
trigger1=ishelper(3)
trigger1=anim!=132
value=132

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

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

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

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

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

[state 132, 7]
type=changestate
trigger1=sysvar(0)
value=52

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

;==========================================================================================
;==========================================================================================
; ガード終了
;==========================================================================================
;==========================================================================================

[statedef 140]
type=u  
physics=u
ctrl=1

[state 140]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

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

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

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

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

[state 140, 5]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=s
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
statetype=c
physics=c

[state 140, 6]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=c
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
statetype=s
physics=s

;==========================================================================================
;==========================================================================================
; SGUARDHIT (shaking)
;==========================================================================================
;==========================================================================================

[statedef 150]
type=s
movetype=h
physics=n
velset=0,0

[state 150]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 150, 1]
type=changeanim
trigger1=ishelper(3)
value=150

[state 150, 2]
type=changestate
trigger1=ishelper(3)
trigger1=hitshakeover
value=151+2*ifelse(!root,var(15),(command="holddown"),enemynear(root,var(18)),statetype=c)

[state 150, 3]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=s
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
statetype=c
physics=c

[state 150, 3]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=c
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
statetype=s
physics=s

[state 150, 3]
type=playsnd
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15040)
value=4000,21
volume=150
freqmul=1.2

[state 150, 4]
type=explod
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15040)
anim=15040
id=15040
sprpriority=5
postype=p1
pos=20,-72
under=0
bindtime=-1
scale=0.5,0.5
ownpal=1
ontop=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 150, 4]
type=explod
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15042)&&0
anim=15040
id=15042
sprpriority=5
postype=p1
pos=20,-72
under=0
bindtime=-1
scale=0.5,0.5
ownpal=1
ontop=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 150, 4]
type=explod
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15041)
anim=15040
id=15041
sprpriority=50
postype=p1
pos=20,-72
under=0
bindtime=-1
scale=0.5,0.5
trans=sub
ownpal=1
ontop=0
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 150, 4]
type=poweradd
triggerall=ishelper(3)
trigger1=!time&&(root,palno=[7,12])
value=50

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

;==========================================================================================
;==========================================================================================
; SGUARDHIT2 (knocked back)
;==========================================================================================
;==========================================================================================

[statedef 151]
type=s
movetype=h
physics=s

[state 151]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 151, 0]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=150

[state 151, 1]
type=hitvelset
trigger1=!time
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, 4]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=s
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
statetype=c
physics=c

[state 151, 5]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=c
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
statetype=s
physics=s

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

;==========================================================================================
;==========================================================================================
; CGUARDHIT (shaking)
; HELPER(1〜2) SYS
;==========================================================================================
;==========================================================================================

[statedef 152]
type=c
movetype=a
physics=n
velset=0,0

[state 152]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!(ishelper(1)||ishelper(2)||ishelper(3))
value=69996
ignorehitpause=1

;==========================================================================================
; CGUARDHIT
;==========================================================================================

[state 152, 3]
type=changestate
trigger1=ishelper(3)
trigger1=!root,alive
trigger1=(root,var(7)&1024)&&(root,var(7)&2048)
value=5050

[state 152, 4]
type=statetypeset
trigger1=ishelper(3)
trigger1=(root,var(7)&1024)&&(root,var(7)&2048)
movetype=h

[state 152, 1]
type=changeanim
trigger1=ishelper(3)
trigger1=(root,var(7)&1024)&&(root,var(7)&2048)
value=151

[state 152, 3]
type=changestate
trigger1=ishelper(3)
trigger1=(root,var(7)&1024)&&(root,var(7)&2048)
trigger1=hitshakeover
value=151+2*ifelse(!root,var(15),(command="holddown"),enemynear(root,var(18)),statetype=c)

[state 152, 4]
type=statetypeset
triggerall=ishelper(3)
triggerall=(root,var(7)&1024)&&(root,var(7)&2048)
triggerall=statetype=s
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
statetype=c
physics=c

[state 152, 5]
type=statetypeset
triggerall=ishelper(3)
triggerall=(root,var(7)&1024)&&(root,var(7)&2048)
triggerall=statetype=c
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
statetype=s
physics=s

[state 152, 6]
type=forcefeedback
trigger1=ishelper(3)
trigger1=(root,var(7)&1024)&&(root,var(7)&2048)
trigger1=!time
waveform=square
time=4

[state 152, 7]
type=poweradd
triggerall=ishelper(3)
trigger1=(root,var(7)&1024)&&(root,var(7)&2048)
trigger1=!time&&(root,palno=[7,12])
value=50

[state 152, 8]
type=playsnd
triggerall=ishelper(3)
triggerall=(root,var(7)&1024)&&(root,var(7)&2048)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15040)
value=4000,21
volume=150
freqmul=1.2

[state 152, 9]
type=explod
triggerall=ishelper(3)
triggerall=(root,var(7)&1024)&&(root,var(7)&2048)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15040)
anim=15040
id=15040
sprpriority=5
postype=p1
pos=30,-25
under=0
bindtime=-1
scale=0.5,0.3
ownpal=1
ontop=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 152, 10]
type=explod
triggerall=ishelper(3)
triggerall=(root,var(7)&1024)&&(root,var(7)&2048)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15042)&&0
anim=15040
id=15042
sprpriority=5
postype=p1
pos=30,-25
under=0
bindtime=-1
scale=0.5,0.3
ownpal=1
ontop=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 152, 11]
type=explod
triggerall=ishelper(3)
triggerall=(root,var(7)&1024)&&(root,var(7)&2048)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15041)
anim=15040
id=15041
sprpriority=50
postype=p1
pos=30,-25
under=0
bindtime=-1
scale=0.5,0.3
trans=sub
ownpal=1
ontop=0
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

;==========================================================================================
; SYS
;==========================================================================================
[state 152, 0-S-0]
type=statetypeset
triggerall=ishelper(3)
trigger1=!(root,var(7)&2048)
statetype=s
[state 152, 0-S-0]
type=attackdist
trigger1=ishelper(1)||ishelper(2)
value=0
[state 152, 0-S-1]
type=changeanim
trigger1=ishelper(3)
trigger1=!(root,var(7)&2048)
value=root,anim
elem=root,animelemno(-1)
[state 152, 0-S-1]
type=palfx
trigger1=ishelper(3)
trigger1=!(root,var(7)&2048)
trigger1=!root,var(45)&&(anim=[1075,1076])
time=1
color=0
[state 152, 0-S-2]
type=nothitby
trigger1=ishelper(3)
trigger1=!(root,var(7)&2048)
trigger2=ishelper(1)||ishelper(2)
value=sca
[state 152, 0-S-3]
type=hitoverride
trigger1=ishelper(3)
trigger1=!(root,var(7)&2048)
trigger2=ishelper(1)||ishelper(2)
time=1
attr=sca,na,sa,ha,nt,st,ht,np,sp,hp,aa,at,ap
stateno=0
[state 152, 0-S-4]
type=playerpush
trigger1=ishelper(3)
trigger1=!(root,var(7)&2048)
value=0
[state 152, 1-S]
type=changeanim
trigger1=(ishelper(1)||ishelper(2)&&!numhelper(3)||ishelper(3)&&0)
value=6000
[state 152, 1-S-rev]
type=changeanim
trigger1=ishelper(2)
trigger1=numhelper(3)
value=ifelse(((helper(3),stateno=3900||helper(3),stateno=2200&&helper(3),animelemtime(3)>=0)&&helper(3),movetype=a),3900+(helper(3),stateno=2200)*12,6000)
[state 152, 1-S-rev]
type=reversaldef
trigger1=ishelper(2)&&0
trigger1=numhelper(3)
trigger1=(helper(3),stateno=3900||helper(3),stateno=2200&&helper(3),animelemtime(3)>=0)&&helper(3),movetype=a
reversal.attr=sca,aa,at,ap
hitflag=m-
priority=7
pausetime=0,0
sparkno=-1
hitsound=-1
p2stateno=3909+(helper(3),stateno=2200)*3
ignorehitpause=1
[state 152, 1-S-rev]
type=targetdrop
trigger1=ishelper(2)
[state 152, 2-S]
type=ctrlset
trigger1=ishelper
trigger1=(ishelper(1)||ishelper(2)||ishelper(3)&&!(root,var(7)&2048))
value=0
[state 152, 3-S]
type=posset
trigger1=ishelper
trigger1=(ishelper(1)||ishelper(2)||ishelper(3))
x=root,pos x
y=root,pos y;-(ishelper(1))*40
[state 152, 4-S]
type=screenbound
trigger1=ishelper
trigger1=(ishelper(1)||ishelper(2)||ishelper(3)&&!(root,var(7)&2048))
value=0
movecamera=0
[state 152, 5-S]
type=displaytoclipboard
trigger1=ishelper(1)
text="gametime-2=%d,gametime-3=%d,l-flag=%d,R4=%d,life=%d"
params=root,var(6),root,var(0),var(14),var(15),var(16)
[state 152, 6-S]
type=displaytoclipboard
trigger1=ishelper(2)
text="v-1=%d,v-2=%d"
params=var(1),var(2)
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(4)
id=4
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(5)
id=5
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(6)
id=6
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(7)
id=7
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
supermovetime=99999999
pausemovetime=99999999
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(8)
id=8
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
supermovetime=99999999
pausemovetime=99999999
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(9)
id=9
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(10)
id=10
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
[state 152, 7-S-D]
type=helper
triggerall=ishelper(2)
trigger1=!numhelper(11)
id=11
persistent=1
name="."
pos=0,0
postype=p1
stateno=0
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
[state 152, 7-S]
type=helper
triggerall=ishelper(2)
triggerall=root,palno!=12
trigger1=numhelper(4)&&numhelper(5)&&numhelper(6)
trigger1=numhelper(7)&&numhelper(8)&&numhelper(9)
trigger1=numhelper(10)&&numhelper(11)
trigger1=!numhelper(3)
id=3
persistent=1
name="."
pos=0,0
postype=p1
stateno=152+((root,var(7)&1024)&&(root,var(7)&2048))*803
helpertype=player
keyctrl=1
ownpal=1
ignorehitpause=1
[state 152, 7-S]
type=helper
triggerall=ishelper(2)
triggerall=root,palno=12
trigger1=numhelper(4)&&numhelper(5)&&numhelper(6)
trigger1=numhelper(7)&&numhelper(8)&&numhelper(9)
trigger1=numhelper(10)&&numhelper(11)
trigger1=!numhelper(3)
id=3
persistent=1
name="."
pos=0,0
postype=p1
stateno=152+((root,var(7)&1024)&&(root,var(7)&2048))*818
helpertype=player
keyctrl=1
ownpal=0
ignorehitpause=1
;supermovetime=99999999
;pausemovetime=99999999
[state 152, 8-S]
type=helper
triggerall=ishelper(1)
trigger1=root,palno=12
trigger1=(root,pos x=[-150,150])&&!numhelper(6080)
trigger1=root,command="x"
id=6080
name="tamatamakintamabokki"
pos=1,0
postype=p1
stateno=6080
helpertype=normal
keyctrl=0
ownpal=1
[state 152, 8-S]
type=helper
triggerall=ishelper(1)
trigger1=root,palno=12
trigger1=(root,pos x=[-150,150])&&!numhelper(6081)
trigger1=root,command="y"
id=6081
name="tamatamakintamabokki"
pos=1,0
postype=p1
stateno=6080
helpertype=normal
keyctrl=0
ownpal=1
[state 152, 8-S]
type=helper
triggerall=ishelper(1)
trigger1=root,palno=12
trigger1=(root,pos x=[-150,150])&&!numhelper(6082)
trigger1=root,command="a"
id=6082
name="tamatamakintamabokki"
pos=1,0
postype=p1
stateno=6080
helpertype=normal
keyctrl=0
ownpal=1
[state 152, 8-S]
type=helper
triggerall=ishelper(1)
trigger1=root,palno=12
trigger1=(root,pos x=[-150,150])&&!numhelper(6083)
trigger1=root,command="b"
id=6083
name="tamatamakintamabokki"
pos=1,0
postype=p1
stateno=6080
helpertype=normal
keyctrl=0
ownpal=1
[state 152, 8-S]
type=helper
triggerall=ishelper(1)
trigger1=root,palno=12
trigger1=(root,pos x=[-150,150])&&!numhelper(6084)
trigger1=root,command="z"
id=6084
name="tamatamakintamabokki"
pos=1,0
postype=p1
stateno=6080
helpertype=normal
keyctrl=0
ownpal=1
[state 152, 8-S]
type=helper
triggerall=ishelper(1)
trigger1=root,palno=12
id=99
persistent=1
name="."
pos=0,0
postype=p1
stateno=6050
helpertype=player
keyctrl=0
ownpal=1
ignorehitpause=1
supermovetime=99999999
pausemovetime=99999999
[state 152, 8-S]
type=assertspecial
triggerall=ishelper(1)&&0
triggerall=root,palno=12&&roundstate=3
trigger1=!enemynear(root,var(18)),alive
trigger2=enemynear(root,var(18)),life<root,life
flag=roundnotover
ignorehitpause=1
[state 152, 8-S]
type=null;poweradd
triggerall=ishelper(1)
trigger1=(numenemy=2||numpartner||root,palno=6)
value=1+((root,palno=6&&root,var(26))*2)+(root,var(22)*3)+(root,palno=6&&(gametime%1000=[1,200]))*(4+(root,life<=lifemax*0.25)*16)
[state 152, 8-S]
type=null
triggerall=ishelper(1)
triggerall=numhelper(3)
triggerall=helper(3),movetype=h
trigger1=(gametime%2=0)
trigger1=var(10):=ceil(helper(3),life)
trigger2=!(gametime%2=0)
trigger2=var(12):=ceil(helper(3),life)
[state 152, 9-S]
type=null
triggerall=ishelper(1)
triggerall=fvar(2):=0||1         ;255=low-d-h 0=normal
triggerall=numhelper(3)
triggerall=helper(3),movetype!=H
trigger1=fvar(3):=0||1
trigger2=fvar(4):=0||1
[state 152, 10-S]
type=varadd
triggerall=ishelper(1)
triggerall=numhelper(3)
triggerall=root,var(6)!=gametime-1
triggerall=helper(3),movetype=h
triggerall=helper(3),stateno!=[5100,5150]
trigger1=var(10)-helper(3),life=[1,(lifemax*(0.2-(0.15*(fvar(2)=255)))))
trigger1=fvar(3):=ifelse(fvar(2)=255,2.2,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),1.0,1.0+!root,var(45)*0.2))-(root,palno=12)*0.5)
trigger2=var(10)-helper(3),life=[(lifemax*(0.2-(0.15*(fvar(2)=255)))),(lifemax*0.4))
trigger2=fvar(3):=ifelse(fvar(2)=255,0.3,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.8,0.8+!root,var(45)*0.2))-(root,palno=12)*0.5)
trigger3=var(10)-helper(3),life=[(lifemax*0.4),(lifemax*0.6))
trigger3=fvar(3):=ifelse(fvar(2)=255,0.1,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.6,0.6+!root,var(45)*0.4))-(root,palno=12)*0.2)
trigger4=var(10)-helper(3),life=[(lifemax*0.6),(lifemax*0.8))
trigger4=fvar(3):=ifelse(fvar(2)=255,0.05,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.4,0.4+!root,var(45)*0.6))-(root,palno=12)*0.1)
trigger5=var(10)-helper(3),life>=(lifemax*0.8)
trigger5=fvar(3):=ifelse(fvar(2)=255,0,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.4,0.4))-(root,palno=12)*0.01)
v=16
value=-ceil((((var(10)-helper(3),life)*fvar(0))*fvar(3))*ifelse(0&&root,palno=6&&root,var(45),0.4,1))
[state 152, 11-S]
type=varadd
triggerall=ishelper(1)
triggerall=numhelper(3)
triggerall=root,var(6)!=gametime-1
triggerall=helper(3),movetype=h
triggerall=helper(3),stateno!=[5100,5150]
trigger1=var(12)-helper(3),life=[1,(lifemax*(0.2-(0.15*(fvar(2)=255)))))
trigger1=fvar(4):=ifelse(fvar(2)=255,2.2,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),1.0,1.0+!root,var(45)*0.2))-(root,palno=12)*0.5)
trigger2=var(12)-helper(3),life=[(lifemax*(0.2-(0.15*(fvar(2)=255)))),(lifemax*0.4))
trigger2=fvar(4):=ifelse(fvar(2)=255,0.3,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.8,0.8+!root,var(45)*0.2))-(root,palno=12)*0.5)
trigger3=var(12)-helper(3),life=[(lifemax*0.4),(lifemax*0.6))
trigger3=fvar(4):=ifelse(fvar(2)=255,0.1,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.6,0.6+!root,var(45)*0.4))-(root,palno=12)*0.2)
trigger4=var(12)-helper(3),life=[(lifemax*0.6),(lifemax*0.8))
trigger4=fvar(4):=ifelse(fvar(2)=255,0.05,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.4,0.4+!root,var(45)*0.6))-(root,palno=12)*0.1)
trigger5=var(12)-helper(3),life>=(lifemax*0.8)
trigger5=fvar(4):=ifelse(fvar(2)=255,0,(ifelse((root,palno<11&&root,var(45)&&root,var(20)),0.4,0.4))-(root,palno=12)*0.01)
v=16
value=-ceil((((var(12)-helper(3),life)*fvar(0))*fvar(4))*ifelse(0&&root,palno=6&&root,var(45),0.4,1))
[state 152, 12-S]
type=null
triggerall=ishelper(1)
trigger1=root,var(6)=gametime-1&&var(16)!=0
trigger1=var(17):=var(17)+1||1
trigger1=var(17)=2
trigger1=var(16):=0
trigger2=!var(16)
trigger2=var(17):=0
[state 152, 13-S]
type=null
triggerall=ishelper(1)&&0
triggerall=root,palno=6
triggerall=numhelper(3)
trigger1=root,life>=lifemax*0.4
trigger1=fvar(0):=0.8-((root,var(26)!=0)*0.2)-((root,var(26)!=0&&helper(3),var(0)!=gametime-1)*0.6)
trigger2=root,life<lifemax*0.4
trigger2=fvar(0):=0.6-((root,var(26)!=0)*0.2)-((root,var(26)!=0&&helper(3),var(0)!=gametime-1)*0.4)
[state 152, 13-S]
type=null
triggerall=ishelper(1)
triggerall=root,palno=[1,6]
trigger1=root,life>=lifemax*0.4
trigger1=fvar(0):=1.2-(var(13)>100)*0.2
trigger2=root,life<lifemax*0.4
trigger2=fvar(0):=1.0-(var(13)>5)*0.2
[state 152, 13-S]
type=null
triggerall=ishelper(1)
triggerall=root,palno=[7,12]
trigger1=root,life>=lifemax*0.4
trigger1=fvar(0):=ifelse(root,palno=11,1.6,1.0-((var(13)>100-(root,palno=12)*50)*(0.2+(root,palno=12)*0.7)))
trigger2=root,life<lifemax*0.4
trigger2=fvar(0):=ifelse(root,palno=11,1.4,0.8-((var(13)>5-(root,palno=12)*4)*(0.2+(root,palno=12)*0.2)))
[state 152, 14-S]
type=varset
triggerall=ishelper(1)
trigger1=numhelper(3)
v=13
value=(var(13)+1)*(helper(3),movetype=h)
[state 152, 15-S]
type=varset
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=root,life<=1&&!var(14)
v=14
value=var(14)+1
[state 152, 16-S]
type=varset
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=root,life>=lifemax-1&&var(14)
v=14
value=0
[state 152, 17-S]
type=varset
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=roundstate>3
v=15
value=var(15)+1
[state 152, 17-S]
type=varset
triggerall=ishelper(1)
trigger1=gametime%50=0
v=18
value=(var(18)+1)*(var(18)<=5)
[state 152, 18-S-HABG]
type=assertspecial
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=helper(3),stateno=[2000,2010]
trigger2=helper(3),stateno=[2900,2901]
flag=nobardisplay
flag2=nobg
flag3=nofg
[state 152, 18-S-HA-S]
type=assertspecial
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=helper(3),stateno=[2900,2902]
flag=nokoslow
[state 152, 18-S-HA-APAL]
type=varset
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=!var(20)&&helper(3),stateno=2901&&helper(3),time=192
trigger2=var(20)
v=20
value=(var(20)+1)*(var(20)<=121)
[state 152, 18-S-HA-APAL]
type=null
triggerall=ishelper(1)
trigger1=var(20)<=1
trigger1=var(21):=ifelse(var(20)=1,255,0)
trigger2=var(20)=[2,60]
trigger2=var(21)>=0
trigger2=var(21):=var(21)-4
trigger3=var(20)=[61,120]
trigger3=var(21)<=255
trigger3=var(21):=var(21)+7
[state 152, 18-S-HA-APAL]
type=allpalfx
triggerall=ishelper(1)
trigger1=var(20)=[2,120]
mul=var(21),var(21),var(21)
time=1
[state 152, 19-S-KO-V]
type=playsnd
trigger1=ishelper(1)
trigger1=!var(19)
trigger1=var(19):=loseko
value=110,100+(!root,var(45)||root,palno=12)*random%4
volume=180
[state 152, 19-S-hit245]
type=null
triggerall=ishelper(1)
triggerall=numhelper(3)
trigger1=helper(3),movetype=a
trigger1=helper(3),anim=245&&helper(3),movehit
trigger1=var(22):=var(22)+1
trigger2=!(helper(3),movetype=a||helper(3),anim=245)
trigger2=var(22):=0
[state 152, 19-S-hit245]
type=envcolor
trigger1=ishelper(1)
trigger1=var(22)=1
time=1
value=200,0,0
under=1
[state 152, 19-S-hit245]
type=envshake
trigger1=ishelper(1)
trigger1=var(22)=1
time=6
ampl=6
freq=90
phase=90
[state 152, -S]
type=turn
triggerall=ishelper(1)
triggerall=numhelper(3)
triggerall=!root,var(45)
trigger1=facing!=helper(3),facing
[state 152, -S]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)&&!numexplod(3005152)
trigger1=helper(3),stateno=1094
trigger1=helper(3),movetype=a
trigger1=helper(3),animelemtime(1)=1
trigger2=helper(3),stateno=1754
trigger2=helper(3),movetype=a
trigger2=helper(3),animelemtime(4)=1
trigger3=helper(3),stateno=2204
trigger3=helper(3),movetype=a
trigger3=helper(3),animelemtime(20)=90
trigger4=helper(3),stateno=3914&&0
trigger4=helper(3),movetype=a
trigger4=helper(3),animelemtime(3)=1
trigger5=helper(3),stateno=3904
trigger5=helper(3),movetype=a
trigger5=helper(3),animelemtime(20)=90
trigger6=helper(3),stateno=2854
trigger6=helper(3),movetype=a
trigger6=helper(3),animelemtime(8)=30
anim=3005
id=3005152
sprpriority=-50
postype=p1
pos=67,-100
bindtime=1
ownpal=0
ontop=0
scale=1.0,1.0
trans=add
[state 152, -S]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),stateno=3914
trigger1=helper(3),movetype=a
trigger1=helper(3),animelemtime(3)=1
anim=3005
id=3005152
sprpriority=-50
postype=back
pos=340,145
bindtime=-1
ownpal=0
ontop=0
scale=1.0,1.0
trans=add
[state 152, -S]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
triggerall=helper(3),stateno=2204||helper(3),stateno=3904
triggerall=helper(3),movetype=a
trigger1=helper(3),animelemtime(20)=1
trigger2=helper(3),animelemtime(20)=5
trigger3=helper(3),animelemtime(20)=10
trigger4=helper(3),animelemtime(20)=15
trigger5=helper(3),animelemtime(20)=20
trigger6=helper(3),animelemtime(20)=25
trigger7=helper(3),animelemtime(20)=30
trigger8=helper(3),animelemtime(20)=32
trigger9=helper(3),animelemtime(20)=34
trigger10=helper(3),animelemtime(20)=36
trigger11=helper(3),animelemtime(20)=38
trigger12=helper(3),animelemtime(20)=40
trigger13=helper(3),animelemtime(20)=42&&helper(3),stateno=3904
trigger14=helper(3),animelemtime(20)=44&&helper(3),stateno=3904
trigger15=helper(3),animelemtime(20)=46&&helper(3),stateno=3904
trigger16=helper(3),animelemtime(20)=48&&helper(3),stateno=3904
trigger17=helper(3),animelemtime(20)=50&&helper(3),stateno=3904
trigger18=helper(3),animelemtime(20)=52&&helper(3),stateno=3904
anim=3005
id=3005153
sprpriority=250
postype=p1
pos=10+random%80,-40-random%130
bindtime=1
ownpal=0
ontop=0
scale=0.5,0.5
trans=add
[state 152, -S]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),stateno=1094
trigger1=helper(3),movetype=a
trigger1=helper(3),animelemtime(1)=[1,10]
trigger2=helper(3),stateno=1754
trigger2=helper(3),movetype=a
trigger2=helper(3),animelemtime(4)>=0
trigger3=helper(3),stateno=2204||helper(3),stateno=3904
trigger3=helper(3),movetype=a
trigger3=helper(3),animelemtime(3)>=0&&helper(3),animelemtime(5)<0||helper(3),animelemtime(8)>=0&&helper(3),animelemtime(9)<0||helper(3),animelemtime(12)>=0&&helper(3),animelemtime(13)<0
trigger4=helper(3),stateno=2204||helper(3),stateno=3904
trigger4=helper(3),movetype=a
trigger4=helper(3),animelemtime(16)>=0&&helper(3),animelemtime(17)<0||helper(3),animelemtime(20)>=0&&helper(3),animelemtime(20)<90+(helper(3),stateno=3904)*0
trigger5=helper(3),stateno=3914
trigger5=helper(3),movetype=a
trigger5=helper(3),animelemtime(3)>=0&&helper(3),animelemtime(5)<0
trigger6=helper(3),stateno=2854
trigger6=helper(3),movetype=a
trigger6=helper(3),animelemtime(8)>=30&&helper(3),animelemtime(9)<0
anim=6101
sprpriority=50
postype=p1
pos=37+random%60,-50-random%100
bindtime=1
removetime=44
ownpal=0
ontop=1
vel=-1+random%3,1-random%3
scale=0.5,0.5
[state 152, -S]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),stateno=3914&&0
trigger1=helper(3),movetype=a
trigger1=helper(3),animelemtime(3)>=0&&helper(3),animelemtime(5)<0
anim=6101
sprpriority=50
postype=p1
pos=37+random%60,-50-random%100
bindtime=1
removetime=44
ownpal=0
ontop=1
vel=-1+random%3,1-random%3
scale=0.5,0.5
[state 152, -S]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),stateno=2204||helper(3),stateno=3904
trigger1=helper(3),movetype=a
trigger1=helper(3),animelemtime(20)>=0&&helper(3),animelemtime(20)<90+(helper(3),stateno=3904)*0
anim=6101
sprpriority=500
postype=p1
pos=37+random%60,-50-random%100
bindtime=1
removetime=44
ownpal=0
ontop=1
vel=-1+random%3,1-random%3
scale=0.5,0.5
trans=sub
;----------------------------
[state ]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),movetype=a
trigger1=helper(3),stateno=2853
trigger1=helper(3),time>=4
trigger1=!(helper(3),time%6)
anim=1562
sprpriority=-50
postype=p1
pos=0,-30
bindtime=1
ownpal=0
ontop=1
scale=1.0,1.0
trans=add
[state ]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),movetype=a
trigger1=helper(3),stateno=2853
trigger1=helper(3),time>=4
trigger1=!(helper(3),time%6)
anim=1562
sprpriority=-50
postype=p1
pos=0,-60
bindtime=1
ownpal=0
ontop=1
scale=1.0,1.0
trans=add
[state ]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),movetype=a
trigger1=helper(3),stateno=2853
trigger1=helper(3),time>=4
trigger1=!(helper(3),time%6)
anim=1562
sprpriority=-50
postype=p1
pos=0,-90
bindtime=1
ownpal=0
ontop=1
scale=0.5,0.5
trans=add
[state ]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),movetype=a
trigger1=helper(3),stateno=2853
trigger1=helper(3),time>=4
trigger1=!(helper(3),time%6)
anim=1562
sprpriority=-50
postype=p1
pos=0,-120
bindtime=1
ownpal=0
ontop=1
scale=0.5,0.5
trans=add
[state ]
type=explod
triggerall=ishelper(1)
triggerall=!root,var(45)
triggerall=numhelper(3)
trigger1=helper(3),movetype=a
trigger1=helper(3),stateno=2853
trigger1=helper(3),time>=4
trigger1=!(helper(3),time%6)
anim=1562
sprpriority=-50
postype=p1
pos=0,-150
bindtime=1
ownpal=0
ontop=1
scale=0.25,0.25
trans=add
;---------------------------------------
[state 152, -S]
type=palfx
triggerall=ishelper(1)
triggerall=!root,var(45)
trigger1=root,palno=1
trigger1=var(52):=255&&var(53):=255&&var(54):=255
trigger2=root,palno=2
trigger2=var(52):=250&&var(53):=200&&var(54):=50
trigger3=root,palno=3
trigger3=var(52):=50&&var(53):=250&&var(54):=40
trigger4=root,palno=4
trigger4=var(52):=250&&var(53):=50&&var(54):=50
trigger5=root,palno=5
trigger5=var(52):=250&&var(53):=100&&var(54):=250
trigger6=root,palno=6
trigger6=var(52):=250&&var(53):=250&&var(54):=250
time=1
mul=var(52),var(53),var(54)
add=10,10,10
color=(!(root,palno=1||root,palno=6))*256
ignorehitpause=1
[state 152, 12EP]
type=palfx
triggerall=ishelper(1)
triggerall=root,palno=12&&var(50):=var(50)+1
trigger1=var(50)%1000=[1,250)
trigger1=var(52):=250-root,var(1)&&var(53):=root,var(1)&&var(54):=0||1
trigger2=var(50)%1000=[250,500)
trigger2=var(52):=250-root,var(1)&&var(53):=0&&var(54):=250-root,var(1)||1
trigger3=var(50)%1000=[500,750)
trigger3=var(52):=root,var(1)&&var(53):=root,var(1)+50&&var(54):=250||1
trigger4=var(50)%1000>=750
trigger4=var(52):=200&&var(53):=root,var(1)&&var(54):=0||1
time=1
mul=var(52),var(53),var(54)
add=10,10,10
ignorehitpause=1
[state 152, 12EP]
type=explod
triggerall=ishelper(1)
trigger1=root,palno=12
trigger1=!root,var(59)&&1;!(gametime%2)
anim=6101
id=6101
sprpriority=90
postype=p1
pos=-10+random%20,-7
scale=0.25,0.25
removetime=22
accel=0,0.01
vel=0,1
ownpal=0
pausemovetime=9999999
supermovetime=9999999
[state 152, -S]
type=selfstate
triggerall=ishelper(3)
trigger1=(root,var(7)&1024)&&!(root,var(7)&2048)
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; CGUARDHIT2 (knocked back)
;==========================================================================================
;==========================================================================================

[statedef 153]
type=c
movetype=h
physics=c

[state 153]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 153]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=151
ignorehitpause=1

[state 153, 1]
type=hitvelset
trigger1=!time
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, 4]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=s
trigger1=!root,var(15)
trigger1=command="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype=c
statetype=c
physics=c

[state 153, 5]
type=statetypeset
triggerall=ishelper(3)
triggerall=statetype=c
trigger1=!root,var(15)
trigger1=command!="holddown"
trigger2=root,var(15)
trigger2=enemynear(root,var(18)),statetype!=c
statetype=s
physics=s

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

;==========================================================================================
;==========================================================================================
; AGUARDHIT (shaking)
;==========================================================================================
;==========================================================================================

[statedef 154]
type=a
movetype=h
physics=n
velset=0,0

[state 154]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 154, 1]
type=changeanim
trigger1=ishelper(3)
value=152

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

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

[state 154, 4]
type=poweradd
triggerall=ishelper(3)
trigger1=!time&&(root,palno=[7,12])
value=50

[state 154, 5]
type=playsnd
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15040)
value=4000,21
volume=150
freqmul=1.2

[state 154, 6]
type=explod
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15040)
anim=15040
id=15040
sprpriority=5
postype=p1
pos=30,-70
under=0
bindtime=-1
scale=0.5,0.3
ownpal=1
ontop=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 154, 7]
type=explod
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15042)&&0
anim=15040
id=15042
sprpriority=5
postype=p1
pos=30,-70
under=0
bindtime=-1
scale=0.5,0.3
ownpal=1
ontop=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 154, 8]
type=explod
triggerall=ishelper(3)
triggerall=root,var(45)
trigger1=!time&&!numexplod(15041)
anim=15040
id=15041
sprpriority=50
postype=p1
pos=30,-70
under=0
bindtime=-1
scale=0.5,0.3
trans=sub
ownpal=1
ontop=0
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

;==========================================================================================
;==========================================================================================
; AGUARDHIT2 (knocked away)
;==========================================================================================
;==========================================================================================

[statedef 155]
type=a
movetype=h
physics=n

[state 155]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 155]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=152
ignorehitpause=1

[state 155, 1]
type=hitvelset
trigger1=!time
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
sysvar(0)=(pos y>=0)&&(vel y>0)

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

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

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

[state 155, 7]
type=changestate
trigger1=sysvar(0)
value=52

;==========================================================================================
;==========================================================================================
; タイムオーバー
;==========================================================================================
;==========================================================================================

[statedef 170]
type=s
ctrl=0
velset=0,0

[state 170]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!(!ishelper||ishelper(3))
value=69996
ignorehitpause=1

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

[state 170, 2]
type=changeanim
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=!time
value=170+random%2

;==========================================================================================
;==========================================================================================
; タイムオーバー(ドロー)
;==========================================================================================
;==========================================================================================

[statedef 175]
type=s
ctrl=0
velset=0,0

[state 175]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!(!ishelper||ishelper(3))
value=69996
ignorehitpause=1

[state 175, 1]
type=changestate
trigger1=!time
trigger1=!selfanimexist(175)
value = 170

[state 175, 2]
type=changeanim
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=!time
value=175

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

;==========================================================================================
;==========================================================================================
; 勝利
;==========================================================================================
;==========================================================================================

[statedef 180]
type=s

[state 180]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
value=69996
ignorehitpause=1

[state 180]
type=changestate
trigger1=ishelper(3)
trigger1=!time&&!root,var(45)
value=185;+!(random%2)*4

[state 180]
type=changestate
trigger1=!time
value=181+ifelse(!(random%40),random%4,0)

;==========================================================================================
;==========================================================================================
; 勝利1
;==========================================================================================
;==========================================================================================

[statedef 181]
type=s
ctrl=0
anim=181
velset=0,0

[state 181]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
value=69996
ignorehitpause=1

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

[state 181, 2]
type=playsnd
trigger1=time>=5&&!(time%30)
value=4000,87
freqmul=0.9
volume=10

[state 181, 2]
type=playsnd
trigger1=time=20||time=24
value=181,0

[state 181, 3]
type=explod
trigger1=animelemtime(1)=1
anim=187
id=187
sprpriority=-5
postype=p1
pos=0,0
under=0
bindtime=1
scale=0.5,0.5
ownpal=1
removetime=-1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 181, 3]
type=explod
trigger1=animelemtime(1)=1
anim=187
id=187
sprpriority=-10
postype=p1
pos=0,0
under=0
bindtime=1
scale=0.5,0.5
ownpal=1
removetime=-1
trans=sub
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 181, 3]
type=explod
trigger1=animelemtime(1)=1
anim=187
id=187
sprpriority=-10
postype=p1
pos=0,0
under=0
bindtime=1
scale=0.5,0.5
ownpal=1
removetime=-1
trans=sub
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 181, 4]
type=explod
triggerall=ishelper(3)
trigger1=time>12&&!(time%6)
anim=2011
id=2011
sprpriority=99
postype=p1
pos=-30+random%60,-30
bindtime=1
supermove=1
ownpal=1
ontop=1
vel=0,-3
scale=0.5,0.5
ignorehitpause=1

[state 181, 5]
type=assertspecial
trigger1=time=[0,230]
flag=roundnotover
ignorehitpause=1

;==========================================================================================
;==========================================================================================
; 勝利2
;==========================================================================================
;==========================================================================================

[statedef 182]
type=s
ctrl=0
anim=183
velset=0,0

[state 182]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
value=69996
ignorehitpause=1

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

[state 182, 2]
type=playsnd
trigger1=animelemtime(10)=1||animelemtime(56)=1||animelemtime(57)=2
value=ifelse(animelemtime(10)=1,290,182),(animelemtime(10)=1)

[state 182, 3]
type=assertspecial
trigger1=time=[0,230]
flag=roundnotover
ignorehitpause=1

;==========================================================================================
;==========================================================================================
; 勝利3
;==========================================================================================
;==========================================================================================

[statedef 183]
type=s
ctrl=0
anim=184
velset=0,0

[state 183]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
value=69996
ignorehitpause=1

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

[state 183, 2]
type=playsnd
trigger1=animelemtime(12)=1||animelemtime(12)=5
value=181,0

[state 183, 3]
type=assertspecial
trigger1=time=[0,200]
flag=roundnotover
ignorehitpause=1

;==========================================================================================
;==========================================================================================
; 勝利4
;==========================================================================================
;==========================================================================================

[statedef 184]
type=s
ctrl=0
anim=186
velset=0,0

[state 184]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
value=69996
ignorehitpause=1

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

[state 181, 2]
type=playsnd
trigger1=animelemtime(22)=5||animelemtime(23)=3
value=1200,0

[state 184, 2]
type=explod
trigger1=animelemtime(3) = 1
anim=188
id=188
sprpriority=5
postype=p1
pos=0,0
under=0
bindtime=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 184, 3]
type=assertspecial
trigger1=time=[0,210]
flag=roundnotover
ignorehitpause=1

;==========================================================================================
;==========================================================================================
; 勝利5
;==========================================================================================
;==========================================================================================

[statedef 185]
type=s
ctrl=0
anim=1074
velset=0,0

[state 185]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
value=69996
ignorehitpause=1

[state 185, 1]
type=null
trigger1=ishelper(3)&&!time
trigger1=fvar(18):=random%5

[state 185, 1]
type=nothitby
trigger1=ishelper(3)
value=sca
time=1

[state 185, 2]
type=playsnd
trigger1=time=2||time=4||time=7||time=9
value=1200,2
freqmul=1.1+(time>=8)*0.3
volume=255

[state 185, 2]
type=null;explod
trigger1=animelemtime(3) = 1
anim=188
id=188
sprpriority=5
postype=p1
pos=0,0
under=0
bindtime=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 185, 3]
type=screenbound
trigger1=1
value=0
movecamera=0

[state 185, 4]
type=veladd
trigger1=ishelper(3)
trigger1=fvar(18)<=2
trigger1=time>=50
y=-0.02-(time>=100)*0.6

[state 185, 4]
type=veladd
trigger1=ishelper(3)
trigger1=fvar(18)=[3,4]
trigger1=time=[50,100]
y=-0.03

[state 185, 4]
type=velset
trigger1=ishelper(3)
trigger1=fvar(18)=[3,4]
trigger1=time>=100
y=0

[state 185, 4]
type=veladd
trigger1=ishelper(3)
trigger1=fvar(18)=[1,2]
trigger1=time>=50
x=(0.02+(time>=100)*0.6)*ifelse((fvar(18)=1),1,-1)

[state 185, 4]
type=veladd
trigger1=ishelper(3)
trigger1=fvar(18)=[3,4]
trigger1=time>=100
x=(0.02+(time>=100)*0.6)*ifelse((fvar(18)=3),1,-1)

[state 185, 4]
type=null;velset
trigger1=ishelper(3)
trigger1=time>=50
y=-0.1

[state 185, 5]
type=playsnd
trigger1=ishelper(3)
trigger1=!(gametime%4)
trigger1=time<=130
value=4000,40;36
freqmul=1.6
volume=5

[state 185, 6]
type=envshake
triggerall=ishelper(3)
trigger1=time<=130
trigger1=!(gametime%4)
time=4
ampl=4
freq=120
phase=120

[state 185, 7]
type=assertspecial
trigger1=time=[0,210]
flag=roundnotover

;==========================================================================================
;==========================================================================================
; イントロ1
;==========================================================================================
;==========================================================================================

[statedef 190]
type=s
ctrl=0
velset=0,0

[state 190]
type=destroyself
trigger1=!ishelper(3)

[state 190, 1]
type=changeanim
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=selfanimexist(190)
value=190

[state 190, 2]
type=changestate
trigger1=!time
trigger1=palno<7
trigger1=var(39):=ifelse(!(random%14),2,random%2)||1
value=192

[state 190, 3]
type=changestate
trigger1=!time
trigger1=var(39):=ifelse((palno=[7,12]),1+(random%2),0)||1
value=191

;==========================================================================================
;==========================================================================================
; イントロ2
;==========================================================================================
;==========================================================================================

[statedef 191]
type=s
ctrl=0
;anim=190
velset=0,0

[state 191]
type=destroyself
trigger1=!ishelper(3)

[state 191]
type=changeanim
triggerall=palno=12
trigger1=anim!=11721
value=11721

[state 191]
type=changeanim
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=!roundstate
value=190

[state 191]
type=assertspecial
trigger1=1
flag=intro

[state 191]
type=playsnd
triggerall=!ishelper&&palno!=12||ishelper(3)
trigger1=animelemtime(9)=1||animelemtime(10)=1||animelemtime(11)=1
value=ifelse(animelemtime(11)=1,1200,ifelse(!var(39),190,4102-var(39))),(animelemtime(11)=1)*10
freqmul=1.0+((var(39)=[1,2])&&animelemtime(10)=1)*0.1
volume=(var(39)=[1,2])*200

[state 191]
type=playsnd
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=animelemtime(12)=1
value=1200,10
volume=50
freqmul=0.8

[state 191]
type=playsnd
trigger1=palno=12
trigger1=!numexplod(191)
value=4000,70
volume=250
freqmul=1.1

[state 191]
type=playsnd
trigger1=palno=12
trigger1=!numexplod(191)
value=4000,70
volume=250
freqmul=1.0

[state 191]
type=explod
trigger1=palno=12
trigger1=!numexplod(191)
anim=3912
id=191
sprpriority=5
postype=p1
pos=0,608
under=0
bindtime=1
removetime=-1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 191]
type=explod
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=animelemtime(11)=1
anim=191
id=191
sprpriority=5
postype=p1
pos=0,0
under=0
bindtime=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[state 191]
type=offset
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=animelemtime(11)>0
x=0
y=-12
ignorehitpause=1

[state 191]
type=changestate
trigger1=!ishelper&&palno!=12||ishelper(3)
trigger1=!animtime
trigger2=palno=12&&time>200
value=0

;==========================================================================================
;==========================================================================================
; イントロ3-1
;==========================================================================================
;==========================================================================================

[statedef 192]
type=s
ctrl=0
anim=1075
movetype=i
physics=n

[state 192]
type=destroyself
trigger1=!ishelper(3)

[state 192]
type=nothitby
trigger1=1
value=sca
time=1

[state 192]
type=posset
trigger1=!time
y=-320

[state 192]
type=posadd
trigger1=time>=90
y=30

[state 192]
type=playsnd
trigger1=!var(39)
trigger1=!time||time=3
value=190,0
freqmul=1.0
volume=255

[state 192]
type=playsnd
trigger1=var(39)=2
trigger1=!time
value=4000,60
freqmul=1.0
volume=255

[state 192]
type=playsnd
trigger1=var(39)=2
trigger1=pos y>=0
value=4000,61
freqmul=1.0
volume=255

[state 192]
type=playsnd
trigger1=var(39)=1
trigger1=pos y>=0
value=4000,62
freqmul=1.0
volume=255

[state 192]
type=playsnd
trigger1=var(39)=1
trigger1=pos y>=0
value=4000,63
freqmul=1.0
volume=255

[state 192]
type=playsnd
trigger1=var(39)=1
trigger1=pos y>=0
value=4000,64
freqmul=1.0
volume=255

[state 192]
type=playsnd
trigger1=pos y>=0
value=4000,40
freqmul=0.8
volume=255

[state 192]
type=playsnd
trigger1=pos y>=0
value=4000,40
freqmul=0.6
volume=255

[state 192]
type=explod
trigger1=pos y>=0
anim=1072
sprpriority=99
postype=p1
pos=-20,0
bindtime=-1
ownpal=1

[state 192]
type=explod
trigger1=pos y>=0
anim=1073
sprpriority=99
postype=p1
pos=20,0
bindtime=-1
ownpal=1

[state 192]
type=screenbound
trigger1=1
value=1
movecamera=1

[state 192]
type=palfx
trigger1=1
time=1
color=0

[state 192]
type=assertspecial
trigger1=1
flag=intro

[state 192]
type=explod
trigger1=var(39)=[1,2]
trigger1=!time
trigger1=!numexplod(1171192+(var(39)=2))
anim=1171+(var(39)=2)
id=1171192+(var(39)=2)
sprpriority=-300
postype=p1
pos=0,323
under=5
ownpal=1
removetime=ifelse((var(39)=2),-1,253)
shadow=-1
bindtime=1

[state 192]
type=modifyexplod
trigger1=!ishelper
trigger1=numexplod(1171192+(var(39)=2))
trigger1=time>=96&&var(40)<=9
trigger1=var(40):=var(40)+1||1
id=1171192+(var(39)=2)
scale=1.0+(var(40)*0.1),1.0-(var(40)*0.18)
ignorehitpause=1

[state 192]
type=changestate
trigger1=pos y>=0
value=193

;==========================================================================================
;==========================================================================================
; イントロ3-2
;==========================================================================================
;==========================================================================================

[statedef 193]
type=s
ctrl=0
velset=0,0

[state 193]
type=destroyself
trigger1=!ishelper(3)

[state 193]
type=nothitby
trigger1=1
value=sca

[state 193]
type=posset
trigger1=!time
y=0

[state 193]
type=envshake
trigger1=!time
time=40
ampl=15
freq=120
phase=120

[state 193]
type=explod
trigger1=time=5
anim=1072
sprpriority=99
postype=p1
pos=10,0
bindtime=-1
ownpal=1

[state 194]
type=explod
trigger1=time=5
anim=1073
sprpriority=99
postype=p1
pos=-10,0
bindtime=-1
ownpal=1

[state 192]
type=modifyexplod
trigger1=!ishelper
trigger1=numexplod(1171192+(var(39)=2))
id=1171192+(var(39)=2)
scale=1.0+(var(40)*0.1),1.0-(var(40)*0.18)
ignorehitpause=1

[state 193]
type=changeanim
trigger1=time<=90
trigger1=anim!=1075
trigger2=time>=91
trigger2=anim!=1076
value=1075+(time>=91)

[state 193]
type=palfx
trigger1=time<=90
time=1
color=0

[state 193]
type=screenbound
trigger1=1
value=1
movecamera=1

[state 193]
type=assertspecial
trigger1=1
flag=intro

[state 193]
type=changestate
trigger1=anim=1076
trigger1=!animtime
value=0

;==========================================================================================
;==========================================================================================
; 挑発
;==========================================================================================
;==========================================================================================

[statedef 195]
type=s
ctrl=0
velset=0,0
movetype=i
physics=s
sprpriority=2

[state 195]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 195]
type=poweradd
triggerall=ishelper(3)
trigger1=animelemtime(1)=0
value=50

[state 195]
type=changeanim
trigger1=ishelper(3)
trigger1=anim!=195
value=195
ignorehitpause=1

[state 195]
type=hitoverride
trigger1=ishelper(3)&&!(var(41)&512)
trigger1=animelemtime(24)<0
time=1
attr=sca,na,sa,ha,nt,st,ht,np,sp,hp,aa,at,ap
stateno=196
ignorehitpause=1

[state 195]
type=ctrlset
trigger1=animelemtime(9)>0
value=1

[state 195]
type=playsnd
triggerall=ishelper(3)
trigger1=animelemtime(7)=1&&!(var(41)&64)
trigger1=var(41):=(var(41)|64)
trigger2=animelemtime(1)=0
trigger2=var(41):=0
value=191,0

[state 195]
type=selfstate
triggerall=ishelper(3)
trigger1=!animtime
trigger2=!root,alive
value=!root,alive*5050
ctrl=(root,alive)

;==========================================================================================
;==========================================================================================

[statedef 196]
type=s
ctrl=0
velset=0,0
physics=s
movetype=i
poweradd=200
sprpriority=2

[state 196]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 195]
type=statetypeset
triggerall=ishelper(3)
trigger1=root,palno!=[11,12]
movetype=h

[state 196]
type=palfx
triggerall=ishelper(3)&&!time
trigger1=(var(41):=ifelse((var(41)&256)&&!(var(41)&512),(var(41)|512),(var(41)|256)))||1
time=2
add=70,0,0
mul=250,180,120
ignorehitpause=1

[state 196]
type=nothitby
trigger1=ishelper(3)
value=sca
ignorehitpause=1

[state 196]
type=changeanim
trigger1=ishelper(3)
value=anim
elem=animelemno(-1)
ignorehitpause=1

[state 196]
type=selfstate
trigger1=time
value=195

;==========================================================================================
;==========================================================================================
; HITG_SHAKE
;==========================================================================================
;==========================================================================================

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

[state 5000]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5000, 2]
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=gethitvar(animtype)=[3,5]
value=5030

[state 5000, 3]
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=(gethitvar(animtype)=[4,5])&&(selfanimexist(5047+gethitvar(animtype)))
value=5047+gethitvar(animtype)

[state 5000, 4]
type=changeanim
triggerall=ishelper(3)
trigger1=time
value=anim

[state 5000,4-p]
type=poweradd
trigger1=ishelper(3)
trigger1=!time&&root,palno=6
value=100

[state 5000, 5]
type=statetypeset
trigger1=!time
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

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

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

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

[state 5000, 10]
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 5001]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

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

[state 5001, 3]
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 5000, 6]
type=changestate
triggerall=ishelper(3)
triggerall=time
trigger1=root,palno=11
trigger2=root,palno!=11
trigger2=root,var(20)
value=0
ctrl=1

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

;==========================================================================================
;==========================================================================================
; HITC_ShAKE
;==========================================================================================
;==========================================================================================

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

[state 5010]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5010, 2] 
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=gethitvar(animtype)=[3,5]
value=5030

[state 5010, 3] 
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=(gethitvar(animtype)=[4,5])&&(selfanimexist(5047+gethitvar(animtype)))
value=5047+gethitvar(animtype) 

[state 5010, 4] 
type=changeanim
triggerall=ishelper(3)
trigger1=time
value=anim

[state 5010,4-p]
type=poweradd
trigger1=ishelper(3)
trigger1=!time&&root,palno=6
value=100

[state 5010, 5] 
type=statetypeset
triggerall=!time
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

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

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

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

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

;==========================================================================================
;==========================================================================================
; HITC_SLIDE
;==========================================================================================
;==========================================================================================

[statedef 5011]
type=c
movetype=h
physics=c

[state 5011]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5011, 2]
type=changeanim
triggerall=ishelper(3)
trigger1=!animtime
value=5025+gethitvar(animtype)

[state 5011, 3] 
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
triggerall=ishelper(3)
triggerall=time
trigger1=root,palno=11
trigger2=root,palno!=11
trigger2=root,var(20)
value=11
ctrl=1

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

;==========================================================================================
;==========================================================================================
; HITA_ShAKE
;==========================================================================================
;==========================================================================================

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

[state 5020]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5020, 2] 
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=gethitvar(animtype)=[3,5]
value=5030

[state 5020, 3] 
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=(gethitvar(animtype)=[4,5])&&(selfanimexist(5047+gethitvar(animtype)))
value=5047+gethitvar(animtype) 

[state 5020, 4]
type=changeanim
triggerall=ishelper(3)
trigger1=time
value=anim

[state 5030,4-p]
type=poweradd
trigger1=ishelper(3)
trigger1=!time&&root,palno=6
value=100

[state 5030, 3] 
type=null;changestate
triggerall=ishelper(3)
triggerall=root,palno=11
trigger1=time
trigger2=vel y>0&&pos y>=10
value=5210

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

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

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

[state 5020, 8]
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=a
movetype=h
physics=n
ctrl=0

[state 5030]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

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

[state 5030, 3] 
type=changestate
triggerall=ishelper(3)
triggerall=root,alive
triggerall=(root,palno=11||root,palno!=11&&root,var(20))
trigger1=hitover
trigger2=vel y>0&&pos y>=10
value=5210

[state 5030, 4]
type=changestate
triggerall=!hitfall
trigger1=hitover
trigger2=vel y>0    
trigger2=pos y>=10  
value=5040 

[state 5030, 5]
type=changestate
triggerall=hitfall
trigger1=hitover
trigger2=vel y>0    
trigger2=pos y>=10  
value=5050 

[state 5030, 6]
type=changestate
trigger1=!animtime
value=5035 

;==========================================================================================
;==========================================================================================
;  HITA_UP_T (transition)
;==========================================================================================
;==========================================================================================

[statedef 5035]
type=a
movetype=h
physics=n

[state 5035]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5035, 1]
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=selfanimexist(5035)
trigger1=anim!=[5051,5059] 
trigger1=anim!=5090 
value=5035

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

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

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

;==========================================================================================
;==========================================================================================
;  HITA_RECOV (recovering in air, not falling)
;==========================================================================================
;==========================================================================================

[statedef 5040]
type=a
movetype=h
physics=n

[state 5040]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5040, 1]
type=changestate
trigger1=ishelper(3)
trigger1=!root,alive
trigger2=!ishelper
trigger2=!alive
value=5050

[state 5040, 2]
type=changeanim
triggerall=ishelper(3)
trigger1=!animtime
trigger1=anim!=5040
trigger2=!time
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 

;==========================================================================================
;==========================================================================================
;  HITA_FALL (knocked up, falling)
;==========================================================================================
;==========================================================================================

[statedef 5050]
type=a
movetype=h
physics=n

[state 5050]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5050, 1]
type=changeanim
triggerall=ishelper(3)
trigger1=!animtime
trigger1=anim=5035
trigger2=!time     
trigger2=anim!=5035
trigger2=(anim!=[5051,5059])&&(anim!=[5061,5069])
trigger2=anim!=5090 
value=5050

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

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

[state 5050, 4] 
type=changestate
triggerall=ishelper(3)
triggerall=root,alive
triggerall=(root,palno=11||root,palno!=11&&root,var(20))
trigger1=vel y>0&&pos y>=-20
trigger2=vel y>-1
value=5200+(vel y>-1)*10

[state 5050, 4] 
type=changestate
triggerall=vel y>0
triggerall=pos y>=-20
triggerall=canrecover
triggerall=command="recovery"
trigger1=ishelper(3)
trigger1=root,alive
trigger2=!ishelper
trigger2=alive
value=5200 

[state 5050, 5]
type=changestate
triggerall=vel y>-1
triggerall=canrecover
triggerall=command="recovery"
trigger1=ishelper(3)
trigger1=root,alive
trigger2=!ishelper
trigger2=alive
value=5210 

[state 5050, 6]
type=changestate
trigger1=vel y>0
trigger1=pos y>=ifelse((anim=[5051,5059])||(anim=[5061,5069]),0,25)
value=5100 

;==========================================================================================
;==========================================================================================
;  HIT_TRIP (shaking)
;==========================================================================================
;==========================================================================================

[statedef 5070]
type=a
movetype=h
physics=n
velset=0,0

[state 5070]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5070, 1]
type=changeanim 
triggerall=ishelper(3)
trigger1=1
value=5070

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

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

;==========================================================================================
;==========================================================================================
;  HIT_TRIP2 (fall through air)
;==========================================================================================
;==========================================================================================

[statedef 5071]
type=a
movetype=h
physics=n

[state 5071]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

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

[state 5071, 3] 
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 5080]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5080, 1]
type=varset
trigger1=!time
sysvar(2)=ifelse(gethitvar(yvel)=0,5080,5090)

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

[state 5080, 3] 
type=varset
trigger1=!time
trigger1=sysvar(2)=5090
trigger1=!selfanimexist(5090)
sysvar(2)=5030

[state 5080, 3] 
type=changeanim
trigger1=1
value=sysvar(2)

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

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

;==========================================================================================
;==========================================================================================
; HITL_SLIDE
;==========================================================================================
;==========================================================================================

[statedef 5081]
type=l
movetype=h
physics=c

[state 5081]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

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

[state 5081, 3] 
type=varset
trigger1=!time
sysvar(0)=1

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

;==========================================================================================
;==========================================================================================
; HIT_BOUNCE (hit ground)
;==========================================================================================
;==========================================================================================

[statedef 5100]
type=l
movetype=h
physics=n

[state 5100]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5100, 2]
type=fallenvshake
trigger1=!time

[state 5100, 3] 
type=varset
trigger1=!time
sysvar(1)=floor(vel y)

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

[state 5100, 3] 
type=changeanim
triggerall=ishelper(3)
trigger1=!time
trigger1=(anim=[5051,5059])||(anim=[5061,5069])
trigger1=selfanimexist(5100+(anim%10))
value=5100+(anim%10)

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

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

[state 5100, 6] 
type=velmul
trigger1=!time
x=0.75

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

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

[state 5100, 9]
type=hitfalldamage
triggerall=ishelper(3)
trigger1=time=3

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

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

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

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

;==========================================================================================
;==========================================================================================
; HIT_BOUNCE (bounce into air)
;==========================================================================================
;==========================================================================================

[statedef 5101]
type=l
movetype=h
physics=n

[state 5101]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5101, 2] 
type=changeanim
triggerall=ishelper(3)
triggerall=!time
trigger1=anim=[5101,5109]
trigger1=selfanimexist(5160+(anim%10))
value=5160+(anim%10)

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

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

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

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

;==========================================================================================
;==========================================================================================
; HIT_LIEDOWN
;==========================================================================================
;==========================================================================================

[statedef 5110]
type=l
movetype=h
physics=n

[state 5110]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5110]
type=varset
triggerall=ishelper(3)
trigger1=!root,var(45)&&root,alive
trigger1=!time
sysvar(4)=ifelse(!root,var(15),command="holdfwd"+command="holdback"*2,1+random%2)

[state 5110]
type=nothitby
trigger1=ishelper(3)
trigger1=!root,var(45)&&root,alive
trigger1=sysvar(4)
value=sca

[state 5110]
type=poweradd
trigger1=ishelper(3)
trigger1=!root,var(45)&&root,alive
trigger1=sysvar(4)
trigger1=time=1
value=250+(root,palno=6)*150

[state 5110]
type=playerpush
trigger1=ishelper(3)
trigger1=!root,var(45)&&root,alive
trigger1=sysvar(4)
value=0

[state 5110]
type=playsnd
trigger1=ishelper(3)
trigger1=!root,var(45)&&root,alive
trigger1=sysvar(4)
trigger1=time=1
value=4000,68
volume=255

[State 5110]
type=afterimage
trigger1=ishelper(3)
trigger1=!root,var(45)&&root,alive
trigger1=sysvar(4)
trigger1=time=1
time=200
timegap=1
framegap=2
trans=add1
length=5
paladd=5,5,5
palmul=1,1,1
palbright=8,8,8
palcontrast=250,250,250
palpostbright=0,0,0
ignorehitpause=1

[state 5110]
type=velset
triggerall=ishelper(3)
triggerall=!root,var(45)&&root,alive
trigger1=sysvar(4)
x=ifelse(sysvar(4)=1,26,-26)

[state 5110, EnvShake]
type=fallenvshake
trigger1=!time

[state 5110, 1] 
type=changeanim
persistent=0
triggerall=ishelper(3)
trigger1=selfanimexist(5110+(anim%10))
trigger1=anim=[5081,5089]
value=5110+(anim%10)

[state 5110, 2] 
type=changeanim
triggerall=ishelper(3)
triggerall=!time
triggerall=anim!=[5110,5119] 
trigger1=anim!=[5161,5169]
trigger2=!selfanimexist(5170+(anim%10))
value=5170

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

[state 5110, 4]
type=hitfalldamage
triggerall=ishelper(3)
trigger1=!time

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

[state 5110, Var]
type=varset
trigger1=!time
trigger1=gethitvar(fall.yvel)!=0
sysvar(1)=floor(vel y)

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

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

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

[state 5110, 9] 
type=changeanim
persistent=0
triggerall=ishelper(3)
triggerall=anim=[5171,5179]
triggerall=selfanimexist(5110+(anim%10))
trigger1=!animtime
trigger2=sysvar(0) 
value=5110+(anim%10)

[state 5110, 10] 
type=changeanim
persistent=0
triggerall=ishelper(3)
triggerall=anim!=[5111,5119]
trigger1=!animtime
trigger2=sysvar(0) 
value=5110

[state 5110, 11] 
type=changestate
triggerall=ishelper(3)
triggerall=root,stateno=5150
trigger1=!animtime
trigger2=sysvar(0) 
trigger3=anim=[5110,5119]
value=5150

[state 5110, 11] 
type=changestate
triggerall=!ishelper
triggerall=!alive
trigger1=!animtime
trigger2=sysvar(0) 
trigger3=anim=[5110,5119]
value=5150

[state 5110, 12] 
type=changestate
triggerall=ishelper(3)
triggerall=root,stateno!=5150
trigger1=!animtime
value=5120

[state 5110, 13]
type=varset
trigger1=sysvar(0)
trigger1=!time
sysvar(0)=0

[state 5110, 14] 
type=velmul
trigger1=1
x=0.85

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

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

;==========================================================================================
;==========================================================================================
; HIT_GETUP
;==========================================================================================
;==========================================================================================

[statedef 5120]
type=l
movetype=i
physics=n

[state 5120]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

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

[state 5120, 1b] 
type=changeanim
triggerall=ishelper(3)
triggerall=!time
trigger1=anim=[5111,5119]
trigger1=selfanimexist(5120+(anim%10))
value=5120+(anim%10)

[state 5120, 1c]
type=changeanim
trigger1=ishelper(3)
trigger1=root,var(45)
trigger1=anim=5120+(anim%10)
value=anim
elem=animelemno(-1)

[state 5120, 1d]
type=trans
triggerall=ishelper(3)
trigger1=root,var(45)
trans=addalpha
alpha=250-time*12,time*12

[state 5120, 1d]
type=assertspecial
triggerall=ishelper(3)
trigger1=root,var(45)
trigger1=time>=18
flag=invisible
flag2=noshadow
ignorehitpause=1

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

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

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

[state 5120, 5] 
type=nothitby
triggerall=ishelper(3)
trigger1=!root,var(45)
trigger1=!animtime
value=,nt,st,ht
time=12

[state 5120, 6] 
type=nothitby
triggerall=ishelper(3)
trigger1=!root,var(45)
trigger1=!animtime
value2=sca
time=3

[state 5120, 7]
type=playsnd
triggerall=ishelper(3)
trigger1=root,var(45)
trigger1=!time||time=4
value=4000,31
volume=250
freqmul=0.8

[state 5120, 8]
type=selfstate
triggerall=ishelper(3)
trigger1=time>=20
trigger1=root,var(45)
value=5121

[state 5120, 9]
type=selfstate
triggerall=ishelper(3)
trigger1=!animtime
trigger1=!root,var(45)
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; HIT_GETUP2
;==========================================================================================
;==========================================================================================

[statedef 5121]
type=l
movetype=i
poweradd=100
physics=n

[state 5121]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger2=!ishelper(3)
trigger3=!numhelper(3)
trigger4=!ishelper
trigger4=alive
value=69996
ignorehitpause=1

[state 5121, 1]
type=turn
triggerall=ishelper(3)
trigger1=root,var(51)

[state 5121, 1a] 
type=changeanim
triggerall=ishelper(3)
trigger1=anim!=5320
value=5320

[state 5121, 1b]
type=trans
trigger1=ishelper(3)
trans=addalpha
alpha=time*20,250-time*20

[state 5121, 1b]
type=playsnd
triggerall=ishelper(3)&&0
trigger1=!time||time=4
value=1200,1
volume=100
freqmul=1.0

[state 5121, 3]
type=nothitby
trigger1=ishelper(3)
value=sca

[state 5121, 7]
type=selfstate
trigger1=!animtime
value=0
ctrl=1

;==========================================================================================
;==========================================================================================
; HIT_LIEDEAD
;==========================================================================================
;==========================================================================================

[statedef 5150]
type=l
physics=n
sprpriority=-3
hitdefpersist=1

[state 5150]
type=changestate
trigger1=name="G-Mizuchi-v2"
trigger1=!ishelper
trigger1=alive
value=69996
ignorehitpause=1

[state 5150-SP-D]
type=palfx
trigger1=name!="G-Mizuchi-v2"
trigger1=!alive&&prevstateno=3103
time=1
color=0

[state 5150-SP-D]
type=velset
trigger1=name!="G-Mizuchi-v2"
trigger1=!alive&&(prevstateno=1301||prevstateno=3103)
x=0
y=0

[state 5150-SP-D]
type=trans
trigger1=name!="G-Mizuchi-v2"
trigger1=!alive&&prevstateno=1301
trigger1=!(gametime%2)
trans=addalpha
alpha=80,220

[state 5150-SP-D]
type=changeanim
trigger1=name!="G-Mizuchi-v2"
trigger1=!alive&&(prevstateno=1301||prevstateno=3103)
trigger1=selfanimexist(anim)
value=anim
elem=animelemno(-1)

[state 5150-SP-D]
type=nothitby
triggerall=name!="G-Mizuchi-v2"
trigger1=!alive&&(prevstateno=1301||prevstateno=3103)
value=sca
time=-1

[state 5150]
type=destroyself
trigger1=!(ishelper(3)||ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)||ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(15)||ishelper(17)||ishelper(18))
trigger2=name!="G-Mizuchi-v2"

[state 5150]
type=statetypeset
trigger1=!(ishelper(4)||ishelper(5)||ishelper(10)||ishelper(6)||ishelper(13)||ishelper(14)||ishelper(15)||ishelper(7)||ishelper(8)||ishelper(17)||ishelper(18))
movetype=h

[state 5150]
type=posadd
trigger1=ishelper(3)
trigger1=!root,alive&&roundstate>3
trigger1=!root,var(45)
trigger1=var(49):=var(49)+1||1
trigger1=var(49)>=50
trigger1=pos y>=-10
y=-1

[state 5150, 0]
type=assertspecial
triggerall=ishelper(3)
trigger1=root,alive&&root,palno=12
trigger2=!root,alive&&!root,var(45)&&roundstate>3
trigger2=var(49)>=400
flag=invisible
ignorehitpause=1

[state 5150, 0]
type=velset
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)>=130
x=2

[state 5150, 0]
type=playsnd
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)>=130&&!(gametime%5)&&!(random%4)
value=110,100+random%4
volume=-30
freqmul=1.9

[state 5150, 0]
type=playsnd
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)>=130&&!(gametime%3)&&(random%4)=1
value=1200,random%4
volume=-30
freqmul=1.9

[state 5150, 0]
type=playsnd
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)>=130&&!(gametime%3)&&(random%4)=2
value=1100,1+random%4
volume=-30
freqmul=1.9

[state 5150, 0]
type=playsnd
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)>=130&&!(gametime%3)&&(random%4)=3
value=181+random%2,0
volume=-30
freqmul=1.9

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205150
sprpriority=-90
postype=p1
pos=-50,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205151
sprpriority=-90
postype=p1
pos=-30,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205152
sprpriority=-90
postype=p1
pos=-10,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205153
sprpriority=-90
postype=p1
pos=0,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205154
sprpriority=-90
postype=p1
pos=10,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205155
sprpriority=-90
postype=p1
pos=30,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1

[state 5150, 0]
type=explod
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=52
anim=20+(facing=1)*3
id=205156
sprpriority=-90
postype=p1
pos=60,20
under=0
removetime=-1
scale=0.2,0.2
bindtime=-1


[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205153)
id=205153
postype=p1
pos=0,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205150)
id=205150
postype=p1
pos=-50,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205151)
id=205151
postype=p1
pos=-30,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205152)
id=205152
postype=p1
pos=-10,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205154)
id=205154
postype=p1
pos=10,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205155)
id=205155
postype=p1
pos=30,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=modifyexplod
triggerall=ishelper(3)
trigger1=numexplod(205156)
id=205156
postype=p1
pos=60,20
bindtime=1
velset=vel x,0
facing=-1
ignorehitpause=1

[state 5150]
type=screenbound
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)>=50
value=0
movecamera=0
ignorehitpause=1

[state 5150]
type=assertspecial
triggerall=ishelper(3)
trigger1=!root,alive&&!root,var(45)&&roundstate>3
trigger1=var(49)=[1,350]
flag=roundnotover
ignorehitpause=1

[state 5150, 1] 
type=changeanim
triggerall=name="G-Mizuchi-v2"
triggerall=ishelper(3)||!ishelper&&!alive&&palno!=12
triggerall=!time
triggerall=selfanimexist(5140)
trigger1=(anim!=[5111,5119])&&(anim!=[5171,5179])
trigger2=!selfanimexist(5140+(anim%10))
value=5140

[state 5150, 3]
type=changeanim
triggerall=name="G-Mizuchi-v2"
triggerall=ishelper(3)||!ishelper&&!alive&&palno!=12
trigger1=!time
trigger1=(anim=[5111,5119])||(anim=[5171,5179])
trigger1=selfanimexist(5140+(anim%10))
value=5140+(anim%10)

[state 5150, 4] 
type=changeanim
persistent=0
triggerall=name="G-Mizuchi-v2"
triggerall=ishelper(3)||!ishelper&&!alive&&palno!=12
trigger1=matchover=1
trigger1=anim=[5140,5149]
trigger1=selfanimexist(anim+10)
value=anim+10

[state 5150, 5] 
type=changeanim
triggerall=name="G-Mizuchi-v2"
triggerall=ishelper(3)||!ishelper&&!alive&&palno!=12
trigger1=!time
trigger1=anim!=[5140,5159]
trigger1=anim!=[5110,5119]
value=5110

[state 5150, 6] 
type=velmul
triggerall=name="G-Mizuchi-v2"
trigger1=(ishelper(3)||!ishelper)
x=0.85

[state 5150, 7] 
type=velset
triggerall=(ishelper(3)||!ishelper)
trigger1=vel x<.05
persistent=0
x=0

[state 5150, 8]
type=nothitby
trigger1=ishelper(3)
value=sca
time=1

[state 5150, 9-h]
type=ctrlset
trigger1=ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)
trigger2=ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(17)||ishelper(18)
value=0

[state 5150, 9-h]
type=playerpush
trigger1=ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)
trigger2=ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(17)||ishelper(18)
value=0

[state 5150, 9-h]
type=changeanim
triggerall=ishelper
trigger1=ishelper(4)&&(root,var(14)!=[27,50])||ishelper(5)&&(!root,var(17))||ishelper(6)&&!var(29)&&!root,var(31)
trigger2=ishelper(9)&&anim!=6100||ishelper(11)&&anim!=6100||ishelper(10)&&!var(29)&&!root,var(23)
value=6000+(ishelper(9)||ishelper(11))*100

[state 5150, 9-h]
type=changeanim
triggerall=(ishelper(7)||ishelper(8))
trigger1=root,palno=[11,12]
trigger1=numhelper(3)
trigger1=!(helper(3),movetype=h||helper(3),var(0)!=gametime-1&&0)
value=helper(3),anim
elem=helper(3),animelemno(-1)

[state 5150, 9-h]
type=sprpriority
trigger1=(ishelper(7)||ishelper(8))
trigger1=root,palno=[11,12]
value=-5+(root,palno=11)*10

[state 5150, 9-h]
type=trans
trigger1=(ishelper(7)||ishelper(8))
trigger1=numhelper(3)
trigger1=root,palno=[11,12]
trigger1=!(helper(3),stateno=865&&helper(3),time<=50)
trigger1=!(helper(3),stateno=860&&helper(3),time<=30)
trans=addalpha
alpha=100,250

[state 5150, 9-h]
type=trans
triggerall=(ishelper(9)||ishelper(11))
trigger1=(lose||drawgame)
trigger1=var(2):=var(2)+1+root,alive||1
trans=addalpha
alpha=200-var(2),260+var(2)

[state 5150, 9-h-860]
type=trans
triggerall=(ishelper(9)||ishelper(11)||ishelper(7)||ishelper(8))
trigger1=numhelper(3)
trigger1=helper(3),stateno=860&&helper(3),time<=30
trans=addalpha
alpha=300-helper(3),time*10,250+helper(3),time*5

[state 5150, 9-h-865]
type=trans
triggerall=(ishelper(9)||ishelper(11)||ishelper(7)||ishelper(8))
trigger1=numhelper(3)
trigger1=helper(3),stateno=865&&helper(3),time<=50
trans=addalpha
alpha=helper(3),time*6,400-helper(3),time*3

[state 5150, 9-h]
type=turn
triggerall=(ishelper(7)||ishelper(8))
triggerall=numhelper(3)
triggerall=facing!=helper(3),facing
trigger1=root,palno=[11,12]
trigger2=(root,palno!=[11,12])&&(root,var(20)=[1,root,var(21)])

[state 5150, 9-h]
type=assertspecial
triggerall=numhelper(3)
trigger1=(ishelper(7)||ishelper(8))
trigger1=(helper(3),movetype=h||helper(3),var(0)!=gametime-1&&(root,palno!=[11,12])||roundstate<2||helper(3),stateno=860&&helper(3),time>=30||(helper(3),stateno=[5120,5121])||roundstate>2&&root,palno<7&&!root,var(45))
trigger2=(ishelper(9)||ishelper(11))
trigger2=(roundstate<2||root,palno=11||!root,var(45)||helper(3),stateno=860&&helper(3),time>=30||root,var(20))
flag=invisible
ignorehitpause=1

[state 5150, 9-h]
type=assertspecial
trigger1=ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)
trigger2=ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(17)||ishelper(18)
flag=noshadow
ignorehitpause=1

[state 5150, 9-h]
type=screenbound
trigger1=ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)
trigger2=ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(15)||ishelper(17)||ishelper(18)
value=0
movecamera=0
ignorehitpause=1

[state 5150, 9-h]
type=nothitby
trigger1=ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)
trigger2=ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(15)||ishelper(17)||ishelper(18)
value=sca
time-1
ignorehitpause=1

[state 5150, 9-h]
type=hitoverride
trigger1=ishelper(4)||ishelper(5)||ishelper(6)||ishelper(7)||ishelper(8)
trigger2=ishelper(9)||ishelper(10)||ishelper(11)||ishelper(13)||ishelper(14)||ishelper(15)||ishelper(17)||ishelper(18)
time=-1
attr=sca,na,sa,ha,nt,st,ht,np,sp,hp,aa,at,ap
stateno=0
ignorehitpause=1

[state 5150, 9-h]
type=posset
triggerall=ishelper
trigger1=ishelper(4)&&!root,var(14)||ishelper(5)&&!root,var(17)||ishelper(6)&&!var(29)&&!root,var(31)
trigger2=ishelper(9)&&0||ishelper(10)&&!var(29)&&!root,var(23)||ishelper(11)&&0
x=root,pos x
y=root,pos y;-20*!(ishelper(7)||ishelper(8))

[state 5150, 10-h]
type=null;posadd
trigger1=(ishelper(9)||ishelper(11))&&numhelper(3)
trigger1=gametime%3&&root,alive&&!((helper(3),stateno=[180,184])&&roundstate>=3)
x=((3.5+ishelper(9)*2)*sin(gametime*0.08-ishelper(11)*0.04))*ifelse(ishelper(11),1,-1)
y=((3.5+ishelper(9)*2)*cos(gametime*0.08-ishelper(11)*0.04))*ifelse(ishelper(11),1,-1)

[state 5150, 10-h]
type=posadd
trigger1=(ishelper(9)||ishelper(11))&&numhelper(3)
trigger1=root,alive&&((helper(3),stateno=[180,184])&&roundstate>=3)
x=(8.5*sin(gametime*0.03))*ifelse(ishelper(11),1,-1)
y=(8.5*cos(gametime*0.04))*ifelse(ishelper(11),1,-1)

[state 5150, 10-h]
type=posadd
trigger1=ishelper(9)
trigger1=root,alive&&!((helper(3),stateno=[180,184])&&roundstate>=3)
x=-5*ifelse(((gametime%200)=[1,100]),cos(root,var(1)/50),cos(gametime*0.04))
y=-4*sin(gametime*0.02)

[state 5150, 10-h]
type=posadd
trigger1=ishelper(11)
trigger1=root,alive&&!((helper(3),stateno=[180,184])&&roundstate>=3)
x=5*ifelse(((gametime%200)=[1,100]),cos(root,var(1)/50),cos(gametime*0.04))
y=-4*sin(gametime*0.04)

;[state 5150, 10-h]
;type=posadd
;trigger1=(ishelper(9)||ishelper(11))
;trigger1=root,alive
;trigger1=fvar(1):=fvar(1)+0.04||1
;x=ifelse(ishelper(9),5*sin(fvar(1)),-5*sin(fvar(1)))
;y=ifelse(ishelper(9),6*sin(fvar(1))-2,6*sin(fvar(1))-2)+3

[state 5150, 10-h]
type=bindtoroot
triggerall=(ishelper(7)||ishelper(8))
trigger1=root,palno=[11,12]
trigger2=root,palno!=[11,12]
trigger2=(root,var(20)=[1,root,var(21)])
pos=(3.5*sin(gametime*0.09))*ifelse(ishelper(8),1,-1),(3.5*cos(gametime*0.09))*ifelse(ishelper(8),1,-1)

[state 5150, 11-h]
type=null;velset
trigger1=(ishelper(9)||ishelper(11))
trigger1=var(1):=10+!root,alive*50||1
trigger1=gametime%9=0
x=(random%10)*0.1
y=(random%10)*0.1
ignorehitpause=1

[state 5150, 12-h]
type=velset
trigger1=(ishelper(9)||ishelper(11))&&numhelper(3)
trigger1=var(3):=(helper(3),statetype=c)*40+(helper(3),statetype=l||(helper(3),stateno=[5100,5120]))*65||1
;trigger1=gametime%9=0
trigger1=(rootdist y<(30+ishelper(10)*30+ishelper(11)*30)||rootdist y>(40+ishelper(10)*40+ishelper(11)*40))
y=(rootdist y-(85-var(3)))/var(1)
ignorehitpause=1

[state 5150, 13-h]
type=velset
trigger1=(ishelper(9)||ishelper(11))
;trigger1=gametime%9=0
trigger1=(rootdist x<-(6+ishelper(10)*6+ishelper(11)*6)||rootdist x>(6+ishelper(10)*6+ishelper(11)*6))
x=(rootdist x)/var(1)
ignorehitpause=1

[state 5150, 14-h]
type=explod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=!numexplod(610151)
anim=6101
id=610151
sprpriority=-100
postype=p1
pos=0,0
scale=1.0,1.0
removetime=-1
ownpal=1
bindtime=-1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h]
type=explod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=!numexplod(3201151)
anim=3201
id=3201151
sprpriority=100
postype=p1
pos=0,0
ontop=1
scale=1.0,1.0
removetime=-1
ownpal=1
bindtime=-1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h]
type=explod
triggerall=(ishelper(9)||ishelper(11))&&0
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=gametime%(4-(helper(3),stateno=1400&&(helper(3),animelemtime(4)=[1,43]))*2)=0
anim=6101;3201
id=6101
sprpriority=-90
postype=p1
pos=0,0
scale=0.5,0.5
removetime=22;44-(helper(3),stateno!=[0,26])*22
;accel=0,0.02
;vel=-1+(random%3),-1+(random%3)
ownpal=0
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h]
type=explod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=!numexplod(3201152)
anim=2955
id=3201152
sprpriority=-150
postype=p1
pos=0,0
ontop=0
scale=0.5,0.5
removetime=-1
trans=sub
ownpal=1
bindtime=-1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h-f1]
type=explod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=!numexplod(3201153)
anim=1555
id=3201153
sprpriority=-250
postype=p1
pos=0,0
ontop=0
scale=0.2,0.2
removetime=-1
ownpal=1
trans=addalpha
alpha=100,230
bindtime=-1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h-f1]
type=explod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=!numexplod(3201154)
anim=1570
id=3201154
sprpriority=-250
postype=p1
pos=0,0
ontop=0
scale=0.2,0.2
removetime=-1
trans=addalpha
alpha=100,230
ownpal=1
bindtime=-1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h]
type=explod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numhelper(3)&&root,var(45)
trigger1=(helper(3),stateno!=[860,866])&&(root,var(20)!=[1,root,var(21)+40])
trigger1=root,palno!=11&&root,alive&&roundstate>=2&&!(lose||drawgame)
trigger1=!numexplod(3201155)
anim=3607
id=3201155
sprpriority=-149
postype=p1
pos=0,0
ontop=0
scale=0.25,0.25
removetime=-1
ownpal=1
bindtime=-1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod(3201151)&&numhelper(3)
trigger1=(helper(3),stateno=[860,866])
trigger2=(root,var(20)=[1,root,var(21)+40])
trigger3=roundstate>=2&&(lose||drawgame)
id=3201151

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod(3201152)&&numhelper(3)
trigger1=(helper(3),stateno=[860,866])
trigger2=(root,var(20)=[1,root,var(21)+40])
trigger3=roundstate>=2&&(lose||drawgame)
id=3201152

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod(3201153)&&numhelper(3)
trigger1=(helper(3),stateno=[860,866])
trigger2=(root,var(20)=[1,root,var(21)+40])
trigger3=roundstate>=2&&(lose||drawgame)
id=3201153

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod(3201154)&&numhelper(3)
trigger1=(helper(3),stateno=[860,866])
trigger2=(root,var(20)=[1,root,var(21)+40])
trigger3=roundstate>=2&&(lose||drawgame)
id=3201154

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod(3201155)&&numhelper(3)
trigger1=(helper(3),stateno=[860,866])
trigger2=(root,var(20)=[1,root,var(21)+40])
trigger3=roundstate>=2&&(lose||drawgame)
id=3201155

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod(610151)&&numhelper(3)
trigger1=(helper(3),stateno=[860,866])
trigger2=(root,var(20)=[1,root,var(21)+40])
trigger3=roundstate>=2&&(lose||drawgame)
id=610151

[state 5150, 14-h]
type=removeexplod
triggerall=(ishelper(9)||ishelper(11))
triggerall=numexplod&&numhelper(3)&&root,palno<7
trigger1=!root,var(45)
trigger2=helper(3),movetype=a&&helper(3),stateno=3952
trigger2=animelemtime(6)>=10
id=-1

;==========================================================================================
;statetypeset
;==========================================================================================
[state 5150, 15-h-D-ST]
type=statetypeset
trigger1=ishelper(4)
trigger1=!root,var(14)
trigger2=ishelper(5)
trigger2=!root,var(17)
movetype=h
[state 5150, 15-h-D-ST]
type=statetypeset
trigger1=ishelper(4)
trigger1=root,var(14)
trigger2=ishelper(5)
trigger2=root,var(17)
movetype=a
;==========================================================================================
;D-P
;==========================================================================================
[state 5150, 15-h-D-P]
type=null;turn
triggerall=ishelper(4)
trigger1=root,var(14)
trigger1=numhelper(3)
trigger1=facing!=helper(3),facing
[state 5150, 15-h-D-P]
type=bindtoroot
triggerall=ishelper(4)
trigger1=numhelper(3)
trigger1=root,var(14)=1
pos=(60*root,var(13)+30)*ifelse(facing!=helper(3),facing,-1,1)
[state 5150, 15-h-D-P]
type=changeanim
triggerall=ishelper(4)
trigger1=(root,var(14)=[27,50])&&anim!=1210
value=1210
[state 5150, 15-h-D-P]
type=playsnd
triggerall=ishelper(4)
trigger1=root,var(14)=27
value=4000,16
volume=250
[state 5150, 15-h-D-P]
type=playsnd
triggerall=ishelper(4)
trigger1=root,var(14)=27
value=4000,88
volume=250
[state 5150, 15-h-D-P]
type=playsnd
triggerall=ishelper(4)
trigger1=root,var(14)=27
value=4000,89
volume=250
freqmul=1.2
[state 5150, 15-h-D-P]
type=envshake
triggerall=ishelper(4)
trigger1=root,var(14)=27
time=15
ampl=-15
freq=95
phase=95
[state 5150, 15-h-D-P]
type=bgpalfx
triggerall=ishelper(4)
trigger1=root,var(14)=27
time=2
invertall=1
[state 5150, 15-h-D-P]
type=projectile
triggerall=ishelper(4)
triggerall=numhelper(3)
trigger1=root,var(14)=[27,50]
trigger1=gametime%2=0
attr=sca,aa,at,ap
projanim=1210
projid=6080
projhitanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=1
projremovetime=2
postype=p1
offset=0,0
velocity=0
animtype=diagup
damage=ceil(0.05*enemy,const(data.life)),1
getpower=112+(root,var(15)!=0)*188,20+(root,var(15)!=0)*30
givepower=8,8
guardflag=m
hitflag=maf
pausetime=2,2
guard.pausetime=0,0
sparkno=s2835
sparkxy=7-random%15,-20-random%70
hitsound=s225,1
guard.sparkno=s(2855+(facing!=helper(3),facing))
guardsound=-1;s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=ifelse((facing!=helper(3),facing),1,-1),-5
air.velocity=0,-5
fall=1
fall.recover=0
p2stateno=1210
[state 5150, 15-h-D-P]
type=projectile
triggerall=ishelper(4)
trigger1=root,var(14)=[27,50]
trigger1=gametime%2=0
attr=sca,aa,at,ap
projanim=1212
projid=6080
projhitanim=-1
projpriority=2147483647
projsprpriority=5
projremove=1
projremovetime=2
postype=p1
offset=0,0
velocity=0
animtype=hard
damage=0
guardflag=
hitflag= 
sparkno=-1
sparkxy=-1
hitsound=-1
guard.sparkno=-1
guardsound=-1
[state 5150, 15-h-D-P]
type=explod
triggerall=ishelper(4)
trigger1=root,var(14)=[1,42]
trigger1=var(50):=random%3||1
trigger1=gametime%2=0
anim=1220
id=1220
sprpriority=5
postype=p1
scale=0.25+(0.25*var(50)),0.25+(0.25*var(50))
pos=-50+random%100,10-random%20
under=0
bindtime=1
[state 5150, 15-h-D-P]
type=explod
triggerall=ishelper(4)
trigger1=root,var(14)=[27,50]
trigger1=1
anim=6101
id=61011
sprpriority=10
postype=p1
scale=0.25+(0.25*var(50)),0.25+(0.25*var(50))
pos=-50+random%100,10-random%50
vel=-1+(random%3),-1+(random%3)
;accel=0,0.05
under=0
bindtime=1
trans=sub
;==========================================================================================
[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)
trigger1=root,var(14)=27
anim=4002
id=1230
sprpriority=5
postype=p1
pos=0,10
under=0
bindtime=1
scale=0.5,0.5
[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)
trigger1=root,var(14)=27
anim=4002
id=1230
sprpriority=4
postype=p1
pos=0,10
under=0
bindtime=1
scale=0.5,0.5
trans=sub
[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)
trigger1=root,var(14)=27
anim=4002
id=1230
sprpriority=4
postype=p1
pos=0,10
under=0
bindtime=1
scale=0.75,0.75
trans=sub
[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)
trigger1=root,var(14)=27
anim=4002
id=1230
sprpriority=4
postype=p1
pos=0,10
under=0
bindtime=1
scale=0.8,0.8
;==========================================================================================
[state 5150, 15-h-D-P-P2s]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=32
anim=4002
id=1230
sprpriority=5
postype=p1
pos=-50,10
scale=0.25,0.5
under=0
bindtime=1
[state 5150, 15-h-D-P-P2s]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=32
anim=4002
id=1230
sprpriority=5
postype=p1
pos=50,10
scale=0.25,0.5
under=0
bindtime=1
[state 5150, 15-h-D-P-P2s2]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=32
anim=4002
id=1230
sprpriority=4
postype=p1
pos=-50,10
scale=0.25,0.5
under=0
bindtime=1
trans=sub
[state 5150, 15-h-D-P-P2s2]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=32
anim=4002
id=1230
sprpriority=4
postype=p1
pos=50,10
scale=0.25,0.5
under=0
bindtime=1
trans=sub
;==========================================================================================
[state 5150, 15-h-D-P-P2m]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=35
anim=4002
id=1230
sprpriority=5
postype=p1
pos=-25,30
scale=0.125,0.5
under=0
bindtime=1
[state 5150, 15-h-D-P-P2m]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=35
anim=4002
id=1230
sprpriority=5
postype=p1
pos=25,30
scale=0.125,0.5
under=0
bindtime=1
[state 5150, 15-h-D-P-P2m2]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=35
anim=4002
id=1230
sprpriority=4
postype=p1
pos=-25,30
scale=0.125,0.25
under=0
bindtime=1
trans=sub
[state 5150, 15-h-D-P-P2m2]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=35
anim=4002
id=1230
sprpriority=4
postype=p1
pos=25,30
scale=0.125,0.25
under=0
bindtime=1
trans=sub
;==========================================================================================
[state 5150, 15-h-D-P-P2m2]
type=explod
triggerall=ishelper(4)  &&0
trigger1=root,var(14)=27
anim=4002
id=1230
sprpriority=-6
postype=p1
pos=-25,10
under=0
bindtime=1
trans=sub
[state 5150, 15-h-D-P-P2m2]
type=explod
triggerall=ishelper(4)  &&0
trigger1=root,var(14)=27
anim=4002
id=1230
sprpriority=-6
postype=p1
pos=25,10
under=0
bindtime=1
trans=sub
[state 5150, 15-h-D-P-P2m2]
type=explod
triggerall=ishelper(4)  &&1
trigger1=root,var(14)=27
anim=1240
id=1230
sprpriority=10
postype=p1
pos=0,-10
scale=0.75,1
under=0
bindtime=1
trans=sub
[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)         &&0
trigger1=root,var(14)=30
anim=1563
sprpriority=6
postype=p1
pos=0,0
under=0
ontop=1
bindtime=1

[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)        &&0
trigger1=root,var(14)=32
anim=1563
sprpriority=6
postype=p1
pos=0,-40
under=0
ontop=1
bindtime=1

[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)        &&0
trigger1=root,var(14)=34
anim=1563
sprpriority=6
postype=p1
pos=0,-80
under=0
ontop=1
bindtime=1

[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)        &&0
trigger1=root,var(14)=36
anim=1563
sprpriority=6
postype=p1
pos=0,-120
under=0
ontop=1
bindtime=1

[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)        &&0
trigger1=root,var(14)=38
anim=1563
sprpriority=6
postype=p1
pos=0,-160
under=0
ontop=1
bindtime=1

[state 5150, 15-h-D-P-P1]
type=explod
triggerall=ishelper(4)       &&0
trigger1=root,var(14)=40
anim=1563
sprpriority=6
postype=p1
pos=0,-200
under=0
ontop=1
bindtime=1

;==========================================================================================
;D-S
;==========================================================================================
[state 5150, 15-h-D-P]
type=turn
triggerall=ishelper(5)
trigger1=root,var(17)=1
trigger1=numhelper(3)
trigger1=facing!=helper(3),facing
[state 5150, 15-h-D-S]
type=sprpriority
triggerall=ishelper(5)
trigger1=root,var(17)
value=5
[state 5150, 15-h-D-S-p]
type=palfx
triggerall=ishelper(5)
triggerall=root,var(45)
trigger1=root,palno<6
time=1
mul=255,255,255
color=0
ignorehitpause=1
[state 5150, 15-h-D-S]         ;共通　位置セット
type=posset
triggerall=ishelper(5)
triggerall=numhelper(3)
trigger1=root,var(17)=1
x=helper(3),pos x+(60*helper(3),facing)
y=-105-(root,var(45)!=0)*14
[state 5150, 15-h-D-S]
type=changeanim
triggerall=ishelper(5)
trigger1=root,var(17)&&anim!=1011
value=1011
[state 5150, 15-h-D-S]
type=velset
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
x=3.5
[state 5150, 15-h-D-S]
type=angledraw
triggerall=ishelper(5)
trigger1=root,palno<7&&!root,var(45)
scale=0.5,0.5
;==========================================================================================
;ボス-射出-11P以外-中段
;==========================================================================================

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-10,0
under=0
ownpal=1
bindtime=1
scale=0.5,0.5
trans=addalpha
alpha=150,230

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-10,0
under=0
ownpal=1
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=212
sprpriority=98
postype=p1
pos=-10,0
under=1
ownpal=1
bindtime=1
scale=0.51,0.51
trans=sub

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=2110
id=212
sprpriority=97
postype=p1
pos=-5,0
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=add

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=2110
id=212
sprpriority=97
postype=p1
pos=-5,0
under=1
ownpal=1
bindtime=1
scale=0.127,0.127
trans=sub

;==========================================================================================
;ボス-射出-11P以外-上段
;==========================================================================================

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,-52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5
trans=addalpha
alpha=150,230

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,-52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=212
sprpriority=98
postype=p1
pos=-32,-52
under=1
ownpal=1
bindtime=1
scale=0.51,0.51
trans=sub

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=2110
id=212
sprpriority=97
postype=p1
pos=-22,-52
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=add

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=2110
id=212
sprpriority=97
postype=p1
pos=-22,-52
under=1
ownpal=1
bindtime=1
scale=0.127,0.127
trans=sub

;==========================================================================================
;ボス-射出-11P以外-下段
;==========================================================================================

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5
trans=addalpha
alpha=150,230

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=211
id=212
sprpriority=98
postype=p1
pos=-32,52
under=1
ownpal=1
bindtime=1
scale=0.51,0.51
trans=sub

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=2110
id=212
sprpriority=97
postype=p1
pos=-22,52
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=add

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=1
anim=2110
id=212
sprpriority=97
postype=p1
pos=-22,52
under=1
ownpal=1
bindtime=1
scale=0.127,0.127
trans=sub

;==========================================================================================
;ボス-スフィア-11P以外-中段
;==========================================================================================

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5) && 1
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(2955)
trigger1=root,var(17)=[1,48]
anim=4000
id=2955
sprpriority=90
postype=p1
pos=0,0
under=0
trans=add
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5) && 1
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(2956)
trigger1=root,var(17)=[1,48]
anim=4000
id=2956
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5) && 1
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(2957)
trigger1=root,var(17)=[1,48]
anim=4000
id=2957
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5) && 1
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(2958)
trigger1=root,var(17)=[1,48]
anim=4000
id=2958
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

;==========================================================================================
;ボス-スフィア-11P以外-上段
;==========================================================================================

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29551)
trigger1=root,var(17)=[1,48]
anim=4000
id=29551
sprpriority=90
postype=p1
pos=-32,-52
under=0
trans=add
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29561)
trigger1=root,var(17)=[1,48]
anim=4000
id=29561
sprpriority=-90
postype=p1
pos=-32,-52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29571)
trigger1=root,var(17)=[1,48]
anim=4000
id=29571
sprpriority=-90
postype=p1
pos=-32,-52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29581)
trigger1=root,var(17)=[1,48]
anim=4000
id=29581
sprpriority=-90
postype=p1
pos=-32,-52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29591)
trigger1=root,var(17)=[1,48]
anim=1011
id=29591
sprpriority=2
postype=p1
pos=-32,-52
under=0
removetime=200
bindtime=-1
ownpal=!(root,palno=[1,5])

;==========================================================================================
;ボス-スフィア-11P以外-下段
;==========================================================================================

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29552)
trigger1=root,var(17)=[1,48]
anim=4000
id=29552
sprpriority=90
postype=p1
pos=-32,52
under=0
trans=add
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29562)
trigger1=root,var(17)=[1,48]
anim=4000
id=29562
sprpriority=-90
postype=p1
pos=-32,52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29572)
trigger1=root,var(17)=[1,48]
anim=4000
id=29572
sprpriority=-90
postype=p1
pos=-32,52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29582)
trigger1=root,var(17)=[1,48]
anim=4000
id=29582
sprpriority=-90
postype=p1
pos=-32,52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!numexplod(29592)
trigger1=root,var(17)=[1,48]
anim=1011
id=29592
sprpriority=2
postype=p1
pos=-32,52
under=0
removetime=200
bindtime=-1
ownpal=!(root,palno=[1,5])

;==========================================================================================
;ボス-消滅-11P以外-中段
;==========================================================================================

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2970
sprpriority=15
postype=p1
pos=0,0
under=0
trans=add
bindtime=1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-s]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=2980
sprpriority=15
postype=p1
pos=0,0
ontop=1
scale=0.25,0.25
bindtime=1
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2971
sprpriority=5
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=sub
bindtime=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2971
sprpriority=4
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=sub
bindtime=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=-1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=-1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

;==========================================================================================
;ボス-消滅-11P以外-上段
;==========================================================================================

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2970
sprpriority=15
postype=p1
pos=-32,-52
under=0
trans=add
bindtime=1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-s]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=2980
sprpriority=15
postype=p1
pos=-32,-52
ontop=1
scale=0.25,0.25
bindtime=1
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2971
sprpriority=5
postype=p1
pos=-32,-52
scale=0.5,0.5
under=0
trans=sub
bindtime=1
ownpal=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2971
sprpriority=4
postype=p1
pos=-32,-52
scale=0.5,0.5
under=0
trans=sub
bindtime=1
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=-1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=-1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

;==========================================================================================
;ボス-消滅-11P以外-下段
;==========================================================================================

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2970
sprpriority=15
postype=p1
pos=-32,52
under=0
trans=add
bindtime=1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-s]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=2980
sprpriority=15
postype=p1
pos=-32,52
ontop=1
scale=0.25,0.25
bindtime=1
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2971
sprpriority=5
postype=p1
pos=-32,52
scale=0.5,0.5
under=0
trans=sub
bindtime=1
ownpal=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=4001
id=2971
sprpriority=4
postype=p1
pos=-32,52
scale=0.5,0.5
under=0
trans=sub
bindtime=1
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=-1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=-1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

;==========================================================================================
;ボス-スフィア-消去-11P以外-中段
;==========================================================================================

[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(2955)
trigger1=root,var(17)>=49
id=2955
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(2956)
trigger1=root,var(17)>=49
id=2956
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(2957)
trigger1=root,var(17)>=49
id=2957
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(2958)
trigger1=root,var(17)>=49
id=2958
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=numexplod(2959)
trigger1=root,var(17)>=49
id=2959

;==========================================================================================
;ボス-スフィア-消去-11P以外-上段
;==========================================================================================

[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29551)
trigger1=root,var(17)>=49
id=29551
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29561)
trigger1=root,var(17)>=49
id=29561
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29571)
trigger1=root,var(17)>=49
id=29571
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29581)
trigger1=root,var(17)>=49
id=29581
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29591)
trigger1=root,var(17)>=49
id=29591

;==========================================================================================
;ボス-スフィア-消去-11P以外-下段
;==========================================================================================

[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29552)
trigger1=root,var(17)>=49
id=29552
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29562)
trigger1=root,var(17)>=49
id=29562
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29572)
trigger1=root,var(17)>=49
id=29572
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29582)
trigger1=root,var(17)>=49
id=29582
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno<11
triggerall=numexplod(29592)
trigger1=root,var(17)>=49
id=29592

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=!(gametime%2)
trigger1=root,var(17)=[1,48]
anim=6101
id=61018
sprpriority=10
postype=p1
scale=0.5,0.5
pos=-10+random%20,30-random%60
under=0
bindtime=1
trans=add

;==========================================================================================
;ボスモード用-SE
;==========================================================================================
[state 5150, 15-h-D-S]
type=playsnd
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=48||root,var(17)=49
value=4000,36
volume=250
freqmul=1.3
[state 5150, 15-h-D-S]
type=playsnd
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=50||root,var(17)=51
value=4000,18
volume=50
freqmul=1.9
[state 5150, 15-h-D-S]
type=envshake
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
trigger1=root,var(17)=49
time=8
ampl=-8
freq=95
phase=95
;==========================================================================================
;==========================================================================================

[state 5150, 15-h-D-S]
type=projectile
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=gametime%5=0
trigger1=root,var(17)=[1,50]
attr=sca,aa
projanim=1163
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=0,0
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990

[state 5150, 15-h-D-S]
type=projectile
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=gametime%5=0
trigger1=root,var(17)=[1,50]
attr=sca,aa
projanim=1163
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=-32,-52
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990

[state 5150, 15-h-D-S]
type=projectile
triggerall=ishelper(5)
triggerall=root,palno<11&&root,var(45)
triggerall=gametime%5=0
trigger1=root,var(17)=[1,50]
attr=sca,aa
projanim=1163
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=-32,52
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990
;==========================================================================================
;射出-ノーマル
;==========================================================================================
[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=!root,var(45)
trigger1=root,var(17)=1
anim=1010
id=1010
sprpriority=10
postype=p1
pos=-2,-2
under=0
scale=0.5,0.5
bindtime=1
;==========================================================================================
;射出-ボス-11P
;==========================================================================================
[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
trigger1=root,palno>10
trigger1=root,var(17)=1
anim=3199
id=3198
sprpriority=5
postype=p1
pos=0,-2
ownpal=1
ontop=1
bindtime=1
ignorehitpause=1
[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
trigger1=root,palno>10
trigger1=root,var(17)=1
anim=3198
id=3198
sprpriority=-5
postype=p1
pos=0,-2
ownpal=1
bindtime=1
ignorehitpause=1
[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
trigger1=root,palno>10
trigger1=root,var(17)=1
anim=3198
id=3198
sprpriority=-6
postype=p1
pos=0,-2
ownpal=1
bindtime=1
;scale=1.01,1.01
ignorehitpause=1
[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
trigger1=root,palno>10
trigger1=(root,var(17)=1||root,var(17)=4)
anim=1010
id=1010
sprpriority=10
postype=p1
pos=12+(root,var(17)=4)*10,-22-(root,var(17)=4)*22
under=0
bindtime=1
[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(5)
trigger1=root,palno>10
trigger1=(root,var(17)=1||root,var(17)=4)
anim=1010
id=1010
sprpriority=10
postype=p1
pos=12+(root,var(17)=4)*10,22+(root,var(17)=4)*22
under=0
bindtime=1

;==========================================================================================
;スフィア-ボス-11P
;==========================================================================================
[state 5150, 15-h-D-S]  
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
triggerall=root,palno>10
triggerall=!numexplod(2955)
trigger1=root,var(17)=[1,14]
trigger2=root,var(17)=[25,79]
anim=4000
id=2955
sprpriority=90
postype=p1
pos=0,0
under=0
trans=add
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5
[state 5150, 15-h-D-S] 
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
triggerall=root,palno>10
triggerall=!numexplod(2956)
trigger1=root,var(17)=[1,14]
trigger2=root,var(17)=[25,79]
anim=4000
id=2956
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
triggerall=root,palno>10
triggerall=!numexplod(2957)
trigger1=root,var(17)=[1,14]
trigger2=root,var(17)=[25,79]
anim=4000
id=2957
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
[state 5150, 15-h-D-S] 
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
triggerall=root,palno>10
triggerall=!numexplod(2958)
trigger1=root,var(17)=[1,14]
trigger2=root,var(17)=[25,79]
anim=4000
id=2958
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5
;==========================================================================================
;スフィア削除-ボス-11P
;==========================================================================================
[state 5150, 15-h-D-S]   
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno>10
triggerall=numexplod(2955)
trigger1=root,var(17)!=[1,14]
trigger1=root,var(17)!=[25,79]
id=2955
[state 5150, 15-h-D-S]   
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno>10
triggerall=numexplod(2956)
trigger1=root,var(17)!=[1,14]
trigger1=root,var(17)!=[25,79]
id=2956
[state 5150, 15-h-D-S] 
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno>10
triggerall=numexplod(2957)
trigger1=root,var(17)!=[1,14]
trigger1=root,var(17)!=[25,79]
id=2957
[state 5150, 15-h-D-S]
type=removeexplod
triggerall=ishelper(5)
triggerall=root,palno>10
triggerall=numexplod(2958)
trigger1=root,var(17)!=[1,14]
trigger1=root,var(17)!=[25,79]
id=2958
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,var(45)
triggerall=root,palno>10
triggerall=!(gametime%2)
trigger1=root,var(17)=[1,14]
trigger2=root,var(17)=[25,79]
anim=6101
id=61018
sprpriority=10
postype=p1
scale=0.5,0.5
pos=-10+random%20,30-random%60
under=0
bindtime=1
trans=add
;==========================================================================================
;ボス消滅エフェクト-11P
;==========================================================================================
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=4001
id=2970
sprpriority=15
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=add
bindtime=1
ownpal=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=4001
id=2971
sprpriority=5
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=sub
bindtime=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=4001
id=2971
sprpriority=4
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=sub
bindtime=1
[state 5150, 15-h-D-S-s]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=2980
sprpriority=15
postype=p1
pos=0,0
ontop=1
scale=0.25,0.25
bindtime=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=-1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=1,1
bindtime=1
ontop=1
trans=sub
ownpal=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=-1,1
bindtime=1
ontop=1
trans=sub
ownpal=1
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1
;==========================================================================================
;ノーマルモード＆11P用-ワープと爆発
;==========================================================================================
[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(5)
triggerall=root,palno>10||!root,var(45)
trigger1=root,var(17)=14
trigger2=root,var(17)=24
trigger3=root,var(17)=79
anim=1012+(root,var(17)=79)*150
id=1012+(root,var(17)=79)*150
sprpriority=9
postype=p1
pos=0,0
scale=1.0-!root,var(45)*0.5,1.0-!root,var(45)*0.5
under=0
bindtime=1
ownpal=!(root,palno=[1,5])
;==========================================================================================
;ノーマルモード＆11P用-他動作系
;==========================================================================================
[state 5150, 15-h-D-S]          
type=assertspecial
triggerall=ishelper(5)
trigger1=root,palno>10||!root,var(45)
trigger1=(root,var(17)=[15,25])
trigger2=root,palno<11&&root,var(45)
trigger2=root,var(17)>=49
flag=invisible
ignorehitpause=1
[state 5150, 15-h-D-S]          
type=velset
triggerall=ishelper(5)
triggerall=root,palno>10||!root,var(45)
trigger1=root,var(17)=1
trigger2=root,var(16)=1
trigger2=root,var(17)=25
trigger3=!root,var(17)
x=ifelse(root,var(17)=1,5.15,2.5)*(root,var(17)>0)
[state 5150, 15-h-D-S]          
type=velset
triggerall=ishelper(5)
triggerall=root,palno>10||!root,var(45)
trigger1=root,var(17)=1
trigger2=root,var(16)=2
trigger2=root,var(17)=25
trigger3=!root,var(17)
x=ifelse(root,var(17)=1,5.15,-2.5)*(root,var(17)>0)
[state 5150, 15-h-D-S]          
type=posset
triggerall=ishelper(5)
triggerall=numhelper(3)
triggerall=root,palno>10||!root,var(45)
trigger1=root,var(16)=1
trigger1=root,var(17)=15
trigger2=root,var(16)=2
trigger2=root,var(17)=15
x=ifelse(root,var(16)=1,enemynear(root,var(18)),pos x-(150*helper(3),facing),enemynear(root,var(18)),pos x+(50*helper(3),facing))
y=ifelse(root,var(16)=1,-20,enemynear(root,var(18)),pos y-30)
;==========================================================================================
;ノーマルモード＆11P用-SE
;==========================================================================================
[state 5150, 15-h-D-S]
type=playsnd
triggerall=ishelper(5)
triggerall=root,palno>10||!root,var(45)
trigger1=root,var(17)=2
trigger2=root,var(17)=14
trigger3=root,var(17)=79
value=4000,4+(root,var(17)=79)
volume=200-(root,var(17)=79)*100
freqmul=ifelse(!root,var(45),1.4,1.0)+(root,var(17)=79)*0.2
[state 5150, 15-h-D-S]
type=playsnd
triggerall=ishelper(5)
triggerall=root,var(45)
trigger1=root,var(17)=4||root,var(17)=6
value=4000,4
volume=200
freqmul=1.0-(root,var(17)=4)*0.2+(root,var(17)=6)*0.1
;==========================================================================================
;11P用-SE
;==========================================================================================
[state 5150, 15-h-D-S]
type=playsnd
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=78||root,var(17)=79
value=4000,36
volume=250
[state 5150, 15-h-D-S]
type=envshake
triggerall=ishelper(5)
triggerall=root,palno>10
trigger1=root,var(17)=79
time=8
ampl=-8
freq=95
phase=95
[state 5150, 15-h-D-S]
type=projectile
triggerall=ishelper(5)
triggerall=gametime%5=0||!root,numprojid(11630)&&0
trigger1=root,palno>10||!root,var(45)
trigger1=root,var(17)=[1,14]
trigger2=root,palno>10||!root,var(45)
trigger2=root,var(17)=[25,79]
trigger3=root,palno<11&&root,var(45) && 0
trigger3=root,var(17)=[1,79]
attr=sca,aa
projanim=1163+!root,var(45)*100
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=0,0
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=ifelse(root,var(16)=2&&(root,var(17)=[25,79]),2,-2)
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
[state 5150, 15-h-D-S-p]
type=projectile
triggerall=ishelper(5)
trigger1=root,palno>10
trigger1=(root,var(17)=1||root,var(17)=4||root,var(17)=5)
attr=a,na
projanim=2610
projhitanim=2611
projid=2510
projpriority=9999999999
projsprpriority=5
projremove=1
projremovetime=150
postype=p1
offset=12+(root,var(17)=4)*10,-20-(root,var(17)=4)*22
velocity=2,ifelse((root,var(17)=5),2,-2)
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.005*enemy,const(data.life))
getpower=25,25
givepower=10,10
guardflag=m
hitflag=maf
pausetime=0,5
guard.pausetime=0,5
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=18
ground.hittime=18
ground.velocity=-3
guard.velocity=-2.8
air.velocity=1,-4
air.fall=1
fall.recover=0
[state 5150, 15-h-D-S-p]
type=projectile
triggerall=ishelper(5)
trigger1=root,palno>10
trigger1=(root,var(17)=1||root,var(17)=4||root,var(17)=5)
attr=a,na
projanim=2610
projhitanim=2611
projid=2510
projpriority=9999999999
projsprpriority=5
projremove=1
projremovetime=150
postype=p1
offset=12+(root,var(17)=4)*10,20+(root,var(17)=4)*22
velocity=2,ifelse((root,var(17)=5),-2,2)
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.005*enemy,const(data.life))
getpower=25,25
givepower=10,10
guardflag=m
hitflag=maf
pausetime=0,5
guard.pausetime=0,5
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=18
ground.hittime=18
ground.velocity=-3
guard.velocity=-2.8
air.velocity=1,-4
air.fall=1
fall.recover=0
;==========================================================================================
;B-N
;==========================================================================================
[state 5150, 9-h-2-bn]
type=changeanim
triggerall=(ishelper(7)||ishelper(8))
trigger1=(root,palno!=[11,12])&&(root,var(20)!=[1,root,var(21)])
value=6000
[state 5150, 9-h-2-bn]
type=changeanim
triggerall=(ishelper(7)||ishelper(8))
trigger1=(root,palno!=[11,12])&&(root,var(20)=[1,root,var(21)])
trigger1=numhelper(3)
trigger1=!(helper(3),movetype=h||helper(3),var(0)!=gametime-1)
value=helper(3),anim
elem=helper(3),animelemno(-1)
[state 5150, 9-h-2-bn]
type=statetypeset
trigger1=(ishelper(7)||ishelper(8))
movetype=i
[state 5150, 9-h-2-bn]
type=sprpriority
trigger1=(ishelper(7)||ishelper(8))
trigger1=(root,palno!=[11,12])&&(root,var(20)=[1,root,var(21)])
value=5
[state 5150, 9-h-2-bn]
type=trans
trigger1=(ishelper(7)||ishelper(8))
trigger1=(root,palno!=[11,12])&&(root,var(20)=[1,root,var(21)])
trans=addalpha
alpha=100,250
[state 5150, 9-h-2-bn]
type=posset
triggerall=(ishelper(7)||ishelper(8))
trigger1=(root,palno!=[11,12])&&(root,var(20)!=[1,root,var(21)])
x=root,pos x
y=root,pos y
;==========================================================================================
;S-D
;==========================================================================================
[state 5150, 9-h-2-sd]
type=turn
triggerall=ishelper(10)
triggerall=numhelper(3)
trigger1=!root,var(45)
trigger1=root,var(23)
trigger1=facing!=helper(3),facing
trigger2=root,var(45)
trigger2=var(29)
trigger2=facing!=helper(3),facing
[state 5150, 9-h-2-sd]
type=statetypeset
trigger1=ishelper(10)
trigger1=root,var(23)
movetype=a
statetype=s
[state 5150, 9-h-2-sd]
type=statetypeset
trigger1=ishelper(10)
trigger1=!root,var(23)
movetype=i
[state 5150, 9-h-2-sd]
type=changeanim
trigger1=ishelper(10)
trigger1=root,var(23)&&!var(29)
value=2350+(root,var(45)>0)*651
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=bindtoroot
trigger1=ishelper(10)
trigger1=root,var(23)&&!var(29)
pos=0,0
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=hitdef
triggerall=ishelper(10)&&!var(29)
triggerall=root,var(23)&&!root,var(45)
triggerall=var(29):=numtarget||1
trigger1=enemynear(root,var(18)),stateno!=[120,159]
trigger1=enemynear(root,var(18)),stateno!=40
trigger1=enemynear(root,var(18)),statetype!=a
attr=,ht
damage=0,0
hitflag=m
priority=7,miss
sparkno=-1
;hitonce=0
p2stateno=2302
p2facing=1
id=2350
[state 5150, 9-h-2-sd]
type=hitdef
triggerall=ishelper(10)&&!var(29)&&              0;off
triggerall=root,var(23)&&root,var(45)
triggerall=var(29):=numtarget||1
trigger1=enemynear(root,var(18)),stateno!=120
trigger1=enemynear(root,var(18)),stateno!=131
trigger1=enemynear(root,var(18)),stateno!=152
trigger1=enemynear(root,var(18)),stateno!=153
attr=,aa,at
damage=ceil(0.1*enemy,const(data.life)),ceil(0.02*enemy,const(data.life))
hitflag=mafd
priority=7,hit
sparkno=-1
hitonce=1
guardflag=l
p2stateno=3103
id=2350
[state 5150, 9-h-2-sd]
type=projectile
triggerall=ishelper(10)
trigger1=numhelper(3)&&root,var(45)
trigger1=helper(3),time=54&&helper(3),stateno=3101
attr=s,aa,at,ap
projanim=2015
projhitanim=-1
projid=6080
projpriority=9999999999
projsprpriority=5
projremove=1
projremovetime=5
postype=back
offset=0,0
velocity=0
animtype=hard
damage=ceil(0.1*enemy,const(data.life)),ceil(0.02*enemy,const(data.life))
getpower=0,0
givepower=0,0
guardflag=l
hitflag=mafd
pausetime=0,5
guard.pausetime=0,5
sparkno=-1
sparkxy=-10,floor(enemy,pos y)-60
hitsound=-1
guard.sparkno=-1
guardsound=-1
ground.type=high
ground.slidetime=18
ground.hittime=18
ground.velocity=-1,-2
guard.velocity=-9.8
air.velocity=-1,-2
fall=1
air.fall=1
fall.recover=0
p2stateno=3103
[state 5150, 9-h-2-sd]
type=targetdrop
triggerall=ishelper(10)
triggerall=numtarget
trigger1=!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelemtime(19)>=1&&helper(3),stateno=2301
[state 5150, 9-h-2-sd]
type=null
triggerall=ishelper(10)
trigger1=var(29)=1
trigger1=var(29):=var(29)+1||1
trigger2=var(29)>=1
trigger2=var(29):=0
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=changeanim
trigger1=ishelper(10)
trigger1=var(29)=[1,1000)
value=2351
ignorehitpause=1 
[state 5150, 9-h-2-sd]
type=hitadd
trigger1=ishelper(10)&& 0
trigger1=var(29)=[1,1000)
value=-999
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=null;bindtotarget
trigger1=ishelper(10)
trigger1=var(29)=[1,1000)
trigger1=helper(3),stateno!=2301
pos=0,0
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=posset
trigger1=ishelper(10)
trigger1=helper(3),stateno!=2301
trigger1=numtarget
x=target,pos x
y=target,pos y
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=reversaldef
trigger1=ishelper(10)
trigger1=0
reversal.attr=sca,aa,at,ap
hitflag=m-
priority=7
pausetime=0,0
numhits=1
sparkno=-1
hitsound=-1
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetbind
triggerall=ishelper(10)
trigger1=numtarget&&!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelem=6,<=0&&helper(3),stateno=2301
pos=40,0
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetstate
triggerall=ishelper(10)
trigger1=numtarget&&!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelem=7&&helper(3),stateno=2301
value=2303
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetstate
triggerall=ishelper(10)
trigger1=numtarget&&!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelem=8&&helper(3),stateno=2301
value=2304
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetstate
triggerall=ishelper(10)
trigger1=numtarget&&!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelem=18&&helper(3),stateno=2301
value=2305
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetlifeadd
triggerall=ishelper(10)
trigger1=numtarget&&!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelem=7&&helper(3),stateno=2301
value=ceil(-0.02*enemy,const(data.life))
kill=0
absolute=1
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetlifeadd
triggerall=ishelper(10)
trigger1=numtarget&&!root,var(45)
trigger1=numhelper(3)
trigger1=helper(3),animelem=18&&helper(3),stateno=2301
value=ceil(-(0.17+(root,palno=6)*0.15)*enemy,const(data.life))
absolute=1
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetlifeadd
triggerall=ishelper(10)&&numhelper(3)&& 0
triggerall=(var(29)=[1,1000))&&helper(3),stateno!=2301
trigger1=numtarget=1
trigger1=root,palno=[6,12]
trigger1=roundstate=2&&var(30)>0&&var(30)-target,life<0
value=(var(30)-target,life)-ceil(target,lifemax*0.05)
absolute=1
kill=(root,palno=[11,12])
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetlifeAdd
triggerall=ishelper(10)&& 0
triggerall=var(29)=[1,1000)
trigger1=numtarget=1&&roundstate=2
trigger1=numhelper(3)
trigger1=(gametime%(12-(root,palno=[6,12])*5))=1&&root,alive&&helper(3),stateno!=2301
value=ceil(-(0.001+(enemy,movetype=a)*0.002)*enemy,const(data.life))
kill=(root,palno=[11,12])
absolute=1
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetveladd
triggerall=ishelper(10)&& 0
triggerall=var(29)=[1,1000)
trigger1=numhelper(3)&&!root,var(45)
trigger1=roundstate=2&&!(helper(3),stateno=800||helper(3),stateno=810||helper(3),stateno=2010)&&numtarget=1
trigger1=target,statetype=a&&target,pos y>-300
trigger1=!(target,movetype=h&&target,stateno=2305)
trigger1=root,alive&&helper(3),stateno!=2301&&helper(3),stateno!=1601
y=-0.25
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetstate
triggerall=ishelper(10)&& 0
triggerall=(root,palno=[11,12])||root,palno<11&&root,var(45)
triggerall=var(29)=[1,1000)
triggerall=numtarget=1&&numhelper(3)
trigger1=helper(3),movetype=a&&helper(3),stateno=2010
trigger1=!((target,stateno=[2030,2070])&&target,movetype=h)
trigger2=helper(3),movetype=a&&helper(3),stateno=2901&&(helper(3),time=[20,220])
trigger2=!(((target,stateno=[2030,2070])||(target,stateno=[2903,2905]))&&target,movetype=h)
value=2030
ignorehitpause=1
[state 5150, 9-h-2-sd]
type=targetfacing
triggerall=ishelper(10)&&0
triggerall=var(29)=[1,1000)
triggerall=numhelper(3)&&numhelper(6)
trigger1=numtarget&&root,var(45)&&!helper(6),var(29)
trigger1=target,alive&&target,movetype=a
value=ifelse(helper(3),p2dist x<0,-1,1)
ignorehitpause = 1
[state 5150, 9-h-2-sd]
type=explod
triggerall=ishelper(10)&& 0
triggerall=var(29)=[1,1000)
triggerall=numhelper(3)
triggerall=helper(3),stateno!=[2300,2301]
trigger1=gametime%4=0
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-30+random%60,10-random%50
vel=0,-1-random%3
under=0
bindtime=1
trans=addalpha
alpha=250,120
;==========================================================================================
;I-S
;==========================================================================================
[state 5150, 9-h-2-is]
type=turn
trigger1=ishelper(6)
trigger1=var(29)&&numhelper(3)
trigger1=facing!=helper(3),facing
[state 5150, 9-h-2-is]
type=statetypeset
trigger1=ishelper(6) && 0
trigger1=root,var(31)
movetype=a
statetype=s
[state 5150, 9-h-2-is]
type=statetypeset
trigger1=ishelper(6)
trigger1=1
movetype=i
[state 5150, 9-h-2-is]
type=changeanim
trigger1=ishelper(6)
trigger1=root,var(31)&&!var(29)
value=2015
ignorehitpause=1
[state 5150, 9-h-2-is]
type=bindtoroot
trigger1=ishelper(6)
trigger1=root,var(31)&&!var(29)
pos=0,0
ignorehitpause=1
[state 5150, 9-h-2-is]
type=null
triggerall=ishelper(6) && 0
trigger1=!var(29)&&numtarget
trigger1=(target,stateno=[2903,2905])||(target,stateno=[5000,5100])
trigger1=var(29):=1
ignorehitpause=1
[state 5150, 9-h-2-is]
type=hitdef
triggerall=ishelper(6)&&!var(29) && 0
triggerall=root,var(31)
trigger1=enemynear(root,var(18)),stateno!=[120,159]
attr=,aa,at
damage=ceil(0.005*enemy,const(data.life)),0
hitflag=mafd
priority=7,hit
sparkno=-1
hitonce=1
[state 5150, 9-h-2-is]
type=targetdrop
triggerall=ishelper(6)
triggerall=numtarget
trigger1=var(29)>=1000
[state 5150, 9-h-2-is]
type=null
triggerall=ishelper(6) && 0
trigger1=var(29)=[1,1000)
trigger1=var(29):=var(29)+1||1
trigger2=var(29)>=1000
trigger2=var(29):=0
ignorehitpause=1
[state 5150, 9-h-2-is]
type=changeanim
trigger1=ishelper(6)
trigger1=var(29)=[1,1000)
value=2351
ignorehitpause=1 
[state 5150, 9-h-2-is]
type=hitadd
trigger1=ishelper(6)
trigger1=var(29)=[1,1000)
trigger1=helper(3),stateno!=[2900,2902]
value=-999
ignorehitpause=1
[state 5150, 9-h-2-is]
type=posset
trigger1=ishelper(6)
trigger1=var(29)=[1,1000)
trigger1=helper(3),stateno!=[2900,2902]
trigger1=numtarget
x=target,pos x
y=target,pos y
ignorehitpause=1
[state 5150, 9-h-2-is]
type=reversaldef
trigger1=ishelper(6) && 0
trigger1=var(29)=[1,1000)
reversal.attr=sca,aa,at,ap
hitflag=m-
priority=7
pausetime=0,0
numhits=1
sparkno=-1
hitsound=-1
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetstate
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
trigger1=numtarget
trigger1=target,stateno=40
value=9
ignorehitpause=1

[state 5150, 9-h-2-is]
type=null
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=root,palno>5
trigger1=numtarget
trigger1=target,movetype!=a
trigger1=var(32):=0||var(33):=0

[state 5150, 9-h-2-is]
type=targetstate
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=(root,palno=[11,12])||root,palno=6
triggerall=numtarget
trigger1=target,movetype=a
trigger1=(var(33):=var(33)+1)&&0
trigger2=var(33)>=100
value=2030
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetstate
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=root,palno>5
trigger1=numtarget
trigger1=target,alive&&target,movetype=a&&target,statetype!=a
trigger1=var(32):=var(32)+1
trigger1=var(32)=1&&!(random%3)
value=9
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetstate
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=!((helper(3),stateno=[2900,2902])&&movetype=a)
trigger1=numtarget
trigger1=!target,alive&&target,movetype!=h&&target,stateno!=964
trigger1=target,stateno!=[5100,5150]
value=964
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetpoweradd
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=root,palno=[6,11]
trigger1=numtarget
trigger1=target,alive
value=ceil(-10*enemy,const(data.power))
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetfacing
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=numhelper(3)
trigger1=numtarget
trigger1=target,alive&&target,movetype=a
value=ifelse(helper(3),p2dist x<0,-1,1)
ignorehitpause = 1

[state 5150, 9-h-2-is-co];戒め
type=targetlifeadd
triggerall=ishelper(6)&&numhelper(1)&&numhelper(3)&& 1
triggerall=(var(29)=[1,1000))
triggerall=!((helper(3),stateno=[2900,2902])&&movetype=a)
trigger1=numtarget=1&&roundstate=2
trigger1=root,palno=[6,12]
trigger1=helper(1),var(12)-helper(3),life>0
value=-ceil(helper(1),var(12)-helper(3),life)
absolute=1
kill=(target,movetype!=a&&helper(3),movetype!=h||(root,palno=[11,12])&&0)
ignorehitpause=1

[state 5150, 9-h-2-is-co];戒め
type=targetlifeadd
triggerall=ishelper(6)&&numhelper(1)&&numhelper(3)&& 1
triggerall=(var(29)=[1,1000))
triggerall=!((helper(3),stateno=[2900,2902])&&movetype=a)
trigger1=numtarget=1&&roundstate=2
trigger1=root,palno=[6,12]
trigger1=helper(1),var(10)-helper(3),life>0
value=-ceil(helper(1),var(10)-helper(3),life)
absolute=1
kill=(target,movetype!=a&&helper(3),movetype!=h||(root,palno=[11,12])&&0)
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetlifeadd
triggerall=ishelper(6)&&numhelper(3)
triggerall=(var(29)=[1,1000))
triggerall=!((helper(3),stateno=[2900,2902])&&movetype=a)
trigger1=numtarget=1
trigger1=root,palno=[6,12]
trigger1=roundstate=2&&var(30)>0&&var(30)-target,life<0
value=(var(30)-target,life)-ceil(target,lifemax*0.1)
absolute=1
kill=(target,movetype!=a&&helper(3),movetype!=h||(root,palno=[11,12])&&0)
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetlifeAdd
triggerall=ishelper(6)&&numhelper(3)
triggerall=var(29)=[1,1000)
triggerall=!((helper(3),stateno=[2900,2902])&&movetype=a)
trigger1=numtarget=1&&roundstate=2
trigger1=(gametime%(12-(root,palno=[6,12])*5))=1&&root,alive
value=ceil(-(0.002+(enemy,movetype=a)*0.012)*enemy,const(data.life))
kill=(target,movetype!=a&&helper(3),movetype!=h||(root,palno=[11,12])&&0)
absolute=1
ignorehitpause=1

[state 5150, 9-h-2-is]
type=targetveladd
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
trigger1=numhelper(3)&&numhelper(10)
trigger1=roundstate=2&&!(helper(3),stateno=800||helper(3),stateno=810||helper(3),stateno=2010)&&numtarget=1
trigger1=target,statetype=a&&target,pos y>-300&&!helper(10),var(29)
trigger1=!(target,movetype=h&&target,stateno=2305)
trigger1=root,alive&&helper(3),stateno!=2301&&helper(3),stateno!=2901&&helper(3),stateno!=1601
y=-0.25
ignorehitpause=1
[state 5150, 9-h-2-is]
type=targetstate
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
trigger1=numtarget=1&&numhelper(3)
trigger1=helper(3),movetype=a&&helper(3),stateno=2010
trigger1=!((target,stateno=[2030,2070])&&target,movetype=h)
value=2030
ignorehitpause=1
[state 5150, 9-h-2-is]
type=explod
triggerall=ishelper(6)
triggerall=var(29)=[1,1000)
triggerall=numhelper(3)
triggerall=helper(3),stateno!=[2900,2902]
trigger1=gametime%4=0
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-30+random%60,10-random%50
vel=0,-1-random%3
under=0
bindtime=1
trans=sub

;==========================================================================================
;D-S-z
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=changeanim
triggerall=ishelper(13)
trigger1=anim!=6144
value=6144

[state 5150, 15-h-D-S-z]
type=palfx
triggerall=ishelper(13)
triggerall=root,var(45)
trigger1=root,palno<6
time=1
mul=255,255,255
color=0
ignorehitpause=1

[state 5150, 15-h-D-S-z]
type=assertspecial
trigger1=ishelper(13)
trigger1=var(51):=(root,palno<11)*15||1    ;-30〜100
flag=invisible

[state 5150, 15-h-D-S-z]
type=statetypeset
trigger1=ishelper(13)
movetype=a

[state 5150, 15-h-D-S-z]
type=velset
triggerall=ishelper(13)
trigger1=var(50)=[1,50+var(51)]
x=4.5

[state 5150, 15-h-D-S-z]
type=playsnd
triggerall=ishelper(13)
triggerall=(root,palno=[11,12])
trigger1=var(50)=2
trigger2=root,var(45)
trigger2=(var(50)=4||var(50)=6)
value=4000,4
volume=200
freqmul=1.0+(var(50)=6)*0.1-(var(50)=4)*0.2

[state 5150, 15-h-D-S-z]
type=playsnd
triggerall=ishelper(13)
triggerall=(root,palno!=[11,12])
trigger1=var(50)=2
trigger2=root,var(45)
trigger2=(var(50)=4||var(50)=6)
value=4000,32
volume=255
freqmul=1.0+(var(50)=6)*0.1-(var(50)=4)*0.3

[state 5150, 15-h-D-S-z]
type=playsnd
triggerall=ishelper(13)
trigger1=var(50)=1
trigger2=root,var(45)
trigger2=(var(50)=3||var(50)=5)
value=4000,10
volume=200

[state 5150, 15-h-D-S-z]
type=playsnd
triggerall=ishelper(13)
triggerall=(root,palno=[11,12])
trigger1=var(50)=48+var(51)||root,var(45)&&var(50)=50+var(51)
value=4000,5
volume=50
freqmul=1.2

[state 5150, 15-h-D-S-z]
type=playsnd
triggerall=ishelper(13)
trigger1=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=48+var(51)||var(50)=50+var(51)
value=4000,36
volume=250
freqmul=1.3

[state 5150, 15-h-D-S-z]
type=envshake
triggerall=ishelper(13)
trigger1=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=48+var(51)
time=8
ampl=-8
freq=95
phase=95

[state 5150, 15-h-D-S-z]
type=sprpriority
triggerall=ishelper(13)
trigger1=var(50):=var(50)+1||1
value=5

;==========================================================================================
;t-00
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=(root,palno=[11,12])||!root,var(45)
trigger1=var(50)=1
anim=1010
id=1010
sprpriority=10
postype=p1
pos=-2,-2
under=0
bindtime=1

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)
trigger1=root,palno!=[11,12]
trigger1=var(50)=1
anim=3199
id=3198
sprpriority=5
postype=p1
pos=0,-2
ownpal=1
ontop=1
bindtime=1
ignorehitpause=1

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)
trigger1=root,palno!=[11,12]
trigger1=var(50)=1
anim=3198
id=3198
sprpriority=-5
postype=p1
pos=0,-2
ownpal=1
bindtime=1
ignorehitpause=1

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)
trigger1=root,palno!=[11,12]
trigger1=var(50)=1
anim=3198
id=3198
sprpriority=-6
postype=p1
pos=0,-2
ownpal=1
bindtime=1
;scale=1.05,1.05
ignorehitpause=1

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=1010
id=1010
sprpriority=10
postype=p1
pos=-30,-52
under=0
bindtime=1

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=1010
id=1010
sprpriority=10
postype=p1
pos=-30,52
under=0
bindtime=1

;==========================================================================================

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-10,0
under=0
ownpal=1
bindtime=1
scale=0.5,0.5
trans=addalpha
alpha=150,230

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-10,0
under=0
ownpal=1
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=212
sprpriority=98
postype=p1
pos=-10,0
under=1
ownpal=1
bindtime=1
scale=0.51,0.51
trans=sub

;==========================================================================================

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,-52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5
trans=addalpha
alpha=150,230

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,-52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=212
sprpriority=98
postype=p1
pos=-32,-52
under=1
ownpal=1
bindtime=1
scale=0.51,0.51
trans=sub

;==========================================================================================

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5
trans=addalpha
alpha=150,230

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=211
sprpriority=99
postype=p1
pos=-32,52
under=0
ownpal=1
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-p]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=1
anim=211
id=212
sprpriority=98
postype=p1
pos=-32,52
under=1
ownpal=1
bindtime=1
scale=0.51,0.51
trans=sub

;==========================================================================================
;t-1
;==========================================================================================

[state 5150, 15-h-D-S-z-b-s]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=211
id=212
sprpriority=6
postype=p1
pos=4,0
under=1
ownpal=1
trans=sub
bindtime=1
scale=0.5,0.5
ignorehitpause=0

[state 5150, 15-h-D-S-z-b-l]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=211
id=212
sprpriority=4
postype=p1
pos=-10,0
under=1
ownpal=1
bindtime=1
scale=1.10,1.10
trans=sub
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-l]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=2110
id=213
sprpriority=6
postype=p1
pos=-10,0
under=1
ownpal=1
bindtime=1
scale=0.5,0.5
trans=add
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-l]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=2110
id=213
sprpriority=5
postype=p1
pos=-10,0
under=1
ownpal=1
bindtime=1
scale=0.5,0.5
trans=sub
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-s]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=2110
id=213
sprpriority=7
postype=p1
pos=0,0
under=1
ownpal=1
bindtime=1
scale=0.25,0.25
trans=add
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-s]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=2110
id=213
sprpriority=5
postype=p1
pos=0,0
under=1
ownpal=1
bindtime=1
scale=0.25,0.25
trans=sub
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-s2]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=2110
id=213
sprpriority=7
postype=p1
pos=10,0
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=add
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-s2]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11&&!(gametime%8)
trigger1=var(50)=[1,48+var(51)]
anim=2110
id=213
sprpriority=5
postype=p1
pos=10,0
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=sub
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-s3]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11
trigger1=var(50)=49+var(51)
anim=2110
id=213
sprpriority=5
postype=p1
pos=20,0
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=add
ignorehitpause=0

[state 5150, 15-h-D-S-z-w-s3]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno<11
trigger1=var(50)=49+var(51)
anim=2110
id=213
sprpriority=5
postype=p1
pos=20,0
under=1
ownpal=1
bindtime=1
scale=0.125,0.125
trans=sub
ignorehitpause=0

[state 5150, 15-h-D-S-z-11P]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno>10
triggerall=!numexplod(2955)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=2955
sprpriority=90
postype=p1
pos=0,0
under=0
trans=add
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-11P]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno>10
triggerall=!numexplod(2956)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=2956
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-11P]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno>10
triggerall=!numexplod(2957)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=2957
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-11P]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno>10
triggerall=!numexplod(2958)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=2958
sprpriority=-90
postype=p1
pos=0,0
under=0
trans=sub
removetime=200
bindtime=-1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-11P]
type=explod
triggerall=ishelper(13) && 1
triggerall=root,var(45)&&root,palno>10
triggerall=!numexplod(2959)
trigger1=var(50)=[1,48+var(51)]
anim=1011
id=2959
sprpriority=2
postype=p1
pos=0,0
under=0
removetime=200
bindtime=-1
ownpal=!(root,palno=[1,5])

;==========================================================================================
;t-2
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29551)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29551
sprpriority=90
postype=p1
pos=-32,-52
under=0
trans=add
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29561)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29561
sprpriority=-90
postype=p1
pos=-32,-52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29571)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29571
sprpriority=-90
postype=p1
pos=-32,-52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29581)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29581
sprpriority=-90
postype=p1
pos=-32,-52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29591)
trigger1=var(50)=[1,48+var(51)]
anim=1011
id=29591
sprpriority=2
postype=p1
pos=-32,-52
under=0
removetime=200
bindtime=-1

;==========================================================================================
;t-3
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29552)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29552
sprpriority=90
postype=p1
pos=-32,52
under=0
trans=add
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29562)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29562
sprpriority=-90
postype=p1
pos=-32,52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29572)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29572
sprpriority=-90
postype=p1
pos=-32,52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29582)
trigger1=var(50)=[1,48+var(51)]
anim=4000
id=29582
sprpriority=-90
postype=p1
pos=-32,52
under=0
trans=sub
removetime=200
bindtime=-1
scale=0.5,0.5

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=!numexplod(29592)
trigger1=var(50)=[1,48+var(51)]
anim=1011
id=29592
sprpriority=2
postype=p1
pos=-32,52
under=0
removetime=200
bindtime=-1

;==========================================================================================
;b-1
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=4001
id=2970
sprpriority=15
postype=p1
pos=0,0
under=0
trans=add
bindtime=1
ownpal=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-s]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=2980
sprpriority=15
postype=p1
pos=0,0
ontop=1
scale=0.25,0.25
bindtime=1
ownpal=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=4001
id=2971
sprpriority=5
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=sub
bindtime=1
[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=4001
id=2971
sprpriority=4
postype=p1
pos=0,0
scale=0.5,0.5
under=0
trans=sub
bindtime=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=-1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=-1,1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)&&(root,palno=[11,12])
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=0,0
vel=1,-1
bindtime=1
ontop=1
trans=sub
ownpal=1

[state 5150, 15-h-D-S]
type=explod
triggerall=ishelper(13)
triggerall=!root,var(45)
trigger1=var(50)=49+var(51)
anim=1162
sprpriority=9
postype=p1
pos=0,0
under=0
bindtime=1
ownpal=!(root,palno=[1,5])

;==========================================================================================
;b-2
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=4001
id=2970
sprpriority=15
postype=p1
pos=-32,-52
under=0
trans=add
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-s]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=2980
sprpriority=15
postype=p1
pos=-32,-52
ontop=1
scale=0.25,0.25
bindtime=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=4001
id=2971
sprpriority=5
postype=p1
pos=-32,-52
scale=0.5,0.5
under=0
trans=sub
bindtime=1
[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=4001
id=2971
sprpriority=4
postype=p1
pos=-32,-52
scale=0.5,0.5
under=0
trans=sub
bindtime=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=-1,-1
bindtime=1
ontop=1
trans=sub

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=1,1
bindtime=1
ontop=1
trans=sub

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=-1,1
bindtime=1
ontop=1
trans=sub

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,-52
vel=1,-1
bindtime=1
ontop=1
trans=sub


;==========================================================================================
;b-3
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=4001
id=2970
sprpriority=15
postype=p1
pos=-32,52
under=0
trans=add
bindtime=1
scale=0.5,0.5

[state 5150, 15-h-D-S-z-s]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=2980
sprpriority=15
postype=p1
pos=-32,52
ontop=1
scale=0.25,0.25
bindtime=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=4001
id=2971
sprpriority=5
postype=p1
pos=-32,52
scale=0.5,0.5
under=0
trans=sub
bindtime=1
[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=4001
id=2971
sprpriority=4
postype=p1
pos=-32,52
scale=0.5,0.5
under=0
trans=sub
bindtime=1

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=-1,-1
bindtime=1
ontop=1
trans=sub

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=1,1
bindtime=1
ontop=1
trans=sub

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=-1,1
bindtime=1
ontop=1
trans=sub

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
trigger1=var(50)=49+var(51)
anim=6400
id=610123
sprpriority=10
postype=p1
scale=0.25,0.25
pos=-32,52
vel=1,-1
bindtime=1
ontop=1
trans=sub

;==========================================================================================
;removeexplod
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13) && 0
triggerall=numexplod(212)
trigger1=var(50)>=49+var(51)
id=212
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13) && 0
triggerall=numexplod(213)
trigger1=var(50)>=49+var(51)
id=213
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(2955)
trigger1=var(50)>=49+var(51)
id=2955
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(2956)
trigger1=var(50)>=49+var(51)
id=2956
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(2957)
trigger1=var(50)>=49+var(51)
id=2957
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(2958)
trigger1=var(50)>=49+var(51)
id=2958
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(2959)
trigger1=var(50)>=49+var(51)
id=2959

;==========================================================================================

[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29551)
trigger1=var(50)>=49+var(51)
id=29551
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29561)
trigger1=var(50)>=49+var(51)
id=29561
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29571)
trigger1=var(50)>=49+var(51)
id=29571
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29581)
trigger1=var(50)>=49+var(51)
id=29581
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29591)
trigger1=var(50)>=49+var(51)
id=29591

;==========================================================================================

[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29552)
trigger1=var(50)>=49+var(51)
id=29552
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29562)
trigger1=var(50)>=49+var(51)
id=29562
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29572)
trigger1=var(50)>=49+var(51)
id=29572
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29582)
trigger1=var(50)>=49+var(51)
id=29582
[state 5150, 15-h-D-S-z]
type=removeexplod
triggerall=ishelper(13)
triggerall=numexplod(29592)
trigger1=var(50)>=49+var(51)
id=29592

[state 5150, 15-h-D-S-z]
type=explod
triggerall=ishelper(13)
triggerall=root,var(45)
triggerall=!(gametime%2)
trigger1=var(50)=[1,48+var(51)]
anim=6101
id=61018
sprpriority=10
postype=p1
scale=0.5,0.5
pos=-10+random%20,30-random%60
under=0
bindtime=1
trans=add

;==========================================================================================
;==========================================================================================

[state 5150, 15-h-D-S-z]
type=projectile
triggerall=ishelper(13)
triggerall=root,palno!=[11,12]
triggerall=gametime%5=0
trigger1=var(50)=[1,50+var(51)]
attr=sca,aa
projanim=11630
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=-32,0
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990

[state 5150, 15-h-D-S-z]
type=projectile
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=gametime%5=0
trigger1=var(50)=[1,50+var(51)]
attr=sca,aa
projanim=1163
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=0,0
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990

[state 5150, 15-h-D-S-z]
type=projectile
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=gametime%5=0
trigger1=var(50)=[1,50+var(51)]
attr=sca,aa
projanim=1163
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=-32,-52
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990

[state 5150, 15-h-D-S-z]
type=projectile
triggerall=ishelper(13)
triggerall=root,palno=[11,12]
triggerall=gametime%5=0
trigger1=var(50)=[1,50+var(51)]
attr=sca,aa
projanim=1163
projid=11630
projhitanim=-1
projremanim=-1
projcancelanim=-1
projpriority=2147483647
projsprpriority=2147483647
projremove=0
projremovetime=1
postype=p1
offset=-32,52
velocity=0
animtype=hard
damage=ceil(0.01*enemy,const(data.life)),ceil(0.002*enemy,const(data.life))
getpower=40+(root,var(15)!=0)*40,20+(root,var(15)!=0)*40
givepower=5,5
guardflag=m
hitflag=maf
pausetime=0,1
guard.pausetime=0,0
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=17
ground.hittime=17
ground.velocity=-2
air.velocity=-1,-5
fall=0
air.fall=1
fall.recover=0
p2stateno=2990

[state 5150, 15-h-D-S-z]
type=destroyself
triggerall=ishelper(13)
trigger1=var(50)>=71+var(51)

;==========================================================================================
;M-S
;==========================================================================================

[state 5150, 15-h-M-S]
type=changeanim
triggerall=ishelper(14)
trigger1=!var(51)&&anim!=1702
value=1702

[state 5150, 15-h-M-S]
type=changeanim
triggerall=ishelper(14)
trigger1=var(51)&&anim!=1705
value=1705

[state 5150, 15-h-M-S]
type=statetypeset
trigger1=ishelper(14)
movetype=a
statetype=s

[state 5150, 15-h-M-S]
type=palfx
triggerall=ishelper(14)
trigger1=root,palno=1
trigger1=var(52):=255&&var(53):=255&&var(54):=255
trigger2=root,palno=2
trigger2=var(52):=250&&var(53):=200&&var(54):=50
trigger3=root,palno=3
trigger3=var(52):=50&&var(53):=250&&var(54):=40
trigger4=root,palno=4
trigger4=var(52):=250&&var(53):=50&&var(54):=50
trigger5=root,palno=5
trigger5=var(52):=250&&var(53):=100&&var(54):=250
trigger6=root,palno=6
trigger6=var(52):=250&&var(53):=250&&var(54):=250
time=1
mul=var(52),var(53),var(54)
add=10,10,10
color=(!(root,palno=1||root,palno=6))*256
ignorehitpause=1

[state 5150, 15-h-M-S]
type=playsnd
triggerall=ishelper(14)
trigger1=var(50)=1
value=4000,22
volume=200
freqmul=1.0

[state 5150, 15-h-M-S]
type=sprpriority
triggerall=ishelper(14)
trigger1=var(50):=var(50)+1||1
value=5

[state 5150, 15-h-M-S]
type=velset
triggerall=ishelper(14)
trigger1=var(50)>=30&&!var(51)&&(p2bodydist x<0||p2bodydist x>0)
x=ifelse(p2bodydist x<0,-4,4)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=velset
triggerall=ishelper(14)
trigger1=var(50)>=30&&!var(51)&&(p2bodydist y<50||p2bodydist y>50)
y=ifelse(p2bodydist y<50,-1.0,1.0)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=angledraw
triggerall=ishelper(14)
trigger1=1
scale=0.2+0.4*(gametime%2),0.2+0.4*(gametime%2)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=angleadd
triggerall=ishelper(14)
trigger1=1
value=-14
ignorehitpause=1

[state 5150, 15-h-M-S]
type=trans
triggerall=ishelper(14)
trigger1=1
trans=addalpha
alpha=250-70*(gametime%3),70*(gametime%3)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=explod
triggerall=ishelper(14)
trigger1=!(gametime%10)
anim=1703
id=1703
sprpriority=99
postype=p1
pos=0,0
vel=0,0
trans=add
bindtime=-1
removetime=10
ownpal=0
ignorehitpause=1

[state 5150, 15-h-M-S]
type=explod
triggerall=ishelper(14)
trigger1=!(gametime%2)&&!moveguarded
anim=6101
sprpriority=2
postype=p1
pos=-10+random%20,10-random%20
scale=0.5,0.5
vel=-1+(random%3),-1+(random%3)
ownpal=0
bindtime=1

[state 5150, 15-h-M-S]
type=modifyexplod
triggerall=ishelper(14)
trigger1=numexplod(1703)
id=1703
scale=0.2+0.12*(gametime%9),0.2+0.12*(gametime%9)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=removeexplod
triggerall=ishelper(14)
triggerall=numexplod(1703)
trigger1=var(50)>=120&&!var(51)||moveguarded||movereversed
trigger2=roundstate>=3||var(51)>=150||hitpausetime>5
trigger3=numtarget
trigger3=var(51)&&target,stateno!=1701
trigger4=!numtarget&&var(51)>10
id=1703
ignorehitpause=1

[state 5150, 15-h-M-S]
type=hitdef
triggerall=ishelper(14)
trigger1=!var(51)
attr=,sp
animtype=hard
damage=5
hitflag=mafd
getpower=30,30
guardflag=m
pausetime=0,2
sparkno=s2835
sparkxy=15,-10
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=low
ground.slidetime=27
ground.hittime=27
ground.velocity=0
air.velocity=-3,-5.2
p2stateno=1701

[state 5150, 15-h-M-S]
type=projectile
triggerall=ishelper(14)
trigger1=!var(51)
trigger1=!(gametime%2)
attr=s,sp
projanim=1707
projid=1706510
projpriority=1
projsprpriority=5
projremove=0
projremovetime=1
postype=p1
offset=0,0
velocity=0,0
animtype=hard
damage=ceil(0.025*enemy,const(data.life)),7
getpower=5,5
givepower=2,2
guardflag=m
hitflag=ma-
pausetime=0,5
guard.pausetime=0,5
sparkno=s2835
sparkxy=0,0
hitsound=s225,1
guard.sparkno=s2855
guardsound=s121,0
ground.type=high
ground.slidetime=18
ground.hittime=18
ground.velocity=3,-5
guard.velocity=-2.8
air.velocity=4.5,-5
fall=1
air.fall=1
fall.recover=0
p2stateno=1701

[state 5150, 15-h-M-S]
type=projectile
triggerall=ishelper(14)
trigger1=!var(51)
trigger1=!(gametime%2)
attr=sca,aa,at,ap
projanim=1706
projid=1706510
projhitanim=-1
projpriority=2147483647
projsprpriority=5
projremove=1
projremovetime=2
postype=p1
offset=0,0
velocity=0
animtype=hard
damage=0
guardflag=
hitflag= 
sparkno=-1
sparkxy=-1
hitsound=-1
guard.sparkno=-1
guardsound=-1

[state 5150, 15-h-M-S]
type=null
triggerall=ishelper(14)
trigger1=!var(51)
trigger1=var(51):=numtarget||1
trigger2=var(51)
trigger2=var(51):=var(51)+1||1
ignorehitpause=1

[state 5150, 15-h-M-S]
type=targetbind
triggerall=ishelper(14)
trigger1=var(51)
pos=0,60
ignorehitpause=1

[state 5150, 15-h-M-S]
type=velset
triggerall=ishelper(14)
trigger1=var(51)
trigger1=(rootdist x<0||rootdist x>0)
x=ifelse(rootdist x<0,-10.5,10.5)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=velset
triggerall=ishelper(14)
trigger1=var(51)
trigger1=rootdist x=[-61,61]
x=0
ignorehitpause=1

[state 5150, 15-h-M-S]
type=velset
triggerall=ishelper(14)
trigger1=var(51)
trigger1=(rootdist y<70||rootdist y>70)
y=ifelse(rootdist y<70,-0.8,0.8)
ignorehitpause=1

[state 5150, 15-h-M-S]
type=velset
triggerall=ishelper(14)
trigger1=var(51)
trigger1=rootdist y=[0,-70]
y=0
ignorehitpause=1

[state 5150, 15-h-M-S]
type=targetstate
triggerall=ishelper(14)
trigger1=var(51)>=120&&numtarget
trigger1=target,stateno=1701
value=1702
ignorehitpause=1

[state 5150, 15-h-M-S]
type=destroyself
triggerall=ishelper(14)
trigger1=var(50)>=120&&!var(51)||moveguarded||movereversed
trigger2=roundstate>=3||var(51)>=150||hitpausetime>5
trigger3=numtarget
trigger3=var(51)&&target,stateno!=1701
trigger4=!numtarget&&var(51)>10
ignorehitpause=1

;==========================================================================================
;J-B
;==========================================================================================

[state 5150, 15-h-J-B]
type=changeanim
triggerall=ishelper(15)
trigger1=anim!=1553
value=1553

[state 5150, 15-h-J-B]
type=statetypeset
trigger1=ishelper(15)
movetype=a
statetype=s

[state 5150, 15-h-J-B]
type=playsnd
triggerall=ishelper(15)
trigger1=animelemtime(3)=1||animelemtime(3)=3
volume=150
freqmul=0.9+(animelemtime(3)=3)*0.3
value=4000,35

[state 5150, 15-h-J-B]
type=playsnd
triggerall=ishelper(15)
trigger1=animelemtime(3)=1||animelemtime(3)=4
volume=250
freqmul=0.9
value=105,0

[state 5150, 15-h-J-B]
type=sprpriority
triggerall=ishelper(15)
trigger1=animelemtime(4)<=2
trigger1=var(50):=(var(50)+1)*(animelemtime(4)<=0)||1
trigger2=animelemtime(7)>=1
trigger2=var(50):=var(50)+1||1
trigger3=1
value=5

[state 5150, 15-h-J-B]
type=trans
triggerall=ishelper(15)
trigger1=animelemtime(4)<=2
trigger1=var(50)<=30
trans=addalpha
alpha=var(50)*12,250-var(50)*12

[state 5150, 15-h-J-B]
type=trans
triggerall=ishelper(15)
trigger1=animelemtime(7)>=1
trigger1=var(50)<=30
trans=addalpha
alpha=250-var(50)*10,var(50)*10

[state 5150, 15-h-J-B]
type=assertspecial
triggerall=ishelper(15)
trigger1=animelemtime(7)>=1
trigger1=var(50)>=30
flag=invisible
flag2=noshadow
ignorehitpause=1

[state 5150, 15-h-J-B]
type=explod
triggerall=ishelper(15)
trigger1=animelemtime(3)=1
anim=1555
sprpriority=5
postype=p1
pos=20,-65
under=0
ownpal=1
ontop=1
ignorehitpause=1

[state 5150, 15-h-J-B]
type=hitdef
triggerall=ishelper(15)
trigger1=animelemtime(5)=1
attr=,sp
animtype=hard
damage=20
hitflag=maf
getpower=30,30
guardflag=m
pausetime=2,25
guard.pausetime=0,25
sparkno=s2835
sparkxy=-40,-80
hitsound=s2000,0
guard.sparkno=s2855
guardsound=s121,0
ground.type=low
ground.slidetime=27
ground.hittime=27
ground.velocity=0
air.velocity=-3,-5.2
envshake.time=10
envshake.ampl=10

[state 5150, 15-h-J-B]
type=playsnd
triggerall=ishelper(15)
trigger1=hitpausetime
volume=150
freqmul=1.0
value=2000,1
ignorehitpause=1

[state 5150, 15-h-J-B]
type=envcolor
triggerall=ishelper(15)
trigger1=hitpausetime
time=1
value=200,0,0
under=1
ignorehitpause=1

[state 5150, 15-h-J-B]
type=destroyself
triggerall=ishelper(15)
trigger1=hitpausetime>10||animelemtime(10)>=1
ignorehitpause=1

;==========================================================================================
;D-SF
;==========================================================================================

[state 5150, 15-h-D-SF]
type=changeanim
triggerall=ishelper(17)
trigger1=var(50):=var(50)+1||1
value=1011

[state 5150, 15-h-D-SF]
type=statetypeset
trigger1=ishelper(17)
movetype=i
statetype=s

[state 5150, 15-h-D-SF]
type=posset
triggerall=ishelper(17)
trigger1=vel y>0&&pos y>=0&&!var(51)
trigger1=(var(51):=var(51)+1)&&0
trigger2=var(51)
trigger2=(var(51):=var(51)+1)||1
y=0

[state 5150, 15-h-D-SF]
type=velset
triggerall=ishelper(17)
trigger1=var(50)=1
trigger2=var(51)
x=0
y=6*(var(50)=1)

[state 5150, 15-h-D-SF]
type=trans
triggerall=ishelper(17)
trigger1=var(51)
trans=addalpha
alpha=250-var(51)*10,var(51)*10

[state 5150, 15-h-D-SF]
type=explod
triggerall=ishelper(17)
trigger1=var(50)=1
anim=1063
sprpriority=99
postype=p1
pos=0-(facing=-1&&0)*10,120
bindtime=1
facing=facing
removetime=20
ownpal=1
pausemovetime=9999999
supermovetime=9999999

[state 5150, 15-h-D-SF]
type=destroyself
triggerall=ishelper(17)
trigger1=var(50)>=100||var(51)>=30

;==========================================================================================
;AD-F
;==========================================================================================

[state 5150, 15-h-AD-F]
type=changeanim
triggerall=ishelper(18)
trigger1=var(50):=var(50)+1||1
value=1174
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=statetypeset
trigger1=ishelper(18)
movetype=a
statetype=s
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=attackdist
trigger1=ishelper(18)
value=0
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=posset
triggerall=ishelper(18)
trigger1=1
y=0
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=playsnd
trigger1=ishelper(18)
trigger1=var(50)=500
value=4000,65
freqmul=0.8
volume=200
loop=1

[state 5150, 15-h-AD-F]
type=palfx
triggerall=ishelper(18)
triggerall=var(50)>=2000
trigger1=var(50)%1000=[1,250)
trigger1=var(51):=250-root,var(1)&&var(52):=root,var(1)&&var(53):=0||1
trigger2=var(50)%1000=[250,500)
trigger2=var(51):=250-root,var(1)&&var(52):=0&&var(53):=250-root,var(1)||1
trigger3=var(50)%1000=[500,750)
trigger3=var(51):=root,var(1)&&var(52):=root,var(1)+50&&var(53):=250||1
trigger4=var(50)%1000>=750
trigger4=var(51):=200&&var(52):=root,var(1)&&var(53):=0||1
time=1
mul=var(51),var(52),var(53)
add=0,0,0
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=palfx
triggerall=ishelper(18)
triggerall=var(50)<2000
trigger1=1
time=1
mul=250,200,50
add=0,0,0
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=poweradd
triggerall=ishelper(18)
trigger1=!(var(50)%(3-(var(50)>=2000)*2))&&roundstate=2
value=10
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=explod
trigger1=ishelper(18)
trigger1=var(50)=[500,2000)
trigger1=!numexplod(11735150)
anim=1173
id=11735150
sprpriority=99
postype=p1
pos=0,0
bindtime=1
removetime=-1
ownpal=1
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=explod
trigger1=ishelper(18)
trigger1=var(50)>=2000
trigger1=!numexplod(21735150)
anim=1173
id=21735150
sprpriority=99
postype=p1
pos=0,0
bindtime=1
removetime=-1
ownpal=0
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=removeexplod
trigger1=ishelper(18)
trigger1=var(50)>=2000
trigger1=numexplod(11735150)
id=11735150
ignorehitpause=1

[state 5150, 15-h-AD-F]
type=explod
trigger1=ishelper(18)
trigger1=var(50)>=500
trigger1=!(gametime%6)
anim=6101
sprpriority=-90
postype=p1
pos=-50+random%100,-50-random%80
scale=0.5,0.5
vel=-1+random%3,-1-(random%3)
ownpal=0
pausemovetime=9999999
supermovetime=9999999

[state 5150, 15-h-AD-F]
type=hitdef
triggerall=ishelper(18)
trigger1=var(50)>=500
trigger1=!(gametime%14)
attr=,sp
animtype=light
damage=6+((var(50)>=2000)*random%40)
numhits=0
hitflag=mafd
getpower=0,0
givepower=-20-((var(50)>=2000)*random%80),-20-((var(50)>=2000)*random%80)
guardflag=
pausetime=0,1+(var(50)>=2000)*2
sparkno=-1;s2835
sparkxy=15,-10
hitsound=-1
guard.sparkno=-1;s2855
guardsound=-1
ground.type=low
ground.slidetime=2
ground.hittime=2
ground.velocity=-1
air.velocity=-1,-1.2
kill=0

;==========================================================================================
;==========================================================================================
; HIT_FALLRECOVER (still falling)
;==========================================================================================
;==========================================================================================

[statedef 5200]
type=a
movetype=h
physics=n

[state 5200]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 5200, 1] 
type=changeanim
triggerall=ishelper(3)
trigger1=anim=5035
trigger1=!animtime
value=5050

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

[state 5200, 3]
type=nothitby
trigger1=ishelper(3)
trigger1=root,var(20)
value=sca

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

;==========================================================================================
;==========================================================================================
; HIT_FALLRECOVER (on the ground)
;==========================================================================================
;==========================================================================================

[statedef 5201]
type=a
movetype=h
physics=a

[state 5201]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 5201]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=5200
ignorehitpause=1

[state 5201]
type=destroyself
trigger1=!ishelper(3)

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

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

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

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

[state 5201, 5] 
type=palfx
trigger1=!time
time=3
add=128,128,128

[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
ctrl=0

[state 5210]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=!ishelper(3)
trigger3=!numhelper(3)
value=69996
ignorehitpause=1

[state 5210]
type=changeanim
trigger1=!time
trigger1=ishelper(3)
value=5210
ignorehitpause=1

[state 5210]
type=destroyself
trigger1=!ishelper(3)

[state 5210, 1] 
type=palfx
trigger1=!time
time=3
add=128,128,128 

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

[state 5210, 2]
type=turn
trigger1=!time
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] 
type=veladd
trigger1=time=4
trigger1=command="holdup"
y=-2

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

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

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

[state 5210, 3]
type=nothitby
trigger1=ishelper(3)
trigger1=root,palno=[11,12]
value=sca

[state 5210, 4]
type=nothitby
trigger1=ishelper(3)
trigger1=root,palno!=[11,12]
trigger1=(!time||root,var(20))
value=sca
time=15

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

[state 5210, 6]
type=veladd
trigger1=time>=4
y=.35

[state 5210, 7] 
type=changestate
trigger1=vel y>0
trigger1=pos y>=0
value=52 
ctrl=1

;==========================================================================================
;==========================================================================================
; Continue?
;==========================================================================================
;==========================================================================================

[statedef 5500]
type=s
ctrl=0
anim=0
velset=0,0

[state 5500]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
value=69996
ignorehitpause=1

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

;==========================================================================================
;==========================================================================================
; Initialize (at the start of the round)
;==========================================================================================
;==========================================================================================

[statedef 5900]
type=s

[state 5900]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
value=69996
ignorehitpause=1

[state 5900, 0]
type=changeanim
triggerall=!ishelper&&palno=12
trigger1=anim!=11721
value=11721

[state 5900, 0]
type=changeanim
triggerall=!ishelper
trigger1=(palno=[7,11])
trigger1=anim!=3
value=3

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

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

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

;---------------------------------------
[state 5900, 4]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1072
sprpriority=99
postype=p1
pos=-1,18
scale=0.5,0.5
bindtime=1
ownpal=1
[state 5900, 4]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1073
sprpriority=99
postype=p1
pos=-1,18
scale=0.5,0.5
bindtime=1
ownpal=1
[state 5900, 4]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1072
sprpriority=99
postype=p1
pos=-12,18
scale=0.25,0.6
bindtime=1
ownpal=1
trans=sub
[state 5900, 4]
type=explod
triggerall=anim=2+!ishelper
triggerall=!(gametime%6)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=1073
sprpriority=99
postype=p1
pos=6,18
scale=0.25,0.6
bindtime=1
ownpal=1
trans=sub
;---------------------------------------
[state 5900, 5]
type=explod
trigger1=!ishelper&&!numexplod(33)
trigger1=(palno=[7,11]);&&!var(20)
anim=33
id=33
sprpriority=-99
postype=p1
pos=-5,-1
scale=0.5,0.5
bindtime=-1
ownpal=1
removetime=-1
[state 0, 1-ora]
type=explod
trigger1=!ishelper&&!numexplod(34)
trigger1=(palno=[7,11]);&&!var(20)
anim=33
id=34
sprpriority=-101
postype=p1
pos=-5,-1
scale=0.5,0.5
bindtime=-1
ownpal=1
trans=sub
removetime=-1
;---------------------------------------
[state 5900, 6]
type=explod
trigger1=!ishelper&&!numexplod(88)
trigger1=!animelemtime(1)
trigger1=(palno=[7,10]);&&!var(20)
anim=8
id=88
sprpriority=99
postype=p1
pos=2,-48
scale=0.5,0.5
bindtime=-1
ownpal=1
removetime=-1
[state 5900, 7]
type=explod
trigger1=!ishelper&&!numexplod(89)
trigger1=!animelemtime(1)
trigger1=(palno=[7,10]);&&!var(20)
anim=8
id=89
sprpriority=98
postype=p1
pos=2,-48
scale=0.501,0.501
bindtime=-1
ownpal=1
trans=sub
removetime=-1
[state 5900, 8-PAT]
type=explod
triggerall=anim=2+!ishelper&&   1
triggerall=!(gametime%2)
trigger1=ishelper(3)
trigger1=(root,palno=[1,6])&&root,var(45)||(root,palno=[7,12])
trigger2=!ishelper
trigger2=(palno=[7,12])
anim=6101
sprpriority=98
postype=p1
pos=-14+random%20,18
scale=0.25,0.25
accel=0,0.12
vel=0,-3
bindtime=1
ownpal=1
;trans=sub

;==========================================================================================
;==========================================================================================
; 
;==========================================================================================
;==========================================================================================

[statedef 5901]
physics=n
[state 5901]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
trigger3=!numhelper(3)
value=69996
ignorehitpause=1
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=i
movetype=i
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=a
movetype=a
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),movetype=h
movetype=h
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=s
statetype=s
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=c
statetype=c
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=a
statetype=a
[state 5901]
type=statetypeset
trigger1=!ishelper&&(var(7)&1024)
trigger1=numhelper(3)
trigger1=helper(3),statetype=l
statetype=l
[state 5901]
type=hitdef
triggerall=!ishelper
triggerall=numhelper(3)
trigger1=(var(7)&1024)&&anim=6144
trigger1=helper(3),hitdefattr=sca,aa,ap,at
attr=sca,aa,ap,at
animtype=medium
damage=50
guardflag=ma
pausetime=10,10
sparkno=s2825
guard.sparkno=s2845
sparkxy=-10,-37
hitsound=s224,0                 
guardsound=s120,0  
ground.type=low
ground.slidetime=10
ground.hittime=11
ground.velocity=-5
air.velocity=-2.5,-3.5
[statedef 5950]
type=a
physics=n
movetype=a
[state 5950]
type=changestate
trigger1=name!="G-Mizuchi-v2"
trigger2=ishelper
value=69996
ignorehitpause=1
[state 5950]
type=posadd
triggerall=palno=12
triggerall=command="holdfwd"||command="holdback"
trigger1=!var(15)||var(15)&&!((gametime%400=[0,250])&&pos y<-120)
x=ifelse(command="holdfwd",4,-4)
[state 5950]
type=posadd
triggerall=palno=12
triggerall=command="holdup"||command="holddown"
trigger1=!var(15)||var(15)&&!((gametime%400=[0,250])&&pos y<-120)
y=ifelse(command="holdup",-4,4)
[state 5950]
type=posadd
trigger1=palno=12&&var(15)
trigger1=(gametime%400=[0,350])&&pos y<-120
y=6
[state 5950]
type=posadd
trigger1=palno=12&&var(15) && 0
trigger1=(gametime%400=[0,250])&&(pos x<-130||pos x>130)
x=ifelse(pos x<-130,-6,6)
[state 5950]
type=posadd
trigger1=palno=12&&var(15)
trigger1=(gametime%600=[300,600))
x=ifelse((gametime%600=[300,450)),-6,6)
[state 5950]
type=posadd
trigger1=palno=12&&var(15)
trigger1=(gametime%800=[600,800))
x=ifelse(!(gametime%2),-20,20)
[state 5950]
type=lifeset
trigger1=0
value=ifelse(palno=12,life+palno,lifemax)
[state 5950]
type=lifeadd
trigger1=palno=12&&!time&&roundstate=2
value=-40
[state 5950] 
type=changestate
trigger1=palno=12&&time>20
value=0

