; Storm by WhiteMagic2002 update by Alucard

;Variables
;var(1)   = Unique Comboing Decider and wait time
;var(3)   = Velocity set for Super Jump
;var(8)   = Lightning Attack Continue Decider
;var(9)   = Lightning Attack Direction Decider
;var(10)  = Lightning Attack Hit Count
;var(11)  = Super Jump
;var(12)  = Spark Bursts for Super Jump
;var(14)  = Lightning Attack Navigation
;var(15)  = HitSound Trigger for Upwards Typhoon
;var(16)  = Guardsound Trigger for Upwards Typhoon
;var(17)  = Lightning Strike random animation
;var(18)  = Lightning Strike hitsound
;var(19)  = Lightning Strike guardsound
;var(20)  = Recovery Roll
;var(21)  = Combo Dampener
;var(22)  = Winstate Decider
;var(23)  = Hailstorm random animation
;var(24)  = Hailstorm random speed
;var(25)  = Hail random x placement
;var(26)  = Hail hitsound
;var(27)  = Hail guardsound
;var(28)  = Hailstorm abrupt stop
;var(29)  = Air Dash allowed?
;var(30)  = Win Screen Random Dot anim
;var(31)  = Win Screen Random Dot Placement
;var(32)  = Win Screen Dot SprPriority
;var(34)  = WinState/Intro Animation Change

[Data]
life = 1000			;Amount of life to start with
attack = 100		;attack power (more is stronger)
defence = 100		;defensive power (more is stronger)
fall.defence_up = 50	;Percentage to increase defense everytime player is knocked down
liedown.time = 50		;Time which player lies down for, before getting up
airjuggle = 15		;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 = 80			;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, -100	;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  = 3.5;2.4		;Walk forward
walk.back = -3.3		;Walk backward
run.fwd  = 9,0;4.6, 0		;Run forward (x, y)
run.back = -9,0;-4.5,-3.8	;Hop backward (x, y)
jump.neu = 0,-10
jump.back =  -3.5,-10
jump.fwd = 4,-10
runjump.fwd = 5,-9
runjump.back = -3.5,-10
airjump.neu = 0,-8.3	;.
airjump.back = -2.9	;Air jump speeds (opt)
airjump.fwd = 2.9  		;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 40
yaccel = .5
stand.friction = .80
crouch.friction = .83	;Friction coefficient when crouching

;---------------------------------------------------------------------------
; 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 = ?
; ...

[Statedef 5900]
type = S

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
trigger1 = !RoundsExisted
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = !RoundsExisted
fvalue = 0

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190 ;190

;Cape for standing
;[State 5900]
;type = helper
;;trigger1 = stateno = 0;!NumHelper(1)
;trigger1 = numhelper(3) < 1;numhelper(2) < 1
;trigger1 = roundno > 1
;trigger1 = anim = 0
;trigger1 = stateno = 5900
;stateno = 3
;postype = p1
;pos = 0,0
;bindtime = -1
;id = 3
;name = "Cape"

[State 5900, Turns Mode Intro]
type = ChangeState
trigger1 = teammode = turns
trigger1 = roundno > 1
trigger1 = roundsexisted <= 0
trigger1 = roundstate = 0
trigger1 = prevstateno != 197
value = 190


; Cape
;[Statedef 3]
;type = S
;physics = N
;anim = 1
;sprpriority = 0
;
;[State 1, AssertSpecial]
;type = AssertSpecial
;trigger1 = parent, Anim != 0
;flag = Invisible
;
;[State 1, PosSet]
;type = PosSet
;trigger1 = 1
;x = parent, Pos X
;y = parent, Pos Y
;
;[State 1, Turn]
;type = Turn
;trigger1 = facing != parent, facing
;
;;[State 1]
;;type = posset
;;trigger1 = time >= 0
;;y = 5*sin(time/15.0)
;
;[State 1]
;type = destroyself
;trigger1 = parent, stateno != 5900
;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, voice]
type = playsnd
trigger1 = animelem = 3
value = 170,0
channel = 1

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

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

[state 180]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 180]
type = varrandom
trigger1 = time = 0
v = 22
range = 200

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

[State 180, 1]
type = ChangeState
trigger1 = var(22) = [101,200]
value = 182

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

[state 181]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 181, 1]
type = playsnd
trigger1 = (gametime%30) = 0;animelem = 12
trigger1 = time > 42
value = S4000,1

[State 181, 1]
type = playsnd
trigger1 = animelem = 12
value = S1000,1
persistent = 0

[State 181, 1]
type = playsnd
trigger1 = animelem = 12
value = 190,0
channel = 1

[State 181, 2]
type = explod
trigger1 = animelem = 11
trigger1 = numexplod(181) < 1
anim = 617
bindtime = -1
sprpriority = 5
pos = 13, -147
id = 181
removetime = -1

[State 181, 2]
type = explod
trigger1 = animelem = 11
trigger1 = numexplod(182) < 1
anim = 3
bindtime = -1
sprpriority = 5
pos = 0, 0
id = 182
removetime = -1

[State 181, dontend]
type = assertspecial
trigger1 = time < 227
flag = roundnotover



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


; Win pose 2
; CNS difficulty: basic
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,-2

[state 182]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 182, 1]
type = veladd
trigger1 = 1
y = -.09

[State 182, 1]
type = screenbound
trigger1 = 1; time >= 57
value = 0

[State 182, noshadow]
type = assertspecial
trigger1 = time > 57
flag = noshadow

[State 182, 0];fake storm helper
type = helper
trigger1 = time = 57
helpertype = normal
;trigger1 = !helperexist(191)
name = "Here I am"
ID = 182
stateno = 183
postype = back
pos = -77, -7

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



;Helper for winpose 2
[Statedef 183]
type = A
ctrl = 0
anim = 183
velset = 0,0

[State 183, dont end round]
type = assertspecial
trigger1 = time < 277
flag = roundnotover

[State 183, snd]
type = playsnd
trigger1 = time = 2
value = 190,0

[State 183, 1]
type = screenbound
trigger1 = 1; time > 26
;movecamera = 0, 1
value = 1

[State 183, 1]
type = velset
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
x = 7
y = 0

[State 183, 1]
type = velset
trigger1 = animelem = 5
x = 5
y = 0

[State 183, 1]
type = velset
trigger1 = animelem = 6
x = 2
y = -2.5;-.5

[State 183, 1]
type = velset
trigger1 = animelem = 7
x = 0
y = -2.5;-.5

[State 183, 1]
type = velset
trigger1 = animelem = 8
x = -.3
y = -3;-.5

[State 183, 1]
type = velset
trigger1 = animelem = 9
x = -.2
y = -3;-.7

[State 183, 1]
type = velset
trigger1 = animelem = 10
x = -.3
y = -1;-.3

[State 183, 1]
type = velset
trigger1 = animelem = 11
x = -.2
y = 0

[State 183, 1]
type = velset
trigger1 = animelem = 12
x = 0
y = .7;.1

[State 183, 1]
type = velset
trigger1 = animelem = 13
x = 0
y = .8;.4

[State 183, 1]
type = velset
trigger1 = animelem = 14
x = 0
y = .9;.8

[State 183, 1]
type = velset
trigger1 = animelem = 15
x = 0
y = 1

