; Lavia's constants and state file.

[Data]
;Amount of life to start with
life = 1000
;attack power (more is stronger)
attack = 100
;defensive power (more is stronger)
defence = 100
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 50
;Time which player lies down for, before getting up
liedown.time = 60
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 2
;Default guard spark number
guard.sparkno = s6767
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = -100
;Variables with this index and above will not have their values
;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.
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 0.5           ;Horizontal scaling factor.
yscale = 0.5          ;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 = 60          ;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 = 1     ;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,10    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.4      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 5.6, 0    ;Run forward (x, y)
run.back = -6,-6.38 ;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 = 0      ;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

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

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = AnimElem = 11
value = 181

;---------------------------------------------------------------------------
; Win pose 1
[Statedef 181]
type    = A
physics = N
ctrl = 0
anim = 181
velset = 0,0

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 120
flag = roundnotover



[State 810, sparkletest]
type = explod
triggerall = anim = 181
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
anim = 7950
ID = 7950
sprpriority = 7
pos = -125+(random%250), 50-(random%250)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 181
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
anim = 7951
ID = 7950
sprpriority = 7
pos = -125+(random%250), 50-(random%250)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 181
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
anim = 7952
ID = 7950
sprpriority = 7
pos = -125+(random%250), 50-(random%250)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest]
type = explod
triggerall = anim = 181
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
anim = 7950
ID = 7950
sprpriority = 7
pos = -125+(random%250), 50-(random%250)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 181
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
anim = 7951
ID = 7950
sprpriority = 7
pos = -125+(random%250), 50-(random%250)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 181
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
anim = 7952
ID = 7950
sprpriority = 7
pos = -125+(random%250), 50-(random%250)
scale = const(size.xscale),const(size.yscale)
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 191]
type = S
ctrl = 0
anim = 2001
sprpriority = 3
;velset = 0,0

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

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

[State 0, Trans]
type = Trans
trigger1 = time < 256
trans = addalpha
alpha = time, 256-time

[State 191, 3] ;Change to stand state when done
type = ChangeAnim
trigger1 = time = 256
value = 2010

[State 191, 4]
type = ChangeAnim
trigger1 = anim = 2010
trigger1 = animtime = 0
value = 2011

[State 191, 5]
type = ChangeState
triggerall = anim = 2011
trigger1 = animtime = 0
value = 0

[State 191, haha]
type = playsnd
trigger1 = time = 256
value = s60,0

[State 191, whoosh?]
type = playsnd
trigger1 = time = 1
trigger2 = time = 64
trigger3 = time = 128
trigger4 = time = 192
value = s191,0

[State 191, explod];top front
type = explod
triggerall = time < 245
trigger1 = time = 1
trigger2 = time = 33
trigger3 = time = 65
trigger4 = time = 97
trigger5 = time = 129
trigger6 = time = 161
trigger7 = time = 193
trigger8 = time = 225
anim = 1230
removetime = 20
sprpriority = 10
pos = 10,-110
scale = const(size.xscale),const(size.yscale)
[State 191, explod];top back
type = explod
triggerall = time < 245
trigger1 = time = 21
trigger2 = time = 53
trigger3 = time = 85
trigger4 = time = 117
trigger5 = time = 149
trigger6 = time = 181
trigger7 = time = 213
anim = 1231
removetime = 12
sprpriority = 1
pos = 10,-110
scale = const(size.xscale),const(size.yscale)
[State 191, explod];back top mid
type = explod
triggerall = time < 245
trigger1 = time = 1
trigger2 = time = 33
trigger3 = time = 65
trigger4 = time = 97
trigger5 = time = 129
trigger6 = time = 161
trigger7 = time = 193
trigger8 = time = 225
anim = 1226
removetime = 12
sprpriority = 1
pos = 0,-90
scale = const(size.xscale),const(size.yscale)
[State 191, explod];front top mid
type = explod
triggerall = time < 245
trigger1 = time = 13
trigger2 = time = 45
trigger3 = time = 77
trigger4 = time = 109
trigger5 = time = 141
trigger6 = time = 173
trigger7 = time = 205
trigger8 = time = 237
anim = 1225
removetime = 20
sprpriority = 10
pos = 0,-90
scale = const(size.xscale),const(size.yscale)

[State 191, explod];front mid low 1
type = explod
triggerall = time < 245
trigger1 = time = 1
trigger2 = time = 33
trigger3 = time = 65
trigger4 = time = 97
trigger5 = time = 129
trigger6 = time = 161
trigger7 = time = 193
trigger8 = time = 225
anim = 1227
removetime = 8
sprpriority = 10
pos = 0,-70
scale = const(size.xscale),const(size.yscale)
[State 191, explod];back mid low
type = explod
triggerall = time < 245
trigger1 = time = 9
trigger2 = time = 41
trigger3 = time = 73
trigger4 = time = 105
trigger5 = time = 137
trigger6 = time = 169
trigger7 = time = 201
trigger8 = time = 233
anim = 1228
removetime = 12
sprpriority = 1
pos = 0,-70
scale = const(size.xscale),const(size.yscale)
[State 191, explod];front mid low 2
type = explod
triggerall = time < 245
trigger1 = time = 21
trigger2 = time = 53
trigger3 = time = 85
trigger4 = time = 117
trigger5 = time = 149
trigger6 = time = 181
trigger7 = time = 213
;trigger8 = time = 245
anim = 1229
removetime = 12
sprpriority = 10
pos = 0,-70
scale = const(size.xscale),const(size.yscale)
[State 191, explod];back top mid
type = explod
triggerall = time < 245
trigger1 = time = 1
trigger2 = time = 33
trigger3 = time = 65
trigger4 = time = 97
trigger5 = time = 129
trigger6 = time = 161
trigger7 = time = 193
trigger8 = time = 225
anim = 1226
removetime = 12
sprpriority = 1
pos = 0,-50
scale = const(size.xscale),const(size.yscale)
[State 191, explod];front top mid
type = explod
triggerall = time < 245
trigger1 = time = 13
trigger2 = time = 45
trigger3 = time = 77
trigger4 = time = 109
trigger5 = time = 141
trigger6 = time = 173
trigger7 = time = 205
trigger8 = time = 237
anim = 1225
removetime = 20
sprpriority = 10
pos = 0,-50
scale = const(size.xscale),const(size.yscale)
[State 191, explod];front bottom 1
type = explod
triggerall = time < 245
trigger1 = time = 1
trigger2 = time = 33
trigger3 = time = 65
trigger4 = time = 97
trigger5 = time = 129
trigger6 = time = 161
trigger7 = time = 193
trigger8 = time = 225
anim = 1232
removetime = 12
sprpriority = 10
pos = 10,-30
scale = const(size.xscale),const(size.yscale)
[State 191, explod];back bottom
type = explod
triggerall = time < 245
trigger1 = time = 13
trigger2 = time = 45
trigger3 = time = 77
trigger4 = time = 109
trigger5 = time = 141
trigger6 = time = 173
trigger7 = time = 205
trigger8 = time = 237
anim = 1233
removetime = 12
sprpriority = 1
pos = 10,-30
scale = const(size.xscale),const(size.yscale)
[State 191, explod];front bottom 2
type = explod
triggerall = time < 245
trigger1 = time = 25
trigger2 = time = 57
trigger3 = time = 89
trigger4 = time = 121
trigger5 = time = 153
trigger6 = time = 185
trigger7 = time = 217
anim = 1234
removetime = 8
sprpriority = 10
pos = 10,-30
scale = const(size.xscale),const(size.yscale)

