; Constants and state file.
; There are comments scattered through this file, so you may like to
; take a look if would like to learn more about the cns.

[Data]
life = 1000			;Amount of life to start with
power = 6000		;Amount of maximum power
attack = 125		;attack power (more is stronger)
defence = 90		;defensive power (more is stronger)
fall.defence_up = 100	;Percentage to increase defense everytime player is knocked down
liedown.time = 100		;Time which player lies down for, before getting up
airjuggle = 35		;Number of points for juggling
sparkno = 2			;Default hit spark number for HitDefs
guard.sparkno = 40	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 255			;Volume offset (negative for softer)
IntPersistIndex = 60	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,
  				;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
  				;If omitted, then it defaults to 60 and 40 for integer and float
  				;variables repectively, meaning that none are persistent, i.e. all
  				;are reset. If you want your variables to persist between matches,
  				;you need to override state 5900 from common1.cns.


[Size]
xscale = 1			;Horizontal scaling factor.
yscale = 1			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 30			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = -5, -90	;Approximate position of head
mid.pos = -5, -60		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.4		;Walk forward
walk.back = -2.2		;Walk backward
run.fwd  = 4.6, 0		;Run forward (x, y)
run.back = -4.5,-3.8	;Hop backward (x, y)
jump.neu = 0,-8.4		;Neutral jumping velocity (x, y)
jump.back = -2.55		;Jump back Speed (x, y)
jump.fwd = 2.5		;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1;Running jump speeds (opt)
runjump.fwd = 4,-8.1	;.
airjump.neu = 0,-8.1	;.
airjump.back = -2.55	;Air jump speeds (opt)
airjump.fwd = 2.5		;.

[Movement]
airjump.num = 1		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .44		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching

[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
victory1 = "The chances of beating a legendary dragon like me are 9001 to 0"
victory2 = "You are a decent fighter, but you lack the proper true power."
victory3 = "As a legendary dragon, I sense you might be able to unlock true power some day..."
victory4 = "Power is something not to be tampered with unless you really know how to handle it."
victory5 = "You think you can beat me in 1 second? Chances of that happening are 0%"
victory6 = "Your moves are too predictable, you need to practice your timing a bit more."
victory7 = "No one said I would go easy on you."

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 170
value = 0,0
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

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

[State 180, win]
type=changestate
trigger1= prevstateno=4312
value=4312

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181

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

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

[State wait]
type = assertspecial
trigger1 = !ishelper
flag = roundnotover

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 180
value = 0,1
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State wait]
type = changestate
trigger1 = time = 80
value = 9800
;==========< BENNY HILL >==========
[Statedef 9800]
type = S
physics = N
anim = 9800
sprpriority = 1
ctrl = 0
[State wait]
type = assertspecial
trigger1 = !ishelper
flag = roundnotover



[State 9800]
type = changestate
trigger1 = time >= 45
value = 9801
[Statedef 9801]
type = S
physics = N
anim = 9801
sprpriority = 1
ctrl = 0
[State wait]
type = assertspecial
trigger1 = time < 255 && !ishelper
flag = roundnotover

[State 9801, Camera]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1
;[State 9801, Camera]
;type = helper
;trigger1 = !numhelper(7650) && !ishelper
;helpertype = normal
;stateno = 7650
;ID = 7650
;name = "Camera"
;postype = p1

[State 9800, snd]
type = playsnd
trigger1 = time = 180
value = S666, 28
channel = 9

[State 9800, snd]
type = playsnd
trigger1 = time = 40
value = S666, 29
channel = 9

[State 9801, FX]
type = helper
trigger1 = !time
helpertype = normal
name = "Possy"
stateno = 6180
postype = p1
pos = -480, 0
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 9801, FX]
type = helper
trigger1 = !(time % 4)
trigger1 = time >= 180 && random < 750
helpertype = normal
name = "Possy"
stateno = 6181
postype = back
pos = -160, 0
size.xscale = 0.375 + (random / 2666.6)
size.yscale = 0.375 + (random / 2666.6)
ownpal = 1