[State 183, 1]
type = velset
trigger1 = time >= 135;(animelem = 16 || animelem = 17 || animelem = 18 || animelem = 19 || animelem = 20 || animelem = 21 || animelem = 22 || animelem = 23 || animelem = 24 || animelem = 25 || animelem = 26 || animelem = 27 || animelem = 28); || animelem = 29 || animelem = 30 || animelem = 31)
trigger1 = pos y >= 0
trigger2 = anim = 185
x = 0
y = 0

[State 183, change]
type = changeanim
trigger1 = pos y >= 0
trigger1 = anim != 185
value = 185

[State 183, windsnd]
type = playsnd
trigger1 = pos y >= 0
trigger1 = (time%38) = 0;animelem = 33
;trigger2 = animelem = 40
value = 1,1
channel = 2

[State 183, ltngsnd]
type = playsnd
triggerall = pos y >= 0
trigger1 = (time%55) = 0; animelem = 39
;trigger2 = animelem = 44
value = 1,0
channel = 2

[State 183, Explod]
type = Explod
trigger1 = pos y >= 0
trigger1 =  (time%38) = 0;animelem = 33
;trigger2 = animelem = 40
anim = 2
sprpriority = 2
postype = p1
pos = 0,10
bindtime = 1
pausemovetime = -1
supermovetime = -1
name = "Wind"
id = 183

[State 183, Explod]
type = Explod
triggerall = pos y >= 0
trigger1 =  (time%55) = 0;animelem = 39
;trigger2 = animelem = 44
anim = 6000;3
sprpriority = 2
postype = p1
pos = 0,5
bindtime = 1
pausemovetime = -1
supermovetime = -1
name = "Lightning"
id = 183

[Statedef 19171]
type = S
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
spriority = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 100
flag = Intro
; ________
;/ Intros \___________________________________________________________
;_____________________________________________________________________|
[Statedef 190]
type = S
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 190, 2]
type = ChangeState
triggerall = time = 0
trigger1 = enemynear, name = "BastionBoss"
trigger2 = enemynear, name = "helibonus"
value = 19171

[State 180, 2]
type = ChangeState
triggerall = p2name = "Wonder Woman" || p4name = "Wonder Woman"
trigger1 = Time = 0
value = 11191

[State 180, 2]
type = ChangeState
triggerall = p2name = "The Mighty Thor" || p4name = "The Mighty Thor"
trigger1 = Time = 0
value = 11190

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 34
range = 4

[State 190, 1]
type = ChangeState
trigger1 = var(34) = 0
value = 191

[State 180, 1]
type = ChangeState
trigger1 = var(34) = 1
value = 193

[State 190, 1]
type = ChangeState
trigger1 = var(34) = 2
value = 194

[State 180, 1]
type = ChangeState
trigger1 = var(34) = 3
value = 11190

[State 180, 1]
type = ChangeState
trigger1 = var(34) = 4
value = 11191

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = animtime = 0
value = 0

;-----------------------------------------------------------------------------------------------------------------
; Intro 1 (Fly)
;-----------------------------------------------------------------------------------------------------------------
[Statedef 191]
type = S
ctrl = 0
anim = 9999
velset = 0,0

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = var(33) = 1;RoundState = 0
trigger1 = anim != 191
value = 191

[State 190, 0];fake storm helper
type = helper
trigger1 = time = 0
helpertype = normal
name = "Whoops! I'm not here yet"
ID = 192
stateno = 192
pos = -122, -7

;Cape for standing
;[State 190, cape]
;type = Helper
;trigger1 = numhelper(2) < 1
;trigger1 = anim = 191
;trigger1 = animelem = 8
;stateno = 2
;postype = p1
;pos = 0,0
;bindtime = -1
;id = 2
;name = "Cape for intro"
;persistent = 0

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

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

; Cape
;[Statedef 2]
;type = S
;physics = N
;anim = 1
;sprpriority = 0
;
;[State 2, PosSet]
;type = PosSet
;trigger1 = 1
;x = parent, Pos X
;y = parent, Pos Y
;
;[State 2, Turn]
;type = Turn
;trigger1 = facing != parent, facing
;
;[State 2]
;type = destroyself
;trigger1 = parent, stateno != 191



;-----------------------------------------------------------------------------------------------------------------
;Helper for intro
;-----------------------------------------------------------------------------------------------------------------
[Statedef 192]
type = A
ctrl = 0
anim = 190
velset = 0,0

[State 192, variable]
type = parentvarset
trigger1 = animtime = -1;pos y >= 0
v = 33
value = 1

[State 192, snd]
type = playsnd
trigger1 = time = 2
value = 190,0

[State 192, 1]
type = screenbound
trigger1 = time > 26
movecamera = 0, 1
value = 1

[State 192, 1]
type = velset
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
x = 7
y = 0

[State 192, 1]
type = velset
trigger1 = animelem = 5
x = 5
y = 0

[State 192, 1]
type = velset
trigger1 = animelem = 6
x = 2
y = -2.5;-.5

[State 192, 1]
type = velset
trigger1 = animelem = 7
x = 0
y = -2.5;-.5

[State 192, 1]
type = velset
trigger1 = animelem = 8
x = -.3
y = -3;-.5

[State 192, 1]
type = velset
trigger1 = animelem = 9
x = -.2
y = -3;-.7

[State 192, 1]
type = velset
trigger1 = animelem = 10
x = -.3
y = -1;-.3

[State 192, 1]
type = velset
trigger1 = animelem = 11
x = -.2
y = 0

[State 192, 1]
type = velset
trigger1 = animelem = 12
x = 0
y = .7;.1

[State 192, 1]
type = velset
trigger1 = animelem = 13
x = 0
y = .8;.4

[State 192, 1]
type = velset
trigger1 = animelem = 14
x = 0
y = .9;.8

[State 192, 1]
type = velset
trigger1 = animelem = 15
x = 0
y = 1

[State 192, 1]
type = velset
trigger1 = (animelem = 16 || animelem = 17 || animelem = 18 || animelem = 19 || animelem = 20 || animelem = 21 || animelem = 22 || animelem = 23)
trigger1 = pos y >= 0
x = 0
y = 0

[State 192, 2]
type = destroyself
trigger1 = animtime = 0;??????????????????  try doing the variable thing for change anim

;-----------------------------------------------------------------------------------------------------------------
;Intro 2 (Civil)
;-----------------------------------------------------------------------------------------------------------------
[Statedef 193]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 193, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 405, 6]
type = PlaySnd
trigger1 = time = 81
value = 1,0

[State 405, 6]
type = PlaySnd
trigger1 = time = 171
value = 1,0

[State 405, 6]
type = PlaySnd
trigger1 = time = 117
value = 193,0
channel = 2

[State 405, 6]
type = PlaySnd
trigger1 = time = 131
value = 4200,0
channel = 3

[State 181, changeclothes]
type = Explod
trigger1 = time = 116
anim = 3351
removetime = 13
postype = p1
pos = 0,0
sprpriority = 5

[State 181, elect]
type = Explod
trigger1 = time = 82
anim = 3301
removetime = 100
postype = p1
pos = 0,0
sprpriority = 5

[State 3020, Shine]
type = helper
trigger1 = time = 128
ID = 13519
pos = 0,0
postype = p1
stateno = 13519
supermovetime = 9999
helpertype = normal
name = ""
ownpal = 0
keyctrl = 0

[State 193, 4]
type = EnvShake
trigger1 = time = 117
time = 12
ampl = -6
freq = 190
phase = 90