;---------------------------------------------------------------------------
; 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 = 40
value = 1

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


;---------------------------------------------------------------------------
; Stand 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 p1's sprite layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 23, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8                 ;Time attacker pauses, time opponent shakes
sparkno = -1;s7010
guard.sparkno = -1;s6767                   ;Spark anim no (Def: set above)
sparkxy = -10, -76               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = s5, 0                  ;Sound to play on hit
guardsound = s6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7010
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)


[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

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

;---------------------------------------------------------------------------
; Standing medium punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 45
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 40
guardflag = MA
pausetime = 12,12
sparkno = -1;s7020
guard.sparkno = -1;s6767
sparkxy = -10,-70
hitsound   = s5,1
guardsound = s6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7020
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

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


;--------------------------------------
;Standing Strong Punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 220
sprpriority = -1

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

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Heavy
damage    = 60
guardflag = MA
pausetime = 12,12
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-70
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -7
air.velocity = -2.5,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 220, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2

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

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

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = -1;s7010
guard.sparkno = -1;s6767
sparkxy = -10,-58
hitsound   = s5,0
guardsound = s6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -4
air.hittime=10
air.velocity = -1,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7010
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 600, 4]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 600, end]
type = ChangeState
trigger1 = time = 21
value = 40

;---------------------------------------------------------------------------
;Jump Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 45
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 40
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = -1;s7020
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,1
guardsound = s6,0
animtype = Med
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -5.5
air.hittime=10
air.velocity = -2,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7020
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 600, 4]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

[State 600, end]
type = ChangeState
trigger1 = time = 21
value = 40

;---------------------------------------------------------------------------
;Jump Strong Punch
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 220
sprpriority = 2

[State 620, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 620, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 60
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
animtype = Med
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -7
air.hittime=10
air.velocity = -3,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 620, 4]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2

[State 620, end]
type = ChangeState
trigger1 = time = 21
value = 40

;---------------------------------------------------------------------------
;Swoop Throw - Attempt 1