[State 9801, fx]
type=helper
triggerall = roundstate = 4
trigger1= time = 140
helpertype = normal ;player
name="Homer"
stateno=6182
ID=6182
postype=p1
pos=-480,0
size.xscale=1
size.yscale=1
ownpal=1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 9801, fx]
type=helper
triggerall = roundstate = 4
trigger1= time = 160
helpertype = normal ;player
name="DIO"
stateno=6183
ID=6183
postype=p1
pos=-480,0
size.xscale=1
size.yscale=1
ownpal=1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 9801]
type = turn
trigger1 = time = 120
[State 9801]
type = velset
trigger1 = 1
x = 8

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 2] ;Special intro for 10th palette.
type = ChangeState
triggerall = Time = 0
trigger1 = palno = 10
value = 197

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = ifelse(random>500,191,194)
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

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

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 190
value = 0,6
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 470
trigger1 = Anim = 190
value = 0,2
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 535
trigger1 = Anim = 190
value = 0,7
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;--------------------------------------------------------------------
;イントロ その７　CC蛟召喚
[Statedef 197]
type=S
ctrl=0
anim=99999

[State ]
type=AssertSpecial
trigger1=stateno=197
flag=intro

[state ]
type=Explod
trigger1=time=10
anim=1705
ID=1705
pos=0, -80
postype=p1
facing=1*(facing)
vfacing=1
bindtime=-1
removetime=-2
scale=0.65,0.65
vel=0,0
sprpriority=5
ontop=0
shadow=0,0,0
ownpal=1
trans=add
supermove=1
pausemovetime=99999999999999999999
supermovetime=99999999999999999999
ignorehitpause=1
[state ]
type=Explod
trigger1=time=10
anim=1705
ID=1705
pos=0, -80
postype=p1
facing=-1*(facing)
vfacing=1
bindtime=-1
removetime=-2
scale=0.65,0.65
vel=0,0
sprpriority=5
ontop=0
shadow=0,0,0
ownpal=1
trans=add
supermove=1
pausemovetime=99999999999999999999
supermovetime=99999999999999999999
ignorehitpause=1
[state ]
type=Explod
trigger1=time=62
anim=1701
ID=1701
pos=0, -80
postype=p1
facing=1*(facing)
vfacing=1
bindtime=-1
removetime=-1
scale=0.5,0.5
vel=0,0
sprpriority=5
ontop=0
shadow=0,0,0
ownpal=1
trans=add
supermove=1
pausemovetime=99999999999999999999
supermovetime=99999999999999999999
ignorehitpause=1
[state ]
type=Explod
trigger1=time=62
anim=1702
ID=1702
pos=0, -80
postype=p1
facing=-1*(facing)
vfacing=1
bindtime=-1
removetime=-1
scale=0.5,0.5
vel=0,0
sprpriority=5
ontop=0
shadow=0,0,0
ownpal=1
trans=add
supermove=1
pausemovetime=99999999999999999999
supermovetime=99999999999999999999
ignorehitpause=1

[state ]
type=PlaySnd
trigger1=time=0
value=2100,3
volume=240
freqmul=1
loop=0

[state ]
type=PlaySnd
trigger1=time=5
value=1,22
volume=240
freqmul=1
loop=0

[state ]
type=Explod
trigger1=time=62
anim=1016
ID=1016
pos=0, -80
postype=p1
facing=1*(facing)
vfacing=1
bindtime=-1
removetime=-1
scale=0.7,0.7
vel=0,0
sprpriority=5
ontop=0
shadow=0,0,0
ownpal=1
trans=add
supermove=1
pausemovetime=99999999999999999999
supermovetime=99999999999999999999
ignorehitpause=1
[state ]
type=Explod
trigger1=ishelper(5150)
trigger1=time=62
anim=1015
ID=1015
pos=0, -80
postype=p1
facing=1*(facing)
vfacing=1
bindtime=-1
removetime=-1
scale=0.5,0.5
vel=0,0
sprpriority=5
ontop=0
shadow=0,0,0
ownpal=1
trans=add
supermove=1
pausemovetime=99999999999999999999
supermovetime=99999999999999999999
ignorehitpause=1

[state ]
type=PlaySnd
trigger1=time=[62,200]
value=1,10
volume=240
freqmul=1
loop=0
persistent=90
[state ]
type=PlaySnd
trigger1=time=[201,340]
value=1,10
volume=240
freqmul=1
loop=0
persistent=45

[state ]
type=PlaySnd
trigger1=time=340
value=1,10
volume=500
freqmul=1
loop=0
[state ]
type=PlaySnd
trigger1=time=340
value=1,10
volume=500
freqmul=1
loop=0