[State 193, 6] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0


;-----------------------------------------------------------------------------------------------------------------
;Intro 3 (Civil)
;-----------------------------------------------------------------------------------------------------------------
[Statedef 194]
type = S
ctrl = 0
anim = 189
velset = 0,0

[State 193, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 405, 6]
type = PlaySnd
trigger1 = time = 37
value = 1,0

[State 405, 6]
type = PlaySnd
trigger1 = time = 87
value = 1,0

[State 405, 6]
type = PlaySnd
trigger1 = time = 87
value = 193,0
channel = 2

[State 405, 6]
type = PlaySnd
trigger1 = time = 101
value = 4200,0
channel = 3

[State 181, changeclothes]
type = Explod
trigger1 = time = 86
anim = 3351
removetime = 13
postype = p1
pos = 0,0
sprpriority = 5

[State 181, elect]
type = Explod
trigger1 = time = 52
anim = 3301
removetime = 100
postype = p1
pos = 0,0
sprpriority = 5

[State 3020, Shine]
type = helper
trigger1 = time = 80
ID = 13519
pos = 0,0
postype = p1
stateno = 13519
supermovetime = 9999
helpertype = normal
name = ""
ownpal = 0
keyctrl = 0

[State 193, 4]
type = EnvShake
trigger1 = time = 87
time = 12
ampl = -6
freq = 190
phase = 90

[State 193, 6] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;-----------------------------------------------------------------------------------------------------------------
;Intro 4 (Classic Storm)
;-----------------------------------------------------------------------------------------------------------------
[Statedef 11190]
type = S
ctrl = 0
anim = 188
velset = 0,0

[State 193, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 405, 6]
type = PlaySnd
trigger1 = time = 1
value = 184,1

[State 405, 6]
type = PlaySnd
trigger1 = time = 37
trigger2 = time = 70
value = 1,0

[State 405, 6]
type = PlaySnd
trigger1 = time = 70
value = 193,0
channel = 2

[State 405, 6]
type = PlaySnd
trigger1 = time = 101
value = 4200,0
channel = 3

[State 181, changeclothes]
type = Explod
trigger1 = time = 69
anim = 3351
removetime = 13
postype = p1
pos = 0,0
sprpriority = 5

[State 181, elect]
type = Explod
trigger1 = time = 52
anim = 3301
removetime = 100
postype = p1
pos = 0,0
sprpriority = 5

[State 3020, Shine]
type = helper
trigger1 = time = 66
ID = 13519
pos = 0,0
postype = p1
stateno = 13519
supermovetime = 9999
helpertype = normal
name = ""
ownpal = 0
keyctrl = 0

[State 193, 4]
type = EnvShake
trigger1 = time = 70
time = 12
ampl = -6
freq = 190
phase = 90

[State 193, 6] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;-----------------------------------------------------------------------------------------------------------------
;Intro 5 (vs ???)
;-----------------------------------------------------------------------------------------------------------------
[Statedef 11191]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 193, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 405, 6]
type = PlaySnd
trigger1 = time = 1
value = 184,0

[State 193, 6] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0



;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 1]
type = ctrlset
trigger1 = time > 47
value = 1

[State 195, 1]
type = playsnd
trigger1 = animelem = 12
value = S4000,1

[State 195, 1]
type = playsnd
trigger1 = animelem = 11
value = S1000,1


[State 195, 2]
type = explod
trigger1 = animelem = 11
anim = 617
bindtime = -1
sprpriority = 5
pos = 13, -147
id = 195

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

;---------------------------------------------------------------------------
; 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  = 4				;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 200, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 6
channel = 2