[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2


[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
guardflag = MA
hitsound = s20,0
guardsound = s6,0
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, vels]
type = velset
trigger1 = time < 30
x = 4.5
y = ifelse(pos y < 0, time/7.5, 0)

[State 2000, startsound]
type = PlaySnd
trigger1 = time = 0
value = s100, 0

[State 800, vels]
type = velset
triggerall = time >=31
trigger1 = time < 41
x = 4.5
y = ifelse(pos y < 0,2,0)

[State 800, anim]
type = changeanim
triggerall = time >= 41 &&  time <=80
trigger1 = time = 50
value = 106


[State 800, vels]
type = velset
triggerall = time >= 41
trigger1 = time <= 80
x = 4.5
y = ifelse(Pos Y >= -187,-time*.02,0)


[State 800, 2]
type = ChangeState
Trigger1 = Time > 80
value = 40
ctrl = 1

;---------------------------------------------------------------------------
;Swoop Slam, Part 2

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60


[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = s30, 0

[state 810, starting vels]
type = velset
trigger1 = time = 0
x = 5
y = 0

[state 810, starting vels2]
type = velset
trigger1 = time = 10
x = 0
y = 0

[state 810, bind 0]
type = targetbind
trigger1 = time < 16
pos = 15, 20


[State 810, Bind 1]
type = TargetBind
triggerall = time >= 16
trigger1 = time <= 90
pos = 15,-15

[State 810, vels]
type = velset
triggerall = time <= 90
trigger1 = animelem = 4
x = 0
y = -7

[State 810, Bind 2]
type = TargetBind
triggerall = time > 90
trigger1 = anim != 5211
pos = 35,0

[State 810, down anim]
type = ChangeAnim
trigger1 = time = 90
value = 811

[State 810, vels 2]
type = velset
triggerall = time > 90
trigger1 = anim != 5211
x = 0
y = 9

[State 810, end]
type = ChangeAnim
triggerall = anim = 811
trigger1 = pos y >= 35 && vel y = 9
value = 812


[State 810, end part 2]
type = ChangeAnim
triggerall = anim = 812
trigger1 = animelem = 3
;triggerall = time > 90
;trigger1 = pos y >= -5 && vel y = 9
value = 5211

[State 810, vels 2.5]
type = velset
trigger1 = anim = 812
y = 0

[State 810, posset]
type = posset
triggerall = anim = 5211
trigger1 = animelem = 1
y = 0


[State 2000, Sound]
type = PlaySnd
triggerall = anim = 812
trigger1 = animelem = 1
value = s60, 0
channel = 1

[State 810, vels 3]
type = velset
;triggerall = pos y >= -5
triggerall = anim = 5211
trigger1 = animelem = 1
x = -.2
y = -3

[State 810, vels 4]
type = veladd
triggerall = anim = 5211
trigger1 = animelem = 2
trigger2 = animelem = 3
;trigger3 = animelem = 4
x = -1.5
y = 1

[State 810, hit sound]
type = playsnd
triggerall = anim = 812
trigger1 = animelem = 1
channel = 0
value = s5,3

[state 810, explod]
type = explod
triggerall = anim = 812
trigger1 = animelem = 1
anim = 7030
pos = 20,-60
sprpriority = 7
scale = const(size.xscale),const(size.yscale)


[State 810, end for real]
type = ChangeState
triggerall = anim = 5211
trigger1 = animtime = 0
value = 40

[State 810, Hurt]
type = TargetLifeAdd
triggerall = anim = 812
trigger1 = animelem = 1
value = -80

[State 810, EnvShake]
type = EnvShake
triggerall = anim = 812
trigger1 = animelem = 1
time = 15
freq = 60
ampl = -4
phase = 90









[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

















;---------------------------------------------------------------------------
;Swoop Throw - Attempt 2

[Statedef 801]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2


[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
guardflag = MA
hitsound = s20,0
guardsound = s6,0
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 811       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, vels]
type = velset
trigger1 = time < 30
x = 4.5
y = ifelse(pos y < 0, time/7.5, 0)

[State 2000, startsound]
type = PlaySnd
trigger1 = time = 0
value = s100, 0

[State 800, vels]
type = velset
triggerall = time >=31
trigger1 = time < 41
x = 4.5
y = ifelse(pos y < 0,2,0)

[State 800, anim]
type = changeanim
triggerall = time >= 41 &&  time <=80
trigger1 = time = 50
value = 106


[State 800, vels]
type = velset
triggerall = time >= 41
trigger1 = time <= 80
x = 4.5
y = ifelse(Pos Y >= -187,-time*.02,0)


[State 800, 2]
type = ChangeState
Trigger1 = Time > 80
value = 40
ctrl = 1

;---------------------------------------------------------------------------
;Swoop Slam, Part 2

[Statedef 811]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60


[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = s30, 0

[state 810, starting vels]
type = velset
trigger1 = time = 0
x = 5
y = 0

[state 810, starting vels2]
type = velset
trigger1 = time = 10
x = 0
y = 0

[state 810, bind 0]
type = targetbind
trigger1 = time < 16
pos = 15, 20


[State 810, Bind 1]
type = TargetBind
triggerall = time >= 16
trigger1 = time <= 90
pos = 15,-15

[State 810, vels]
type = velset
triggerall = time <= 90
trigger1 = animelem = 4
x = 0
y = -7

[State 810, Bind 2]
type = TargetBind
triggerall = time > 90
trigger1 = anim != 5211
pos = 35,0

[State 810, Bind 3]
type = TargetBind
;triggerall = time > 90
triggerall = anim = 812
trigger1 = anim != 5211
pos = 35,35

[State 810, down anim]
type = ChangeAnim
trigger1 = time = 90
value = 811

[State 810, vels 2]
type = velset
triggerall = time > 90
trigger1 = anim != 5211
x = 0
y = 9

[State 810, end]
type = ChangeAnim
triggerall = anim = 811
trigger1 = pos y >= 35 && vel y = 9
value = 812


[State 810, end part 2]
type = ChangeAnim
triggerall = anim = 812
trigger1 = animelem = 3
;triggerall = time > 90
;trigger1 = pos y >= -5 && vel y = 9
value = 5211

[State 810, vels 2.5]
type = velset
trigger1 = anim = 812
y = 0

[State 810, posset]
type = posset
triggerall = anim = 5211
trigger1 = animelem = 1
y = 0


[State 2000, Sound]
type = PlaySnd
triggerall = anim = 812
trigger1 = animelem = 1
value = s60, 0
channel = 1

[State 810, vels 3]
type = velset
;triggerall = pos y >= -5
triggerall = anim = 5211
trigger1 = animelem = 1
x = -.2
y = -3

[State 810, vels 4]
type = veladd
triggerall = anim = 5211
trigger1 = animelem = 2
trigger2 = animelem = 3
;trigger3 = animelem = 4
x = -1.5
y = 1

[State 810, hit sound]
type = playsnd
triggerall = anim = 812
trigger1 = animelem = 1
channel = 0
value = s5,3

[state 810, explod]
type = explod
triggerall = anim = 812
trigger1 = animelem = 1
anim = 7030
pos = 20,-60
sprpriority = 7
scale = const(size.xscale),const(size.yscale)


[State 810, end for real]
type = ChangeState
triggerall = anim = 5211
trigger1 = animtime = 0
value = 40

[State 810, Hurt]
type = TargetLifeAdd
triggerall = anim = 812
trigger1 = animelem = 1
value = -115

[State 810, EnvShake]
type = EnvShake
triggerall = anim = 812
trigger1 = animelem = 1
time = 15
freq = 60
ampl = -4
phase = 90









[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)







;---------------------------------------------------------------------------
;Thrown by Swoop Slam

[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

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

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;---------------------------------------------------------------------------
;Stomper

[Statedef 830]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2


[State 830, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
;hitflag = M-          ;Affect only ground people who are not being hit
guardflag = MA
hitsound = s5,2
guardsound = s6,0
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 840       ;On success, KFM changes to state 810
p2stateno = 850       ;If hit, p2 changes to state 850 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down


[State 830, vels]
type = velset
trigger1 = time < 30
x = 4.5
y = ifelse(pos y < 0, time/7.5, 0)

[State 2000, Sound]
type = PlaySnd
trigger1 = time = 0
value = s100, 0

[State 830, vels]
type = velset
triggerall = time >=31
trigger1 = time < 41
x = 4.5
y = ifelse(pos y < 0,2,0)

[State 830, anim]
type = changeanim
triggerall = time >= 41 &&  time <=80
trigger1 = time = 50
value = 106

[State 830, vels]
type = velset
triggerall = time >= 41
trigger1 = time <= 80
x = 4.5
y = ifelse(Pos Y >= -187,-time*.02,0)

[State 830, 2]
type = ChangeState
Trigger1 = Time > 80
value = 40
ctrl = 1


;Stomper, Part 2

[Statedef 840]
type    = S
movetype= A
physics = N
anim = 0
poweradd = 60

[state 840, starting vels]
type = velset
triggerall = anim = 0
trigger1 = animelem = 1
y = -3

[state 840, starting vels]
type = velset
triggerall = anim = 0
trigger1 = 1
x = ifelse(p2dist x > 15, 3, 0)

[state 840, fall after rising]
type = veladd
triggerall = anim = 0
triggerall = pos y <= 0
trigger1 = time < 45
 y = ifelse(pos y >= -10 , 0, ifelse(pos y<= -5,.3,.1))
 
 [State 840, vels to fix bugs]
 type = velset
 triggerall = anim = 0
 triggerall = time > 10
 triggerall = time < 45
 trigger1 = pos y >= 15
 y = 0
 
 
[state 840, spark]
type = explod
trigger1 = time = 1
anim = 7030
pos = 70,-40
sprpriority = 5
scale = const(size.xscale),const(size.yscale)

[State 840, hurt0]
type = targetlifeadd
trigger1 = time = 1
value = -30

[State 840, anim2]
type = changeanim
trigger1 = time = 45
value = 850

[State 840, posfix]
type = posset
triggerall = anim = 850
trigger1 = animelem = 1
y = -40

[State 840, posfix 2]
type = posset
triggerall = anim = 850
trigger1 = animelem = 4
y = -15

[State 840, velfix... although I don't know why this bug occurs]
type = velset
trigger1 = anim = 850
x = 0
y = 0

[State 840, anim3]
type = changeanim
trigger1 = time = 115
value = 5211

[State 2000, Sound]
type = PlaySnd
triggerall = anim = 5211
trigger1 = animelem = 1
value = s60, 0

[State 810, vels 3]
type = velset
triggerall = anim = 5211
trigger1 = animelem = 1
x = -.5
y = -3

[State 840, vels 4]
type = veladd
triggerall = anim = 5211
trigger1 = animelem = 2
trigger2 = animelem = 3
;trigger3 = animelem = 4
x = -3
y = 1

[State 840, bindvel]
type = targetvelset
trigger1 = time = 115
x = 0
y = 0

[State 840, hurt]
type = targetlifeadd
trigger1 = time = 61
trigger2 = time = 71
trigger3 = time = 81
trigger4 = time = 91
trigger5 = time = 101
trigger6 = time = 111
value = -15

[State 2000, Sound]
type = PlaySnd
trigger1 = time = 61
trigger2 = time = 71
trigger3 = time = 81
trigger4 = time = 91
trigger5 = time = 101
trigger6 = time = 111
value = s5, 3

[State 840, combo]
type = hitadd
trigger1 = time = 61
trigger2 = time = 71
trigger3 = time = 81
trigger4 = time = 91
trigger5 = time = 101
trigger6 = time = 111
;trigger7 = time = 95
value = 1

[state 840, sparks]
type = explod
trigger1 = time = 61
trigger2 = time = 71
trigger3 = time = 81
trigger4 = time = 91
trigger5 = time = 101
trigger6 = time = 111
anim = 7030
pos = 15,-10
sprpriority = 5
scale = const(size.xscale),const(size.yscale)
[state 840, end]
type = changestate
triggerall = anim = 5211
trigger1 = animtime = 0
value = 40

[State 840, p2dead?]
type = changestate
triggerall = anim = 0
trigger1 = p2life = 0
value = 40









[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7950
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7951
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 5211
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
anim = 7952
ID = 7950
sprpriority = 7
pos = -65+(random%175), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

;---------------------------------------------------------------------------
;Thrown by Stomper

[Statedef 850]
type    = A
movetype= H
physics = S
velset = 0,0

[State 850, bind0]
type = changeanim
trigger1 = time = 1
value = 5030

[State 850, vels for air3]
type = veladd
triggerall = anim = 5030
triggerall = anim != 5151
triggerall = anim != 5100
trigger1 = time > 1
y = .25


[State 850, vels for air2]
type = velset
triggerall = anim = 5030
triggerall = vel y > 0
trigger1 = pos y >= -5
y = 0

[State 850, anim0]
type = changeanim
triggerall = anim = 5030
triggerall = vel y = 0
trigger1 = pos y >= -5
value = 5110



[State 850, bind 1]
type = changeanim
trigger1 = time = 61
trigger2 = time = 71
trigger3 = time = 81
trigger4 = time = 91
trigger5 = time = 101
trigger6 = time = 111
value = 5110

[State 850, posset]
type = posset
trigger1 = time = 61
trigger2 = time = 71
trigger3 = time = 81
trigger4 = time = 91
trigger5 = time = 101
trigger6 = time = 111
trigger7 = time = 115
y = 0

[state 850, bind 2]
type = changeanim
trigger1 = time = 66
trigger2 = time = 76
trigger3 = time = 86
trigger4 = time = 96
trigger5 = time = 106
value = 5090

[State 850, posset]
type = posset
trigger1 = time = 66
trigger2 = time = 76
trigger3 = time = 86
trigger4 = time = 96
trigger5 = time = 106
y = 25

[State 850, dead]
type = changeanim
trigger1 = time = 115
value = 5151

[State 850, ressurection?]
type = selfstate
trigger1 = time = 160
value = 5120

[State 850, dead?]
type = changestate
triggerall = life = 0
trigger1 = p2stateno != 840
value = 5150





;---------------------------------------
;Kick Down Move...

[Statedef 860]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2


[State 830, 1]
type = hitdef
trigger1 = animelem = 3
attr=S,SA
damage = 40,7
guardflag = MA
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-2
air.type = High
air.hittime = 17
air.velocity = -3,-4
fall = 1
air.fall = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 860, vels]
type = velset
trigger1 = time < 30
x = 4.5
y = ifelse(pos y < 0, time/7.5, 0)

[State 2000, Sound]
type = PlaySnd
trigger1 = time = 0
value = s100, 0

[State 860, vels]
type = velset
triggerall = time >=31
trigger1 = time < 41
x = 4.5
y = ifelse(pos y < 0,2,0)

[State 860, anim]
type = changeanim
triggerall = time >= 41 &&  time <=80
trigger1 = time = 50
value = 106

[State 860, vels]
type = velset
triggerall = time >= 41
trigger1 = time <= 80
x = 4.5
y = ifelse(Pos Y >= -187,-time*.02,0)

[State 860, 2]
type = ChangeState
Trigger1 = Time > 80
value = 40
ctrl = 1








;----------------------------------
;The jump that doesn't need to exist.  I mean, seriously...  Lavia can fly.
;Why then, would she need a jump?  I don't know, but I'm sure Capcom does.
;Anyway, here's the jump stuff...
[Statedef 900]
type = A
physics = N
anim = 900

[State 900, jumpsnd]
type = playsnd
trigger1 = time = 1
value = s30,0

[State 900, starting vels]
type = velset
triggerall = anim != 920
trigger1 = time >= 1
x = 0
y = -11.4

[State 900, change vels]
type = veladd
triggerall = anim != 920
trigger1 = time >= 1
y = .3*time

[State 900, change vels 2]
type = velset
triggerall = anim = 910
triggerall = anim != 920
trigger1 = vel y >= 8
y = 8

[State 900, changeanim into coming down]
type = changeanim
triggerall = anim != 920
trigger1 = time = 30
value = 910

[State 900, change vels 3]
type = velset
triggerall = anim = 910
trigger1 = pos y >= -5
y = 0

[State 900, changeanim for landing]
type = changeanim
triggerall = anim = 910
trigger1 = pos y >= -5
value = 920

[State 900, Landing Sound]
type = PlaySnd
triggerall = anim = 920
trigger1 = animelem = 1
value = s40, 0

[State 900, back to 0]
type = ChangeState
triggerall = anim = 920
trigger1 = animtime = 0
value = 40

[State 900, vels for left and right]
type = velset
triggerall = anim != 920
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 900, vels for left and right]
type = velset
triggerall = anim != 920
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State -2, turn]
type = turn
trigger1 = P2Dist x <= 0








;--------------------------------------------------------------
; SPECIALS -- INASMUCH THAT ANY MOVE CAN BE "SPECIAL"
;--------------------------------------------------------------

;-----------
;Spin Upper (Weak)
;-----------
[Statedef 1000]
type = S
physics = S
movetype = A
anim = 1000
ctrl = 0
poweradd = 70
juggle = 4
air.juggle = 4

[State 1000, vel]
type = velset
trigger1 = anim = 1000
x = 2
y = ifelse(pos y <= -187, 0,-2)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = s60,0


[State 1000, hitdef]
type = hitdef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
attr=S,NA
damage = 30,5
guardflag = MA
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-1
air.type = High
air.hittime = 17
air.velocity = -3,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1000, hitdef2]
type = hitdef
trigger1 = animelem = 4
attr=S,SA
damage = 30,5
guardflag = M
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-1
air.type = High
air.hittime = 17
air.velocity = -3,-4
fall = 1
air.fall = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

;[State 1000, end]
;type = ChangeState
;trigger1 = animtime = 0
;value = 40

[State 900, changeanim into coming down]
type = changeanim
triggerall = anim = 1000
trigger1 = animtime = 0
value = 911

[State 900, change vels]
type = veladd
triggerall = anim != 920
trigger1 = time >= 1
y = .015*time

[State 900, change vels 3]
type = velset
triggerall = anim = 911
trigger1 = pos y >= -5
y = 0

[State 900, changeanim for landing]
type = changeanim
triggerall = anim = 911
trigger1 = pos y >= -5
value = 920

[State 900, posset]
type = posset
trigger1 = anim = 920
y = 0

[State 900, Landing Sound]
type = PlaySnd
triggerall = anim = 920
trigger1 = animelem = 1
value = s40, 0

[State 900, back to 0]
type = ChangeState
triggerall = anim = 920
trigger1 = 1;animtime = 0
value = 40











[State 810, sparkletest]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7950
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7951
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7952
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)




;-----------
;Spin Upper (Medium)
;-----------
[Statedef 1001]
type = A
physics = S
movetype = A
anim = 1000
ctrl = 0
poweradd = 70
juggle = 4
air.juggle = 4

[State 1001, vel]
type = velset
trigger1 = anim = 1000
x = 2.5
y = ifelse(pos y <= -187, 0,-2.5)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = s60,0



[State 1001, hitdef]
type = hitdef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
attr=S,SA
damage = 36,7
guardflag = MA
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-2
air.type = High
air.hittime = 17
air.velocity = -3,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 10001, hitdef2]
type = hitdef
trigger1 = animelem = 4
attr=S,SA
damage = 36,7
guardflag = M
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-2
air.type = High
air.hittime = 17
air.velocity = -3,-4
fall = 1
air.fall = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

;[State 1000, end]
;type = ChangeState
;trigger1 = animtime = 0
;value = 40

[State 900, changeanim into coming down]
type = changeanim
triggerall = anim = 1000
trigger1 = animtime = 0
value = 911

[State 900, change vels]
type = veladd
triggerall = anim != 920
trigger1 = time >= 1
y = .015*time

[State 900, change vels 3]
type = velset
triggerall = anim = 911
trigger1 = pos y >= -5
y = 0

[State 900, changeanim for landing]
type = changeanim
triggerall = anim = 911
trigger1 = pos y >= -5
value = 920

[State 900, posset]
type = posset
trigger1 = anim = 920
y = 0

[State 900, Landing Sound]
type = PlaySnd
triggerall = anim = 920
trigger1 = animelem = 1
value = s40, 0

[State 900, back to 0]
type = ChangeState
triggerall = anim = 920
trigger1 = 1;animtime = 0
value = 40




[State 810, sparkletest]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7950
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7951
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7952
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
;-----------
;Spin Upper (Heavy)
;-----------
[Statedef 1002]
type = A
physics = S
movetype = A
anim = 1000
ctrl = 0
poweradd = 70
juggle = 4
air.juggle = 4

[State 1002, vel]
type = velset
trigger1 = anim = 1000
x = 3
y = ifelse(pos y <= -187, 0,-3)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = s60,0



[State 1002, hitdef]
type = hitdef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
attr=S,SA
damage = 42,7
guardflag = MA
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-3
air.type = High
air.hittime = 17
air.velocity = -3,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1002, hitdef2]
type = hitdef
trigger1 = animelem = 4
attr=S,SA
damage = 42,7
guardflag = M
hitflag = MAIHF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10,-55
hitsound   = s5,2
guardsound = s6,0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,-3
air.type = High
air.hittime = 17
air.velocity = -3,-4
fall = 1
air.fall = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

;[State 1000, end]
;type = ChangeState
;trigger1 = animtime = 0
;value = 40

[State 900, changeanim into coming down]
type = changeanim
triggerall = anim = 1000
trigger1 = animtime = 0
value = 911

[State 900, change vels]
type = veladd
triggerall = anim != 920
trigger1 = time >= 1
y = .015*time

[State 900, change vels 3]
type = velset
triggerall = anim = 911
trigger1 = pos y >= -5
y = 0

[State 900, changeanim for landing]
type = changeanim
triggerall = anim = 911
trigger1 = pos y >= -5
value = 920

[State 900, posset]
type = posset
trigger1 = anim = 920
y = 0

[State 900, Landing Sound]
type = PlaySnd
triggerall = anim = 920
trigger1 = animelem = 1
value = s40, 0

[State 900, back to 0]
type = ChangeState
triggerall = anim = 920
trigger1 = 1;animtime = 0
value = 40



[State 810, sparkletest]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7950
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

[State 810, sparkletest2]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7951
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)
[State 810, sparkletest3]
type = explod
triggerall = anim = 1000
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
anim = 7952
ID = 7950
sprpriority = 7
pos = -50+(random%125), -20-(random%175)
scale = const(size.xscale),const(size.yscale)