[state ]
type=removeexplod
trigger1=time=341
id=1701
[state ]
type=removeexplod
trigger1=time=341
id=1702
[state ]
type=removeexplod
trigger1=time=341
id=1015
[state ]
type=removeexplod
trigger1=time=341
id=1016

[state ]
type=changeanim
trigger1=time=340
value=99977

[State 3000, Super]
type = Helper
trigger1 = time=340
persistent = 0
id = 2320
name = "Super Spark Helper"
pos = 0,-20
postype = P1
stateno = 2300
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state ]
type=PlaySnd
trigger1=time=340
value=0,0
volume=500
freqmul=1
loop=0

[State ]
type=SelfState
trigger1=time=400
value=0

;---------------------------------------------------------------------------
;イントロ（禊）
[Statedef 194]
type = S
physics = S
ctrl = 0
anim = 99999
velset = 0,0

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

[state 190, groove]
type = helper
trigger1 = time = 0
ID = 7800
stateno = 7800
postype = p1
pos = 0,0
name = "Maxime"
bindtime = -1
size.xscale= 0.55
size.yscale= 0.55
ownpal = 1

[State 820, Anim]
type = ChangeAnim
trigger1 = time > 150
value = 194
persistent = 0

[State 181, 2]
type = PlaySnd
triggerall = anim = 194
trigger1 = AnimElem = 1
value = 444,2
channel = 1

[State 190, 4]
type = ChangeState
triggerall = anim = 194
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;イントロ（禊）（ベガ）1
[Statedef 7800]
type = S
physics = N
ctrl = 0
anim = 7800
velset = 0,0
sprpriority = 2

[State 181, 2]
type = PlaySnd
trigger1 = time = 3
value = 8,15
channel = 2

[State 190, 4]
type = ChangeState
trigger1 = time > 150
trigger1 = !root,NumHelper(7860)
value = 7801

;---------------------------------------------------------------------------
;イントロ（禊）（ベガ）2
[Statedef 7801]
anim = 7801

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8, 16

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,4
channel = 2