[State 200, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,0
channel = 3
ignorehitpause = 1
persistent = 0

[State 200, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,0
channel = 3
ignorehitpause = 1
persistent = 0

[State 200, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 200, HitDef]
type = HitDef
trigger1 = AnimElem = 2
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
attr = S, NA
damage = 20,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,7
sparkno = 0;S10005
sparkxy = -20,-85
;hitsound = S2000,0
;guardsound = S0,3
ground.type = High
ground.slidetime = 11
ground.hittime  = 11
ground.velocity = ifelse(prevstateno = 200, -9, -3);-6
guard.velocity = -8
air.type = High
air.velocity = -4,-1
ground.cornerpush.veloff = -7
palfx.time = 30
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6


[State 200, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 201
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "200 effect"
id = 200

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

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

[State 210, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 7
channel = 2

[State 210, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 210, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 210, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 30,0
guardflag = MA
hitflag = MAF
pausetime = 9,9
sparkno = 1;S10006
;guard.sparkno = s10003; s20020
sparkxy = -25,-87
;hitsound   = s0,6
;guardsound = s0,3
ground.type = high
ground.slidetime = 8
ground.hittime  = 19
ground.velocity = ifelse(prevstateno = 200, -3, -9)
air.velocity = -5.4,-3
ground.cornerpush.veloff = -10
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6

[State 210, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 211
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "210 effect"
id = 210

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

;---------------------------------------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50;ifelse (prevstateno = 851, 0,65); if this move is infinity counter
ctrl = 0
;velset = 0,0
anim = 220

;[State 220, 1]); if this move is infinity counter in air
;type = Statetypeset
;trigger1 = prevstateno = 851
;trigger1 = pos Y < 0
;statetype = A
;physics = A

;[State 220, NotHitBy]; if this move is infinity counter
;type = NotHitBy
;trigger1 = prevstateno = 851
;value = SCA
;time = 1

[State 220, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 7
channel = 2

[State 220, snd]
type = playsnd
trigger1 = animelem = 3
value = 1000, 1
channel = 1

[State 220, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,2
channel = 3
ignorehitpause = 1
persistent = 0

[State 220, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,2
channel = 3
ignorehitpause = 1
persistent = 0

[State 220, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 220, 2]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = AnimElem = 4
attr = S, NA
animtype  = hard
damage    = 70
hitflag = MAF
pausetime = 10,10
sparkno = 2;S10006
sparkxy = -10,-80
;guard.sparkno = s10003; s20020
;hitsound   = s2000,2
;guardsound = s0,3
ground.type = high
ground.slidetime = 12
ground.hittime  = 24
ground.velocity = -11.3, -7.3
air.velocity = -11.3,-4
ground.cornerpush.veloff = -27
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall = ifelse (prevstateno = 851, 1,0)
fall.recover = ifelse (prevstateno = 851, 0,1)
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
;p2stateno = 623
fall = 1


[State 220, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 221
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "220 effect"
id = 220

[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0;ifelse (prevstateno = 851 && pos Y<0, 50,0)
ctrl = 1

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

[State 230, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 3
channel = 2

[State 230, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 230, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 230, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 230, hitdef]
type = hitdef
triggerall = P2Stateno !=5070
triggerall = P2Stateno !=5071
trigger1 = animelem = 2
attr = C, NA
animtype  = light
damage    = 20,0
guardflag = LA
pausetime = 9,9
sparkno = 0;S10005
;guard.sparkno = s10003; s20020
sparkxy = -15,-40
;hitsound = S2000,3
;guardsound = S0,3
ground.type = low
ground.slidetime = 5
ground.hittime  = 13
ground.velocity = -7.0
air.velocity = -2.0,-3.0
ground.cornerpush.veloff = -12

[State 230, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 231
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "230 effect"
id = 230

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

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

[State 240, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,4
channel = 3
ignorehitpause = 1
persistent = 0

[State 240, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,4
channel = 3
ignorehitpause = 1
persistent = 0

[State 240, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 240, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 2
channel = 2

[State 240, 2]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 40,0
guardflag = MA
hitflag = MAF
pausetime = 10,10
sparkno = 1;S10006
;guard.sparkno = s10003; s20020
sparkxy = -20,-55
;hitsound   = s2000,4
;guardsound = s0,3
ground.type = low
ground.slidetime = 6
ground.hittime  = 13
ground.velocity = -10.3 
air.velocity = -3.5,-4
ground.cornerpush.veloff = -14

[State 240, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 241
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "240 effect"
id = 240

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

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

[State 250, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 2
channel = 2

[State 250, snd]
type = playsnd
trigger1 = animelem = 5
value = 1000, 1
channel = 1

[State 250, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,5
channel = 3
ignorehitpause = 1
persistent = 0

[State 250, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,5
channel = 3
ignorehitpause = 1
persistent = 0

[State 250, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 250, HitDef A]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = time= 0
attr = S, NA
damage = 70,0
animtype = Up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = 2;S10007
;guard.sparkno = s10003; S8020
sparkxy = -10,-60
;hitsound   = s2000,5
;guardsound = s0,3
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-4
guard.velocity = -11
airguard.velocity = -5,-1
ground.cornerpush.veloff = -4
air.type = Low
air.velocity = -5, -5;ifelse (prevstateno = 440, -14, -11)
fall =1

[State 250, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 251
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "250 effect"
id = 250

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

;---------------------------------------------------------------------------
; 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  = 4
poweradd= 15
ctrl = 0
anim = 400

[State 400, snd]
type = playsnd
trigger1 = animelem = 2
value = 1000, 6
channel = 2

[State 400, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 401
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "400 effect"
id = 400

[State 400, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,0
channel = 3
ignorehitpause = 1
persistent = 0

[State 400, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,0
channel = 3
ignorehitpause = 1
persistent = 0

[State 400, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 400, hitdef]
type = hitdef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = animelem = 2
attr = C, NA
animtype  = light
damage    = 20,0
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = 0;S10005
;guard.sparkno = s10003; s20020
sparkxy = -10,-37
ground.type = low
ground.slidetime = 5
ground.hittime  = 13
ground.velocity = -7.0
air.velocity = -2.0,-3.0
ground.cornerpush.veloff = -12
palfx.time = 25
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6

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

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

[State 410, snd]
type = playsnd
trigger1 = animelem = 3
value = 1000, 7
channel = 2

[State 410, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 411
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "410 effect"
id = 410

[State 410, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 410, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 410, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 410, hitdef]
type = hitdef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = animelem = 3
attr = C, NA
animtype  = medium
damage    = 35,0
guardflag = MA
hitflag = MAF
pausetime = 9,9
sparkno = 1;S10006
;guard.sparkno = s10003; s20020
sparkxy = -10,-37
ground.type = low
ground.slidetime = 7
ground.hittime  = 18
ground.velocity = -7.3
air.velocity = -2.0,-3.0
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6

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

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

[State 420, snd]
type = playsnd
trigger1 = animelem = 4
value = 1000, 8
channel = 2

[State 420, snd]
type = playsnd
trigger1 = animelem = 5
value = 1000, 1
channel = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElem = 4, = 0
anim = 421
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "420 effect"
id = 420

[State 420, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,2
channel = 3
ignorehitpause = 1
persistent = 0

[State 420, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,2
channel = 3
ignorehitpause = 1
persistent = 0

[State 420, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 420, HitDef]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
;trigger1 = P2StateType != L
trigger1 = AnimElem = 3
attr = C, NA
damage = 45,0
guardflag = L
priority = 4, Hit
pausetime = 9,9
sparkno = 2;S10007
;guard.sparkno = s10003; S8020
sparkxy = -10,-60
hitsound   = s0,6
guardsound = s0,3
animtype = Up
ground.type = Hard
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0,-12
guard.velocity = -5
air.velocity = -2,-11
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
;p2stateno = 623



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

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

[State 430, snd]
type = playsnd
trigger1 = animelem = 2
value = 1000, 3
channel = 2

[State 430, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 431
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "430 effect"
id = 430

[State 430, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 430, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 430, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 430, hitdef]
type = hitdef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = time  = 0
attr = C, NA
animtype  = light
damage    = 18,0
hitflag = MAFD
guardflag = L
priority = 3, Hit
pausetime = 9,9
sparkno = 0;S10005
;guard.sparkno = s10003; s20020
sparkxy = -10,-17
ground.type = low
ground.slidetime = 9
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.0,-3.0

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

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

[State 430, snd]
type = playsnd
trigger1 = animelem = 3
value = 1000, 2
channel = 2

[State 440, Explod]
type = Explod
trigger1 = AnimElem = 3, = 0
anim = 441
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "440 effect"
id = 440

[State 440, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,4
channel = 3
ignorehitpause = 1
persistent = 0

[State 440, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,4
channel = 3
ignorehitpause = 1
persistent = 0

[State 440, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 240, 2]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 40,0
hitflag = MAFD
guardflag = L
priority = 3, Hit
pausetime = 9,9
sparkno = 1;S10006
;guard.sparkno = s10003; s20020
sparkxy = -10,-15
hitsound   = s0,6
guardsound = s0,3
ground.type = low;trip
ground.slidetime = 6
ground.hittime  = 13
ground.velocity = -4
air.velocity = -3.5,-4
ground.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------
; 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  = 4
poweradd= 60
ctrl = 0
anim = 450

[State 430, snd]
type = playsnd
trigger1 = animelem = 2
value = 1000, 2
channel = 2

[State 450, Explod]
type = Explod
trigger1 = AnimElem = 2, = 0
anim = 451
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "450 effect"
id = 450

[State 450, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,5
channel = 3
ignorehitpause = 1
persistent = 0

[State 450, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,5
channel = 3
ignorehitpause = 1
persistent = 0
[State 450, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 250, HitDef A]
type = HitDef
;triggerall = P2Stateno !=5070
;triggerall = P2Stateno !=5071
trigger1 = time = 0
attr = C, NA
damage = 70,0
animtype = hard
hitflag = M
guardflag = L
priority = 4, Hit
pausetime = 10,10
sparkno = 2;S10007
;guard.sparkno = s10003; S8020
sparkxy = -10,-13
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-5;-1,-15
guard.velocity = -8
airguard.velocity = -5,-1
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = 0, -12;ifelse (prevstateno = 440, -14, -11)
fall = 1

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

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

[State 600, snd]
type = playsnd
trigger1 = animelem = 2
value = 1000, 6
channel = 2

[State 600, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 601
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "600 effect"
id = 600

[State 600, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,0
channel = 3
ignorehitpause = 1
persistent = 0

[State 600, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,0
channel = 3
ignorehitpause = 1
persistent = 0

[State 600, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 600, hitdef]
type = hitdef
trigger1 = time  = 0
attr = A, NA
animtype  = light
damage    = 27,0
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = 0;S10005
;guard.sparkno = s10003; s20020
sparkxy = -10,-37
ground.type = high
ground.slidetime = 6
ground.hittime  = 11
ground.velocity = -6,0 
air.velocity = 0,-4.0
palfx.time = 25
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >=12

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

;---------------------------------------------------------------------------
; Jump Medium Punch (mid)
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 45
ctrl = 0
anim = 610

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 38

[State 1000, Proj]
type = projectile
trigger1 = animelem = 8
;trigger1 = movecontact = 0
projid = 617
projanim = 617
velocity = 8.5, 0
accel = 0,0
offset = 40, -90
projshadow = 0,0,0; 255, 255, 255
sparkno = 3;S10005
;guard.sparkno = s10003; s20020
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 40, 2			;Damage that move inflicts, guard damage
animtype = Heavy			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = HA			;Flags on how move is to be guarded against
pausetime = 12,12
hitsound = S2000, 1
guardsound = S0, 12
sparkxy = 70, 0
ground.type = high
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -6
air.velocity = -2, -3
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
;p2stateno = 623

[State 610, snd]
type = playsnd
trigger1 = animelem = 6
value = 1000, 1
channel = 1

[State 610, snd]
type = playsnd
trigger1 = animelem = 6
value = 1000, 7
channel = 2

[State 610, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 613
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "610 effect"
id = 610


[State 610, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 610, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 610, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

;[State 240, 2]
;type = HitDef
;trigger1 = AnimElem = 6
;attr = S, NA
;animtype  = Medium
;damage    = 40,0
;guardflag = MA
;pausetime = 0,11
;sparkno = S10006
;guard.sparkno = s10003; s20020
;sparkxy = -10,-65
;hitsound   = s0,6
;guardsound = s0,3
;ground.type = low
;ground.slidetime = 6
;ground.hittime  = 13
;ground.velocity = -10.3
;air.velocity = -3.5,-4
;ground.cornerpush.veloff = 0

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


; Jump Medium Punch (down)
; CNS difficulty: easy
[Statedef 611]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 45
ctrl = 0
anim = 611

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 38

[State 1000, Proj]
type = projectile
trigger1 = animelem = 8
;trigger1 = movecontact = 0
projid = 617
projanim = 617
velocity = 8.5, 3
accel = 0,0
offset = 40, -82
projshadow = 0,0,0; 255, 255, 255
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 40, 2			;Damage that move inflicts, guard damage
animtype = Heavy			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = HA			;Flags on how move is to be guarded against
pausetime = 12,12
sparkno = 3;S10005
;guard.sparkno = s10003; s20020
hitsound = S2000, 1
guardsound = S0, 12
sparkxy = 70, 0
ground.type = high
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -6
air.velocity = -2, -3
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
;p2stateno = 623

[State 611, snd]
type = playsnd
trigger1 = animelem = 6
value = 1000, 1
channel = 1

[State 611, snd]
type = playsnd
trigger1 = animelem = 6
value = 1000, 7
channel = 2

[State 611, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 614
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "611 effect"
id = 614


[State 611, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 611, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 611, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

;[State 240, 2]
;type = HitDef
;trigger1 = AnimElem = 6
;attr = S, NA
;animtype  = Medium
;damage    = 40,0
;guardflag = MA
;pausetime = 0,11
;sparkno = S10006
;guard.sparkno = s10003; s20020
;sparkxy = -10,-65
;hitsound   = s0,6
;guardsound = s0,3
;ground.type = low
;ground.slidetime = 6
;ground.hittime  = 13
;ground.velocity = -10.3
;air.velocity = -3.5,-4
;ground.cornerpush.veloff = 0

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


; Jump Medium Punch (up)
; CNS difficulty: easy
[Statedef 612]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 45
ctrl = 0
anim = 612

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 38

[State 1000, Proj]
type = projectile
trigger1 = animelem = 8
;trigger1 = movecontact = 0
projid = 617
projanim = 617
velocity = 8.5, -3
accel = 0,0
offset = 40, -111
projshadow = 0,0,0; 255, 255, 255
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 40, 2			;Damage that move inflicts, guard damage
animtype = Heavy			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = HA			;Flags on how move is to be guarded against
pausetime = 12,12
sparkno = 3;S10005
;guard.sparkno = s10003; s20020
hitsound = S2000, 1
guardsound = S0, 12
sparkxy = 70, 0
ground.type = high
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -6
air.velocity = -2, -3
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
;p2stateno = 623

[State 612, snd]
type = playsnd
trigger1 = animelem = 6
value = 1000, 1
channel = 1

[State 612, snd]
type = playsnd
trigger1 = animelem = 3
value = 1000, 7
channel = 2

[State 612, Explod]
type = Explod
trigger1 = AnimElem = 1, = 0
anim = 615
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "612 effect"
id = 615


[State 612, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 612, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,1
channel = 3
ignorehitpause = 1
persistent = 0

[State 612, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

;[State 240, 2]
;type = HitDef
;trigger1 = AnimElem = 6
;attr = S, NA
;animtype  = Medium
;damage    = 40,0
;guardflag = MA
;pausetime = 0,11
;sparkno = S10006
;guard.sparkno = s10003; s20020
;sparkxy = -10,-65
;hitsound   = s0,6
;guardsound = s0,3
;ground.type = low
;ground.slidetime = 6
;ground.hittime  = 13
;ground.velocity = -10.3
;air.velocity = -3.5,-4
;ground.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 60
ctrl = 0
anim = 620

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 31

[State 620, snd]
type = playsnd
trigger1 = animelem = 3
value = 1000, 1
channel = 1

[State 620, snd]
type = playsnd
trigger1 = animelem = 3
value = 1000, 8
channel = 2

[State 620, Explod]
type = Explod
trigger1 = AnimElem = 2, = 0
anim = 621
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "620 effect"
id = 620

[State 620, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,2
channel = 3
ignorehitpause = 1
persistent = 0

[State 620, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,2
channel = 3
ignorehitpause = 1
persistent = 0

[State 620, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 620, hitdef]
type = hitdef
trigger1 = time = 0
attr = A, NA
animtype  = medium
damage    = 65
guardflag = MA
hitflag = MAF
pausetime = 9,9
sparkno = 2;S10007
;guard.sparkno = s10003; s20020
sparkxy = -10,-37
ground.type = high
ground.slidetime = 10
ground.hittime  = 23
ground.velocity = -12.3 
air.velocity = -10.5, 12
fall.envshake.time = 10
air.fall = 1
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
;p2stateno = 623

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

;---------------------------------------------------------------------------
;Electrocutted state
[Statedef 623]
type    = A
physics = N
movetype = H
anim = 5002

[State 623, a2]
type = ChangeAnim
trigger1 = AnimExist(7696)
value = 7696
persistent = 0

[State 623, a3]
type = SelfState
trigger1 = time = 15
value = 5030

;---------------------------------------------------------------------------
;Electrocutted state
[Statedef 624]
type    = U
MoveType = H
physics = U
ctrl = 0
VelSet = 0,0
anim = 5002

[State 623, a2]
type = ChangeAnim
trigger1 = AnimExist(7696)
value = 7696
persistent = 0

[State 1050, KOed by iceball]
type = ChangeState
trigger1 = life <= 0
value = 5050 

[State 1050, gr]
type = ChangeAnim
triggerall = AnimExist(5300)
trigger1 = (time = 10) && StateType != A 
value = 5300

[State 1050, gr]
type = SelfState
triggerall = AnimExist(5300)
trigger1 = (time = 10) && StateType = A 
value = 5030

[State 1050, gr]
type = SelfState
triggerall = AnimExist(5300)
trigger1 = time >= 101
ctrl = 1
value = 5030

[State 1050, gr]
type = SelfState
triggerall = !AnimExist(5300)
trigger1 = time = 15
ctrl = 1
value = 5030

;---------------------------------------------------------------------------
; Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 15
ctrl = 0
anim = 630

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 13

[State 630, Explod]
type = Explod
trigger1 = AnimElem = 2, = 0
anim = 631
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "630 effect"
id = 630

[State 630, hitsnd]
type = playsnd
trigger1 = time = 1
value = 1000,3
channel = 2
ignorehitpause = 1
persistent = 0

[State 630, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 630, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,3
channel = 3
ignorehitpause = 1
persistent = 0

[State 630, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 630, hitdef]
type = hitdef
trigger1 = time = 0
attr = A, NA
animtype  = light
damage    = 20,0
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = 0;S10006
;guard.sparkno = s10003; s20020
sparkxy = -10,-37
ground.type = high
ground.slidetime = 6
ground.hittime  = 15
ground.velocity =  -5.2
air.velocity = 0,-4.3

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

;---------------------------------------------------------------------------
; Jump Medium Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 45
ctrl = 0
anim = 640

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 23

[State 630, hitsnd]
type = playsnd
trigger1 = time = 1
value = 1000,4
channel = 2
ignorehitpause = 1
persistent = 0

[State 640, Explod]
type = Explod
trigger1 = AnimElem = 2, = 0
anim = 641
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "640 effect"
id = 640

[State 640, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,4
channel = 3
ignorehitpause = 1
persistent = 0

[State 640, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,4
channel = 3
ignorehitpause = 1
persistent = 0

[State 640, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 640, hitdef]
type = hitdef
trigger1 = time  = 0
attr = A, NA
animtype  = medium
damage    = 45,0
guardflag = MA
hitflag = MAF
pausetime = 9,9
sparkno = 1;S10006
;guard.sparkno = s10003; s20020
sparkxy = -10,-37
ground.type = high
ground.slidetime = 6
ground.hittime  = 15
ground.velocity =  -7.2
air.velocity = 0,-4.3

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

;---------------------------------------------------------------------------
; Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 55
ctrl = 0
anim = 650

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 39

[State 630, hitsnd]
type = playsnd
trigger1 = time = 1
value = 1000,5
channel = 2
ignorehitpause = 1
persistent = 0

[State 650, Explod]
type = Explod
trigger1 = AnimElem = 2, = 0
anim = 651
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
name = "650 effect"
id = 650

[State 650, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 1
value = 2000,5
channel = 3
ignorehitpause = 1
persistent = 0

[State 650, hitsnd]
type = playsnd
triggerall = movehit
trigger1 = uniqhitcount = 2
value = 2000,5
channel = 3
ignorehitpause = 1
persistent = 0

[State 650, guardsnd]
type = playsnd
trigger1 = moveguarded
;trigger1 = uniqhitcount = 1
value = 0,3
channel = 3
ignorehitpause = 1
persistent = 0

[state 651, hitdef]
type = hitdef
trigger1 = time = 0
attr = a, NA
animtype  = hard
damage    = 55
guardflag = MA
hitflag = MAF
pausetime = 10,10
sparkno = 2;S10007
;guard.sparkno = s10003; s20020
sparkxy = -10,-80
ground.type = high
ground.slidetime = 9
ground.hittime  = 20
ground.velocity = -3.8,-3.3
air.velocity = -5.8, -5.3
fall = 0;ifelse(P2statetype = A && prevstateno = 600 || P2statetype = A && prevstateno = 610 || P2statetype = A && prevstateno = 620 || P2statetype = A && prevstateno = 630 || P2statetype = A && prevstateno = 640, 1, 0)

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

;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced
; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
;[Statedef 800]
;type    = S
;movetype= A
;physics = S
;juggle  = 0
;velset = 0,0
;ctrl = 0
;anim = 800

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
;[State 800, 1]
;type = HitDef
;Trigger1 = Time = 0
;attr = S, NT          ;Attributes: Standing, Normal Throw
;hitflag = M-          ;Affect only ground people who are not being hit
;priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
;sparkno = -1          ;No spark
;sprpriority = 1       ;Draw in front of p2
;p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
;p2facing = 1          ;Force p2 to face player
;p1stateno = 810       ;On success, player changes to state 810
;p2stateno = 820       ;If hit, p2 changes to state 820 in player's cns
;fall = 1              ;Force p2 into falling down

;[State 800, 2]
;type = ChangeState
;Trigger1 = AnimTime = 0
;value = 0
;ctrl = 1

;---------------------------------------------------------------------------
; 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


[Statedef 800];Throw Attempt
type = S
movetype = A
physics = S
velset = 0,0
;anim = 798
ctrl = 0

[State 800, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 798
value = 798

[State 800, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = M
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 801
p2stateno = 802

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

;---------------------------------------------------------------------------
;Punch Throw on ground
[Statedef 801]
type = S
movetype = A
physics = S
anim = 800
sprpriority = 1
ctrl = 0

[State 801, 2]
type = playsnd
trigger1 = animelem = 1
value = 888,0
channel = 2

[State 801, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 10800
sprpriority = 2
postype = p1
pos = 1,-5
ownpal = 1
bindtime = -1
name = "throwelectricity"
id = 10800

[State 801, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, < 0
time = 1
pos = 30,0

[State 801, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 27, < 0  ;60
time = 1
pos = 88,-5

[State 811, PlaySnd]
type = PlaySnd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 60
value = 1000,6;2,3
channel = 2
;volume = 50

[State 801, Explod]
type = Explod
trigger1 = AnimElem = 31
anim = 10007
ontop = 1
postype = p1
pos = 85,-100
ownpal = 1
bindtime = 1
removetime = -2
name = "hitspark"
id = 2

[State 801, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 33  ;74
value = 2000,2


[State 801, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElem = 33, = 0  ;74
x = -8
y = -3.5

[State 811, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = -8

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

;---------------------------------------------------------------------------
;Punch throw p2 anim
[Statedef 802]
type = A
movetype = H
physics = N
sprpriority = 0
facep2 = 1
ctrl = 0

[State 802, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 802

[State 802, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 802, PosSet]
type = PosSet
trigger1 = !AnimTime
y = -40

[State 802, SelfState]
type = SelfState
trigger1 = !AnimTime
value = 5050

;---------------------------------------------------------------------------
;Punch Throw Attempt(backwards)
[Statedef 810]
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 100
ctrl = 0

[State 810, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 798
value = 798

[State 810, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = M
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 811
p2stateno = 802

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

;---------------------------------------------------------------------------
;Punch Throw (Backwards)
[Statedef 811]
type = S
movetype = A
physics = S
anim = 800
sprpriority = 1
ctrl = 0

[State 801, 2]
type = playsnd
trigger1 = animelem = 1
value = 888,0
channel = 2

[State 811, Turn]
type = Turn
trigger1 = !Time

[State 811, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 10800
sprpriority = 2
postype = p1
pos = 0,0
ownpal = 1
bindtime = -1
name = "throwelectricity"
id = 10800

[State 811, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, < 0
time = 1
pos = 30,0

[State 811, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 19, < 0
time = 1
pos = 88,-95

[State 811, PlaySnd]
type = PlaySnd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = 1000,6;2,3
channel = 2
;volume = 50

[State 811, Explod]
type = Explod
trigger1 = AnimElem = 19
anim = 10007
ontop = 1
postype = p1
pos = 88,-95
removetime = -2
ownpal = 1
bindtime = 1
name = "Hitspark"
id = 2


[State 811, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = 2000, 2

[State 811, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElem = 19
x = -10
y = -7.5

[State 811, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = -8

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

;---------------------------------------------------------------------------
;Kick Throw Attempt
[Statedef 820]
type = S
movetype = A
physics = S
velset = 0,0
ctrl = 0

[State 820, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 798
value = 798

[State 820, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = M
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 821
p2stateno = 822

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

;---------------------------------------------------------------------------
;Kick Throw
[Statedef 821]
type = S
movetype = A
physics = S
anim = 810
sprpriority = 1
ctrl = 0

[State 801, 2]
type = playsnd
trigger1 = animelem = 1
value = 888,0
channel = 3

[State 821, Width]
type = Width
trigger1 = 1
edge = 120,-60

[State 821, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 10810
sprpriority = 2
postype = p1
pos = -15,0
ownpal = 1
bindtime = -1
name = "throw wind"
id = 10810

[State 821, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, < 0
time = 1
pos = 30,0

[State 821, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 14, < 0
time = 1
pos = 60,-75

[State 821, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1000,10;3,1
channel = 2

[State 821, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 14
value = 1000,1

[State 821, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElem = 14
x = -1
y = -10

[State 821, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 14
value = -60

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

;---------------------------------------------------------------------------
;Kick Throw P2 Anim
[Statedef 822]
type = A
movetype = H
physics = N
sprpriority = 0
facep2 = 1
ctrl = 0

[State 822, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 812

[State 822, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 822, PosSet]
type = PosSet
trigger1 = !AnimTime
y = -15

[State 822, SelfState]
type = SelfState
trigger1 = !AnimTime
value = 5050

;---------------------------------------------------------------------------
;Kick Throw Attempt (Backwards)
[Statedef 830]
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 100
;anim = 798
ctrl = 0

[State 830, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 798
value = 798

[State 830, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = M
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 831
p2stateno = 822

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

;---------------------------------------------------------------------------
;Kick Throw Backwards
[Statedef 831]
type = S
movetype = A
physics = S
anim = 810
sprpriority = 1
ctrl = 0

[State 831, Turn]
type = Turn
trigger1 = !Time

[State 801, 2]
type = playsnd
trigger1 = animelem = 1
value = 888,0
channel = 3

[State 821, Width]
type = Width
trigger1 = 1
edge = 120,-60

[State 821, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 10810
sprpriority = 2
postype = p1
pos = 0,0
ownpal = 1
bindtime = -1
name = "throw wind"
id = 10810

[State 821, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, < 0
time = 1
pos = 30,0

[State 821, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 14, < 0
time = 1
pos = 60,-75

[State 821, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1000,10;3,1
channel = 2

[State 821, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 14
value = 1000,1

[State 821, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElem = 14
x = -1
y = -10

[State 821, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 14
value = -60

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

;---------------------------------------------------------------------------
;Punch Throw in Air Attempt
[Statedef 880]
type = A
movetype = A
physics = A
;anim = 799
ctrl = 0

[State 880, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 799
value = 799

[State 880, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = AF
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 881
p2stateno = 852

[State 880, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Punch Throw in air
[Statedef 881]
type = A
movetype = A
physics = N
anim = 800
velset = 0,0
sprpriority = 1
ctrl = 0

[State 801, 2]
type = playsnd
trigger1 = animelem = 1
value = 888,0
channel = 2

[State 801, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 10800
sprpriority = 2
postype = p1
pos = 0,0
ownpal = 1
bindtime = -1
name = "throwelectricity"
id = 10800

[State 801, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, < 0
time = 1
pos = 30,0

[State 801, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 19, < 0
time = 1
pos = 88,-5

[State 811, PlaySnd]
type = PlaySnd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = 1000,6;2,3
channel = 2

[State 801, Explod]
type = Explod
trigger1 = AnimElem = 19
anim = 10007
ontop = 1
postype = p1
pos = 88,-95
ownpal = 1
bindtime = 1
removetime = -2
name = "hitspark"
id = 2

[State 801, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = 2000,2


[State 801, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElem = 19, = 0
x = -10
y = -7.5

[State 811, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = -8

[State 851, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 50 + ((var(49) > 1) * 1652)
ctrl = 1

;---------------------------------------------------------------------------
;Punch throw in air P2 anim
[Statedef 852]
type = A
movetype = H
physics = N
sprpriority = 0
facep2 = 1
ctrl = 0

[State 852, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 802

[State 852, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 852, PosSet]
type = PosSet
trigger1 = !AnimTime
y = enemyNear, Pos Y -15

[State 852, SelfState]
type = SelfState
trigger1 = !AnimTime
value = 5050

;---------------------------------------------------------------------------
;Punch throw in air attempt backwards
[Statedef 860]
type = A
movetype = A
physics = A
poweradd = 100
;anim = 799
ctrl = 0

[State 860, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 796
value = 799

[State 860, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = AF
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 861
p2stateno = 852

[State 860, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 50 + ((var(49) > 1) * 1652)
ctrl = 1

;---------------------------------------------------------------------------
;Punch Throw in Air Backwards
[Statedef 861]
type = A
movetype = A
physics = N
anim = 800
velset = 0,0
sprpriority = 1
ctrl = 0

[State 861, Turn]
type = Turn
trigger1 = !Time

[State 801, 2]
type = playsnd
trigger1 = animelem = 1
value = 888,0
channel = 2

[State 801, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 10800
sprpriority = 2
postype = p1
pos = 0,0
ownpal = 1
bindtime = -1
name = "throwelectricity"
id = 10800

[State 801, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, < 0
time = 1
pos = 30,0

[State 801, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 19, < 0
time = 1
pos = 88,-95

[State 811, PlaySnd]
type = PlaySnd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = 1000,6;2,3
channel = 2
;volume = 50

[State 801, Explod]
type = Explod
trigger1 = AnimElem = 19
anim = 10007
ontop = 1
postype = p1
pos = 88,-95
ownpal = 1
bindtime = 1
removetime = -2
name = "hitspark"
id = 2

[State 801, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = 2000,2


[State 801, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElem = 19, = 0
x = -10
y = -7.5

[State 811, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = (gametime%7) = 0
trigger1 = time > 19
trigger1 = time < 70
value = -8

[State 861, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 50
ctrl = 1














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

[State 900, varset for vel]
type = varset
trigger1 = prevstateno = 420
;trigger2 = prevstateno = 250
;trigger3 = prevstateno = 450
v = 3
value = 1

[State 900, 1]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 900, 2]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 900, 3]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

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

;---------------------------------------------------------------------------
;Super Jump
[Statedef 901]
type    = A
physics = A
ctrl = 1
anim = 1041
velset = 0, ifelse(var(3) = 1, -13.5, -15);ifelse(var(3) = 1, -13.7, -16)

;[State 901];super jump dust
;type = Explod
;trigger1 = time = 0
;anim = 10014
;id = 10014
;postype = P1
;pos = 0,17
;sprpriority = 2
;ownpal = 0

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time >= 0

[State 901, Sound]
type = PlaySnd
trigger1 = time = 1
value = S0,5

[State 1401, Super Jump Spark VarSet]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

[State 901, Holding Back]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = (Anim != 43) && (command = "holdback")
x = -0.1

[State 901, Holding Forward]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = (Anim != 42) && (command = "holdfwd")
x = 0.25

[State 901, Jumping Fwd Velocity]
type = VelSet
trigger1 = Anim = 1042
trigger1 = Time = [0,5]
x = 2.5

[State 901, Jumping Back Velocity]
type = VelSet
trigger1 = Anim = 1043
trigger1 = Time = [0,5]
x = -2

[State 901, ChangeAnim 1]  ;Change to neutral jumping anim
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 1041

[State 901, ChangeAnim end]  ;Change to landing jumping anim
type = ChangeAnim
trigger1 = vel y > 0
value = 44
persistent = 0

[State 901, ChangeAnim 2]  ;Change to jumping forward anim
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 1042

[State 901, ChangeAnim 2]  ;Change to jumping forward down anim
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = vel y >=.01
value = 045
persistent = 0

[State 901, ChangeAnim 3]  ;Change to jumping back anim
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 1043

[State 901, ChangeAnim 3]  ;Change to jumping back anim
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = vel y >= .01
value = 046
persistent = 0




;---------------------------------------------------------------------------
; Recovery Roll
[Statedef 850]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 5120
sprpriority = -1

[State 850, snd]
type = PlaySnd
trigger1 = time = 0
value = 190,1
volume = 20
channel = 2


[State 850, shake]
type = EnvShake
trigger1 = time = 0
time = 10
;freq = 60
;ampl = -2




[State 850, VarSet]
type = VarSet
trigger1 = Time >= 1
v = 20
value = 0

[State 850, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 1,0

[State 850, Explod];landing dust
type = Explod
trigger1 = AnimElemTime(1) = 0
anim = 10004
id = 10004
postype = P1
pos = 0,0
sprpriority = -1
ownpal = 0

[State 850, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 850, VelSet 1]
type = VelSet
trigger1 = animelem = 1;AnimElemTime(2) = 0
x = 9;ifelse(Anim = 850,9,-9)

[State 850, VelSet 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 850, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

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

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

[State 850, ChangeState]
type = ChangeState
trigger1 != Alive
trigger1 = life <= 0
value = 5150
ctrl = 0


; Infinity Counter
[Statedef 851]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 222
sprpriority = -1

[State 850, NotHitBy]
type = NotHitBy
trigger1 = time >= 0
value = SCA
time = 1

[State 851, pause]
type = SuperPause
trigger1 = time = 0
time = 28
pos = 0,30;5,-71
anim = S851
sound = S851,1
poweradd = -500
ontop = 1

[State 851]
type = explod
anim = 10024
id = 10024
trigger1 = time = 0
supermovetime = 10
removetime = -2
postype = left
pos = 0,0
ontop = 1


[State 851,snd]
type = playsnd
trigger1 = time = 0
value = 851,0
persistent = 0

[State 851]
type = changestate
trigger1 = time = 1
value = 220
ctrl = 0

;---------------------------------------------------------------------------------------------------------------------
;(Hyper flash)
;---------------------------------------------------------------------------------------------------------------------
;Brillo Pal
[Statedef 13519]
ctrl = 0
anim = 6900

[State 3019, Assert]
type = AssertSpecial
trigger1 = Time <= 30
flag = NoFG
flag2 = NoBarDisplay
flag3 = GlobalNoShadow

[State 3019, PalFX]
type = AllPalFX
trigger1 = Time >= 0
time = 1
color = 256-(time*4)
add = 130+(time*9), 130+(time*9), 130+(time*9)
ignorehitpause = 1


[State 3019, 1]
type = DestroySelf
trigger1 = Time >= 35



;hyper coisas
;----- begin of Hyper Effects Helpers-----
;;;;;###################################################################################

;----------------------------[2002 UM MAX2 BG]----------------------------------
[Statedef 40001]
anim = 9999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG

;[State 40001, Tile #1-7]
;type = Explod
;triggerall = !numexplod(15600)
;trigger1 = !time
;anim = 15600
;ID = 15600
;pos = 0,0
;postype = left  ;p2,front,back,left,right
;removetime = 10
;pausemovetime = -1
;supermovetime = -1
;scale = 1.1,1.1
;sprpriority = -20
;ownpal = 1
;ignorehitpause = 1
;bindtime = -1
;persistent = 0

[State 40001, Tile #1-7]
type = Explod
trigger1 = !time
trigger2 = numexplod(15601) = 0
anim = 15600
ID = 15601
pos = 0,0
postype = left  ;p2,front,back,left,right
removetime = -1
pausemovetime = -1
supermovetime = -1
scale = 1.1,1.1
sprpriority = -9999
ownpal = 1
ignorehitpause = 1
bindtime = -1

[State 40001, Glass Break]
type = ChangeState
;trigger1 = root, stateno != 3300 && root, stateno != 3350
;trigger2 = root, stateno = 3300 && root,animelemtime(61) = 1  || root, stateno = 3350 && root,animelemtime(50) = 1
trigger1 = root, stateno !=[3000,4999]
;trigger2 = root, NumHelper(8400) !=0|| root, NumHelper(8420) !=0
value = stateno+1

[Statedef 40002]
anim = 9999

;[State 40002, RemoveExplod]
;type = RemoveExplod
;trigger1 = !time
;id = 15600

[State 40002, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 15601

[State 40002, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S14001,0
volume = 200

[State 40001, Glass Break]
type = Explod
triggerall = !numexplod(15640)
trigger1 = !time
anim = 15604
ID = 15640
pos = 0,0
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
scale = 1,1
sprpriority = -20
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;--------------------------[2002 UM MAX2 PORTRAIT]------------------------------
[Statedef 40003]
anim = 9999

[State 40001, P1 BG]
type = Explod
triggerall = !numexplod(15650)
triggerall = teamside = 1
trigger1 = !time
anim = 15605
ID = 15650
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P2 BG]
type = Explod
triggerall = !numexplod(15651)
triggerall = teamside = 2
trigger1 = !time
anim = 15606
ID = 15651
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P1 PORTRAIT]
type = Explod
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = 15607
ID = 15660
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40001, P2 PORTRAIT]
type = Explod
triggerall = !numexplod(15661)
triggerall = teamside = 2
trigger1 = !time
anim = 15607
ID = 15661
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15650
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15650
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15651
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15651
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15660
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15660
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15661
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15661
scale = 1,1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 60

[Statedef 40004]
anim = 9999

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1
;-----------------------

;--------------------------------------------------------------------------------------------
; Guard Push (stand)
[Statedef 7610]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7610
sprpriority = 0
facep2 = 1

[State 7610, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7610, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7610, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7610, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7610, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

[State 7610, PlaySnd 2]
type = PlaySnd
trigger1 = Time = 0
value = 4,0

[State 7610, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = F7020
postype = p1
pos = 31,-77
ownpal = 1
vel = 0,0
scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 5

[State 7610, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7611
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

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

;---------------------------------------------------------------------------
; Guard Push (Helper)

[Statedef 7611]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = Parent,Anim
sprpriority = -4


[State 7611, PlayerPush]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 7611, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 7611, VelSet 1]
type = VelSet
trigger1 = Time = [0,10]
x = 25

[State 7611, VelSet 2]
type = VelSet
trigger1 = Time = [11,13]
x = 15

[State 7611, VelSet 2]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 7611, DestroySelf]
type = DestroySelf
trigger1 = Time >= 14