;-----------
;"Luan"cher (all)
;-----------
[Statedef 1100]
type = A
physics = S
movetype = A
anim = 1100
ctrl = 0
poweradd = 70
juggle = 10

[State 1100, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = S,SA
damage = 20,2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = -1;s7030
guard.sparkno = -1;s6767
sparkxy = -10, -130
hitsound   = s5,2
guardsound = s6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = 0,-11
air.type = Low
air.hittime = 25
air.velocity = 0,-11
fall = 1
air.fall = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = s0,2

[State 1100, end]
type = ChangeState
trigger1 = animtime = 0
value = 40


;-----------
;Dodge (a la Melty Blood?)
;-----------
[Statedef 1105]
type = A
physics = N
anim = 1105
ctrl = 0
sprpriority = 1

[State 1105, vel]
type = VelSet
triggerall = anim = 1105
trigger1 = time = 0
x = 0
y = 0

[State 1105, Grab Sound]
type = PlaySnd
trigger1 = time = 1
value = s60, 0


[State 1105, end]
type = ChangeState
trigger1 = time = 40
value = 40


;-----------------------------------
;Feather Attack (Angle 3)

[Statedef 1200]
type = A
physics = S
movetype = A
anim = 1200
ctrl = 0
sprpriority = 1

[State 1200, vels]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 4
value = s0,0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 6
value = s50,0

[State 1200, feather chama 1 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1210
ID = 1210
name = "Feather"
postype = p1
pos = -20,-50
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 2 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1210
ID = 1210
name = "Feather"
postype = p1
pos = -20,-130
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 3 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1210
ID = 1210
name = "Feather"
postype = p1
pos = -60,-90
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 4 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1210
ID = 1210
name = "Feather"
postype = p1
pos = 60,-50
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 5 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1210
ID = 1210
name = "Feather"
postype = p1
pos = 60,-130
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 6 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1210
ID = 1210
name = "Feather"
postype = p1
pos = 100,-90
scale = const(size.xscale),const(size.yscale)
[state 1200, end]
type = changestate
trigger1 = animtime = 0
value = 40



;Feather Attack (Angle 2)

[Statedef 1201]
type = A
physics = S
movetype = A
anim = 1200
ctrl = 0
sprpriority = 1

[State 1201, vels]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 4
value = s0,0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 6
value = s50,0

[State 1200, feather chama 1 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1211
ID = 1211
name = "Feather"
postype = p1
pos = -20,-50
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 2 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1211
ID = 1211
name = "Feather"
postype = p1
pos = -20,-130
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 3 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1211
ID = 1211
name = "Feather"
postype = p1
pos = -60,-90
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 4 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1211
ID = 1211
name = "Feather"
postype = p1
pos = 60,-50
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 5 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1211
ID = 1211
name = "Feather"
postype = p1
pos = 60,-130
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 6 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1211
ID = 1211
name = "Feather"
postype = p1
pos = 100,-90
scale = const(size.xscale),const(size.yscale)

[state 1200, end]
type = changestate
trigger1 = animtime = 0
value = 40




;Feather Attack (Angle 1)

[Statedef 1202]
type = A
physics = S
movetype = A
anim = 1200
ctrl = 0
sprpriority = 1

[State 1202, vels]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 4
value = s0,0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 6
value = s50,0

[State 1200, feather chama 1 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1212
ID = 1212
name = "Feather"
postype = p1
pos = -20,-50
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 2 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1212
ID = 1212
name = "Feather"
postype = p1
pos = -20,-130
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 3 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1212
ID = 1212
name = "Feather"
postype = p1
pos = -60,-90
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 4 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1212
ID = 1212
name = "Feather"
postype = p1
pos = 60,-50
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 5 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1212
ID = 1212
name = "Feather"
postype = p1
pos = 60,-130
scale = const(size.xscale),const(size.yscale)
[State 1200, feather chama 6 of 6]
type = Helper
trigger1 = Animelem = 5
helpertype = normal
stateno = 1212
ID = 1212
name = "Feather"
postype = p1
pos = 100,-90
scale = const(size.xscale),const(size.yscale)
[state 1200, end]
type = changestate
trigger1 = animtime = 0
value = 40


;----
;Feather Helper Angle3
[Statedef 1210]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=1210
poweradd=15
sprpriority=4

[State 1210, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 25,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
sparkxy = 0,0
guard.sparkno = -1;s6767
hitsound = s5,1
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1210, starting vels]
type = velset
triggerall = animelem != 21
triggerall = time < 20
trigger1 = 1
x = 0
y = 0

[State 1210, attack vels]
type = velset
triggerall = time >= 21
trigger1 = 1
x = 6
y = 4

[State 1210, end if hit]
type = destroyself
trigger1 = movehit
trigger2 = time > 100

;----
;Feather Helper Angle2
[Statedef 1211]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=1211
poweradd=15
sprpriority=4

[State 1210, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 25,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
sparkxy = 0,0
guard.sparkno = -1;s6767
hitsound = s5,1
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1210, starting vels]
type = velset
triggerall = animelem != 21
triggerall = time < 20
trigger1 = 1
x = 0
y = 0

[State 1210, attack vels]
type = velset
triggerall = time >= 21
trigger1 = 1
x = 7
y = 3

[State 1210, end if hit]
type = destroyself
trigger1 = movehit
trigger2 = time > 100

;----
;Feather Helper Angle1
[Statedef 1212]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=1212
poweradd=15
sprpriority=4

[State 1210, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 25,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
sparkxy = 0,0
guard.sparkno = -1;s6767
hitsound = s5,1
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1210, starting vels]
type = velset
triggerall = animelem != 21
triggerall = time < 20
trigger1 = 1
x = 0
y = 0

[State 1210, attack vels]
type = velset
triggerall = time >= 21
trigger1 = 1
x = 8
y = 2

[State 1210, end if hit]
type = destroyself
trigger1 = movehit
trigger2 = time > 100


;-----------------------------------------
;Laser (straight)
;-----------------
;version 1
[Statedef 1300]
type = A
physics = S
movetype = A
anim = 1300
ctrl = 0
sprpriority = 4

[State 1300, starting vels... I'm getting tired of calling it that]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,0

[State 1300, fire away]
type=Helper
trigger1 = Animelem = 4
helpertype = normal
stateno = 1310
ID = 1310
name = "Laser Charge"
postype = p1
pos = -5,-12
scale = const(size.xscale),const(size.yscale)
[State 1300, playsnd]
type = playsnd
trigger1 = animelem = 4
value = s70,0

[State 1300, end]
type= ChangeState
trigger1 = time = 40
value = 40



;version 2
[Statedef 1301]
type = A
physics = S
movetype = A
anim = 1300
ctrl = 0
sprpriority = 4

[State 1301]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,0


[State 1301, fire away]
type=Helper
trigger1 = Animelem = 4
helpertype = normal
stateno = 1311
ID = 1311
name = "Laser Charge"
postype = p1
pos = -5,-12
scale = const(size.xscale),const(size.yscale)
[State 1300, playsnd]
type = playsnd
trigger1 = animelem = 4
value = s70,0

[State 1301, end]
type= ChangeState
trigger1 = time = 40
value = 40



;version 3
[Statedef 1302]
type = A
physics = S
movetype = A
anim = 1300
ctrl = 0
sprpriority = 4

[State 1302]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,0

[State 1302, fire away]
type=Helper
trigger1 = Animelem = 4
helpertype = normal
stateno = 1312
ID = 1312
name = "Laser Charge"
postype = p1
pos = -5,-12
scale = const(size.xscale),const(size.yscale)
[State 1300, playsnd]
type = playsnd
trigger1 = animelem = 4
value = s70,0

[State 1302, end]
type= ChangeState
trigger1 = time = 40
value = 40


;-----
;Projectile
[statedef 1310]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=1310
poweradd=15
sprpriority=6

[State 1310, starting vels]
type = velset
trigger1 = 1
x = 0
y = 0

[state 1310, projectile... from a helper]
type = Projectile
trigger1 = animelem = 9
projanim = 1311
projhitanim = 1312
projscale = 0.8333333333333,1.0714285714285
projremovetime = 120
velocity = 4,0
remvelocity = 0,0
accel = 0,0
velmul = 1
projhits = 1
projpriority = 1
projsprpriority = 7
postype = p1
attr = S,NA
damage = 35,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
sparkxy = 85,-80
guard.sparkno = -1;s6767
hitsound = s5,3
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1310, end]
type = destroyself
trigger1= animtime = 0


;-----
;Projectile
[statedef 1311]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=1310
poweradd=15
sprpriority=6

[State 1311, starting vels]
type = velset
trigger1 = 1
x = 0
y = 0

[state 1311, projectile... from a helper]
type = Projectile
trigger1 = animelem = 9
projanim = 1311
projhitanim = 1312
projscale = 0.8333333333333,1.0714285714285
projremovetime = 120
velocity = 8,0
remvelocity = 0,0
accel = 0,0
velmul = 1
projhits = 1
projpriority = 1
projsprpriority = 7
postype = p1
attr = S,NA
damage = 45,3
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
sparkxy = 85,-80
guard.sparkno = -1;s6767
hitsound = s5,3
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1311, end]
type = destroyself
trigger1= animtime = 0


;-----
;Projectile
[statedef 1312]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=1310
poweradd=15
sprpriority=6

[State 1312, starting vels]
type = velset
trigger1 = 1
x = 0
y = 0

[state 1312, projectile... from a helper]
type = Projectile
trigger1 = animelem = 9
projanim = 1311
projhitanim = 1312
projscale = 0.8333333333333,1.0714285714285
projremovetime = 120
velocity = 8,0
remvelocity = 0,0
accel = 0,0
velmul = 1
projhits = 1
projpriority = 1
projsprpriority = 7
postype = p1
attr = S,NA
damage = 55,5
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = -1;s7030
sparkxy = 85,-80
guard.sparkno = -1;s6767
hitsound = s5,3
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7030
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1312, end]
type = destroyself
trigger1= animtime = 0



;------------------------------------------
;Air Push... the lamest move ever
[Statedef 1400]
type = S
physics = N
movetype = A
anim = 1400
ctrl = 0
sprpriority = 4

[State 1400, vels of the beginning]
type = velset
trigger1 = 1
x = 0
y = 0

[State 810, Grab Sound]
type = PlaySnd
trigger1 = time = 1
value = s50, 0

[State 1400, be still!]
type = posfreeze
trigger1 = 1

[State 1400, a5]
type = Helper
triggerall = stateno = 1400
trigger1 = Time = 0
trigger2 = time = 5
trigger3 = time = 10
trigger4 = time = 15
trigger5 = time = 20
trigger6 = time = 25
helpertype = Normal
name = "AirPushHelper"
ID = 1410
postype = P1
pos = -50,0
stateno = 1410
size.height = 150
size.ground.back = 100
size.ground.front = 50
scale = const(size.xscale),const(size.yscale)
[State 1400, end]
type = ChangeState
triggerall = command != "air_start"
trigger1 = animtime = 0
value = 40





[Statedef 1410];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 1410
sprpriority = -4
ID = 1410

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

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = 0

[State 1410, hitdef]
type = hitdef
trigger1 = 1

[State 6350, a2]
type = Velset
trigger1 = 1
x = 2

[State 6350, a6]
type = DestroySelf
trigger1 = parent,anim =0  && parent,time > 10
trigger2 = parent,anim = 40 && parent,time > 10


;---------------------------------------------------------------------------
;Hyper Moves... of which there are only 2
;---------------------------------------------------------------------------
[Statedef 2000]
type = A
physics = N
movetype = A
anim = 2000
ctrl = 0
sprpriority = 4

[State 2000, vels]
type = velset
triggerall = anim = 2000
trigger1 = animelem = 1
x = 0
y = 0

[State 2000, Grab Sound]
type = PlaySnd
trigger1 = time = 0
value = s80, 0


[State 2000, SuperPause]
type = SuperPause
trigger1 = Time = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 0

[State 1500, Hyper Spark]
type = explod
trigger1 = time = 0
anim = 7900
ownpal = 1
sprpriority = 5
postype = p1
pos = 20,-110
supermovetime = 54
scale = const(size.xscale),const(size.yscale)
[State 1621, CFE]
type = Explod
trigger1 = time = 0
anim = 6500
pos = 0,0
sprpriority = -3
postype = front
bindtime = -1
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 66
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 2000, Sound]
type = PlaySnd
trigger1 = animelem = 2
value = s80, 1
channel = 2


[State 2000, groundfire]
type = Explod
trigger1 = animelem = 1
anim = 2100
ID = 2001
pos = 0,-1*(pos y)-30
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 7
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 2000, fireball hitdef helper]
type = Helper
trigger1 = time = 10
helpertype = normal
stateno = 2110
name = "Fireball hitdef"
postype = p1
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 2000, fireball helper_size1]
type = Explod
trigger1 = time = 10
anim = 2110
ID = 2110
postype = p1
pos = 0,0
scale = 1,1
sprpriority = 7
ownpal = 1
removetime = 25
scale = const(size.xscale),const(size.yscale)
[State 2000, fireball helper_size2]
type = Explod
trigger1 = time = 35
anim = 2110
postype = p1
pos = 0,8
scale = 1.1,1.1
sprpriority = 7
ownpal = 1
removetime = 25
scale = const(size.xscale),const(size.yscale)
[State 2000, fireball helper_size3]
type = Explod
trigger1 = time = 60
anim = 2110
postype = p1
pos = 0,17
scale = 1.2,1.2
sprpriority = 7
ownpal = 1
removetime = 25
scale = const(size.xscale),const(size.yscale)
[State 2000, fireball helper_size3]
type = Explod
trigger1 = time = 85
anim = 2110
postype = p1
pos = 0,25
scale = 1.3,1.3
sprpriority = 7
ownpal = 1
removetime = 25; time is now 110
scale = const(size.xscale),const(size.yscale)
[State 2000, Changeanim]
type = changeanim
trigger1 = time = 110
value = 2111