[State 181, 2]
type = PlaySnd
trigger1 = animelem = 11
value = 5100,0
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 195
value = 0,0
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 1				;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 200				;Change animation (Def: no change)
poweradd = 20			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=40,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=40,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=45,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Light Kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=23,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Medium Kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=40,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Strong Kick
; CNS difficulty: easy
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=45,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1
[State 250, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Light Punch
; CNS difficulty: easy
; Description: Simple crouching attack. The HitDef's guardflag parameter
;     is set to "L", meaning that the move can only be guarded low
;     (crouching), and not by standing or jumping opponents.
;     Like for all light attacks, it's a good idea to keep the slidetime
;     and hittime parameters at a smaller number, so the opponent isn't
;     stunned for too long. For all crouching attacks you have to
;     remember to set the attr parameter to indicate that it is crouching
;     attack. In this case, "C, NA" stands for "crouching, normal attack".
;     The HitDef's priority is set at 3, instead of the default of 4,
;     so this attack has a lower priority than most others, meaning the
;     player will get hit instead of trading hits with the opponent if
;     their attack collision boxes (Clsn1) intersect each other's Clsn2
;     boxes at the same time.
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=23,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1
[State 400, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 400, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=40,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

[State 410, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=45,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

[State 420, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 420, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Light Kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=23,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1

[State 430, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 430, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Medium Kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 200

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=40,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1
[State 440, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 440, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouch Strong Kick
; CNS difficulty: easy
; Description: This move uses "Trip" for the "ground.type" parameter in
;     its HitDef. It's a special type that puts the opponent in a tripped
;     animation as he falls. Also, the hitflag parameter in the HitDef
;     is set to "MAFD". The "D" indicates that a downed opponent can be
;     hit by the attack.
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 450

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=45,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1
[State 450, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 450, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State ]
type=Projectile
trigger1=AnimElem=1
projID=6400
projanim=6400
projscale=1,5
projremove=0
projremovetime=40
attr=A,SP
damage=40,2
hitsound=5,0
animtype=Hard
hitflag=MAF
pausetime=0,2
velocity=0,0
remvelocity=0,0
accel=1,0
velmul=1,1
projhits=1
projmisstime=0
projpriority=7
projsprpriority=3
projedgebound=40
projstagebound=40
projheightbound=-240, 1
supermovetime=9999999999
pausemovetime=9999999999
ignorehitpause=1
ground.type = Trip
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = Trip
air.velocity = -1.4,-3
air.hittime = 12

[State 600, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 600
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =
;---------------------------------------------------------------------------
; Throwing the opponent
; Description: In this state, the player throws the opponent by binding him to
;     various offsets based on his current frame of animation. For
;     example, [State 810, Bind 1] binds the opponent to an offset of
;     28 pixels in front of the player. That puts him around where the hand
;     is at. Is is important to keep the opponent bound using a
;     TargetBind controller at all times, until you let him go. This
;     is especially important if your player has a Clsn2 box that
;     allows him to get hit while throwing someone. Each time a player
;     gets hit, all his bound targets will be set to a fall state. If
;     the opponent is not bound, then he might get stuck in his thrown
;     state when his attacker is knocked out of the throw halfway.
; Notes: There is a TargetLifeAdd controller to decrease the opponent's
;     life, and a TargetState controller to change his state to a
;     falling state when KFM lets go of him.
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = 47, 0

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -50, -50

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 11
value = -78

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 11
value = 821

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -10

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

;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;---------------------------------------------------------------------------
; Opponent thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
ctrl = 1

[State 0, 1]
type = ChangeAnim
triggerall = name = "Black Kyurem"
triggerall = Life >= 250
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 11]
type = ChangeAnim
triggerall = name = "Black Kyurem"
triggerall = Life <= 250
trigger1 = Anim != 11345 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 11345

[State ]
type = Explod
triggerall = name = "Black Kyurem"
triggerall = numexplod(17172) = 0
trigger1 = life <= 250
trigger1 = animelem = 1
anim = 17172
ID = 17172
bindtime = -1
removetime = -1
pos = 35,-15
scale = .5,.5
sprpriority = 3
ownpal = 1

[State 0, 2]
type = VelSet
triggerall = name = "Black Kyurem"
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
triggerall = name = "Black Kyurem"
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = name = "Black Kyurem"
trigger1 = !alive
value = 5050
;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

[State -2]
type = selfstate
trigger1 = movereversed
trigger1 = palno = 1 || palno = 2 || palno = 3 || palno = 4 || palno = 5 || palno = 6 || palno = 7 || palno = 8 || palno = 9 || palno = 11 || palno = 12
value = 1302

[State 8000, 6]
type = selfstate;destroyself
value=40010
trigger1=ishelper(40010)
trigger1=stateno!=40010
ignorehitpause=1

[State 8000, 6]
type = selfstate
trigger1=ishelper(40020)
trigger1=stateno!=40020
value=40020
ignorehitpause=1

[State 8000, 6]
type = selfstate;destroyself
value=40000
trigger1=ishelper(40000)
trigger1=stateno!=40000
ignorehitpause=1

[State 8000, 6]
type = selfstate;destroyself
value=195020
trigger1=ishelper(195020)
trigger1=stateno!=195020
ignorehitpause=1

[State 8000, 6]
type = selfstate;destroyself
value=130
trigger1=ishelper(40002)
trigger1=stateno!=40000
ignorehitpause=1
;-------------------------------------------------------------------------------
;GHOST mode
[State -2];オリコン状態
type = CtrlSet
trigger1 = Movetype = H
trigger2 = movecontact
triggerall = alive
triggerall = var(39) = 1
value = 1

[State -2, イントロ終了攻撃対策]
type = NotHitBy
triggerall = var(39) = 1
trigger1 = Movetype = H
value = SCA
time = 2
supermovetime = 99999
pausemovetime = 99999
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = var(39) = 1
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = var(39) = 1
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = var(39) = 1
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = var(39) = 1
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = var(39) = 1
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = var(39) = 1
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State 701, 残像]
type = AfterImage
triggerall = Alive = 1
trigger1 = var(39) = 1
trigger1 = time = 0
time = -1
trans = sub
timegap = 1
framegap = 2
length = 60
paladd = 0,0,0
palmul = 1,1,1

[State 3002]
type = PalFX
trigger1 = var(39) = 1
Time = 1
mul = 100,100,100
IgnoreHitPause = 1

[State 3002]
type = lifeadd
trigger1 = var(39) = 1
Time = 1
value = 1
;-------------------------------------------------------------------------------
;10P (OVERPOWERED PALETTE)
[State -2, CannotReversed]
type = SelfState
triggerall = alive || life >= 1
trigger1 = movereversed
trigger1 = palno = 10
value = 703
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State -2];オリコン状態
type = CtrlSet
trigger1 = Movetype = H
trigger2 = movecontact
triggerall = alive
triggerall = PalNo = 10
value = 1

[State -3, ひかる]
type = PalFX
triggerall = palno = 10
trigger1 = (GameTime%60)=0
time = 100
sinadd = 60, 60, 60, 60
ignorehitpause=1

[State -2,体力]
type = LifeAdd
trigger1 = Palno = 10
trigger1 = Life < 500
value = 30
IgnoreHitPause = 1

[State -2,体力]
type = powerAdd
trigger1 = Palno = 10
value = 70
IgnoreHitPause = 1

[State -2];はやい
type = VelMul
triggerall = 1
trigger1 = PalNo = 10
x = 1.2
ignorehitpause = 1

[State -2]
type = HitOverride
trigger1 = palno = 10
attr = SCA,AA,AT,AP
slot = 1
stateno = 703
time = -1
forceair = 0

[State -2]
type = helper
trigger1 = palno=10&&numhelper(195020)=0&&enemy,life>=enemy,lifemax*0.9&&var(55)<=1&&(stateno!=[2000,2005])&&roundstate=2
id = 195020
persistent = 1
name = "bari"
pos = 0,0
postype = P1
stateno = 195020+(EnemyNear,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT)
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
triggerall = roundstate = 2
triggerall = anim = 0
trigger1 = palno = 10&&enemy,life>=enemy,lifemax*0.9&&var(55)<=1&&(stateno!=[2000,2005])
trigger1 = (GameTime%9) = 1
id = 2793
persistent = 1
name = "hikari"
pos = var(50),var(51)
postype = p1
stateno = 2793
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varrandom
trigger1 = 1
range = -40,30
v = 50

[State -2]
type = varrandom
trigger1 = 1
range = 0,-60
v = 51

[State -2]
type = varrandom
trigger1 = 1
range = -110,110
v = 43

[State -2]
type = varrandom
trigger1 = 1
range = 0,-170
v = 44

[State -2]
type = Trans
trigger1 = palno=10&&enemy,life>=enemy,lifemax*0.9&&var(55)<=49&&alive
trans = addalpha
alpha = 200,230

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = Palno = 10
trigger1 = enemy,life!=0
trigger2 = life=0
flag = noko
flag2 = noko
flag3 = noko
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
trigger1 = enemy,time<= 100
trigger1 = life = 0
trigger1 = palno = 10
trigger2 = gethitvar(damage)>=100
v = 24 ;fv = 10
value = 1
ignorehitpause = 1
persistent = 1

[State -2, LifeSet]
type = LifeSet
triggerall = PalNo = 10
triggerall = life = 0
trigger1 = var(24)=1
value = lifemax
ignorehitpause = 1
persistent = 1

[State -2]
Type = Helper
Triggerall = NumHelper(13713) = 0
trigger1 = PalNo = 10
trigger1 = Life <= 500
OwnPal = 1
ID = 13713
StateNo = 13713
keyctrl = 1
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = "R-D-K"
;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, エフェクト]
type = Explod
trigger1 = !NumExplod(125)
trigger1 = anim = 120
anim = 125
id = 125
postype = p1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 1
IgnoreHitPause = 1

[State -3, エフェクト]
type = Explod
trigger1 = !NumExplod(135)
trigger1 = anim = 130
anim = 135
id = 135
postype = p1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 1
IgnoreHitPause = 1

[State -3, エフェクト]
type = Explod
;triggerall = Time >= 0
trigger1 = !NumExplod(125)
trigger1 = anim = 140
anim = 145
id = 125
postype = p1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 1
IgnoreHitPause = 1

[State -3, エフェクト]
type = Explod
trigger1 = !NumExplod(155)
trigger1 = anim = 150
anim = 155
id = 155
postype = p1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 1
IgnoreHitPause = 1

;This controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0

[State ]
type = RemoveExplod
trigger1 = anim != 11345
id = 17172