[State 2000, explod fireballend hitdef helper]
type = Helper
trigger1 = time = 110
helpertype = normal
stateno = 2120
name = "Fireballend hitdef"
postype = p1
pos = 0,0
scale = const(size.xscale),const(size.yscale)
[State 2000, changeanim]
type = changeanim
trigger1 = time = 125
value = 2200

[State 2000, Sound2]
type = StopSnd
trigger1 = time >= 125
value = s80, 1
channel = 2

[State 2000, Sound 3]
type = PlaySnd
trigger1 = time = 126
value = s80, 2

[State 2200, hitdef]
type = HitDef
triggerall = anim = 2200
trigger1 = AnimElem = 1
trigger2 = ANimElem = 3
attr = S,NA
damage = 40,8
animtype = Heavy
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 0,6
sparkno=-1;s7800
sparkxy = -10, -53
guard.sparkno = -1;s6767
hitsound = s5,3
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,-2
air.type = High
air.velocity = -1,-2.5
fall = 1
air.fall = 1
fall.recover=0
air.hittime = 25
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7800
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

palfx.time = 25		;50 for last hit
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,25
Palfx.color = 0
palfx.invertall = 1



[State 2000, phoenix vels]
type = velset
triggerall = anim != 2010
trigger1 = time >= 125
x = 5
y = 0

[State 2000, phoenix vels stop]
type = velset
trigger1 = time = 220
x = 0
y = 0

[State 2000, changeanim final]
type = Changeanim
trigger1 = time = 220
value = 2010

[State 2000, back to normal]
type = ChangeState
triggerall = anim = 2010
trigger1 = animtime = 0
value = 40


;------------
[Statedef 2110]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=21101
poweradd=15
sprpriority=6

[State 2110, vels]
type = velset
trigger1 = 1
x = 0
y = 0

[State 2110, hitdef]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 3
trigger3 = animelem = 5
trigger4 = animelem = 7
trigger5 = animelem = 9
trigger6 = animelem = 11
trigger7 = animelem = 13
trigger8 = animelem = 15
trigger9 = animelem = 17
trigger10 = animelem = 19
attr = S,NA
damage = 10,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = -1;s7800
sparkxy = 0,-100
guard.sparkno = -1;s6767
hitsound = s5,1
guardsound = s6,0
ground.type = High
ground.slidetime = 0;15
ground.hittime  = 25
ground.velocity = 0,0
air.type = Low
air.hittime = 15
air.velocity = 0,-2
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7800
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

palfx.time = 25		;50 for last hit
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,25
Palfx.color = 0
palfx.invertall = 1

[State 2110, bind]
type = bindtoparent
trigger1 = 1


[State 2110, die]
type = destroyself
trigger1 = time = 100

;-------

[Statedef 2120]
type = C
movetype=H
physics=C
juggle=6
ctrl=0
anim=2120
poweradd=15
sprpriority=6

[State 2120, vels]
type = velset
trigger1 = 1
x = 0
y = 0

[State 2110, hitdef]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
attr = S,NA
damage = 10,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = -1;s7800
sparkxy = 0,-100
guard.sparkno = -1;s6767
hitsound = s5,1
guardsound = s6,0
ground.type = High
ground.slidetime = 0;15
ground.hittime  = 25
ground.velocity = 0,0
air.type = Low
air.hittime = 15
air.velocity = 0,-2
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7800
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

palfx.time = 25		;50 for last hit
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,25
Palfx.color = 0
palfx.invertall = 1

[State 2120, bind]
type = bindtoparent
trigger1 = 1


[State 2120, die]
type = destroyself
trigger1 = time = 15

;-------------
;Phoenix Flier
;-------------
[Statedef 2500]
type = A
physics = N
movetype = A
anim = 2000
ctrl = 0
sprpriority = 4

[State 2000, vels]
type = velset
triggerall = anim = 2000
trigger1 = animelem = 1
x = 0
y = 0

[State 2000, Grab Sound]
type = PlaySnd
trigger1 = time = 0
value = s80, 0

[State 2000, Grab Sound]
type = PlaySnd
trigger1 = animelem = 2
value = s80, 1
channel = 2

[State 2000, SuperPause]
type = SuperPause
trigger1 = Time = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 0

[State 1500, Hyper Spark]
type = explod
trigger1 = time = 0
anim = 7900
ownpal = 1
sprpriority = 5
postype = p1
pos = 20,-110
supermovetime = 54
scale = const(size.xscale),const(size.yscale)
[State 1621, CFE]
type = Explod
trigger1 = time = 0
anim = 6500
pos = 0,0
sprpriority = -3
postype = front
bindtime = -1
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 66
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 2000, groundfire]
type = Explod
trigger1 = animelem = 1
anim = 2100
ID = 2001
pos = 0,-1*(pos y)-30
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 7
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 2000, fireball hitdef helper]
type = Helper
trigger1 = time = 10
helpertype = normal
stateno = 2110
name = "Fireball hitdef"
postype = p1
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 2000, fireball helper_size1]
type = Explod
trigger1 = time = 10
anim = 2110
ID = 2110
postype = p1
pos = 0,0
scale = 1,1
sprpriority = 7
ownpal = 1
removetime = 25
scale = const(size.xscale),const(size.yscale)
[State 2000, fireball helper_size2]
type = Explod
trigger1 = time = 35
anim = 2110
postype = p1
pos = 0,8
scale = 0.5,0.5
sprpriority = 7
ownpal = 1
removetime = 25

[State 2000, fireball helper_size3]
type = Explod
trigger1 = time = 60
anim = 2110
postype = p1
pos = 0,17
scale = 0.6,0.6
sprpriority = 7
ownpal = 1
removetime = 25

[State 2000, fireball helper_size3]
type = Explod
trigger1 = time = 85
anim = 2110
postype = p1
pos = 0,25
scale = 0.65,0.65
sprpriority = 7
ownpal = 1
removetime = 25; time is now 110

[State 2000, Changeanim]
type = changeanim
trigger1 = time = 110
value = 2111

[State 2000, explod fireballend hitdef helper]
type = Helper
trigger1 = time = 110
helpertype = normal
stateno = 2120
name = "Fireballend hitdef"
postype = p1
pos = 0,0
scale = const(size.xscale),const(size.yscale)
[State 2000, changeanim]
type = changeanim
trigger1 = time = 125
value = 2210

[State 2000, Sound2]
type = StopSnd
trigger1 = time >= 125
value = s80, 1
channel = 2

[State 2000, Sound 3]
type = PlaySnd
trigger1 = time = 126
value = s80, 2

[State 2200, hitdef]
type = HitDef
triggerall = anim = 2210
trigger1 = AnimElem = 1
trigger2 = ANimElem = 3
attr = S,NA
damage = 40,8
animtype = Heavy
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 0,6
sparkno=-1;s7800
sparkxy = -10, -53
guard.sparkno = -1;s6767
hitsound = s5,3
guardsound = s6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,-3
air.type = High
air.velocity = -1,-3.5
fall = 1
air.fall = 1
fall.recover=0
air.hittime = 25
envshake.time = 1
envshake.ampl = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7800
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 6767
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

palfx.time = 25		;50 for last hit
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,25
Palfx.color = 0
palfx.invertall = 1



[State 2000, phoenix vels]
type = velset
triggerall = anim != 2010
trigger1 = time >= 125
x = 5
y = ifelse(pos y <= -187, 0, -2)

[State 2000, phoenix vels stop]
type = velset
trigger1 = time = 220
x = 0
y = 0

[State 2000, changeanim final]
type = Changeanim
trigger1 = time = 220
value = 2010

[State 2000, back to normal]
type = ChangeState
triggerall = anim = 2010
trigger1 = animtime = 0
value = 40


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Light Ouch]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5001 && anim != 5011 && anim != 5002 && anim !=5012
trigger2 = stateno = 5010
trigger2 = anim != 5021 && anim != 5022
value = 500,0
channel = 0
ignorehitpause = 1

[State -3, Medium & Hard Ouch]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 6
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 500,0
channel = 0
ignorehitpause = 1








