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

[Data]
life = 1000			;Amount of life to start with
power = 3000		;Amount of maximum power
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 = 60		;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 = 0			;Volume offset (negative for softer)
IntPersistIndex = 45,47	;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 = 0.335			;Horizontal scaling factor.
yscale = 0.335			;Vertical scaling factor.
ground.back = 18		;Player width (back, ground)
ground.front = 18		;Player width (front, ground)
air.back = 18		;Player width (back, air)
air.front = 18		;Player width (front, air)
height = 60			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 60	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = -5, -112	;Approximate position of head
mid.pos = -5, -78		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2		;Walk forward
walk.back = -1.5		;Walk backward
run.fwd  = 9, 0		;Run forward (x, y)
run.back = -5.5,0	;Hop backward (x, y)
jump.neu = 0,-10.8		;Neutral jumping velocity (x, y)
jump.back = -2.5		;Jump back Speed (x, y)
jump.fwd = 3.1		;Jump forward Speed (x, y)
runjump.back = -5,-10.8;Running jump speeds (opt)
runjump.fwd = 6.2,-10.8	;.
airjump.neu = 0,-9.8	;.
airjump.back = -2.5	;Air jump speeds (opt)
airjump.fwd = 3.1		;.

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

[Quotes]
Victory1 = "Fighting game training has just begun! Clear the game today! No excuses!"
Victory2 = "I did it! Kiririn for the win! Say, how does it feel? How does it feel to be clobbered by me?"
Victory3 = "Heh heh! You totally moe'd out, huh?"
Victory4 = "Hahaaaa! I won! Heh heh! I'm awesome! I rock! Hahaha!"
Victory5 = "Whew, that was a close call. If I had gotten hurt, you-know-who would be so worried..."
Victory6 = "Unfulfilled dreams lead to despair... That's a tough life consultation there!"
Victory7 = "Hopes, dreams... It's almost as if those words were created with me in mind!"
Victory8 = "But I finally made it to the 2D world! What is this!? I can't believe it!"

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

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

[State 170, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S170,0+Random%2
Channel = 0

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

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

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

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

[State 181, Helper]
type = Helper
trigger1 = AnimElem = 1
stateno = 6004
ID = 181
Name = "Speech"
postype = left
facing = 1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
persistent = 0
Helpertype = Normal
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 181, PlaySnd]
type = PlaySnd
trigger1 = Anim = 180
trigger1 = AnimElem = 1
value = S180,0
Channel = 0

[State 181, PlaySnd]
type = PlaySnd
trigger1 = Anim = 181
trigger1 = AnimElem = 1
value = S180,1+Random%3
Channel = 0

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

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, PlaySnd]
type = PlaySnd
trigger1 = Anim = 190
trigger1 = Time = 1
value = S190,0+Random%3
Channel = 0

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

[State 190, ChangeState]
type = ChangeState
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Shana_K"
trigger1 = Time = 0
value = 192

[State 190, ChangeState]
type = ChangeState
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Rentaro_K"
trigger1 = Time = 0
value = 193

[State 190, ChangeState]
type = ChangeState
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Miyuki_K"
trigger1 = Time = 0
value = 194

[State 190, ChangeState]
type = ChangeState
trigger1 = Time >= 180
trigger1 = Anim = 190
value = 191
ctrl = 0

[StateDef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0
sprpriority = 2

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 191, ChangeState]
type = ChangeState
trigger1 = Animtime = 0
value = 0

[StateDef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0
sprpriority = 2

[State 192, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S191,0
Channel = 0

[State 192, ChangeState]
type = ChangeState
trigger1 = Time >= 270
value = 191
ctrl = 0

[StateDef 193]
type = S
ctrl = 0
anim = 192
velset = 0,0
sprpriority = 2

[State 193, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 193, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S191,2
Channel = 0

[State 193, ChangeState]
type = ChangeState
trigger1 = Time >= 320
value = 191
ctrl = 0

[StateDef 194]
type = S
ctrl = 0
anim = 190
velset = 0,0
sprpriority = 2

[State 193, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

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

[State 193, ChangeState]
type = ChangeState
trigger1 = Time >= 420
value = 191
ctrl = 0

;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[StateDef 195]
type = C
movetype = A
physics = N
ctrl = 0
anim = 195
sprpriority = 2
VelSet = 0,0

[State 195, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0 
trigger1 = AnimElemTime(7) < 0
StateType = A

[State 195, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
StateType = S

[State 195, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S195,0+Random%4

[State 195, VelSet]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = 2
y = -7

[State 195, VelAdd]
type = Veladd
trigger1 = AnimElemTime(5) >= 0 
trigger1 = AnimElemTime(7) < 0
y = 0.65

[State 195, VelSet]
type = VelSet
trigger1 = AnimElemTime(7) >= 0
x = 0
y = 0

[State 195, PosSet]
type = PosSet
trigger1 = AnimElemTime(7) = 0
y = 0

[State 195, Explod]
type = Explod
trigger1 = AnimElem = 7
anim = 8020
sprpriority = -3
postype = p1
scale= 0.5,0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 195, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,0

[State 195, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S40,0

[State 195, Helper]
type = Helper
trigger1 = AnimElem = 3
helpertype = Normal
name = "Box"
pos = 0,0
stateno = 196
ID = 196
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 195, Helper]
type = Helper
trigger1 = AnimElem = 5
helpertype = Normal
name = "Lol"
pos = 0,0
stateno = 197
ID = 197
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 195, Helper]
type = Helper
trigger1 = AnimElem = 5
helpertype = Normal
name = "Lol"
pos = 15,0
stateno = 197
ID = 198
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 195, Helper]
type = Helper
trigger1 = AnimElem = 5
helpertype = Normal
name = "Lol"
pos = 30,0
stateno = 197
ID = 199
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 195, HitDef]
type = HitDef
trigger1 = AnimElem = 5
damage = 20
attr = S,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 10,12
priority = 5,Hit
sparkno = -1+(0*(var(41) := 8050))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -75))
hitsound = S200,0
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -.5,-14
guard.velocity = -8
air.velocity = -.5,-14
yaccel = 0.65
fall = 1
fall.recover = 1
fall.recovertime = 30

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

[StateDef 196]
Type = A
Physics = N
MoveType = I
Anim = 296
ctrl = 0
velset = 0,0
sprpriority = 3

[State 196, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H
trigger2 = Root,StaTeno != 195

[StateDef 197]
Type = A
Physics = N
MoveType = I
ctrl = 0
velset = 0,0
sprpriority = 5

[State 197, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 197, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = IfElse(Facing = 1,297+Random%6,303+Random%6)

[State 197, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(197)
scale = 1,1

[State 197, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(198)
scale = 1.25,1.25

[State 197, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(199)
scale = 0.75,0.75

[State 197, AngleSet]
type = AngleSet
trigger1 = Time = 0
trigger1 = IsHelper(197)
value = 75+Random%10

[State 197, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(198)
value = (112+Random%4)-18

[State 197, AngleSet]
type = AngleSet
trigger1 = Time = 0 
trigger1 = IsHelper(199)
value = (112+Random%4)-38

[State 197, PosAdd]
type = PosAdd
trigger1 = IsHelper(197)
trigger1 = Time <= 9
trigger1 = Root,HitPausetime = 0
x = IfElse(Time%2 = 0,1,0)
y = -IfElse(Time = 9,1,2)

[State 197, PosAdd]
type = PosAdd
trigger1 = IsHelper(198)
trigger1 = Time <= 9
trigger1 = Root,HitPauseTime = 0
x = 1
y = -IfElse(Time = 9,1,2)

[State 197, PosAdd]
type = PosAdd
trigger1 = IsHelper(199) 
trigger1 = Time <= 9
trigger1 = Root,HitPauseTime = 0
x = 1
y = -1

[State 197, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H
trigger2 = Root,StaTeno != 195
trigger3 = Time >= 12

;---------------------------------------------------------------------------
; 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
;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)
sprpriority = 2			;Set layering priority to 2 (in front)
facep2 = 1

[State 200, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+random%5
channel = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,0

[State 200, HitDef]
type = HitDef
trigger1 = AnimElem = 2
damage = IfElse(Var(26),17,14)
attr = S,NA
guardflag = MA
hitflag = MAF
pausetime = 8,10
priority = 4,Hit
sparkno = -1+(0*(var(41) := 8050))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -30))
hitsound = S200,0
guardsound = S300,0
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -7
air.velocity = -1.5,-6.5
yaccel =.65
air.fall = 1
fall.recover = 1
fall.recovertime = 14
getpower = 20

[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
ctrl = 0
velset = 0,0
anim = 210
facep2 = 1

[State 210, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,1

[State 210, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 700
trigger1 = time = 1
value = S410,0+random%8
channel = 0

[State 210, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 211
ID = 211
pos = -20,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 3
damage = IfElse(Var(26),25,21)
attr = S,NA
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 8,10
priority = 4,Hit
hitsound = S200,1
guardsound = S300,0
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -65))
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 16
envshake.time = 9
envshake.ampl = 2
getPower = 30,20

[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
ctrl = 0
velset = 0,0
anim = 220
facep2 = 1

[State 220, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveHit = 1
v = 45
value = 5

[State 220, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveGuarded = 1
v = 45
value = 3

[State 220, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(6) < 0
statetype = A

[State 220, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
statetype = S

[State 220, VelSet]
type = VelSet
trigger1 = (AnimElemTime(2) >= 0 && AnimElemTime(6) < 0) || AnimElem = 7
x = IfElse(AnimElemTime(6) < 0,5.3,0)

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 0
anim = 221
ID = 221
postype = p1
pos = -55,-68
scale = 0.3,0.3
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 0
anim = 221
ID = 221
postype = p1
pos = -14,-78
scale = 0.35,0.35
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 0
anim = 221
ID = 221
postype = p1
pos = 27,-97
scale = 0.45,0.45
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 2
anim = 221
ID = 221
postype = p1
pos = 57,-115
scale = 0.4,0.4
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 2
anim = 221
ID = 221
postype = p1
pos = 86,-140
scale = 0.31,0.31
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 0
anim = 221
ID = 221
postype = p1
pos = 75,-158
scale = 0.25,0.25
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 4
anim = 221
ID = 221
postype = p1
pos = 29,-81
scale = 0.3,0.3
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 4
anim = 221
ID = 221
postype = p1
pos = 66,-95
scale = 0.26,0.26
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 6
anim = 221
ID = 221
postype = p1
pos = -38,-59
scale = 0.27,0.27
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 6
anim = 221
ID = 221
postype = p1
pos = -75,-55
scale = 0.26,0.26
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 8
anim = 221
ID = 221
postype = p1
pos = 20,-71
scale = 0.34,0.34
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 8
anim = 221
ID = 221
postype = p1
pos = -8,-113
scale = 0.34,0.34
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 8
anim = 221
ID = 221
postype = p1
pos = 22,-141
scale = 0.34,0.34
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = -28,-82
scale = 0.32,0.32
sprpriority = 1
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = 43,-104
scale = 0.34,0.34
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = 90,-95
scale = 0.24,0.24
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = 68,-74
scale = 0.38,0.38
sprpriority = 1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = 56,-54
scale = 0.35,0.35
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0 

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = 43,-28
scale = 0.4,0.4
sprpriority = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = 12,-16
scale = 0.36,0.36
sprpriority = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = -9,-17
scale = 0.38,0.38
sprpriority = 1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, Explod]
type = Explod
trigger1 = AnimElemTime(3) = 12
anim = 221
ID = 221
postype = p1
pos = -31,-14
scale = 0.38,0.38
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 220, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 700
trigger1 = time = 1
value = S420,0+random%2
channel = 0

[State 220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,9

[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
damage = IfElse(Var(26),14,12)
attr = S,NA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 5,10
priority = 4,Hit
hitsound = S200,2
guardsound = S300,0
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -65))
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -5
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 18
getpower = 15
envshake.time = 9
envshake.ampl = 3

[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 8
damage = IfElse(Var(26),18,15)
attr = S,NA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 11,12
priority = 4,Hit
hitsound = S200,2
guardsound = S300,0
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -65))
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -8
guard.velocity = -10
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 18
getpower = 20
envshake.time = 9
envshake.ampl = 3

[State 220, 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
ctrl = 0
anim = 400
facep2 = 1

[State 400, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,0

[State 400, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+random%5
channel = 0

[State 400, HitDef]
type = HitDef
trigger1= AnimElem = 2
damage = IfElse(Var(26),17,14)
attr = C,NA
guardflag = L
hitflag = MAF
pausetime = 7,8
priority = 4,Hit
sparkno = -1+(0*(var(41) := 8050))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -15))
hitsound = S200,0
guardsound = S300,0
ground.type = low
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -6.5
air.velocity = -1.5,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 14
getpower = 20
givepower = 15

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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
ctrl = 0
anim = 410
facep2 = 1

[State 410, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,1

[State 410, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 700
trigger1 = time = 1
value = S410,0+random%8
channel = 0

[State 410, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 411
ID = 411
pos = 0,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 410, HitDef]
type = HitDef
trigger1 = AnimElem = 3
damage = IfElse(Var(26),26,22)
attr = C,NA
animtype = medium
guardflag = L
hitflag = MAF
pausetime = 8,10
priority = 4,Hit
hitsound = S200,1
guardsound = S300,0
sparkno = -1+(0*(var(41) := 8051))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -30))
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
guard.velocity = -8.5
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 16
getpower = 35
givepower = 15
envshake.time = 9
envshake.ampl = 2

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

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
VelSet = 0,0
ctrl = 0
anim = 420
facep2 = 1

[State 420, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 700
trigger1 = time = 1
value = S420,2+random%4
channel = 0

[State 420, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,9

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 0
anim = 221
ID = 421
postype = p1
pos=floor(-68*(fvar(32)-.33)),floor(-65*(fvar(33)-.33))
scale=.46*(fvar(32)-.33),.46*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 0
anim = 221
ID = 421
postype = p1
pos=floor(-46*(fvar(32)-.33)),floor(-79*(fvar(33)-.33))
scale=.32*(fvar(32)-.33),.32*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 0
anim = 221
ID = 421
postype = p1
pos=floor(20*(fvar(32)-.33)),floor(-80*(fvar(33)-.33))
scale=.3*(fvar(32)-.33),.3*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 2
anim = 221
ID = 421
postype = p1
pos=floor(-89*(fvar(32)-.33)),floor(-55*(fvar(33)-.33))
scale=.38*(fvar(32)-.33),.38*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 2
anim = 221
ID = 421
postype = p1
pos=floor(-75*(fvar(32)-.33)),floor(-40*(fvar(33)-.33))
scale=.24*(fvar(32)-.33),.24*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
facing = -1
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 4
anim = 221
ID = 421
postype = p1
pos=floor(-65*(fvar(32)-.33)),floor(-29*(fvar(33)-.33))
scale=.22*(fvar(32)-.33),.22*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 4
anim = 221
ID = 421
postype = p1
pos=floor(-95*(fvar(32)-.33)),floor(-70*(fvar(33)-.33))
scale=.23*(fvar(32)-.33),.23*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 6
anim = 221
ID = 421
postype = p1
pos=floor(-24*(fvar(32)-.33)),floor(-19*(fvar(33)-.33))
scale=.26*(fvar(32)-.33),.26*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 6
anim = 221
ID = 421
postype = p1
pos=floor(-3*(fvar(32)-.33)),floor(-68*(fvar(33)-.33))
scale=.24*(fvar(32)-.33),.24*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 10
anim = 221
ID = 421
postype = p1
pos=floor(70*(fvar(32)-.33)),floor(-106*(fvar(33)-.33))
scale=.47*(fvar(32)-.33),.47*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 10
anim = 221
ID = 421
postype = p1
pos=floor(140*(fvar(32)-.33)),floor(-86*(fvar(33)-.33))
scale=.49*(fvar(32)-.33),.49*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 10
anim = 221
ID = 421
postype = p1
pos=floor(178*(fvar(32)-.33)),floor(-72*(fvar(33)-.33))
scale=.64*(fvar(32)-.33),.64*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 10
anim = 221
ID = 421
postype = p1
pos=floor(199*(fvar(32)-.33)),floor(-27*(fvar(33)-.33))
scale=.6*(fvar(32)-.33),.6*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 12
anim = 221
ID = 421
postype = p1
pos=floor(169*(fvar(32)-.33)),floor(-83*(fvar(33)-.33))
scale=.34*(fvar(32)-.33),.34*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 12
anim = 221
ID = 421
postype = p1
pos=floor(105*(fvar(32)-.33)),floor(-101*(fvar(33)-.33))
scale=.62*(fvar(32)-.33),.62*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 12
anim = 221
ID = 421
postype = p1
pos=floor(47*(fvar(32)-.33)),floor(-96*(fvar(33)-.33))
scale=.35*(fvar(32)-.33),.35*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 12
anim = 221
ID = 421
postype = p1
pos=floor(22*(fvar(32)-.33)),floor(-107*(fvar(33)-.33))
scale=.66*(fvar(32)-.33),.66*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, Explod]
type = Explod
trigger1 = AnimElemTime(1) = 12
anim = 221
ID = 421
postype = p1
pos=floor(-22*(fvar(32)-.33)),floor(-97*(fvar(33)-.33))
scale=.64*(fvar(32)-.33),.64*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 420, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = C,NA
animtype  = Hard
damage = IfElse(Var(26),37,31)
hitflag = MAF
guardflag = L
pausetime = 12,14
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -45))
hitsound = S200,2
guardsound = S300,0
ground.type = high
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -1.5,-7.5
guard.velocity = -6.5
air.velocity = -1.5,-7.5
fall = 1
fall.recover = 1
getpower = 45
givepower = 15
envshake.time = 9
envshake.ampl = 2
fall.recovertime = 30

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

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

[State 600, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,0

[State 600, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 650
trigger1 = time = 1
value = S400,0+random%5
channel = 0

[State 600, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 601
ID = 601
pos = 0,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 600, HitDef]
type = HitDef
trigger1 = AnimElem = 2
damage = IfElse(Var(26),18,15)
attr = A,NA
guardflag = HA
hitflag = MAF
pausetime = 6,8
priority = 4,Hit
hitsound = S200,0
guardsound = S300,0
sparkno = -1+(0*(var(41) := 8050))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -70))
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -5
guard.velocity = -7
air.velocity = -1.5,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 14
getpower = 25

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

;---------------------------------------------------------------------------
; Jump Medium Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 610

[State 610, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,1

[State 610, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 700
trigger1 = time = 1
value = S410,0+random%8
channel = 0

[State 610, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 611
ID = 611
pos = 0,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 610, HitDef]
type = HitDef
trigger1 = AnimElem = 3
damage = IfElse(Var(26),37,28)
attr = A,NA
animtype = medium
guardflag = HA
hitflag = MAF
pausetime = 8,10
priority = 4,Hit
hitsound = S200,2
guardsound = S300,0
sparkno = -1+(0*(var(41) := 8051))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -40))
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -6
guard.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 18
getpower = 35
envshake.time = 9
envshake.ampl = 2

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

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

[State 620, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,2

[State 620, PlaySnd]
type = PlaySnd
triggerall = MoveType != H && Random < 700
trigger1 = time = 1
value = S420,2+random%4
channel = 0

[State 620, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 621
ID = 621
pos = 0,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 620, HitDef]
type = HitDef
trigger1 = AnimElem = 4
damage = IfElse(Var(26),50,42)
attr = A,NA
animtype = Hard
guardflag = HA
hitflag = MAF
pausetime = 10,13
priority = 4,Hit
HitSound = S200,2
GuardSound = S300,0
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -67))
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -8
guard.velocity = -10
air.velocity = -2.5,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 20
GetPower = 50
envshake.time = 9
envshake.ampl = 3

[State 620, 5]
type = CtrlSet
trigger1 = Time = 26
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

[State 800, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S810,0+random%3
channel = 0

; 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 = AnimElem = 2
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
hitsound = S800,3
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
numhits = 0

[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
velset = 0,0

[State 810, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = MoveHit = 1
v = 45
value = 12

[State 810, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = MoveGuarded = 1
v = 45
value = 6

[State 810, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = MoveContact = 1
v = 45
value = -15

[State 810, TargetBind]
type = TargetBind
trigger1 = time = 0
pos = 35

[State 810, PlaySnd]
type = playsnd
trigger1 = AnimElem = 4
value = S100,2

[State 810, PlaySnd]
type = playsnd
trigger1 = AnimElem = 4
value = S800,0+Random%3
Channel = 0

[State 810, Helper]
type = Helper
trigger1 = Time = 25
helpertype = Normal
name = "Slap"
pos = 60,-85
stateno = 811
ID = 811
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 810, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
animtype  = Hard
damage = 50
hitflag = MAF
guardflag =
pausetime = 0,10
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -75))
hitsound = S200,2
guardsound = S300,0
ground.type = high
ground.slidetime = 11
ground.hittime = 11
ground.velocity = -5,-6.4
air.velocity = -5,-6.4
fall = 1
fall.recover = 0
yaccel = 0.55
envshake.time = 9
envshake.ampl = 2

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

[StateDef 811]
type = A
movetype = I
physics = N
anim = 801
ctrl = 0
sprpriority = 3

[State 811, VarAdd]
type = VarAdd
trigger1 = Time = [12,18]
fvar(3) = 0.08

[State 811, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 811, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 811, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2+FVar(3),2.5+FVar(3)

[State 811, AngleSet]
type = AngleSet
trigger1 = time = 0
value = -43

[State 811, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = IsHelper(811)
trigger2 = Root,StateNo != 810
trigger3 = IsHelper(951)
trigger3 = Root,StateNo != 951

;---------------------------------------------------------------------------
; 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    = S
movetype= H
physics = N
velset = 0,0

[State 820, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

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

[StateDef 950]
Type = S
MoveType = A
Physics = N
VelSet = 0,0
Anim = 950
ctrl = 0

[State 950, VarRandom]
type = Varrandom
trigger1 = Time = 0
v = 0
range = 0,2

[State 950, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
v = 45
Value = -100

[State 950, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 0
trigger1 = time = 0
value = -1000

[state 950, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 950, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Var(0) = 0
value = S950,0
channel = 0

[State 950, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Var(0) = 1
value = S950,2
channel = 0

[State 950, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Var(0) = 2
value = S950,4
channel = 0

[State 950, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S10000,4

[State 950, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S100,2

[State 950, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 20
movetime = 20
anim = -1
sound = -1
pos = 0,0
p2defmul = 1
poweradd = 0
darken = 0
unhittable = 1

[State 950, Helper]
type = Helper
trigger1 = Time = 0
Helpertype = normal
StateNo = 953
ID = 953
name = "Guard_Counter"
postype = p1
pos = ceil(-15 * const(size.xscale)), ceil(-75 * const(size.yscale))
supermovetime = 9999
pausemovetime = 9999
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 950, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 14

[State 950, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 950, HitDef]
type = HitDef
trigger1 = AnimElem = 2
damage = 0
attr = S,ST
hitflag = MA 
priority = 1,Miss
sparkno = -1+(0*(var(41) := 8054))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := ceil(enemy,Pos Y-75)))
hitsound = S200,2
guardsound = S300,0
sprpriority = 1
pausetime = 0,13
ground.velocity = -3,-9
air.velocity = -3,-9
fall = 1
fall.recover = 0
yaccel = 0.8
getpower = 0,0
guard.dist = 0
hitonce = 1
p1facing = 1
p2facing = 1
p1stateno = 951
p2stateno = 952
kill = 0
envshake.time = 10
envshake.ampl = 3
forcenofall = 1

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

[StateDef 951]
type = S
movetype = A
physics = N
ctrl = 0
anim = 951
sprpriority = 2
velset = 0,0

[State 951, Width]
type = Width
trigger1 = AnimElem = 1 
trigger1 = FrontEdgeBodyDist <= 60
edge = 80,0

[State 951, TargetBind]
type = TargetBind
trigger1 = Time = 0
pos = Floor(40*FVar(32)),0

[State 951, EnvShake]
type = EnvShake
trigger1 = AnimElem = 13
time = 20
freq = 160
ampl = -4

[State 951, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 13
trigger1 = Var(0) = 0
value = S950,1
channel = 0

[State 951, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 13
trigger1 = Var(0) = 1
value = S950,3
channel = 0

[State 951, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 13
trigger1 = Var(0) = 2
value = S950,5
channel = 0

[State 950, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S40,1

[State 950, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 10
value = S40,0

[State 951, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 13
value = S100,2

[State 950, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 13
value = S200,8

[State 951, VelSet]
type = VelSet
trigger1 = AnimElem = 7
x = 4
y = -5

[State 951, VelAdd]
type = Veladd
trigger1 = AnimElemtime(6) >= 0 
trigger1 = AnimElemTime(10) < 0
y = 0.65

[State 951, VelSet]
type = VelSet
trigger1 = AnimElem = 10
x = 0
y = 0

[State 951, PosSet]
type = PosSet
trigger1 = AnimElem = 10
y = 0

[State 951, PosAdd]
type = PosAdd
trigger1 = AnimElem = 10
x = 20

[State 951, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 13
value = -100

[State 951, Helper]
type = Helper
trigger1 = AnimElem = 13
helpertype = Normal
name = "Slap"
pos = 60,-25
stateno = 811
ID = 951
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 951, Helper]
type = Helper
trigger1 = AnimElem = 13
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X + 40) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 22)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 951, Helper]
type = Helper
trigger1 = AnimElem = 13
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X + 40) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 22)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

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

[StateDef 952]
type = S
movetype = H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0

[State 952, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 955

[State 952, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = -2
y = -5

[State 952, VelAdd]
type = Veladd
trigger1 = AnimElemTime(2) >= 0 
trigger1 = AnimElemTime(6) < 0 
y = 0.65

[State 952, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0
y = 0

[State 952, PosSet]
type = PosSet
trigger1 = Time = 0
trigger2 = AnimElem = 6
y = 0

[State 952, PosAdd]
type=Posadd
trigger1 = AnimElem = 10
x = -35

[State 952, SelfState]
type = SelfState
trigger1 = ((AnimTime = 0 && Anim = 952) || Time = 140) && Alive = 0
value = 5150

[State 952, SelfState]
type = SelfState
trigger1 = (AnimTime = 0 && Anim = 952) || Time = 140
value = 5120

[StateDef 953]
Type = A
Physics = N
MoveType = I
Anim = 99999
ctrl = 0
velset = 0,0

[State 953, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 1
color= 16*time
mul = 16*time, 16*time, 16*time

[State 953, Explod]
type = Explod
trigger1 = Time = 0
Anim = 953
ID = 953
sprpriority = 3
postype = p1
pos = 0,-53
removetime = 16
supermovetime = -1
ownpal = 1

[State 953, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(953)
ID = 953
scale = (.0625*time), (.0625*time)
trans = addalpha
alpha = 256-(16*time), 256

[State 953, Explod]
type = Explod
trigger1 = time = 0
anim = 954
ID = 954
sprpriority = -2
postype = p1
pos = 0,-ceil(pos y)
supermovetime = -1
ownpal = 1

[State 953, DestroySelf]
type = DestroySelf
trigger1= time >= 16

[StateDef 954]
type = S
movetype = H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0

[State 954, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 952

[State 954, PosAdd]
type=Posadd
trigger1 = AnimElem = 8
x = -35

[State 954, SelfState]
type = SelfState
trigger1 = ((AnimTime = 0 && Anim = 952) || Time = 140) && Alive = 0
value = 5150

[State 954, SelfState]
type = SelfState
trigger1 = (AnimTime = 0 && Anim = 952) || Time = 140
value = 5120

[StateDef 1000]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1000
poweradd = 65
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1000, Helper]
type = Helper
trigger1 = AnimElem = 4
helpertype = normal
stateno = 8030
ID = 8030
name = "Dash Dust"
postype = p1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S100,7

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1000,0
Channel = 0

[State 1000, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) >= 0
x = 11

[State 1000, HitDef]
type = HitDef
trigger1 = !MoveContact
damage = IfElse(Var(26),71,59),6
attr = S,SA
animtype = hard
guardflag = MA
hitflag = MAFD
pausetime = 9,12
priority = 5,Hit
sparkno = -1+(0*(var(41) := 8054))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -65))
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -5,-7.5
air.velocity = -5,-6.5
yaccel = 0.65
fall = 1
fall.recover = 1
fall.recovertime = 18
envshake.time = 9
envshake.ampl = 3

[State 1000, ChangeState]
type = ChangeState
trigger1 = Time >= 32
trigger2 = AnimElemTime(IfElse(MoveContact,3,6)) >= 1 && (Command = "x" || Command = "hold_x")
value = 1001

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(IfElse(MoveContact,3,6)) >= 1 && (Command = "y" || Command = "hold_y")
value = 1010

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(IfElse(MoveContact,3,6)) >= 1 && (Command = "z" || Command = "hold_z")
value = 1020

[StateDef 1001]
type = S
movetype = I
physics = N
anim = 1001
sprpriority = 1
ctrl = 0

[State 1001, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal
stateno = 8030
ID = 8030
name = "Dash Dust"
postype = p1
pos = 20,0
facing = -1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 1001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,6

[State 1001, VelSet]
type = VelSet
trigger1 = Time <= 20
x = 1

[State 1001, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 1001, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[StateDef 1010]
type = S
movetype = A
physics = N
anim = 1010
ctrl = 0
poweradd = 65
sprpriority = 2
velset = 0,0

[State 1010, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo = 1000
trigger1 = Time = 0 
value = 1010
elem = 2

[State 1010, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo = 1020
trigger1 = Time = 0 
value = 1010
elem = 6

[State 1010, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0 
trigger1 = AnimElemTime(6) < 0
statetype = A

[State 1010, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0 
statetype = C

[State 1010, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(11) >= 0
statetype = S

[State 1010, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S100,7

[State 1010, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S1010,IfElse(PrevStateNo = 1020,1,0)
Channel = 0

[State 1010, Helper]
type = Helper
trigger1 = AnimElem = 6
helpertype = normal
stateno = 8030
ID = 8030
name = "Dash Dust"
postype = p1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 1010, VelSet]
type = VelSet
trigger1 = AnimElemTime(3) >= 0
x = IfElse(AnimElemTime(6) < 0,5,IfElse(AnimElemTime(6) >= 2,8,10))

[State 1010, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 1010, PlayerPush]
type = PlayerPush
trigger1 = MoveHit && NumTarget && FrontEdgeBodyDist >= 30
trigger1 = Target,StateType = A
value = 0

[State 1010, HitDef]
type = HitDef
trigger1 = !MoveContact
damage = IfElse(Var(26),92,77),8
attr = C,SA
animtype = hard
guardflag = L
hitflag = MAF
pausetime = 10,12
priority = 5,Hit
sparkno = -1+(0*(var(41) := 8054))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -15))
hitsound = S200,2
guardsound = S300,0
ground.type = trip
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,-6.5
air.velocity = -2,-6.5
yaccel = 0.65
fall = 1
fall.recover = 0
envshake.time = 9
envshake.ampl = 3

[State 1010, ChangeState]
type = ChangeState
trigger1 = Time >= 28
value = 1011

[StateDef 1011]
type = C
movetype = I
physics = N
anim = 1011
sprpriority = 1
ctrl = 0
velset = 0,0

[State 1011, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0
statetype = S

[State 1011, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[StateDef 1020]
type = S
movetype = A
physics = N
anim = 1020
ctrl = 0
poweradd = 65
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1020, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo = 1000
trigger1 = Time = 0 
value = 1020
elem = 2

[State 1020, Helper]
type = Helper
trigger1 = AnimElem = 5
helpertype = Normal
name = "Kick Slash"
pos = 0,0
stateno = 1023
ID = 1023
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1020, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) >= 0
x = IfElse(AnimElemTime(3) < 0,4,7)

[State 1020, VelSet]
type = VelSet
trigger1 = AnimElem = 3
y = -6

[State 1020, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) >= 0
y = 0.44

[State 1020, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0
statetype = A

[State 1020, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,2

[State 1020, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S1020,0+Random%2

[State 1020, HitDef]
type = HitDef
trigger1= AnimElem = 4
damage= IfElse(Var(26),35,29),3
attr = S,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 9,10
priority = 5,Hit
sparkno = -1+(0*(var(41) := 8054))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -75))
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,-8.5
air.velocity = -1.2,-8.5
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 24
envshake.time = 10
envshake.ampl = 3

[State 1020, HitDef]
type = HitDef
trigger1 = AnimElem = 5
damage = IfElse(Var(26),47,39),4
attr = S,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 9,10
priority = 5,Hit
sparkno = -1+(0*(var(41) := 8054))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -75))
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 24
p2facing = 1
envshake.time = 10
envshake.ampl = 3
p2StateNo = 1027

[State 1020, VelSet]
type = VelSet
trigger1 = AnimElemTime(7) >= 1 && (Command = "y" || Command = "hold_y")
y = 0

[State 1020, PosSet]
type = PosSet
trigger1 = AnimElemTime(7) >= 1 && (Command = "y" || Command = "hold_y")
y = 0

[State 1020, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(7) >= 1 && (Command = "up" || Command = "holdup")
value = 1024

[State 1020, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = AnimElemTime(7) >= 1 && (Command = "y" || Command = "hold_y")
value = 1010

[State 1020, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(7) >= 1 && (Command = "z" || Command = "hold_z")
value = 1022

[State 1020, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1021

[StateDef 1021]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 1021

[State 1021, Explod]
type = Explod
trigger1 = Time = 0
anim = 8020
sprpriority = -3
postype = p1
scale= 0.5,0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1021, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S40, 0

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

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

[StateDef 1022]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1022
sprpriority = 2

[State 1022, VelSet]
type = VelSet
trigger1 = 1
x = 2

[State 1022, VelSet]
type = VelSet
trigger1 = Time = 0
y = -5

[State 1022, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.51

[State 1022, Helper]
type = Helper
trigger1 = AnimElem = 2
helpertype = Normal
name = "Kick Slash"
pos = 0,0
stateno = 1023
ID = 1024
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1022, HitDef]
type = HitDef
trigger1 = AnimElem = 2
damage = IfElse(Var(26),29,24),3
attr = S,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 10,12
priority = 5,Hit
sparkno = -1+(0*(var(41) := 8054))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -65))
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -8,-3
air.velocity = -8,-3
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 16
p2facing = 1
envshake.time = 10
envshake.ampl = 3

[State 1022, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S1020,2

[State 1022, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(4) >= 3 && Pos y >= 0
value = 1021

[StateDef 1023]
type = A
movetype = I
physics = N
sprpriority = 6
anim = 1023

[State 1023, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 1023, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 1023, BindToParent]
type = BindToParent
trigger1 = 1
pos = Floor(-3*Root,FVar(32)),0

[State 1023, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1

[State 1023, AngleSet]
type = AngleSet
trigger1 = Time = 0
value = 2

[State 1023, AngleAdd]
type = AngleAdd
trigger1 = AnimElemTime(1) = 1
value = -2
persistent = 0

[State 1023, AngleAdd]
type = AngleAdd
trigger1 = AnimElemTime(1) = 2
value = -2
persistent = 0

[State 1023, AngleAdd]
type = AngleAdd
trigger1 = AnimElemTime(1) = 3
value = -2
persistent = 0

[State 1023, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Root,MoveType = H
trigger3 = IsHelper(1023) && Root,StateNo != 1020
trigger4 = IsHelper(1024) && Root,StateNo != 1022
trigger5 = IsHelper(2000) && Root,StateNo != 2000

[StateDef 1024]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1024
sprpriority = 2
velset = 0,-0.5

[State 1024, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 3
y = -8

[State 1024, VelAdd]
type = VelAdd
trigger1 = Pos Y <0 && AnimElemTime(3) >= 1
y = 0.6

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

[State 1024, CtrlSet]
type = CtrlSet
trigger1 = time >= 15
value = 1

[State 1024, ChangeState]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 52

[StateDef 1025]
type = A
movetype = H
physics = N
sprpriority=1

[State 1025, ChangeAnim2]
type = Changeanim2
trigger1 = !SelfAnimExist(5012)
value = 5012

[State 1025, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5012)
value = 5012

[State 1025]
type = ChangeAnim
trigger1 = 1
value = anim

[State 1025, PosFreeze]
type = PosFreeze
trigger1 = HitShakeOver=0
value = 1

[State 1025, VelSet]
type = VelSet
trigger1 = 1
y = 15
persistent = 0

[State 1025, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && HitShakeOver = 1
value = 1026

[StateDef 1026]
type = A
movetype = H
physics = N
sprpriority = 1

[State 1026]
type = PosSet
trigger1 = time = 0
y = 0

[State 1026, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 5
freq = 160
ampl = -4

[State 1026, VelSet]
type = VelSet
trigger1 = time = 0
x = -4
y = -10.5

[State 1026, VelAdd]
type = Veladd
trigger1 = 1
y = 0.65

[State 1026, ChangeAnim2]
type = Changeanim2
trigger1 =! SelfAnimExist(5030)
value = 5030

[State 1026, ChangeAnim]
type = Changeanim
trigger1 = SelfAnimExist(5030)
value = 5030

[State 1026, SelfState]
type = SelfState
trigger1 = time = 15 && Anim = 5030 && Pos Y <= -2
value = 5050

[StateDef 1027]
type = A
movetype = H
physics = N
sprpriority=1

[State 1027, ChangeAnim2]
type = Changeanim2
trigger1 = !SelfAnimExist(5012)
value = 5012

[State 1027, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5012)
value = 5012

[State 1027]
type = ChangeAnim
trigger1 = 1
value = anim

[State 1027, PosFreeze]
type = PosFreeze
trigger1 = HitShakeOver=0
value = 1

[State 1027, VelSet]
type = VelSet
trigger1 = 1
y = 15
persistent = 0

[State 1027, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && HitShakeOver = 1
value = 1028

[StateDef 1028]
type = A
movetype = H
physics = N
sprpriority = 1

[State 1028]
type = PosSet
trigger1 = time = 0
y = 0

[State 1028, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 5
freq = 160
ampl = -4

[State 1028, VelSet]
type = VelSet
trigger1 = time = 0
x = -4
y = -9

[State 1028, VelAdd]
type = Veladd
trigger1 = 1
y = 0.65

[State 1028, ChangeAnim2]
type = Changeanim2
trigger1 =! SelfAnimExist(5030)
value = 5030

[State 1028, ChangeAnim]
type = Changeanim
trigger1 = SelfAnimExist(5030)
value = 5030

[State 1028, SelfState]
type = SelfState
trigger1 = time = 15 && Anim = 5030 && Pos Y <= -2
value = 5050

[StateDef 1100]
type = A
movetype = A
physics = N
anim = 1100
velset = 0,0
ctrl = 0
facep2 = 1
PowerAdd = 100
sprpriority = 2

[State 1100, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveHit = 1
v = 45
value = 4

[State 1100, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveGuarded = 1
v = 45
value = 2

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(18) >= 0
statetype = S

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1100,0+Random%2
channel = 0

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 9
value = S100,9

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15
value = S100,2

[State 1100, VelSet]
type = VelSet
trigger1 = 1
x = IfElse(AnimElemTime(2) < 0,1,IfElse(AnimElemTime(8) < 0,7,3.5))

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) = 0 || AnimElem = 8
y = -IfElse(AnimElemTime(2) = 0,5.5,10)

[State 1100, VelAdd]
type = Veladd
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(18) < 0
y = 0.65

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElemTime(18) >= 0
x = 0
y = 0

[State 1100, PosSet]
type = PosSet
trigger1 = AnimElem = 18
y = 0

[State 1100, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = Normal
name = "Wand"
pos = 0,0
stateno = 1101
ID = 1101
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1100, Helper]
type = Helper
trigger1 = AnimElem = 2
helpertype = Normal
name = "Spin"
pos = 0,0
stateno = 1102
ID = 1102
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1100, Helper]
type = Helper
trigger1 = AnimElem = 15
helpertype = Normal
name = "Slash"
pos = 0,0
stateno = 1103
ID = 1103
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1100, Explod]
type = Explod
trigger1 = AnimElem = 18
anim = 8020
sprpriority = -3
postype = p1
scale= 0.5,0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18
value = S40, 0

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
trigger4 = AnimElem = 9
trigger5 = AnimElem = 10
trigger6 = AnimElem = 11
damage = IfElse(Var(26),14,12),3
attr = A,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 4,5
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -2,-6.3
air.velocity = -2,-6.3
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 24
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 15
damage = IfElse(Var(26),24,20),4
attr = A,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 5,7
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 24
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1100, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 1100, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

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

[StateDef 1101]
type = A
movetype = I
physics = N
sprpriority = 6
anim = 1101

[State 1101, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 1101, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 1101, BindToParent]
type = BindToParent
trigger1 = IsHelper(1101)
pos = 23,-106

[State 1101, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(1101)
scale = 2,2

[State 1101, AngleSet]
type = AngleSet
trigger1 = IsHelper(1101)
value = -80

[State 1101, DestroySelf]
type = DestroySelf
trigger1 = Time >= 8
trigger2 = Root,MoveType = H
trigger3 = Root,StateNo != [1100,1105]

[StateDef 1102]
type = A
movetype = I
physics = N
sprpriority = 6

[State 1102, ChangeAnim]
type = ChangeAnim
trigger1 = IsHelper(1102)&&(Root,AnimElemTime(2) = [0,30])
value = 1102
elem = Root,AnimElemTime(2)+IfElse(Root,HitPauseTime = 0,1,0)

[State 1102, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 1102, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 1102, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1102)&&Root,AnimElemTime(13) < 0
time = 1
pos = Floor(IfElse(Root,AnimElemTime(8) < 0,31,IfElse(Root,AnimElemTime(12) < 0,39,-10))*Root,FVar(32)),Floor(-IfElse(Root,AnimElemTime(8) < 0,67,IfElse(Root,AnimElemTime(12) < 0,119,125))*Root,FVar(33))

[State 1102, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1102)&&Root,AnimElemTime(13) >= 0
time = 1
pos = Floor(-27*Root,Fvar(32)),Floor(-103*Root,FVar(33))

[State 1102, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(1102)
scale = IfElse(Root,AnimElemTime(8) < 0,0.705,IfElse(Root,AnimElemTime(12) < 0,0.5,IfElse(Root,AnimElemTime(13) < 0,1,1.5))),2.05

[State 1102, AngleSet]
type = AngleSet
trigger1 = (Time = 0|| Root,AnimElemTime(8) = 0 || Root,AnimElemTime(12) = 0 || Root,AnimElemTime(13) = 0)&&IsHelper(1102)
value = IfElse(Time = 0,-33,IfElse(Root,AnimElemTime(8) = 0,24,IfElse(Root,AnimElemTime(12) = 0,-61,-28)))

[State 1102, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Root,MoveType = H
trigger3 = Root,StateNo != [1100,1105]

[StateDef 1103]
type = A
movetype = I
physics = N
sprpriority = 6
anim = 1103

[State 1103, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 1103, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 1103, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 1103, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1

[State 1103, AngleSet]
type = AngleSet
trigger1 = 1
value = IfElse(AnimElemTime(3) < 0,10,5)

[State 1103, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Root,MoveType = H
trigger3 = IsHelper(1103)
trigger3 = Root,StateNo != [1100,1105]
trigger4 = IsHelper(4103)
trigger4 = Root,StateNo != 4103

[StateDef 1105]
type = A
movetype = A
physics = N
anim = 1105
velset = 0,0
ctrl = 0
facep2 = 1
PowerAdd = 100
sprpriority = 2

[State 1105, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveHit = 1
v = 45
value = 4

[State 1105, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveGuarded = 1
v = 45
value = 2

[State 1105, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1100,0+Random%2
channel = 0

[State 1105, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 9
value = S100,9

[State 1105, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15
value = S100,2

[State 1105, VelSet]
type = VelSet
trigger1 = 1
x = IfElse(AnimElemTime(2) < 0,1,IfElse(AnimElemTime(8) < 0,7,3.5))

[State 1105, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) = 0 || AnimElem = 8
y = -IfElse(AnimElemTime(2) = 0,5.5,10)

[State 1105, VelAdd]
type = Veladd
trigger1 = AnimElemTime(3) >= 0 
y = 0.65

[State 1105, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = Normal
name = "Wand"
pos = 0,0
stateno = 1101
ID = 1101
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1105, Helper]
type = Helper
trigger1 = AnimElem = 2
helpertype = Normal
name = "Spin"
pos = 0,0
stateno = 1102
ID = 1102
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1105, Helper]
type = Helper
trigger1 = AnimElem = 15
helpertype = Normal
name = "Slash"
pos = 0,0
stateno = 1103
ID = 1103
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1105, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
trigger4 = AnimElem = 9
trigger5 = AnimElem = 10
trigger6 = AnimElem = 11
damage = IfElse(Var(26),14,12),3
attr = A,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 4,5
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -2,-6.3
air.velocity = -2,-6.3
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 24
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1105, HitDef]
type = HitDef
trigger1 = AnimElem = 15
damage = IfElse(Var(26),24,20),4
attr = A,SA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 5,7
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 1
fall.recovertime = 24
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1105, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 1105, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 1105, ChangeState]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 1106

[StateDef 1106]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 1106

[State 1106, Explod]
type = Explod
trigger1 = Time = 0
anim = 8020
sprpriority = -3
postype = p1
scale= 0.5,0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1106, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S40, 0

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

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

[StateDef 1200]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1200
poweradd = 100
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8
value = S100,2

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8
value = S1200,Var(11)-1
channel = 0

[State 1200, Helper]
type = Helper
triggerall=!numhelper(1205)
trigger1 = AnimElem = 1
trigger2=animelem=6
helpertype = Normal
name = "ItemGen"
stateno = 1205
ID = 1205
ownpal = 1
ignorehitpause = 1

[state ]
type=null
trigger1=animelem=1||animelem=6
trigger1=1||(var(11):=(var(10):=var(10)%7+1))

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

[statedef 1205]
type=a
movetype=i
physics=n
ctrl=0
anim=99999

[state ]
type=null
trigger1=var(0):=((root,animelem=1)+2*(root,animelem=6)+3*(root,animelem=11)+4*(root,animelem=16)+5*(root,animelem=21))

[State 1205, ParentVarAdd]
type = ParentVarAdd
triggerall = Root,StateNo != 2200
trigger1 = IsHelper(1205)
trigger1 = NumHelper(1199)
trigger1 = Helper(1199),MoveHit = 1
trigger2 = IsHelper(1205)
trigger2 = NumHelper(1200)
trigger2 = Helper(1200),MoveHit = 1
trigger3 = IsHelper(1205)
trigger3 = NumHelper(1201)
trigger3 = Helper(1201),MoveHit = 1
trigger4 = IsHelper(1205)
trigger4 = NumHelper(1202)
trigger4 = Helper(1202),MoveHit = 1
trigger5 = IsHelper(1205)
trigger5 = NumHelper(1203)
trigger5 = Helper(1203),MoveHit = 1
trigger6 = IsHelper(1205)
trigger6 = NumHelper(1204)
trigger6 = Helper(1204),MoveHit = 1
trigger7 = IsHelper(1205)
trigger7 = NumHelper(1205)
trigger7 = Helper(1205),MoveHit = 1
var(45) = 12-27*(!!Root,var(46))

[State 1205, ParentVarAdd]
type = ParentVarAdd
triggerall = Root,StateNo != 2200
trigger1 = IsHelper(1205)
trigger1 = NumHelper(1199)
trigger1 = Helper(1199),MoveGuarded = 1
trigger2 = IsHelper(1205)
trigger2 = NumHelper(1200)
trigger2 = Helper(1200),MoveGuarded = 1
trigger3 = IsHelper(1205)
trigger3 = NumHelper(1201)
trigger3 = Helper(1201),MoveGuarded = 1
trigger4 = IsHelper(1205)
trigger4 = NumHelper(1202)
trigger4 = Helper(1202),MoveGuarded = 1
trigger5 = IsHelper(1205)
trigger5 = NumHelper(1203)
trigger5 = Helper(1203),MoveGuarded = 1
trigger6 = IsHelper(1205)
trigger6 = NumHelper(1204)
trigger6 = Helper(1204),MoveGuarded = 1
trigger7 = IsHelper(1205)
trigger7 = NumHelper(1205)
trigger7 = Helper(1205),MoveGuarded = 1
var(45) = 6-21*(!!Root,var(46))

[state ]
type=turn
trigger1=facing!=root,facing

[state ]
type=helper
helpertype=normal
name="item"
stateno=1201
id=1199+var(0)
ownpal=0
size.xscale=.335
size.yscale=.335
triggerall=var(0)
trigger1=root,stateno=1200
trigger1=var(0)<3
trigger2=root,stateno=1210
trigger2=var(0)<4
trigger3=root,stateno=1220
trigger3=var(0)<5
trigger4=root,stateno=2200

[state ]
type=destroyself
trigger1=!numhelper(1200)
trigger1=!numhelper(1201)
trigger1=!numhelper(1202)
trigger1=!numhelper(1203)
trigger1=!numhelper(1204)

[StateDef 1201]
type = A
movetype = A
physics = N
ctrl = 0
sprpriority = 1

[state ]
type=destroyself
trigger1=root,stateno!=[1200,1220]
trigger1=root,stateno!=2200

[state ]
type=changestate
value=1202
triggerall=time
triggerall=var(14)%2=0
trigger1=root,animelem=3
trigger2=root,animelem=8
trigger3=root,animelem=13
trigger4=root,animelem=18
trigger5=root,animelem=23

[state ]
type=null
triggerall=!time
trigger1=0*(var(13):=root,var(10)-1)*(var(11):=(root,stateno=2200))*(var(14):=ishelper(1200)+3*ishelper(1201)+5*ishelper(1202)+7*ishelper(1203)+9*ishelper(1204))
trigger2=var(13)=6
trigger2=0*(var(15):=random/10)
[state ]
type=null
trigger1=(root,animelem=2)+(root,animelem=7)+(root,animelem=12)+(root,animelem=17)+(root,animelem=22)
trigger1=0*(var(14):=var(14)+1)

[state ]
type=changeanim
value=1230+3*(var(13)=1)+7*(var(13)=2)+11*(var(13)=3)+15*(var(13)=4)+18*(var(13)=5)+(20+3*(!var(15)))*(var(13)=6)
trigger1=!time

[state ]
type=assertspecial
flag=noshadow
trigger1=1

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

[state ]
type=angledraw
scale=var(0),var(0)
trigger1=1||(var(0):=1+2*(var(13)=4)*(var(11)=1))

[state ]
type=null
triggerall=!var(13)
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-8*root,fvar(32))+(fvar(1):=-126*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-13*root,fvar(32))+(fvar(1):=-125*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-21*root,fvar(32))+(fvar(1):=-120*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-26*root,fvar(32))+(fvar(1):=-115*root,fvar(33))
[state ]
type=null
triggerall=var(13)=1
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-8*root,fvar(32))+(fvar(1):=-126*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-13*root,fvar(32))+(fvar(1):=-125*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-24*root,fvar(32))+(fvar(1):=-120*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-27*root,fvar(32))+(fvar(1):=-114*root,fvar(33))
[state ]
type=null
triggerall=var(13)=2
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-8*root,fvar(32))+(fvar(1):=-126*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-13*root,fvar(32))+(fvar(1):=-125*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-25*root,fvar(32))+(fvar(1):=-120*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-26*root,fvar(32))+(fvar(1):=-115*root,fvar(33))
[state ]
type=null
triggerall=var(13)=3
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-8*root,fvar(32))+(fvar(1):=-121*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-13*root,fvar(32))+(fvar(1):=-119*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-25*root,fvar(32))+(fvar(1):=-112*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-27*root,fvar(32))+(fvar(1):=-108*root,fvar(33))
[state ]
type=null
triggerall=var(13)=4
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-7*root,fvar(32))+(fvar(1):=-125*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-13*root,fvar(32))+(fvar(1):=-123*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-25*root,fvar(32))+(fvar(1):=-119*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-27*root,fvar(32))+(fvar(1):=-114*root,fvar(33))
[state ]
type=null
triggerall=var(13)=5
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-8*root,fvar(32))+(fvar(1):=-127*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-14*root,fvar(32))+(fvar(1):=-125*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-25*root,fvar(32))+(fvar(1):=-120*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-27*root,fvar(32))+(fvar(1):=-115*root,fvar(33))
[state ]
type=null
triggerall=var(13)=6
trigger1=(var(14)=1)+(var(14)=5)+(var(14)=9)
trigger1=1||(fvar(0):=-7*root,fvar(32))+(fvar(1):=-126*root,fvar(33))
trigger2=(var(14)=2)+(var(14)=6)+(var(14)=10)
trigger2=1||(fvar(0):=-13*root,fvar(32))+(fvar(1):=-125*root,fvar(33))
trigger3=(var(14)=3)+(var(14)=7)
trigger3=1||(fvar(0):=-25*root,fvar(32))+(fvar(1):=-120*root,fvar(33))
trigger4=(var(14)=4)+(var(14)=8)
trigger4=1||(fvar(0):=-26*root,fvar(32))+(fvar(1):=-115*root,fvar(33))

[state ]
type=bindtoroot
pos=floor(.5+fvar(0)),floor(.5+fvar(1))
time=1
trigger1=1

[StateDef 1202]
type = A
movetype  =A
physics = N
ctrl = 0
sprpriority = 2
anim=1230+!var(13)+4*(var(13)=1)+8*(var(13)=2)+12*(var(13)=3)+(26-10*!var(11))*(var(13)=4)+18*(var(13)=5)+(21+3*!var(15))*(var(13)=6)

[state ]
type=changestate
value=1204
trigger1=movecontact
trigger1=var(13)=[0,4]
trigger2=var(13)=6
trigger2=var(19)=1

[state ]
type=velset
y=0*(var(0):=-1)
trigger1=pos y>=0
trigger1=ifelse(var(13)=4,var(11)=1,var(13)!=6)
trigger2=var(13)=6
trigger2=!animtime

[state ]
type=posset
y=0
trigger1=var(0)=-1

[state ]
type=changestate
value=1203
trigger1=var(0)=-1

[state ]
type=destroyself
triggerall=backedgebodydist<-80
trigger1=!var(13)
trigger2=var(13)=3

[state ]
type=null
trigger1=var(13)=1
trigger1=frontedgebodydist<10
trigger1=!movecontact
trigger1=0*(var(16):=1)
trigger2=var(18)>0
trigger2=0*(var(18):=var(18)+1)
trigger3=var(13)=6
trigger3=p2dist y=[-80,80]
trigger3=p2dist x=[-50,50]
trigger3=enemynear,movetype=a
trigger3=0*(var(18):=var(18)+1)
trigger4=var(13)=6
trigger4=var(18)>9
trigger4=0*(var(19):=1)

[state ]
type=assertspecial
flag=noshadow
trigger1=1

[state ]
type=turn
trigger1=var(16)=1
persistent=0

[state ]
type=bindtoroot
pos=floor(.5+fvar(0)),floor(.5+fvar(1))
time=1
triggerall=!time
trigger1=!var(13)
trigger1=1||(fvar(0):=71*root,fvar(32))+(fvar(1):=-82*root,fvar(33))
trigger2=var(13)=1
trigger2=1||(fvar(0):=58*root,fvar(32))+(fvar(1):=-100*root,fvar(33))
trigger3=var(13)=2
trigger3=1||(fvar(0):=56*root,fvar(32))+(fvar(1):=-86*root,fvar(33))
trigger4=var(13)=3
trigger4=1||(fvar(0):=60*root,fvar(32))+(fvar(1):=-79*root,fvar(33))
trigger5=var(13)=4
trigger5=1||(fvar(0):=54*root,fvar(32))+(fvar(1):=-90*root,fvar(33))
trigger6=var(13)=5
trigger6=1||(fvar(0):=53*root,fvar(32))+(fvar(1):=-87*root,fvar(33))
trigger7=var(13)=6
trigger7=1||(fvar(0):=58*root,fvar(32))+(fvar(1):=-85*root,fvar(33))

[state ]
type=sprpriority
value=3
trigger1=time>4
ignorehitpause=1

[state ]
type=hitoverride
attr=sca,aa,ap,at
stateno=1204
trigger1=1
ignorehitpause=1

[state ]
type=angledraw
value=var(17)
scale=fvar(2),fvar(2)
triggerall=1||(fvar(2):=1+2*(time>0)*(var(11)=1)*(var(13)=4))
trigger1=var(13)=4
trigger1=pos y>=0
trigger1=!var(11)
trigger1=1||(var(17):=0)
trigger2=!var(13)
trigger2=1||(var(17):=var(17)-15)
trigger3=var(13)=1||var(13)=4
trigger3=1||(var(17):=var(17)-10)
trigger4=var(13)=2
trigger4=1||(var(17):=var(17)-12)
trigger5=var(13)=5
trigger5=1||(var(17):=var(17)-6)
trigger6=1||(var(17):=0)

[state ]
type=null
triggerall=!var(13)
trigger1=!time
trigger1=1||(fvar(0):=13+2*!var(11))+(fvar(1):=-2+2.05*!var(11))
trigger2=var(11)=1
trigger2=1||(fvar(1):=vel y+.4)
[state ]
type=null
triggerall=var(13)=1
trigger1=!time
trigger1=1||(fvar(0):=ifelse(!var(11),1+2.2*!var(16),4))+(fvar(1):=-2-6.8*!var(11))
trigger2=1||(fvar(1):=vel y+.4-.15*!var(11))
[state ]
type=null
triggerall=var(13)=2
trigger1=!time
trigger1=1||(fvar(0):=5)+(fvar(1):=-1.6)
trigger2=1||(fvar(1):=vel y+.26)
[state ]
type=null
triggerall=var(13)=3
trigger1=!time
trigger1=1||(fvar(0):=5.5)+(fvar(1):=-3+1.1*!var(11))
trigger2=1||(fvar(1):=vel y+.32)
[state ]
type=null
triggerall=var(13)=4
trigger1=!time
trigger1=1||(fvar(0):=10-6.5*!var(11))+(fvar(1):=-5)
trigger2=pos y>=0
trigger2=!var(11)
trigger2=1||(fvar(1):=-6.5)
trigger3=1||(fvar(1):=vel y+.38)
[state ]
type=null
triggerall=var(13)=5
trigger1=!time
trigger1=1||(fvar(0):=2.5)+(fvar(1):=-2)
trigger2=1||(fvar(1):=vel y+.25)
[state ]
type=null
triggerall=var(13)=6
trigger1=!time
trigger1=1||(fvar(0):=6)+(fvar(1):=-2)
trigger2=1||(fvar(0):=vel x+ifelse(animelem=3,<20,-.18,ifelse(animelem=4,<10,-.02,ifelse(animelem=4,<30,-.025,ifelse(animelem=5,10,.02,.025)))))+(fvar(1):=vel y+.205*(vel y<.6))

[state ]
type=velset
x=fvar(0)
y=fvar(1)
trigger1=1

[state ]
type=hitdef
damage=ceil(IfElse(Root,Var(26),36,30)*(root,fvar(1)*root,fvar(2))),4
attr=s,sp
animtype=medium
guardflag=ma
hitflag=maf
pausetime=1,10
priority=5,hit
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=S200,2
guardsound=S300,0
ground.type=low
ground.slidetime=15
ground.hittime=15
ground.velocity=-8
air.velocity=-2,-6.5
yaccel=.65
air.fall=1
fall.recover=1 
fall.recovertime=16
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
down.velocity=-.5,0
down.cornerpush.veloff=0
trigger1=var(13)=[0,4]
trigger1=!var(11)
trigger1=!movecontact
trigger1=!movereversed

[state ]
type=hitdef
damage=ceil(IfElse(Root,Var(26),42,35)*(root,fvar(1)*root,fvar(2))),4
attr=s,hp
animtype=medium
guardflag=ma
hitflag=maf
pausetime=1,10
priority=6,hit
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=S200,8
guardsound=S300,0
ground.type=low
ground.slidetime=15
ground.hittime=15
ground.velocity=-4-4*(var(13)=3),-10*(var(13)=3)
air.velocity=-2-2*(var(13)=3),-6.5-3.5*(var(13)=3)
yaccel=.65
fall=(var(13)=3)
air.fall=1
fall.recover=1 
fall.recovertime=28
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
down.velocity=-.5,0
down.cornerpush.veloff=0
getpower=0
trigger1=var(13)!=4
trigger1=var(11)=1
trigger1=!movecontact
trigger1=!movereversed

[state ]
type=hitdef
damage=ceil(IfElse(Root,Var(26),60,50)*(root,fvar(1)*root,fvar(2))),4
attr=s,hp
animtype=medium
guardflag=ma
hitflag=mafd
pausetime=1,10
priority=6,hit
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=S200,8
guardsound=S300,0
ground.type=low
ground.slidetime=15
ground.hittime=15
ground.velocity=-8,-3
air.velocity=-8,-3
yaccel=.65
fall=1
fall.recover=1 
fall.recovertime=28
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
down.velocity=-.5,0
down.cornerpush.veloff=0
getpower=0
trigger1=var(13)=4
trigger1=var(11)=1
trigger1=!movecontact
trigger1=!movereversed

[State 1202, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 0
ignorehitpause = 1
persistent = 4
size.xscale = 1
size.yscale = 1

[State 1202, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 0
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 4
size.xscale = 1
size.yscale = 1

[State 1202, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 1202, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[StateDef 1203]
type = A
movetype = A
physics = N
ctrl = 0
sprpriority = 3
anim=1230+28*!var(13)+5*(var(13)=1)+9*(var(13)=2)+(27-14*!var(31))*(var(13)=3)+29*(var(13)=4)+19*(var(13)=5)+(22+3*!var(15))*(var(13)=6)

[state ]
type=destroyself
trigger1=!animtime
trigger2=var(13)=6
trigger2=var(31)>0

[state ]
type=null
triggerall=var(13)=6
triggerall=!var(31)
trigger1=rootdist y=0
trigger1=rootdist x=[-28,28]
trigger1=1||(var(31):=1)
trigger2=numpartner
trigger2=partner,pos y=pos y
trigger2=partner,pos x-pos x=[-28,28]
trigger2=1||(var(31):=1)
trigger3=p2dist y=0
trigger3=p2dist x=[-28,28]
trigger3=1||(var(31):=2)

[state ]
type=poweradd
value=100
trigger1=var(13)=6
trigger1=var(31)=1

[state ]
type=hitoverride
attr=sca,aa,ap,at
stateno=1203
trigger1=1
ignorehitpause=1

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

[state ]
type=assertspecial
flag=noshadow
trigger1=1

[state ]
type=angledraw
value=var(17)
scale=fvar(2),fvar(2)
triggerall=1||(fvar(2):=1+2*(time>0)*(var(13)=4)*(var(31)=1))
trigger1=!time
trigger1=1||(var(17):=0)
trigger2=var(13)=4
trigger2=time=[1,20]
trigger2=1||(var(17):=var(17)-18)
trigger3=var(13)=5
trigger3=animelem=8,>=0
trigger3=1||(var(17):=-32)+(fvar(2):=2.2)

[state ]
type=posset
y=0
trigger1=!time
trigger2=var(13)=4
trigger2=time>4
trigger2=pos y>=0

[state ]
type=velset
x=fvar(0)
y=fvar(1)
trigger1=!time
trigger1=0*(fvar(1):=0)
trigger2=!var(13)
trigger2=vel x>0
trigger2=1||(fvar(0):=vel x-.7)
trigger3=var(13)=1
trigger3=vel x>0
trigger3=1||(fvar(0):=vel x-.15)
trigger4=var(13)=2
trigger4=vel x>0
trigger4=1||(fvar(0):=vel x-.25)
trigger5=var(13)=3
trigger5=vel x>0
trigger5=var(17)>=15+30*!var(31)
trigger5=1||(fvar(0):=vel x-.5)
trigger6=var(13)=4
trigger6=!time
trigger6=1||(fvar(0):=3)+(fvar(1):=-2)
trigger7=var(13)=4
trigger7=time>1
trigger7=pos y<0
trigger7=1||(fvar(1):=vel y+.21)
trigger8=var(13)=4
trigger8=time>4
trigger8=pos y>=0
trigger8=1||(fvar(0):=vel x*.95)+(fvar(1):=0)
trigger9=var(13)=5
trigger9=vel x>0
trigger9=1||(fvar(0):=vel x-.14)
trigger10=var(13)=6||vel x<0
trigger10=1||(fvar(0):=0)

[state ]
type=playsnd
value=s100,10
trigger1=var(13)=5
trigger1=animelem=8

[state ]
type=envshake
time=10
freq=160
ampl=-4
trigger1=var(13)=5
trigger1=animelem=8

[state ]
type=trans
trans=addalpha
alpha=var(0),var(1)
trigger1=var(13)=5
trigger1=animelem=8,>=0
trigger1=1||(var(0):=(var(1):=256))
trigger2=!time
trigger2=0*(var(2):=animtime)
trigger3=var(13)<3
trigger3=1||(var(1):=256-(var(0):=floor(.5+256*cos(time*pi/(2.*var(2))))))
trigger4=var(13)=6
trigger4=animtime>-30
trigger4=1||(var(1):=256-(var(0):=floor(.5+256*cos((30+animtime)*pi/60.))))

[state ]
type=hitdef
damage=ceil(IfElse(Root,Var(26),36,30)*(root,fvar(1)*root,fvar(2))),4
attr=s,sp
animtype=medium
guardflag=ma
hitflag=maf
pausetime=1,10
priority=5,hit
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=s200,2
guardsound=s300,0
ground.type=low
ground.slidetime=15
ground.hittime=15
ground.velocity=-8
air.velocity=-2,-6.5
yaccel=.65
air.fall=1
fall.recover=1
fall.recovertime=16
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
down.velocity=-.5,0
down.cornerpush.veloff=0
trigger1=var(13)=3
trigger1=!var(11)
trigger1=!movecontact
trigger1=!movereversed

[state ]
type=hitdef
damage=ceil(IfElse(Root,Var(26),36,30)*(root,fvar(1)*root,fvar(2))),4
attr=s,hp
animtype=medium
guardflag=ma
hitflag=maf
pausetime=1,10
priority=6,hit
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=s200,2
guardsound=s300,0
ground.type=low
ground.slidetime=15
ground.hittime=15
ground.velocity=-8
air.velocity=-2,-6.5
yaccel=.65
air.fall=1
fall.recover=1
fall.recovertime=16
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
down.velocity=-.5,0
down.cornerpush.veloff=0
getpower=0
trigger1=var(13)=3
trigger1=var(11)=1
trigger1=!movecontact
trigger1=!movereversed

[state ]
type=hitdef
damage=ceil(IfElse(Root,Var(26),36,30)*(root,fvar(1)*root,fvar(2))),4
attr=s,sp
animtype=up
guardflag=ma
hitflag=maf
pausetime=0,12
priority=5,hit
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=s200,2
guardsound=s300,0
ground.type=low
ground.slidetime=15
ground.hittime=15
ground.velocity=-.5,-14
guard.velocity=-8
air.velocity=-.5,-14
yaccel=.65
fall=1
fall.recover=1
fall.recovertime=28
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
down.velocity=-.5,0
down.cornerpush.veloff=0
palfx.time=45
palfx.mul=128,128,128
palfx.sinadd=96,96,96,4
trigger1=var(13)=5
trigger1=animelem=8,>=0
trigger1=!movecontact
trigger1=!movereversed

[State 1203, Helper]
type = Helper
trigger1 = !NumHelper(8100)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8100
ID = 8100
name = "Burning"
posType = P2
ownPal = 0
ignoreHitPause = 1

[State 1203, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 55)
pausemovetime = 9999
supermovetime = 9999
ownpal = 0
ignorehitpause = 1
persistent = 4
size.xscale = 1
size.yscale = 1

[State 1203, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 55)
ownpal = 0
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 4
size.xscale = 1
size.yscale = 1

[State 1203, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 1203, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[StateDef 1204]
type = A
movetype = I
physics = N
ctrl = 0
sprpriority = 3
anim=1230+2*!var(13)+6*(var(13)=1)+10*(var(13)=2)+14*(var(13)=3)+17*(var(13)=4)+(31+!var(15))*(var(13)>4)

[state ]
type=destroyself
trigger1=!animtime

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

[state ]
type=assertspecial
flag=noshadow
trigger1=1

[state ]
type=trans
trans=addalpha
alpha=var(0),var(1)
trigger1=!time
trigger1=0*(var(2):=animtime)
trigger2=1||(var(1):=256-(var(0):=floor(.5+256*cos(time*pi/(2.*var(2))))))

[state ]
type=angledraw
value=var(17)
scale=fvar(2),fvar(2)
trigger1=!time
trigger1=0*(var(17):=0)
trigger2=var(13)!=4
trigger2=1||(fvar(2):=1)
trigger3=time
trigger3=1||(fvar(2):=1+2*(var(11)=1))

[state ]
type=velset
x=fvar(0)
y=fvar(1)
trigger1=var(13)!=6
trigger1=!time
trigger1=1||(fvar(0):=-1.5)+(fvar(1):=-4)
trigger2=!time
trigger2=1||(fvar(0):=-.75)+(fvar(1):=-1.5)
trigger3=1||(fvar(1):=vel y+.08+.15*(var(13)!=6))

[StateDef 1210]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1210
poweradd = 100
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1210, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 13
value = S100,2

[State 1210, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem= 13
value = S1200,Var(11)-1
channel = 0

[State 1210, Helper]
type = Helper
triggerall=!numhelper(1205)
trigger1 = AnimElem = 1
trigger2=animelem=6
trigger3 = AnimElem = 11
helpertype = Normal
name = "ItemGen"
stateno = 1205
ID = 1205
ownpal = 1
ignorehitpause = 1

[state ]
type=null
trigger1=animelem=1||animelem=6||animelem=11
trigger1=1||(var(11):=(var(10):=var(10)%7+1))

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

[StateDef 1220]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1220
poweradd = 100
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 13 || AnimElem = 18
value = S100,2

[State 1220, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 13 || AnimElem = 18
value = S1200,Var(11)-1
channel = 0

[State 1220, Helper]
type = Helper
triggerall=!numhelper(1205)
trigger1 = AnimElem = 1
trigger2=animelem=6
trigger3 = AnimElem = 11
trigger4 = AnimElem = 16
helpertype = Normal
name = "ItemGen"
stateno = 1205
ID = 1205
ownpal = 1
ignorehitpause = 1

[state ]
type=null
trigger1=animelem=1||animelem=6||animelem=11 || AnimElem = 16
trigger1=1||(var(11):=(var(10):=var(10)%7+1))

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

[StateDef 1300]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1300
poweradd = 110
velset = 0,0

[State 1300, VelSet]
type = VelSet
trigger1 = Time = 0
x = 1
y = -8.2

[State 1300, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.6

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1300,0+Random%4
channel = 0

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S200,0

[State 1300, Helper]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "Beachball"
pos = 0,0
stateno = 1302
ID = 1302
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1300, ChangeState]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 1301

[StateDef 1301]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 1301

[State 1301, Explod]
type = Explod
trigger1 = Time = 0
anim = 8020
sprpriority = -3
postype = p1
scale= 0.5,0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 1301, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S40, 0

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

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

[StateDef 1302]
type = A
movetype = A
physics = N
ctrl = 0
sprpriority = 3
anim = 1302

[State 1302, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1302, BindToRoot]
type = BindToRoot
trigger1 = Root,AnimElemTime(1) <= 4
time = 1
pos = Floor(28*Root,FVar(32)),Floor(-99*Root,FVar(33))

[State 1302, BindToRoot]
type = BindToRoot
trigger1 = Root,AnimElemTime(2) = [0,6]
time = 1
pos = Floor(28*Root,FVar(32)),Floor(-106*Root,FVar(33))

[State 1302, BindToRoot]
type = BindToRoot
trigger1 = Root,AnimElemTime(3) >= 0
time = 1
pos = Floor(28*Root,FVar(32)),Floor(-107*Root,FVar(33))

[State 1302, ChangeState]
type = ChangeState
trigger1 = Root,AnimElemTime(4) >= 0
value = 1303

[State 1302, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H
trigger2 = Root,StateNo != 1300

[StateDef 1303]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1303
sprpriority = 3

[State 1303, ParentVarAdd]
type = ParentVarAdd
trigger1 = IsHelper(1302)
trigger1 = NumHelper(1302)
trigger1 = Helper(1302),MoveContact = 1
var(45) = 12-27*(!!Root,Var(46))

[State 1303, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1303, BindToParent]
type = BindToParent
trigger1 = Time = 0
time = 1
pos = Floor(40*Root,FVar(32)),Floor(-50*Root,FVar(33))

[State 1303, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1304
ignorehitpause = 1

[State 1303, VelSet]
type = VelSet
trigger1 = Time = 0
x = 12
y = 12

[State 1303, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
damage = ceil(IfElse(Root,Var(26),72,60)*(Root,fvar(1)*Root,fvar(2))),5
attr = A,SP
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 0,12
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,2
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 1
fall.recovertime = 16
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1303, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 1303, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 1303, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 1303, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[State 1303, VelSet]
type = VelSet
trigger1 = Pos y >= -10
y = 0

[State 1303, PosSet]
type = PosSet
trigger1 = Pos y >= -10
y = -10

[State 1303, ChangeState]
type = ChangeState
trigger1 = Pos y >= -10
value = 1304

[State 1303, ChangeState]
type = ChangeState
trigger1 = MoveContact
value = 1305
ignorehitpause = 1

[StateDef 1304]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1304
sprpriority = 3

[state ]
type=trans
trans=addalpha
alpha=var(0),var(1)
trigger1=!time
trigger1=0*(var(2):=animtime)
trigger2=1||(var(1):=256-(var(0):=floor(.5+256*cos(time*pi/(2.*var(2))))))

[State 1304, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1304, VelSet]
type = VelSet
trigger1 = Time = 0
x = 1

[State 1304, VelSet]
type = VelSet
trigger1 = Time = 2
x = 2.8
y = -5.5

[State 1304, VelAdd]
type = VelAdd
trigger1 = Time >= 2
y = 0.29

[State 1304, DestroySelf]
type = DestroySelf
trigger1 = Time >= 30 

[StateDef 1305]
type = A
movetype = I
physics = N
ctrl = 0
sprpriority = 3
anim = 1304

[state ]
type=trans
trans=addalpha
alpha=var(0),var(1)
trigger1=!time
trigger1=0*(var(2):=animtime)
trigger2=1||(var(1):=256-(var(0):=floor(.5+256*cos(time*pi/(2.*var(2))))))

[State 1305, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1305, VelSet]
type = VelSet
trigger1 = Time = 0
x = 2.8
y = -5.5

[State 1305, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.29

[State 1305, DestroySelf]
type = DestroySelf
trigger1 = Time >= 30

[StateDef 1400]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1400
poweradd = 100
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1400, VarAdd]
type = VarAdd
triggerall = Var(49) <= 0
trigger1 = Var(46) = 1
trigger1 = Var(47) >= 1
trigger1 = Time = 1
v = 47
Value = -1

[State 1400, VarSet]
type = VarSet
trigger1 = time = 0
v = 48
value = 0

[State 1400, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1400,0+Random%2
channel = 0

[State 1400, Helper]
type = Helper
triggerall = Var(49) <= 0
trigger1 = Var(46) = 0
trigger1 = time = 0
trigger2 = Var(46) = 1
trigger2 = Var(47) = 0
trigger2 = time = 0
ID = 1401
pos = 30,0
postype = P1
stateno = 1401
helpertype = normal
name = "Kuroneko"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1400, Helper]
type = Helper
triggerall = Var(49) <= 0
trigger1 = Var(46) = 1
trigger1 = Var(47) >= 1
trigger1 = time = 0
ID = 1430
pos = 30,0
postype = P1
stateno = 1420
helpertype = normal
name = "Kamineko"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1400, Helper]
type = Helper
triggerall = Var(49) > 0
trigger1 = time = 0
ID = 1430
pos = 30,0
postype = P1
stateno = 1420
helpertype = normal
name = "Kamineko"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1400, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
Ctrl = 1

[StateDef 1401]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0
anim = 1401
sprpriority = 2

[State 1401, ParentVarAdd]
type = ParentVarAdd
trigger1 = IsHelper(1401)
trigger1 = NumHelper(1415)
trigger1 = Helper(1415),MoveHit = 1
trigger2 = IsHelper(1401)
trigger2 = NumHelper(1416)
trigger2 = Helper(1416),MoveHit = 1
trigger3 = IsHelper(1401)
trigger3 = NumHelper(1417)
trigger3 = Helper(1417),MoveHit = 1
trigger4 = IsHelper(1401)
trigger4 = NumHelper(1418)
trigger4 = Helper(1418),MoveHit = 1
trigger5 = IsHelper(1401)
trigger5 = NumHelper(1419)
trigger5 = Helper(1419),MoveHit = 1
trigger6 = IsHelper(1401)
trigger6 = NumHelper(1420)
trigger6 = Helper(1420),MoveHit = 1
trigger7 = IsHelper(1401)
trigger7 = NumHelper(1421)
trigger7 = Helper(1421),MoveHit = 1
trigger8 = IsHelper(1401)
trigger8 = NumHelper(1422)
trigger8 = Helper(1422),MoveHit = 1
trigger9 = IsHelper(1401)
trigger9 = NumHelper(1423)
trigger9 = Helper(1423),MoveHit = 1
trigger10 = IsHelper(1401)
trigger10 = NumHelper(1424)
trigger10 = Helper(1424),MoveHit = 1
trigger11 = IsHelper(1401)
trigger11 = NumHelper(1425)
trigger11 = Helper(1425),MoveHit = 1
trigger12 = IsHelper(1401)
trigger12 = NumHelper(1426)
trigger12 = Helper(1426),MoveHit = 1
trigger13 = IsHelper(1401)
trigger13 = NumHelper(1427)
trigger13 = Helper(1427),MoveHit = 1
var(45) = 2-6*(!!Root,var(46))

[State 1401, ParentVarAdd]
type = ParentVarAdd
trigger1 = IsHelper(1401)
trigger1 = NumHelper(1415)
trigger1 = Helper(1415),MoveGuarded = 1
trigger2 = IsHelper(1401)
trigger2 = NumHelper(1416)
trigger2 = Helper(1416),MoveGuarded = 1
trigger3 = IsHelper(1401)
trigger3 = NumHelper(1417)
trigger3 = Helper(1417),MoveGuarded = 1
trigger4 = IsHelper(1401)
trigger4 = NumHelper(1418)
trigger4 = Helper(1418),MoveGuarded = 1
trigger5 = IsHelper(1401)
trigger5 = NumHelper(1419)
trigger5 = Helper(1419),MoveGuarded = 1
trigger6 = IsHelper(1401)
trigger6 = NumHelper(1420)
trigger6 = Helper(1420),MoveGuarded = 1
trigger7 = IsHelper(1401)
trigger7 = NumHelper(1421)
trigger7 = Helper(1421),MoveGuarded = 1
trigger8 = IsHelper(1401)
trigger8 = NumHelper(1422)
trigger8 = Helper(1422),MoveGuarded = 1
trigger9 = IsHelper(1401)
trigger9 = NumHelper(1423)
trigger9 = Helper(1423),MoveGuarded = 1
trigger10 = IsHelper(1401)
trigger10 = NumHelper(1424)
trigger10 = Helper(1424),MoveGuarded = 1
trigger11 = IsHelper(1401)
trigger11 = NumHelper(1425)
trigger11 = Helper(1425),MoveGuarded = 1
trigger12 = IsHelper(1401)
trigger12 = NumHelper(1426)
trigger12 = Helper(1426),MoveGuarded = 1
trigger13 = IsHelper(1401)
trigger13 = NumHelper(1427)
trigger13 = Helper(1427),MoveGuarded = 1
var(45) = 1-5*(!!Root,var(46))

[State 1401, Trans]
type = Trans
trigger1 = Time >= 0
trigger1 = Time < 9
trans = AddAlpha
alpha = 256,256-(32*Time)

[State 1401, Trans]
type = Trans
trigger1 = Time >= 101
trans = AddAlpha
alpha = IfElse(time >= 8,32*(116-time),256),ifelse(time <= 6,32*(time-101),256)

[State 1401, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
time = -1
StateNo = 1404

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

[State 1401, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1410,0+Random%3
channel = 1

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(48*Root,FVar(32)),Floor(-11*Root,FVar(33))
stateno = 1402
ID = 1402
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(30*Root,FVar(32)),Floor(-7*Root,FVar(33))
stateno = 1402
ID = 1403
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(38*Root,FVar(32)),Floor(-13*Root,FVar(33))
stateno = 1402
ID = 1404
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(42*Root,FVar(32)),Floor(-23*Root,FVar(33))
stateno = 1402
ID = 1405
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(51*Root,FVar(32)),Floor(-5*Root,FVar(33))
stateno = 1402
ID = 1406
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(38*Root,FVar(32)),Floor(-70*Root,FVar(33))
stateno = 1402
ID = 1407
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(29*Root,FVar(32)),Floor(-78*Root,FVar(33))
stateno = 1402
ID = 1408
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(11*Root,FVar(32)),Floor(-12*Root,FVar(33))
stateno = 1402
ID = 1409
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(21*Root,FVar(32)),Floor(-16*Root,FVar(33))
stateno = 1402
ID = 1410
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(40*Root,FVar(32)),Floor(-31*Root,FVar(33))
stateno = 1402
ID = 1411
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(48*Root,FVar(32)),Floor(-48*Root,FVar(33))
stateno = 1402
ID = 1412
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(23*Root,FVar(32)),Floor(-34*Root,FVar(33))
stateno = 1402
ID = 1413
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(46*Root,FVar(32)),Floor(-80*Root,FVar(33))
stateno = 1402
ID = 1414
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 67
helpertype = Normal
name = "Rose2"
pos = Floor(48*Root,FVar(32)),Floor(-11*Root,FVar(33))
stateno = 1403
ID = 1415
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 56
helpertype = Normal
name = "Rose2"
pos = Floor(30*Root,FVar(32)),Floor(-7*Root,FVar(33))
stateno = 1403
ID = 1416
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 61
helpertype = Normal
name = "Rose2"
pos = Floor(38*Root,FVar(32)),Floor(-13*Root,FVar(33))
stateno = 1403
ID = 1417
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 73
helpertype = Normal
name = "Rose2"
pos = Floor(42*Root,FVar(32)),Floor(-23*Root,FVar(33))
stateno = 1403
ID = 1418
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 61
helpertype = Normal
name = "Rose2"
pos = Floor(51*Root,FVar(32)),Floor(-5*Root,FVar(33))
stateno = 1403
ID = 1419
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 67
helpertype = Normal
name = "Rose2"
pos = Floor(38*Root,FVar(32)),Floor(-70*Root,FVar(33))
stateno = 1403
ID = 1420
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 73
helpertype = Normal
name = "Rose2"
pos = Floor(29*Root,FVar(32)),Floor(-78*Root,FVar(33))
stateno = 1403
ID = 1421
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 77
helpertype = Normal
name = "Rose2"
pos = Floor(11*Root,FVar(32)),Floor(-12*Root,FVar(33))
stateno = 1403
ID = 1422
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 60
helpertype = Normal
name = "Rose2"
pos = Floor(21*Root,FVar(32)),Floor(-16*Root,FVar(33))
stateno = 1403
ID = 1423
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 65
helpertype = Normal
name = "Rose2"
pos = Floor(40*Root,FVar(32)),Floor(-31*Root,FVar(33))
stateno = 1403
ID = 1424
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 77
helpertype = Normal
name = "Rose2"
pos = Floor(48*Root,FVar(32)),Floor(-48*Root,FVar(33))
stateno = 1403
ID = 1425
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 71
helpertype = Normal
name = "Rose2"
pos = Floor(23*Root,FVar(32)),Floor(-34*Root,FVar(33))
stateno = 1403
ID = 1426
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, Helper]
type = Helper
trigger1 = Time = 71
helpertype = Normal
name = "Rose2"
pos = Floor(46*Root,FVar(32)),Floor(-80*Root,FVar(33))
stateno = 1403
ID = 1427
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1401, DestroySelf]
type = DestroySelf
trigger1 = Time >= 116

[StateDef 1402]
type = S
movetype = I
physics = N
ctrl = 0
sprpriority = 0

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1412)
fvar(4) = IfElse(Time <= 2,0.08*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1408) || IsHelper(1409) || IsHelper(1414)
fvar(4) = IfElse(Time <= 2,0.1*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1405)
fvar(4) = IfElse(Time <= 2,0.12*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1406) || IsHelper(1413)
fvar(4) = IfElse(Time <= 2,0.16*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1407)
fvar(4) = IfElse(Time <= 2,0.17*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1404)
fvar(4) = IfElse(Time <= 2,0.18*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1410) || IsHelper(1411)
fvar(4) = IfElse(Time <= 2,0.19*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, VarAdd]
type = VarAdd
trigger1 = IsHelper(1402) || IsHelper(1403)
fvar(4) = IfElse(Time <= 2,0.2*1,IfElse((Time = [6,8]),0.01,0))

[State 1402, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1402, Trans]
type = Trans
trigger1 = (Anim = [1402,1404]) && AnimElemTime(3) < 0
trans = AddAlpha
alpha = 200,50

[State 1402, Trans]
type = Trans
trigger1 = Anim = [1405,1407]
trans = AddAlpha
alpha = 200,150

[State 1402, SprPriority]
type = SprPriority
trigger1 = IsHelper(1402) || IsHelper(1403) || IsHelper(1405) || IsHelper(1406) || IsHelper(1408) || IsHelper(1409) || IsHelper(1412) || IsHelper(1413) || IsHelper(1414)
value = -1

[State 1402, SprPriority]
type = SprPriority
trigger1 = IsHelper(1404) || IsHelper(1407) || IsHelper(1410) || IsHelper(1411)
value = 0

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 
trigger1 = (IsHelper(1404) || IsHelper(1407) || IsHelper(1409) || IsHelper(1410) || IsHelper(1411) || IsHelper(1412))
value = 1402

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 
trigger1 = (IsHelper(1402) || IsHelper(1403) || IsHelper(1408) || IsHelper(1414))
value = 1403

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 
trigger1 = (IsHelper(1405) || IsHelper(1406) || IsHelper(1413))
value = 1404

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = ((IsHelper(1404) && Time = 51) || (IsHelper(1407) && Time = 57) || (IsHelper(1409) && Time = 63) || (IsHelper(1410) && Time = 46) || (IsHelper(1411) && Time = 51) || (IsHelper(1412) && Time = 63))
value = 1405

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = ((IsHelper(1402) && Time = 57) || (IsHelper(1403) && Time = 46) || (IsHelper(1408) && Time = 63) || (IsHelper(1414) && Time = 57))
value = 1406

[State 1402, ChangeAnim]
type = ChangeAnim
trigger1 = ((IsHelper(1405) && Time = 63) || (IsHelper(1406) && Time = 51) || (IsHelper(1413) && Time = 57))
value = 1407

[State 1402, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.4+FVar(4),0.4+FVar(4)

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1402)
value = 100

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1403)
value = -50

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1404)
value = 10

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1405)
value = -80

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1408)
value = -8

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1412)
value = 172

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1413)
value = -20

[State 1402, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1414)
value = -83

[State 1402, DestroySelf]
type = DestroySelf
trigger1 = Parent,StateNo != 1401
trigger2 = Anim = [1405,1407] 
trigger2 = AnimTime = 0

[StateDef 1403]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1408
sprpriority = 4

[State 1403, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1403, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.7,0.7

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1415) || IsHelper(1427)
value = -90

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1416)
value = -100

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1417)
value = -115

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1418)
value = -95

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1419)
value = -48

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1420)
value = -54

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1421)
value = -43

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1422)
value = -80

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1423)
value = -135

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1424)
value = -45

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1425)
value = -88

[State 1403, AngleSet]
type = Angleset
trigger1 = IsHelper(1426)
value = -96

[State 1403, VelSet]
type = VelSet
trigger1 = Time = 0
x = 5

[State 1403, VelAdd]
type = VelAdd
trigger1 = 1
x = 0.12
y = -0.1

[State 1403, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
damage = ceil(IfElse(Root,Var(26),10,8)*(Root,fvar(1)*Root,fvar(2))),1
attr = S,SP
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 1,10
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,3
guardsound = S300,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2,-6.5
air.velocity = -2,-6.5
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1403, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 0
size.xscale = 1
size.yscale = 1

[State 1403, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 0
size.xscale = 1
size.yscale = 1

[State 1403, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 1403, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[State 1403, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist < -30 
trigger2 = Time = 180

[StateDef 1404]
type = S
movetype = H
physics = N
ctrl = 0
sprpriority = -2
anim = 1409

[State 1404, Trans]
type = Trans
trigger1 = AnimElemTime(3) >= 0
trans = AddAlpha
alpha = 256-(25*(Time-16)),25

[State 1404, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1430,0+Random%2
channel = 1

[State 1404, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

[StateDef 1420]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0
anim = 1410
sprpriority = 2

[State 1420, ParentVarAdd]
type = ParentVarAdd
trigger1 = IsHelper(1430)
trigger1 = NumHelper(1444)
trigger1 = Helper(1444),MoveHit = 1
trigger2 = IsHelper(1430)
trigger2 = NumHelper(1445)
trigger2 = Helper(1445),MoveHit = 1
trigger3 = IsHelper(1430)
trigger3 = NumHelper(1446)
trigger3 = Helper(1446),MoveHit = 1
trigger4 = IsHelper(1430)
trigger4 = NumHelper(1447)
trigger4 = Helper(1447),MoveHit = 1
trigger5 = IsHelper(1430)
trigger5 = NumHelper(1449)
trigger5 = Helper(1449),MoveHit = 1
trigger6 = IsHelper(1430)
trigger6 = NumHelper(1451)
trigger6 = Helper(1451),MoveHit = 1
trigger7 = IsHelper(1430)
trigger7 = NumHelper(1452)
trigger7 = Helper(1452),MoveHit = 1
trigger8 = IsHelper(1430)
trigger8 = NumHelper(1453)
trigger8 = Helper(1453),MoveHit = 1
trigger9 = IsHelper(1430)
trigger9 = NumHelper(1454)
trigger9 = Helper(1454),MoveHit = 1
trigger10 = IsHelper(1430)
trigger10 = NumHelper(1455)
trigger10 = Helper(1455),MoveHit = 1
var(45) = 2-6*(!!Root,var(46))

[State 1420, ParentVarAdd]
type = ParentVarAdd
trigger1 = IsHelper(1430)
trigger1 = NumHelper(1444)
trigger1 = Helper(1444),MoveGuarded = 1
trigger2 = IsHelper(1430)
trigger2 = NumHelper(1445)
trigger2 = Helper(1445),MoveGuarded = 1
trigger3 = IsHelper(1430)
trigger3 = NumHelper(1446)
trigger3 = Helper(1446),MoveGuarded = 1
trigger4 = IsHelper(1430)
trigger4 = NumHelper(1447)
trigger4 = Helper(1447),MoveGuarded = 1
trigger5 = IsHelper(1430)
trigger5 = NumHelper(1449)
trigger5 = Helper(1449),MoveGuarded = 1
trigger6 = IsHelper(1430)
trigger6 = NumHelper(1451)
trigger6 = Helper(1451),MoveGuarded = 1
trigger7 = IsHelper(1430)
trigger7 = NumHelper(1452)
trigger7 = Helper(1452),MoveGuarded = 1
trigger8 = IsHelper(1430)
trigger8 = NumHelper(1453)
trigger8 = Helper(1453),MoveGuarded = 1
trigger9 = IsHelper(1430)
trigger9 = NumHelper(1454)
trigger9 = Helper(1454),MoveGuarded = 1
trigger10 = IsHelper(1430)
trigger10 = NumHelper(1455)
trigger10 = Helper(1455),MoveGuarded = 1
var(45) = 1-5*(!!Root,var(46))

[State 1420, Trans]
type = Trans
trigger1 = Time >= 0
trigger1 = Time < 9
trans = AddAlpha
alpha = 256,256-(32*Time)

[State 1420, Trans]
type = Trans
trigger1 = Time >= 181
trans = AddAlpha
alpha = IfElse(time >= 8,32*(196-time),256),ifelse(time <= 6,32*(time-181),256)

[State 1420, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
time = -1
StateNo = 1423

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

[State 1420, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1410,4
channel = 1

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(61*Root,FVar(32)),Floor(-15*Root,FVar(33))
stateno = 1421
ID = 1431
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(40*Root,FVar(32)),Floor(-10*Root,FVar(33))
stateno = 1421
ID = 1432
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(43*Root,FVar(32)),Floor(-16*Root,FVar(33))
stateno = 1421
ID = 1433
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(48*Root,FVar(32)),Floor(-29*Root,FVar(33))
stateno = 1421
ID = 1434
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(59*Root,FVar(32)),Floor(-9*Root,FVar(33))
stateno = 1421
ID = 1435
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(48*Root,FVar(32)),Floor(-90*Root,FVar(33))
stateno = 1421
ID = 1436
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 10
helpertype = Normal
name = "Rose"
pos = Floor(38*Root,FVar(32)),Floor(-100*Root,FVar(33))
stateno = 1421
ID = 1437
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(10*Root,FVar(32)),Floor(-13*Root,FVar(33))
stateno = 1421
ID = 1438
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(26*Root,FVar(32)),Floor(-21*Root,FVar(33))
stateno = 1421
ID = 1439
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(49*Root,FVar(32)),Floor(-37*Root,FVar(33))
stateno = 1421
ID = 1440
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(60*Root,FVar(32)),Floor(-55*Root,FVar(33))
stateno = 1421
ID = 1441
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(28*Root,FVar(32)),Floor(-42*Root,FVar(33))
stateno = 1421
ID = 1442
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 14
helpertype = Normal
name = "Rose"
pos = Floor(56*Root,FVar(32)),Floor(-101*Root,FVar(33))
stateno = 1421
ID = 1443
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 66
trigger2 = Time = 107
helpertype = Normal
name = "Rose2"
pos = Floor(61*Root,FVar(32)),Floor(-15*Root,FVar(33))
stateno = 1422
ID = 1444
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 48
trigger2 = Time = 60
trigger3 = Time = 94
helpertype = Normal
name = "Rose2"
pos = Floor(40*Root,FVar(32)),Floor(-10*Root,FVar(33))
stateno = 1422
ID = 1445
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 54
trigger2 = Time = 72
helpertype = Normal
name = "Rose2"
pos = Floor(43*Root,FVar(32)),Floor(-16*Root,FVar(33))
stateno = 1422
ID = 1446
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 110
helpertype = Normal
name = "Rose2"
pos = Floor(48*Root,FVar(32)),Floor(-29*Root,FVar(33))
stateno = 1422
ID = 1447
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 72
trigger2 = Time = 96
trigger3 = Time = 138
helpertype = Normal
name = "Rose2"
pos = Floor(48*Root,FVar(32)),Floor(-90*Root,FVar(33))
stateno = 1422
ID = 1449
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 60
trigger2 = Time = 84
helpertype = Normal
name = "Rose2"
pos = Floor(10*Root,FVar(32)),Floor(-13*Root,FVar(33))
stateno = 1422
ID = 1451
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 42
trigger2 = Time = 54
trigger3 = Time = 126
helpertype = Normal
name = "Rose2"
pos = Floor(26*Root,FVar(32)),Floor(-21*Root,FVar(33))
stateno = 1422
ID = 1452
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 66
trigger2 = Time = 90
trigger3 = Time = 114
trigger4 = Time = 132
helpertype = Normal
name = "Rose2"
pos = Floor(49*Root,FVar(32)),Floor(-37*Root,FVar(33))
stateno = 1422
ID = 1453
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 102
trigger2 = Time = 144
helpertype = Normal
name = "Rose2"
pos = Floor(60*Root,FVar(32)),Floor(-55*Root,FVar(33))
stateno = 1422
ID = 1454
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, Helper]
type = Helper
trigger1 = Time = 138
helpertype = Normal
name = "Rose2"
pos = Floor(28*Root,FVar(32)),Floor(-42*Root,FVar(33))
stateno = 1422
ID = 1455
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 1420, DestroySelf]
type = DestroySelf
trigger1 = Time >= 196

[StateDef 1421]
type = S
movetype = I
physics = N
ctrl = 0
sprpriority = 0

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1431)
fvar(4) = IfElse(Time <= 2,0.08*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1437) || IsHelper(1438) || IsHelper(1443)
fvar(4) = IfElse(Time <= 2,0.1*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1434)
fvar(4) = IfElse(Time <= 2,0.12*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1435) || IsHelper(1442)
fvar(4) = IfElse(Time <= 2,0.16*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1436)
fvar(4) = IfElse(Time <= 2,0.17*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1433)
fvar(4) = IfElse(Time <= 2,0.18*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1439) || IsHelper(1440)
fvar(4) = IfElse(Time <= 2,0.19*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, VarAdd]
type = VarAdd
trigger1 = IsHelper(1431) || IsHelper(1432)
fvar(4) = IfElse(Time <= 2,0.2*1.3,IfElse((Time = [6,8]),0.01,0))

[State 1421, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1421, Trans]
type = Trans
trigger1 = Anim = [1414,1416]
trans = AddAlpha
alpha = 200,150

[State 1421, SprPriority]
type = SprPriority
trigger1 = IsHelper(1431) || IsHelper(1432) || IsHelper(1434) || IsHelper(1435) || IsHelper(1437) || IsHelper(1438) || IsHelper(1441) || IsHelper(1442) || IsHelper(1443)
value = -1

[State 1421, SprPriority]
type = SprPriority
trigger1 = IsHelper(1433) || IsHelper(1436) || IsHelper(1439) || IsHelper(1440)
value = 0

[State 1421, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 
trigger1 = (IsHelper(1433) || IsHelper(1436) || IsHelper(1438) || IsHelper(1439) || IsHelper(1440) || IsHelper(1441))
value = 1411

[State 1421, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 
trigger1 = (IsHelper(1431) || IsHelper(1432) || IsHelper(1437) || IsHelper(1443))
value = 1412

[State 1421, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 
trigger1 = (IsHelper(1434) || IsHelper(1435) || IsHelper(1442))
value = 1413

[State 1421, ChangeAnim]
type = ChangeAnim
trigger1 = ((IsHelper(1433) && Time = 138) || (IsHelper(1436) && Time = 144) || (IsHelper(1438) && Time = 146) || (IsHelper(1439) && Time = 128) || (IsHelper(1440) && Time = 134) || (IsHelper(1441) && Time = 146))
value = 1414

[State 1421, ChangeAnim]
type = ChangeAnim
trigger1 = ((IsHelper(1431) && Time = 144) || (IsHelper(1432) && Time = 132) || (IsHelper(1437) && Time = 150) || (IsHelper(1443) && Time = 140))
value = 1415

[State 1421, ChangeAnim]
type = ChangeAnim
trigger1 = ((IsHelper(1434) && Time = 150) || (IsHelper(1435) && Time = 138) || (IsHelper(1442) && Time = 140))
value = 1416

[State 1421, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.4+FVar(4),0.4+FVar(4)

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1431)
value = 100

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1432)
value = -50

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1433)
value = 10

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1434)
value = -80

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1437)
value = -8

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1441)
value = 172

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1442)
value = -20

[State 1421, AngleSet]
type = Angleset
trigger1 = Time = 0 
trigger1 = IsHelper(1443)
value = -83

[State 1421, DestroySelf]
type = DestroySelf
trigger1 = Parent,StateNo != 1420
trigger2 = Anim = [1414,1416] 
trigger2 = AnimTime = 0

[StateDef 1422]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1417
sprpriority = 4

[State 1422, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1422, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.7,0.7

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1444) 
value = -90

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1445)
value = -100

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1446)
value = -115

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1447)
value = -95

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1449)
value = -54

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1451)
value = -80

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1452)
value = -135

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1453)
value = -45

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1454)
value = -88

[State 1422, AngleSet]
type = Angleset
trigger1 = IsHelper(1455)
value = -96

[State 1422, VelSet]
type = VelSet
trigger1 = Time = 0
x = 5

[State 1422, VelAdd]
type = VelAdd
trigger1 = 1
x = 0.12
y = -0.1

[State 1422, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
damage = ceil(IfElse(Root,Var(26),10,8)*(Root,fvar(1)*Root,fvar(2))),1
attr = S,SP
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 1,10
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,3
guardsound = S300,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2,-6.5
air.velocity = -2,-6.5
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 3

[State 1422, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 0
size.xscale = 1
size.yscale = 1

[State 1422, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 0
size.xscale = 1
size.yscale = 1

[State 1422, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 1422, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[State 1422, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist < -30 
trigger2 = Time = 180

[StateDef 1423]
type = S
movetype = H
physics = N
ctrl = 0
sprpriority = -2
anim = 1418

[State 1423, Trans]
type = Trans
trigger1 = AnimElemTime(3) >= 0
trans = AddAlpha
alpha = 256-(25*(Time-16)),25

[State 1423, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1430,0+Random%2
channel = 1

[State 1423, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

[StateDef 2000]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2000
sprpriority = 2
velset = 0,0
facep2 = 1

[State 2000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
v = 45
Value = 50

[State 2000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
v = 45
Value = -150

[State 2000, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
value = -1000

[State 2000, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
value = 300

[State 2000, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 12

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S10000,3

[State 2000, Helper]
type = Helper
trigger1 = Time = 0
name = "EX"
ID = 6200
stateno = 6200
pos = 0,0
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

[State 2000, PalFX]
type = PalFX
trigger1 = GameTime % 3 = 0
time = 1
add = 0,76,224
color = 124
ignorehitpause = 1

[State 2000, PalFX]
type = PalFX
trigger1 = GameTime % 3 = 1
time = 1
add = 0,46,164
color = 256
ignorehitpause = 1

[State 2000, StateTypeSet]
type = StateTypeSet
trigger1 = (AnimElemTime(6) >= 0 && AnimElemTime(11) < 0) || (AnimElemTime(17) >= 0 && AnimElemTime(27) < 0)
statetype = A

[State 2000, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(11) >= 0 && AnimElemTime(17) < 0
statetype = C

[State 2000, Helper]
type = Helper
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
helpertype = normal
stateno = 8030
ID = 8030
name = "Dash Dust"
postype = p1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 2000, Helper]
type = Helper
trigger1 = AnimElem = 19
trigger2 = AnimElem = 23
helpertype = Normal
name = "Kick Slash"
pos = 0,0
stateno = 1023
ID = 2000
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 2000, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 2000, PlayerPush]
type = PlayerPush
trigger1 = MoveHit 
trigger1 = NumTarget 
trigger1 = FrontEdgeBodyDist >= 30 
trigger1 = AnimElemTime(13) >= 0
trigger1 = AnimElemTime(16) < 0
trigger1 = Target,StateType = A
value = 0
ignorehitpause = 1

[State 2000, Turn]
type = Turn
trigger1 = AnimElem = 17 && P2Dist x < 0

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
value = S100,7

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
trigger2 = AnimElem = 23
value = S100,2

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S2000,0
channel = 0

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 11
value = S2000,1
channel = 0

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 22
value = S2000,2
channel = 0

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) = [0,5]
x = 11

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(11) <= 0
x = 8

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(11) >= 0 && AnimElemTime(15) < 0
x = 7.5

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(17) >= 0 && AnimElemTime(22) < 0
x = 7

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(17) = 0
y = -6

[State 2000, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(17) >= 0 && AnimElemTime(22) < 0
y = 0.4

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(22) >= 0
x = 2

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElemTime(22) = 0
y = -9.2

[State 2000, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(22) >= 0
y = 0.65

[State 2000, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed 
trigger1 = (AnimElemTime(5) = [0,5])
damage = IfElse(Var(10),30,25),5
attr = S,HA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 9,12
priority = 6,Hit
sparkno = -1+(0*(var(41) := 8053))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -65))
hitsound = S200,6
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -5,-7.5
air.velocity = -5,-6.5
ground.cornerpush.veloff = -7
air.cornerpush.veloff = -7
yaccel = .65
fall = 1
fall.recover = 0
getpower = 0,0
envshake.time = 10
envshake.ampl = 3

[State 2000, HitDef]
type = HitDef
trigger1 = AnimElem = 12 || AnimElem = 13 || AnimElem = 14
damage = IfElse(Var(10),24,20),3
attr = C,HA
animtype = hard
guardflag = L
hitflag = MAF
pausetime = 5,10
priority = 6,Hit
sparkno = -1+(0*(var(41) := 8053))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := IfElse(P2StateType = A,-75,-15)))
hitsound = S200,6
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,-6.5
air.velocity = -2,-IfElse(AnimElemTime(14) < 0,2,6.5)
ground.cornerpush.veloff = -7
air.cornerpush.veloff = -7
down.velocity = -.5,0
down.cornerpush.veloff = -2
yaccel = .65
fall = 1
fall.recover = 0
getpower = 0,0
envshake.time = 10
envshake.ampl = 3

[State 2000, HitDef]
type = HitDef
trigger1 = AnimElem = 18
damage = IfElse(Var(10),30,25),3
attr = S,HA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 10,9
priority = 6,Hit
sparkno = -1+(0*(var(41) := 8053))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -75))
hitsound = S200,7
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,-8.5
air.velocity = -1.2,-8.5
yaccel = .65
fall = 1
fall.recover = 0
P2facing = 1
getpower = 0,0
envshake.time = 10
envshake.ampl = 3

[State 2000, HitDef]
type = HitDef
trigger1 = AnimElem = 19
damage = IfElse(Var(10),30,25),3
attr = S,HA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 11,10
priority = 6,Hit
sparkno = -1+(0*(var(41) := 8053))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -75))
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 0
getpower = 0,0
envshake.time = 10
envshake.ampl = 3
P2StateNo = 1025

[State 2000, HitDef]
type = HitDef
trigger1 = AnimElem = 23
damage = IfElse(Var(10),30,25),3
attr = S,HA
animtype = hard
guardflag = MA
hitflag = MAFD
pausetime = 9,12
priority = 6,Hit
sparkno = -1+(0*(var(41) := 8053))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 80 && var(44) := -75))
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -6,10
air.velocity = -6,10
yaccel = .65
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 3
getpower = 0,0

[State 2000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1021

[StateDef 2200]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2200
sprpriority = 2
velset = 0,0
facep2 = 1

[State 2200, VarSet]
type = VarSet
trigger1 = Time = 0
v = 10
Value = 0

[State 2200, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
v = 45
Value = 50

[State 2200, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
v = 45
Value = -150

[State 2200, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
value = -1000

[State 2200, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
value = 300

[State 2200, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 9

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S10000,3

[State 2200, Helper]
type = Helper
trigger1 = Time = 0
name = "EX"
ID = 6200
stateno = 6200
pos = 0,0
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

[State 2200, PalFX]
type = PalFX
trigger1 = GameTime % 3 = 0
time = 1
add = 0,76,224
color = 124
ignorehitpause = 1

[State 2200, PalFX]
type = PalFX
trigger1 = GameTime % 3 = 1
time = 1
add = 0,46,164
color = 256
ignorehitpause = 1

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 13 || AnimElem = 18 || AnimElem = 23
value = S100,2

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S2200,0
channel = 0

[State 2200, Helper]
type = Helper
triggerall=!numhelper(1205)
trigger1 = AnimElem = 1
trigger2 = AnimElem = 6
trigger3 = AnimElem = 11
trigger4 = AnimElem = 16
trigger5 = AnimElem = 21
helpertype = Normal
name = "ItemGen"
stateno = 1205
ID = 1205
ownpal = 1
ignorehitpause = 1

[state ]
type=null
trigger1=animelem=1||animelem=6||animelem=11 || AnimElem = 16 || AnimElem = 21
trigger1=1||(var(11):=(var(10):=var(10)%7+1))

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

[StateDef 2300]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1300
velset = 0,0

[State 2300, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
v = 45
Value = 50

[State 2300, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) >= 2
trigger1 = Time = 14
v = 45
value = 25

[State 2300, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
v = 45
Value = -150

[State 2300, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) = 1
trigger1 = Time = 15
v = 47
Value = -1

[State 2300, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) >= 2
trigger1 = Time = 15
v = 47
Value = -2

[State 2300, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
value = -1000

[State 2300, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
value = 300

[State 2300, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 10

[State 2300, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S10000,3

[State 2300, Helper]
type = Helper
trigger1 = Time = 0
name = "EX"
ID = 6200
stateno = 6200
pos = 0,0
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

[State 2300, PalFX]
type = PalFX
trigger1 = GameTime % 3 = 0
time = 1
add = 0,76,224
color = 124
ignorehitpause = 1

[State 2300, PalFX]
type = PalFX
trigger1 = GameTime % 3 = 1
time = 1
add = 0,46,164
color = 256
ignorehitpause = 1

[State 2300, VelSet]
type = VelSet
trigger1 = Time = 0
x = 1
y = -8.2

[State 1300, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.4

[State 2300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S2300,0+Random%2
channel = 0

[State 2300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S200,0

[State 2300, Helper]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "Beachball"
pos = 0,0
stateno = 2301
ID = 2301
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 2300, ChangeState]
type = ChangeState
trigger1 = vel Y > 0 && pos Y >= 0
value = 1301

[StateDef 2301]
type = A
movetype = A
physics = N
ctrl = 0
sprpriority = 3
anim = 1302

[State 2301, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 2301, BindToRoot]
type = BindToRoot
trigger1 = Root,AnimElemTime(1) <= 4
time = 1
pos = Floor(28*Root,FVar(32)),Floor(-99*Root,FVar(33))

[State 2301, BindToRoot]
type = BindToRoot
trigger1 = Root,AnimElemTime(2) = [0,6]
time = 1
pos = Floor(28*Root,FVar(32)),Floor(-106*Root,FVar(33))

[State 2301, BindToRoot]
type = BindToRoot
trigger1 = Root,AnimElemTime(3) >= 0
time = 1
pos = Floor(28*Root,FVar(32)),Floor(-107*Root,FVar(33))

[State 2301, ChangeState]
type = ChangeState
trigger1 = Root,AnimElemTime(4) >= 0
value = 2302

[State 2301, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H
trigger2 = Root,StateNo != 2300

[StateDef 2302]
type = A
movetype = A
physics = N
ctrl = 0
anim = 2302
sprpriority = 3

[State 2302, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 2302, BindToParent]
type = BindToParent
trigger1 = Time = 0
time = 1
pos = Floor(40*Root,FVar(32)),Floor(-50*Root,FVar(33))

[State 2302, VelSet]
type = VelSet
trigger1 = Time = 0
x = 14
y = 12

[State 2302, HitDef]
type = HitDef
trigger1 = Root,Var(46) = 0
trigger1 = !MoveContact && !MoveReversed
damage = ceil(IfElse(Root,Var(26),144,120)*(Root,fvar(1)*Root,fvar(2))),12
attr = A,HP
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 0,12
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
getpower = 0
p2stateno = 1025

[State 2302, HitDef]
type = HitDef
trigger1 = Root,Var(46) = 1
trigger1 = Root,Var(47) = 0
trigger1 = !MoveContact && !MoveReversed
damage = ceil(IfElse(Root,Var(26),180,150)*(Root,fvar(1)*Root,fvar(2))),15
attr = A,HP
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 0,12
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
getpower = 0
p2stateno = 1025

[State 2302, HitDef]
type = HitDef
trigger1 = Root,Var(46) = 1
trigger1 = Root,Var(47) >= 1
trigger1 = !MoveContact && !MoveReversed
damage = ceil(IfElse(Root,Var(26),198,165)*(Root,fvar(1)*Root,fvar(2))),17
attr = A,HP
animtype = medium
guardflag = MA
hitflag = MAF
pausetime = 0,12
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,10
air.velocity = -1.2,10
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.freq = 90
envshake.ampl = 4
getpower = 0
p2stateno = 1025

[State 2302, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8053
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 2302, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 2302, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 2302, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[State 2302, VelSet]
type = VelSet
trigger1 = Pos y >= -10
y = 0

[State 2302, PosSet]
type = PosSet
trigger1 = Pos y >= -10
y = -10

[State 2302, ChangeState]
type = ChangeState
trigger1 = Pos y >= -10
value = 1304

[State 2302, ChangeState]
type = ChangeState
trigger1 = MoveContact
value = 1305
ignorehitpause = 1

[StateDef 3000]
Type = S
Physics = S
MoveType = I
Anim = 3000
VelSet = 0,0
ctrl = 0
sprpriority = 2

[State 3000, VarAdd]
type = VarAdd
trigger1 = Var(47) >= 3
trigger1 = AnimElem = 1
v = 47
Value = -3

[State 3000, VarSet]
type = VarSet
trigger1 = Time = 0
var(48) = 360
ignorehitpause = 1

[State 3000, VarSet]
type = VarSet
trigger1 = Var(46) = 0
trigger1 = Time = 0
var(49) = 600
ignorehitpause = 1

[State 3000, VarSet]
type = VarSet
trigger1 = Var(46) = 1
trigger1 = Time = 0
var(49) = 900
ignorehitpause = 1

[State 3000, NotHitBy]
type = NotHitBy
trigger1 = Anim = 3000
value = SCA

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S10000,6

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S3000,0+Random%3
Channel = 0

[State 3000, SuperPause]
type = SuperPause
trigger1 = Anim = 3000
trigger1 = time = 0
time = 56
movetime = 56
anim = -1
p2defmul = 1
darken = 0

[State 3000, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal
stateno = 3010
ID = 3010
name = "Effect"
postype = p1
pos = 0,-90
supermovetime = 255
size.xscale = 0.335
size.yscale = 0.335
ownpal = 1

[State 3000, Helper]
type = Helper
trigger1 = Time = 0
stateno = 3011
ID = 3011
name = "Portrait"
SuperMovetime = 9999
PauseMovetime = 9999
ownpal = 1

[State 3000, Helper]
type = Helper
trigger1 = Time = 0
stateno = 3012
ID = 3012
Name = "Trigger"
postype = Left
pos = 320,-140
facing = 1
sprpriority = 1
ownpal = 1
ignorehitpause = 1
persistent = 0
Pausemovetime = 9999
SuperMovetime = 9999

[State 3000, Helper]
type = Helper
trigger1 = Time = 0
stateno = 3013
ID = 3013
Name = "Trigger"
postype = Left
pos = 320,-100
facing = 1
sprpriority = 1
ownpal = 1
ignorehitpause = 1
persistent = 0
Pausemovetime = 9999
SuperMovetime = 9999

[State 3000, Helper]
type = Helper
trigger1 = time = 0
ID = 3004
pos = 60,0
postype = P1
stateno = 3004
helpertype = normal
name = "Kuroneko"
keyctrl = 0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 3000, helper]
type = Helper
trigger1 = Time = 0
stateno = 3001
ID = 3001
Name = "Meter"
postype = P1
facing = 1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
persistent = 0
Helpertype = Normal
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 3000, helper]
type = Helper
trigger1 = AnimElem = 1
stateno = 3002
ID = 3002
Name = "Curse"
postype = P1
facing = 1
ownpal = 1
ignorehitpause = 1
persistent = 0
Helpertype = Normal
pausemovetime=-2**31-1
supermovetime=-2**31-1

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

[StateDef 3001]
type = A
movetype = I
physics = N
anim = 99999
ctrl = 0
velset = 0,0
sprpriority = -99

[State 3001, nothitby]
type = nothitby
trigger1 = 1
value = SCA
time = 999

[State 3001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3001, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 3001, Explod]
type = explod
trigger1 = Numexplod(6017)=0
ID = 6017
anim = IfElse(Teamside = 1,6017,6018)
pos = Ifelse(Teamside = 1,-10,10),15
postype = P1
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 3001, Explod]
type = explod
trigger1 = NumExplod(6019) = 0
id = 6019
anim = 6019
pos = Ifelse(Teamside = 1,-12,12),6
postype = P1
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = ifelse(teamside=1,1,-1)
pausemovetime=-1
supermovetime=-1

[State 3001, ModifyExplod]
type = modifyexplod
trigger1 = 1
id = 6019
Scale = .5*Root,Var(49)/900,0.50

[State 3001, RemoveExplod]
type = RemoveExplod
trigger1 = Root,Var(49) <= 0
id = 6017

[State 3001, RemoveExplod]
type = RemoveExplod
trigger1 = Root,Var(49) <= 0
id = 6019

[State 3001, DestroySelf]
type = DestroySelf
trigger1 = Root,Var(49) <= 0

[StateDef 3002]
type = A
movetype = I
physics = N
anim = 3001
ctrl = 0
velset = 0,0
sprpriority = -5

[State 3002, NotHitBy]
type = NotHitBy
trigger1 = Root,StateNo = 3000
trigger2 = Root,StateNo = [4005,4099]
value = SCA

[State 3002, NotHitBy]
type = NotHitBy
trigger1 = Root,StateNo != 3000
value = SCA,NT,ST,HT

[State 3002, HitBy]
type = HitBy
trigger1 = Root,StateNo != 3000
value = SCA,NA,SA,HA,NP,SP,HP

[State 3002, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3003, AssertSpecial]
type = AssertSpecial
trigger1 = Root,StateNo = [4005,4099]
flag = Invisible

[State 3002, Trans]
type = Trans
trigger1 = 1
trans = add

[State 3002, HitOverride]
type = HitOverride
trigger1 = Root,StateNo != 3000
attr = SCA,NA,SA,HA,NP,SP,HP
time = -1
StateNo = 3003

[State 3002, BindtoRoot]
type = BindToRoot
trigger1 = 1
time = -1
pos = 0,-65
ignorehitpause = 1

[State 3002, AngleDraw]
type = AngleDraw
trigger1 = Time >= 0
trigger1 = Time < 10
scale = 0+(Time*0.05),0+(Time*0.05)

[State 3002, AngleDraw]
type = AngleDraw
trigger1 = Time >= 10
scale = 0.5,0.5

[State 3002, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 1

[State 3002, DestroySelf]
type = DestroySelf
trigger1 = Root,Var(49) <= 0

[StateDef 3003]
type = A
movetype = A
physics = N
anim = 3002
ctrl = 0
velset = 0,0
sprpriority = -5

[State 3003, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3003, Trans]
type = Trans
trigger1 = Time >= 0
trans = AddAlpha
alpha = IfElse(time >= 8,32*(15-time),256),ifelse(time <= 6,32*(time),256)

[State 3003, BindtoRoot]
type = BindToRoot
trigger1 = 1
time = -1
pos = 0,-65
ignorehitpause = 1

[State 3003, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5+(Time*0.1),0.5+(Time*0.1)

[State 3003, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,19

[State 3003, HitDef]
type = HitDef
trigger1 = AnimElem = 1
damage = ceil(50*(Root,fvar(1)*Root,fvar(2)))
attr = S,HP
animtype = up
guardflag = 
hitflag = MAF
pausetime = 0,12
priority = 5,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -1,-14
guard.velocity = -8
air.velocity = -1,-14
yaccel = 0.65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
getpower = 0,0

[State 3003, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8054
stateno = 8054
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 3003, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 3003, DestroySelf]
type = DestroySelf
trigger1 = Time >= 15

[StateDef 3004]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
anim = 3003
sprpriority = 2

[State 3004, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3004, Trans]
type = Trans
trigger1 = Time >= 25
trans = AddAlpha
alpha = IfElse(time >= 8,32*(40-time),256),ifelse(time <= 6,32*(time-25),256)

[State 3004, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1410,3
channel = 1

[State 3004, DestroySelf]
type = DestroySelf
trigger1 = Time >= 40

[StateDef 3010]
Type = A
Physics = N
MoveType = I
Anim = 3010
Ctrl = 0
velset = 0,0
sprpriority = 5

[State 3010, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3010, AngleSet]
type = AngleSet
trigger1 = Time = 0
value = 6*(random%60)

[State 3010, AngleAdd]
type = AngleAdd
trigger1 = 1
value = -6

[State 3010, AngleDraw]
type = AngleDraw
trigger1 = time < 8
scale = (0.0625*time),(0.0625*time)

[State 3010, AngleDraw]
type = AngleDraw
trigger1 = time >= 8
scale = 0.5,0.5

[State 3010, Trans]
type = Trans
trigger1 = time < 16
trans = AddAlpha
alpha = 256, 256

[State 3010, Trans]
type = Trans
trigger1 = time >= 16
trans = AddAlpha
alpha = ceil(256 - 25.6*(time-16)), 256

[State 3010, Explod]
type = explod
trigger1 = Time = 0
anim = 3011
ID = 3011
sprpriority = 5
postype = p1
facing = IfElse(random<500,-1,1)
vfacing = IfElse(random<500,-1,1)
removetime = 16
supermovetime = -1

[State 3010, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(3011)
ID = 3011
scale = 2-(.125*time), 2-(.125*time)
trans = AddAlpha
alpha = IfElse(time<4, 64*time, 256), 256

[State 3010, Explod]
type = Explod
trigger1 = time = 16
anim = 3012
ID = 3012
sprpriority = 5
postype = p1
removetime = 32
supermovetime = -1

[State 3010, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(3012)
ID = 3012
scale = (.1*(time-16)), (.1*(time-16))
trans = AddAlpha
alpha = ceil(256 - 25.6*(time-16)), 256

[State 3010, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 26

[State 3010, DestroySelf]
type = DestroySelf
trigger1 = time >= 26

[StateDef 3011]
Type = S
Physics = N
MoveType = I
Anim = 99999
Ctrl = 0
velset = 0,0
sprpriority = 5

[State 3011, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3011, BGPalFX]
type = BGPalFX
trigger1 = time > 0
trigger1 = time <= 51
time = 1
color= 5*time
mul = 5*time, 5*time, 5*time

[State 3011, Explod]
type = Explod
trigger1 = time = 0
anim = 3013
id = 3013
pos = ceil(gamewidth/2.0),ceil(gameheight/2.0-40)
postype = left
sprpriority = -8
bindtime = -1
ownpal = 1
Scale = .5,.5
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 3011, Explod]
type = Explod
trigger1 = time = 0
anim = 3014
ID = 3014
pos = ceil(gamewidth/2.0),ceil(gameheight/2.0-40)
postype = left
sprpriority = -7
bindtime = -1
ownpal = 1
Scale = .5,.5
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 3011, ModifyExplod]
type = ModifyExplod
trigger1 = time >= 65
ID = 3013
Scale = 0.5,0.5-((time-65)*0.1)

[State 3011, ModifyExplod]
type = ModifyExplod
trigger1 = time >= 65
ID = 3014
Scale = 0.5,0.5-((time-65)*0.1)

[State 3011, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 70
ID = 3013

[State 3011 RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 70
ID = 3014

[State 3011, DestroySelf]
type = DestroySelf
trigger1 = Time >= 70

[StateDef 3012]
type = A
movetype = I
physics = N
anim = 99999
ctrl = 0
velset = 0,0
sprpriority = 1

[State 3012, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3012, Explod]
type = Explod
Trigger1 = TeamSide = 1
Trigger1 = Time = 0
Anim = 3015
id = 3015
Pos = 0,ceil((1.33*gameheight/gamewidth)*54)
PosType = left
ownpal = 1
bindtime = -1
pausemovetime = 9999
supermove = 9999
ignorehitpause = 1
sprpriority = -5
scale = 0.5,0.5

[State 3012, Explod]
type = Explod
Trigger1 = TeamSide = 2
Trigger1 = Time = 0
Anim = 3015
id = 3015
Pos = 0,ceil((1.33*gameheight/gamewidth)*54)
PosType = left
ownpal = 1
bindtime = -1
pausemovetime = 9999
supermove = 9999
ignorehitpause = 1
sprpriority = -5
scale = 0.5,0.5

[State 3012, RemoveExplod]
type = RemoveExplod
ID = 3015
trigger1 = Time >= 73

[State 3012, DestroySelf]
type = DestroySelf
trigger1 = Time >= 73

[StateDef 3013]
type = A
movetype = I
physics = N
anim = 99999
ctrl = 0
velset = 0,0
sprpriority = 1

[State 3013, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3013, Explod]
type = Explod
Trigger1 = TeamSide = 1
Trigger1 = Time = 0
Anim = 3016
id = 3016
Pos = 215,ceil((1.33*gameheight/gamewidth)*114)
PosType = left
ownpal = 1
bindtime = -1
pausemovetime = 9999
supermove = 9999
ignorehitpause = 1
sprpriority = -5
scale = 0.5,0.5

[State 3013, Explod]
type = Explod
Trigger1 = TeamSide = 2
Trigger1 = Time = 0
Anim = 3016
id = 3016
Pos = 215,ceil((1.33*gameheight/gamewidth)*114)
PosType = left
ownpal = 1
bindtime = -1
pausemovetime = 9999
supermove = 9999
ignorehitpause = 1
sprpriority = -5
scale = 0.5,0.5

[State 3013, RemoveExplod]
type = RemoveExplod
ID = 3016
trigger1 = Time >= 73

[State 3013, DestroySelf]
type = DestroySelf
trigger1 = Time >=73

[StateDef 4000]
type = S
movetype = A
physics = N
ctrl = 0
Velset = 0,0
anim = 4000
facep2 = 1

[State 4000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
v = 45
Value = 75

[State 4000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
v = 45
Value = -350

[State 4000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) = 1
trigger1 = Time = 83
v = 47
Value = -1

[State 4000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) = 2
trigger1 = Time = 83
v = 47
Value = -2

[State 4000, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) >= 3
trigger1 = Time = 83
v = 47
Value = -3

[State 4000, VarAdd]
type = VarAdd
trigger1 = Var(49) > 0
trigger1 = Time = 0
var(49) = 300
ignorehitpause = 1

[State 4000, VarSet]
type = VarSet
trigger1 = Var(49) > 900
trigger1 = Time = 0
var(49) = 900
ignorehitpause = 1

[State 4000, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
value = -3000

[State 4000, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 1
trigger1 = Time = 0
value = 500

[State 4000, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 50

[State 4000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

[State 4000, Pause]
type = Pause
trigger1 = Time = 0
time = 50
movetime = 50

[state ]
type=helper
stateno=20200
id=20200
postype=left
ownpal=1
pausemovetime=2147483647
supermovetime=2147483647
trigger1=time=0

[State 4000, Helper]
type = Helper
trigger1 = Time = 0
name = "EX2"
ID = 6210
stateno = 6210
pos = 0,-85
postype = p1
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
ignorehitpause = 1

[State 4000, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S10000,5

[State 4000, Helper]
type = Helper
trigger1 = Time = 54
helpertype = Normal
name = "Machine"
pos = Floor(123*FVar(32)),0
stateno = 4002
ID = 4002
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4000, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S4000,0
channel = 0

[State 4000, ChangeState]
type = ChangeState
trigger1 = Time >= 109
value = 4001

[State 4000, ChangeState]
type = ChangeState
trigger1 = NumHelper(4002)
trigger1 = Helper(4002),StateNo = 4004
value = 4005

[StateDef 4001]
type = S
movetype = I
physics = S
ctrl = 0
anim = 4001
sprpriority = 2
velset = 0,0

[State 4001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

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

[StateDef 4002]
type = A
movetype  = A
physics = N
ctrl = 0
anim = 4003
sprpriority = -1
velset = 0,10

[State 4000, Helper]
type = Helper
trigger1 = Time = 0
trigger1 = IsHelper(4002)
helpertype = Normal
name = "Machine"
stateno = 4002
ID = 40020
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4002, PosAdd]
type = PosAdd
trigger1 = Time = 0 && IsHelper(4002)
y = -240

[State 4002, BindToParent]
type = BindToParent
trigger1 = IsHelper(40020)
time = 1
pos = 0,0

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,11

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = Time >= 1
trigger1 = Pos y >= 0
value = S100,12

[State 4002, EnvShake]
type = EnvShake
trigger1 = Time >= 1
trigger1 = Pos y >= 0 
time = 10
freq = 60
ampl = 4

[State 4002, ChangeState]
type = ChangeState
trigger1 = Time >= 1
trigger1 = Pos y >= 0
value = 4003

[State 4002, DestroySelf]
type = DestroySelf
trigger1 = Root,MoveType = H 
trigger2 = Root,Stateno != [4000,4001]

[StateDef 4003]
type = A
movetype = A
physics = N
ctrl = 0
anim = IfElse(IsHelper(4002),4004,4003)
velset = 0,0

[State 4003, VarAdd]
type = VarAdd
trigger1 = Time >= 26
var(6) = 30
ignorehitpause = 1

[State 4003, VarAdd]
type = VarAdd
trigger1 = Time >= 26
var(7) = 20

[State 4003, VarAdd]
type = VarAdd
trigger1 = Time = [1,16]
fvar(10) = IfElse(Time <= 8,-0.025,0.0125)
ignorehitpause = 1

[State 4003, VarAdd]
type = VarAdd
trigger1 = Time = [1,16]
fvar(11) = IfElse(Time <= 8,0.025,-0.0125)
ignorehitpause = 1

[State 4003, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 4003, Trans]
type = Trans
trigger1 = Time >= 26 && IsHelper(4002)
trans = AddAlpha
alpha = 150-Var(6),0

[State 4003, Trans]
type = Trans
trigger1 = IsHelper(40020)
trans = AddAlpha
alpha = 100-Var(7),100-Var(7)

[State 4003, BindToParent]
type = BindToParent
trigger1 = IsHelper(40020)
time = 1
pos = 0,0

[State 4003, PosSet]
type = posset
trigger1 = Time = 0
y = 0

[State 4003, SprPriority]
type = SprPriority
trigger1 = 1
value = -IfElse(IsHelper(4002),1,2)
ignorehitpause = 1

[State 4003, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 4003
ignorehitpause = 1

[State 4003, HitDef]
type = HitDef
trigger1 = AnimElem = 2
damage = 0
attr = S,HT
animtype = hard
guardflag = 
hitflag = MF
pausetime = 0,1
priority = 7,Hit
sparkno = -1
hitsound = -1
guardsound = -1
guard.sparkno= -1
ground.type = low
ground.slidetime = 15
ground.hittime =15
ground.velocity = -8
air.velocity =-2,-6.5
yaccel = .65 
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.velocity = -.5,0
down.cornerpush.veloff = 0
P2stateno = 4006
getpower = 0,0
ID = 4000
p2facing = 1

[State 4003, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.1+FVar(10),0.9+FVar(11)
ignorehitpause = 1

[State 4003, VarSet]
type = VarSet
trigger1 = NumEnemy
trigger1 = MoveContact != 1
var(26) = (EnemyNear,MoveType = A)

[State 4003, Helper]
type = Helper
trigger1 = MoveContact = 1 && NumTarget && Var(26)
trigger1 = !(Target,HitShakeOver)
helpertype = Normal
stateno = 8700
ID = 8700
name = "Counter"
postype = P1
pos = 0,0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
persistent = 0

[State 4003, ChangeState]
type = ChangeState
trigger1 = MoveHit
value = 4004
ignorehitpause = 1

[State 4003, DestroySelf]
type = DestroySelf
trigger1 = IsHelper(40020) && Parent,StateNo != 4003
trigger2 = Root,Movetype = H
trigger3 = Root,StateNo != [4000,4001]
trigger4 = Var(6) >= 180

[StateDef 4004]
type = A
movetype = A
physics = N
ctrl = 0
anim = 99999

[State 4004, VarAdd]
type = VarAdd
trigger1 = Time = [42,105]
var(8) = 2

[State 4004, VarAdd]
type = VarAdd
trigger1 = Time >= 116
var(9) = IfElse(Time < 176,2,IfElse((Time = [184,185]),-6,IfElse(Time >= 186,-9,0)))

[State 4004, VarSet]
type = VarSet
trigger1 = Time = 185
trigger2 = Time = 187
trigger3 = Time = 189
trigger4 = Time = 191
trigger5 = Time = 193
var(23) = -2

[State 4004, VarSet]
type = VarSet
trigger1 = Time = 186
trigger2 = Time = 188
trigger3 = Time = 190
trigger4 = Time = 192
trigger5 = Time = 194
var(23) = 2

[State 4004, VarSet]
type = VarSet
trigger1 = Time = 195
var(23) = 0

[State 4004, VarAdd]
type = VarAdd
trigger1 = Time = [185,249]
var(24) = -IfElse(Time >= 186,9,6)

[State 4004, VarSet]
type = VarSet
trigger1 = Time = 250
var(24) = -100

[State 4004, AllPalFX]
type = AllPalFX
trigger1 = Time = 0
trigger2 = Time = 240
add = 255,255,255
time = 10

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4008
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 10
ownpal = 1

[State 4004, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 40
trigger2 = Time = 104
trigger3 = Time = 241
ID = 4005

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
trigger2 = Time = 40
trigger3 = Time = 104
anim = IfElse(Time = 40,4005,4006)
ID = 4005
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 20
ownpal = 1

[State 4004, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 40 
trigger2 = Time = 241
ID = 4014

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
trigger2 = Time = 104
anim = 4014
ID = 4014
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 14
ownpal = 1

[State 4004, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 40
trigger2 = Time = 104
trigger3 = Time = 241
ID = 4017

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
trigger2 = Time = 40
trigger3 = Time = 104
anim = IfElse(Time = 40,4018,4017)
ID = 4017
postype = left
Pos = 160,240
scale = 0.335,0.3
sprpriority = 17
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 40
anim = 4019
ID = 4017
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 16
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = IfElse(Facing = 1,4020,4024)
ID = 4020
postype = left
scale = 0.335,0.335
sprpriority = 5
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4021
ID = 4020
postype = left
scale = 0.335,0.335
sprpriority = 3
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4022
ID = 4020
postype = left
scale = 0.335,0.335
sprpriority = 4
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4011
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 15
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4007
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 10
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4009
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 15
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4010
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 15
ownpal = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4012
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 14
ownpal = 1
bindtime = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4013
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.335
sprpriority = 14
ownpal = 1
bindtime = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4015
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.3
sprpriority = 15
ownpal = 1
bindtime = 1

[State 4004, Explod]
type = Explod
trigger1 = Time = 0
anim = 4016
ID = 4011
postype = left
Pos = 160,240
scale = 0.335,0.3
sprpriority = 15
ownpal = 1
bindtime = 1

[State 4004, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 241
ID = 4011

[State 4004, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 241
ID = 4017

[State 4004, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 241
ID = 4020

[State 4004, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(4020)
ID = 4020
postype = p1
pos = -127+Var(8),-267+Var(9)

[State 4004, PosSet]
type = PosSet
trigger1 = Time = 0
x = -60

[State 4004, TargetBind]
type = TargetBind
trigger1 = Time <= 250
pos = IfElse(Time = 250,IfElse(Target,Facing = 1,-30,30),Var(23)),Var(24)

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,13

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = Time = 52
value = S4000,1

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = Time = 110
value = S4000,2

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = Time = 185
value = S800,3

[State 4004, PlaySnd]
type = PlaySnd
trigger1 = Time = 42 
trigger2 = Time = 75
trigger3 = Time = 110
trigger4 = Time = 186
value = S100,IfElse(Time = 110,15,IfElse(Time = 186,16,14))
channel = 1

[State 4000, PlaySnd]
type = PlaySnd
trigger1 = Time = 250
value = S100,12

[State 4005, PlaySnd]
type = PlaySnd
trigger1 = Time = 116
value = S100,15
channel = 1

[State 4005, PlaySnd]
type = PlaySnd
trigger1 = Time = 185
value = S100,16

[State 4004, StopSnd]
type = StopSnd
trigger1 = Time = 72
trigger2 = Time = 110
trigger3 = Time = 186
channel = 1

[State 4004, TargetState]
type = TargetState
trigger1 = NumTarget(4000) && Time = 185
value = 4007

[State 4004, HitAdd]
type = HitAdd
trigger1 = Time = 185
value = 1

[State 4004, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Root,Var(46) = 0
trigger1 = Time = 185
trigger2 = Root,Var(46) = 1
trigger2 = Root,Var(47) = 0
trigger2 = Time = 185
value = ceil(-350*(Root,fvar(1)*Root,fvar(2)))
Absolute = 0
kill = 1

[State 4004, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Root,Var(46) = 1
trigger1 = Root,Var(47) = 1
trigger1 = Time = 185
value = ceil(-375*(Root,fvar(1)*Root,fvar(2)))
Absolute = 0
kill = 1

[State 4004, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Root,Var(46) = 1
trigger1 = Root,Var(47) = 2
trigger1 = Time = 185
value = ceil(-420*(Root,fvar(1)*Root,fvar(2)))
Absolute = 0
kill = 1

[State 4004, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Root,Var(46) = 1
trigger1 = Root,Var(47) >= 3
trigger1 = Time = 185
value = ceil(-455*(Root,fvar(1)*Root,fvar(2)))
Absolute = 0
kill = 1

[State 4004, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

[StateDef 4005]
type = S
movetype = A
physics = S
ctrl = 0
anim = 4002
sprpriority = 2

[State 4005, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) = 1
trigger1 = AnimElem = 2
v = 47
Value = -1

[State 4005, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) = 2
trigger1 = AnimElem = 2
v = 47
Value = -2

[State 4005, VarAdd]
type = VarAdd
trigger1 = Var(46) = 1
trigger1 = Var(47) >= 3
trigger1 = AnimElem = 2
v = 47
Value = -3

[State 4005, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

[State 4005, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

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

[State 4005, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S4000,3
channel = 0

[State 4005, PosSet]
type = PosSet
trigger1 = Time = 0 
x = -60

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

[StateDef 4006]
type = A
movetype = H
physics = N
sprpriority = 1

[State 4006, ChangeAnim2]
type=Changeanim2
trigger1 = Time = 0
value = 4023

[State 4006, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 4006, VelSet]
type = velset
trigger1 = 1
x = 0
y = 0
ignorehitpause = 1

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

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

[State 4006, SelfState]
type = SelfState
trigger1 = Time >= 300
value = 5030

[StateDef 4007]
type = A
movetype = H
physics = N
sprpriority = 1

[State 4007, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 66
value = 5050

[State 4007, ChangeAnim]
type = Changeanim
trigger1 = Time = 66 && SelfAnimExist(5050)
value = 5050

[State 4007, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

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

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

[State 4007, VelSet]
type = VelSet
trigger1 = Time >= 66
x = -1.8

[State 4007, VelSet]
type = VelSet
trigger1 = Time = 66
y = -2.8

[State 4007, VelAdd]
type = VelAdd
trigger1 = Time >= 66
y = 0.65

[State 4007, SelfState]
type = SelfState
trigger1 = Time >= 66 && Pos y >= 0
value = 5100

[StateDef 4100]
type = S
movetype = I
physics = N
ctrl = 0
Velset = 0,0
anim = 4100
facep2 = 1

[State 4100, VarAdd]
type = VarAdd
trigger1 = Var(46) = 0
trigger1 = Time = 0
v = 45
Value = 100

[State 4100, VarAdd]
type = VarAdd
trigger1 = Var(49) > 0
trigger1 = Time = 0
var(49) = 300
ignorehitpause = 1

[State 4100, VarSet]
type = VarSet
trigger1 = Var(49) > 900
trigger1 = Time = 0
var(49) = 900
ignorehitpause = 1

[State 4100, PowerAdd]
type = PowerAdd
trigger1 = Time = 0
value = -3000

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

[State 4100, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 4100, Pause]
type = Pause
trigger1 = Time = 0
time = 50
movetime = 50

[state ]
type=helper
stateno=20200
id=20200
postype=left
ownpal=1
pausemovetime=2147483647
supermovetime=2147483647
trigger1=time=0

[State 4100, Helper]
type = Helper
trigger1 = Time = 0
name = "EX2"
ID = 6210
stateno = 6210
pos = 0,-85
postype = p1
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
ignorehitpause = 1

[State 4100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S10000,5

[State 4100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S4100,0
channel = 0

[State 4100, ChangeState]
type = ChangeState
trigger1 = Time >= 50
value = 4101

[StateDef 4101]
type = S
movetype = A
physics = S
ctrl = 0
anim = 4101
sprpriority = 2
velset = 0,0

[State 4101, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

[State 4101, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,7

[State 4101, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
value = S100,3

[State 4101, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal
stateno = 8030
ID = 8030
name = "Dash Dust"
postype = p1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 4101, VelSet]
type = VelSet
trigger1 = Time > 0
x = 12

[State 4101, HitDef]
type = HitDef
trigger1 = !MoveContact
damage = 0,0
attr = S,HA
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 0,12
priority = 7,Hit
sparkno = -1
hitsound = -1
guardsound = s100,8
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = 0
air.velocity = 0
guard.velocity = -6
guard.sparkno = -1
yaccel = .65
fall.recover = 0
numhits = 0
getpower = 0,0
forcenofall = 1
p2stateno = 4107

[State 4101, Helper]
type = Helper
trigger1 = MoveGuarded  = 1
helpertype = normal
stateno = 9000
ID = 9000
name = "Guard_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

[State 4101, ChangeState]
type = ChangeState
trigger1 = MoveHit
value = 4103
ignorehitpause = 1

[State 4101, ChangeState]
type = ChangeState
trigger1 = Time >= 27
trigger2 = MoveGuarded
value = 4102

[StateDef 4102]
type = S
movetype = I
physics = N
anim = 4102
sprpriority = 1
ctrl = 0

[State 4101, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

[State 4102, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal
stateno = 8030
ID = 8030
name = "Dash Dust"
postype = p1
pos = 20,0
facing = -1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 4102, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S100,6

[State 4102, VelSet]
type = VelSet
trigger1 = Time <= 17
x = 2

[State 4102, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 4102, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[StateDef 4103]
type = S
movetype = A
physics = N
ctrl = 0
anim = 4103
sprpriority = 2
velset = 0,0

[State 4103, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

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

[State 4103, PosAdd]
type = PosAdd
trigger1 = Time = 0 && P2BodyDist x <= 10
x = -10

[State 4103, Width]
type = Width
trigger1 = Time = 0 && FrontEdgeBodyDist <= 60
edge = 60,0

[State 4103, TargetBind]
type = TargetBind
trigger1 = time = 0
time = 1
pos = 60,0

[State 4103, VelSet]
type = Velset
trigger1 = AnimElem = 66
x = -2
y = -8

[State 4103, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(66) >= 0 && AnimElemTime(72) < 0
y = 0.41

[State 4103, VelSet]
type = Velset
trigger1 = AnimElem = 72
x = 0
y = 0

[State 4103, PosSet]
type = PosSet
trigger1 = AnimElem = 72
y = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElem = 3
trigger2 = AnimElem = 19
anim = 211
ID = 4103
pos = -20,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElem = 10
trigger2 = AnimElem = 37
anim = 411
ID = 4103
pos = 0,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElem = 29
anim = 621
ID = 4103
pos = 0,0
scale = 0.335,0.335
postype = p1
sprpriority = 4
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 4103, Helper]
type = Helper
trigger1 = AnimElem = 33
helpertype = Normal
name = "Slash"
pos = 0,0
stateno = 1103
ID = 4103
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 0
trigger2 = AnimElemTime(42) = 0
anim = 221
ID = 4103
postype = p1
pos=floor(-68*(fvar(32)-.33)),floor(-65*(fvar(33)-.33))
scale=.46*(fvar(32)-.33),.46*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 0
trigger2 = AnimElemTime(42) = 0
anim = 221
ID = 4103
postype = p1
pos=floor(-46*(fvar(32)-.33)),floor(-79*(fvar(33)-.33))
scale=.32*(fvar(32)-.33),.32*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 0
trigger2 = AnimElemTime(42) = 0
anim = 221
ID = 4103
postype = p1
pos=floor(20*(fvar(32)-.33)),floor(-80*(fvar(33)-.33))
scale=.3*(fvar(32)-.33),.3*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 2
trigger2 = AnimElemTime(42) = 2
anim = 221
ID = 4103
postype = p1
pos=floor(-89*(fvar(32)-.33)),floor(-55*(fvar(33)-.33))
scale=.38*(fvar(32)-.33),.38*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 2
trigger2 = AnimElemTime(42) = 2
anim = 221
ID = 4103
postype = p1
pos=floor(-75*(fvar(32)-.33)),floor(-40*(fvar(33)-.33))
scale=.24*(fvar(32)-.33),.24*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
facing = -1
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 4
trigger2 = AnimElemTime(42) = 4
anim = 221
ID = 4103
postype = p1
pos=floor(-65*(fvar(32)-.33)),floor(-29*(fvar(33)-.33))
scale=.22*(fvar(32)-.33),.22*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 4
trigger2 = AnimElemTime(42) = 4
anim = 221
ID = 4103
postype = p1
pos=floor(-95*(fvar(32)-.33)),floor(-70*(fvar(33)-.33))
scale=.23*(fvar(32)-.33),.23*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 6
trigger2 = AnimElemTime(42) = 6
anim = 221
ID = 4103
postype = p1
pos=floor(-24*(fvar(32)-.33)),floor(-19*(fvar(33)-.33))
scale=.26*(fvar(32)-.33),.26*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 6
trigger2 = AnimElemTime(42) = 6
anim = 221
ID = 4103
postype = p1
pos=floor(-3*(fvar(32)-.33)),floor(-68*(fvar(33)-.33))
scale=.24*(fvar(32)-.33),.24*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 10
trigger2 = AnimElemTime(42) = 10
anim = 221
ID = 4103
postype = p1
pos=floor(70*(fvar(32)-.33)),floor(-106*(fvar(33)-.33))
scale=.47*(fvar(32)-.33),.47*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 10
trigger2 = AnimElemTime(42) = 10
anim = 221
ID = 4103
postype = p1
pos=floor(140*(fvar(32)-.33)),floor(-86*(fvar(33)-.33))
scale=.49*(fvar(32)-.33),.49*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 10
trigger2 = AnimElemTime(42) = 10
anim = 221
ID = 4103
postype = p1
pos=floor(178*(fvar(32)-.33)),floor(-72*(fvar(33)-.33))
scale=.64*(fvar(32)-.33),.64*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 10
trigger2 = AnimElemTime(42) = 10
anim = 221
ID = 4103
postype = p1
pos=floor(199*(fvar(32)-.33)),floor(-27*(fvar(33)-.33))
scale=.6*(fvar(32)-.33),.6*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 12
trigger2 = AnimElemTime(42) = 12
anim = 221
ID = 4103
postype = p1
pos=floor(169*(fvar(32)-.33)),floor(-83*(fvar(33)-.33))
scale=.34*(fvar(32)-.33),.34*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 12
trigger2 = AnimElemTime(42) = 12
anim = 221
ID = 4103
postype = p1
pos=floor(105*(fvar(32)-.33)),floor(-101*(fvar(33)-.33))
scale=.62*(fvar(32)-.33),.62*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 12
trigger2 = AnimElemTime(42) = 12
anim = 221
ID = 4103
postype = p1
pos=floor(47*(fvar(32)-.33)),floor(-96*(fvar(33)-.33))
scale=.35*(fvar(32)-.33),.35*(fvar(33)-.33)
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 12
trigger2 = AnimElemTime(42) = 12
anim = 221
ID = 4103
postype = p1
pos=floor(22*(fvar(32)-.33)),floor(-107*(fvar(33)-.33))
scale=.66*(fvar(32)-.33),.66*(fvar(33)-.33)
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(12) = 12
trigger2 = AnimElemTime(42) = 12
anim = 221
ID = 4103
postype = p1
pos=floor(-22*(fvar(32)-.33)),floor(-97*(fvar(33)-.33))
scale=.64*(fvar(32)-.33),.64*(fvar(33)-.33)
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 0
anim = 221
ID = 4103
postype = p1
pos = -55,-68
scale = 0.3,0.3
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 0
anim = 221
ID = 4103
postype = p1
pos = -14,-78
scale = 0.35,0.35
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 0
anim = 221
ID = 4103
postype = p1
pos = 27,-97
scale = 0.45,0.45
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 2
anim = 221
ID = 4103
postype = p1
pos = 57,-115
scale = 0.4,0.4
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 2
anim = 221
ID = 4103
postype = p1
pos = 86,-140
scale = 0.31,0.31
sprpriority = 3
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 0
anim = 221
ID = 4103
postype = p1
pos = 75,-158
scale = 0.25,0.25
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 4
anim = 221
ID = 4103
postype = p1
pos = 29,-81
scale = 0.3,0.3
sprpriority = 3
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 4
anim = 221
ID = 4103
postype = p1
pos = 66,-95
scale = 0.26,0.26
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 6
anim = 221
ID = 4103
postype = p1
pos = -38,-59
scale = 0.27,0.27
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 6
anim = 221
ID = 4103
postype = p1
pos = -75,-55
scale = 0.26,0.26
sprpriority = 3
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 8
anim = 221
ID = 4103
postype = p1
pos = 20,-71
scale = 0.34,0.34
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 8
anim = 221
ID = 4103
postype = p1
pos = -8,-113
scale = 0.34,0.34
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 8
anim = 221
ID = 4103
postype = p1
pos = 22,-141
scale = 0.34,0.34
sprpriority = 3
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = -28,-82
scale = 0.32,0.32
sprpriority = 1
facing = -1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = 43,-104
scale = 0.34,0.34
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = 90,-95
scale = 0.24,0.24
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = 68,-74
scale = 0.38,0.38
sprpriority = 1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = 56,-54
scale = 0.35,0.35
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0 

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = 43,-28
scale = 0.4,0.4
sprpriority = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = 12,-16
scale = 0.36,0.36
sprpriority = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = -9,-17
scale = 0.38,0.38
sprpriority = 1
vfacing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Explod]
type = Explod
trigger1 = AnimElemTime(49) = 12
anim = 221
ID = 4103
postype = p1
pos = -31,-14
scale = 0.38,0.38
sprpriority = 1
facing = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 0

[State 4103, Helper]
type = Helper
trigger1 = AnimElem = 55
helpertype = Normal
name = "Weapon"
pos = 0,0
stateno = 4104
ID = 4104
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4103, Helper]
type = Helper
trigger1 = AnimElem = 55
helpertype = Normal
name = "Weapon"
pos = 0,0
stateno = 4104
ID = 4105
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4103, Helper]
type = Helper
trigger1 = AnimElem = 55
helpertype = Normal
name = "Weapon"
pos = 0,0
stateno = 4104
ID = 4106
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4103, Helper]
type = Helper
trigger1 = AnimElemTime(63) = 11
helpertype = Normal
name = "Weapon"
pos = 0,0
stateno = 4104
ID = 4107
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4103, Helper]
type = Helper
trigger1 = AnimElem = 66
helpertype = Normal
name = "Weapon"
pos = Floor(40*FVar(32)),Floor(-116*FVar(33))
stateno = 4105
ID = 4108
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4103, Explod]
type = Explod
trigger1 = AnimElem = 61
anim = 4107
ID = 4103
postype = p1
scale = 0.335*FVar(32),0.335*FVar(33)
sprpriority = 6
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6 
trigger2 = AnimElem = 25
value = S100,0

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 
trigger2 = AnimElem = 10
trigger3 = AnimElem = 19
trigger4 = AnimElem = 37
value = S100,1

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 22 
trigger2 = AnimElem = 29
trigger3 = AnimElem = 33
trigger4 = AnimElem = 40
trigger5 = AnimElem = 61
value = S100,2

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15 
trigger2 = AnimElem = 45
trigger3 = AnimElem = 49
value = S100,9

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 25
value = S4100,1
channel = 0

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 55
value = S4100,2
channel = 0

[State 4103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 65
value = S4100,3
channel = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 19
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = medium
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno=-1
hitsound = S200,7
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 25
damage = IfElse(Var(26),23,19)
attr = S,HA
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,6
guardsound = S300,0
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 10
trigger2 = AnimElem = 37
damage = IfElse(Var(26),23,19)
attr = C,HA
animtype = medium
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,7
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 15
trigger2 = AnimElem = 45
damage = IfElse(Var(26),23,19)
attr = C,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 22
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel  =.65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 29
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 33
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity =-8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 40
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = .65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 49 
trigger2 = AnimElem = 50 
trigger3 = AnimElem = 51 
trigger4 = AnimElem = 52
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,20
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2,-6.5
yaccel = 0.65
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 53
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,14
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 60
ground.velocity = -2,-10
air.velocity = -2,-10
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type =  HitDef
trigger1 = AnimElem = 61
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,14
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,5
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 60
ground.velocity = -.5,-14.5
air.velocity = -.5,-14.5
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 67
damage = IfElse(Var(26),23,19)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,28
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,3
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 60
ground.velocity = -2,-6.5
air.velocity = -2,-6.5
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 0

[State 4103, HitDef]
type = HitDef
trigger1 = AnimElem = 76
damage = IfElse(Var(26),120,100)
attr = S,HA
animtype = hard
guardflag = 
hitflag = MAF
pausetime = 0,28
priority = 7,Hit
sparkno = -1
guard.sparkno = -1
hitsound = S200,8
guardsound = S300,0
ground.type = low
ground.slidetime = 15
ground.hittime = 60
ground.velocity = -2,-6.5
air.velocity = -2,-6.5
yaccel = .65
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 4
getpower = 0
kill = 1
palFX.time = 45
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4

[State 4103, Helper]
type = Helper
trigger1 = AnimElemTime(76) > 0
trigger1 = !NumHelper(8100)
trigger1 = !NumHelper(20150)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8100
ID = 8100
name = "Burning"
posType = P2
ownPal = 1
ignoreHitPause = 1

[State 4103, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal
ID = 8053
stateno = 8053
name = "Hit_Spark"
postype = p1
Pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 65)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1
ignorehitpause = 1
persistent = 8
size.xscale = 1
size.yscale = 1

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

[StateDef 4104]
type = S
physics = N
ctrl = 0

[State 4104, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 4104, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = IfElse(IsHelper(4104),4106,IfElse(IsHelper(4105),4105,IfElse(IsHelper(4106),4109,4111)))

[State 4104, Trans]
type = Trans
trigger1 = IsHelper(4106)
trigger2 = IsHelper(4107)
trans = addalpha
alpha = 256,256

[State 4104, Trans]
type = Trans
trigger1 = IsHelper(4105)
trans = AddAlpha
alpha = 256,150

[State 4104, SprPriority]
type = SprPriority
trigger1 = IsHelper(4104)
value = IfElse(AnimElemTime(3)<0,4,0)

[State 4104, SprPriority]
type = SprPriority
trigger1 = IsHelper(4105)
value = IfElse(AnimElemTime(3) < 0,3,-1)

[State 4104, SprPriority]
type = SprPriority
trigger1 = IsHelper(4106) 
trigger2 = IsHelper(4107)
value = IfElse(IsHelper(4106),5,1)

[State 4104, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(4104) 
trigger2 = IsHelper(4105)
time = 1
pos = Floor(IfElse(AnimElemTime(3) >= 17,-5,IfElse((AnimElemTime(2) = [12,14]),14,0))*Root,FVar(32)),Floor(IfElse((AnimElemTime(2) = [12,14]),-9,0)*Root,FVar(33))

[State 4104, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(4106)
time = 1
pos = Floor(-5*Root,FVar(32)),Floor(-71*Root,FVar(33))

[State 4104, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(4107)
time = 1
pos = Floor(-20*Root,FVar(32)),Floor(-92*Root,FVar(33))

[State 4104, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(4104)
trigger2 = IsHelper(4105)
scale = 1,1

[State 4104, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(4106)
scale = 1.9,1.9

[State 4104, AngleDraw]
type = AngleDraw
trigger1 = IsHelper(4107)
scale = 1.92,1.7

[State 4104, AngleSet]
type = Angleset
trigger1 = (AnimElemTime(2) = 12 || AnimElemTime(3) = 0 || AnimElemTime(3) = 17) && (IsHelper(4104) || IsHelper(4105))
value = IfElse(AnimElemTime(2) = 12,5,IfElse(AnimElemTime(3) = 0,0,-5))

[State 4104, AngleSet]
type = AngleSet
trigger1 = IsHelper(4106)
value = 106

[State 4104, AngleSet]
type = AngleSet
trigger1 = IsHelper(4107)
value = -40

[State 4104, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0 
trigger2 = Root,MoveType = H
trigger3 = Root,StateNo != 4103

[StateDef 4105]
type = A
physics = N
ctrl = 0
sprpriority = 3
anim = 4108

[State 4105, VarRandom]
type = VarRandom
trigger1 = 1
v = 0
range=-10,10

[State 4105, VarRandom]
type = VarRandom
trigger1 = 1
v = 1
range = -10,10

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 4
v = 2
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 6
v = 3
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 8
v = 4
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 14
v = 5
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 40
v = 6
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = 1
v = 7
range = -10,10

[State 4105, VarRandom]
type = VarRandom
trigger1 = 1
v = 8
range = -10,10

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 4
v = 9
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 6
v = 10
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 8
v = 11
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 14
v = 12
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 40
v = 13
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = 1
v = 14
range = -10,10

[State 4105, VarRandom]
type = VarRandom
trigger1 = 1
v = 15
range = -10,10

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 4
v = 16
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = time = 6
v = 17
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 8
v = 18
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 14
v = 19
range = 200,500

[State 4105, VarRandom]
type = VarRandom
trigger1 = Time = 40
v = 25
range = 200,500

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(4109)
fvar(15) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(4110)
fvar(16) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(4111)
fvar(17)= 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(4112)
fvar(18) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(4113)
fvar(19)=.0335*root,fvar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(14109)
fvar(20) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(14110)
fvar(21)=.0335*root,fvar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(14111)
fvar(22) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(14112)
fvar(23) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(14113)
fvar(24) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(24109)
fvar(25) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(24110)
fvar(26) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(24111)
fvar(27) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(24112)
fvar(28) = 0.0335*Root,FVar(32)

[State 4105, VarAdd]
type = VarAdd
trigger1 = NumExplod(24113)
fvar(29) = 0.0335*Root,FVar(32)

[State 4105, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 4105, Trans]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 4105, ChangeAnim]
type = ChangeAnim
trigger1 = Root,AnimElemTime(76) >= 0
value = 4112
persistent = 0

[State 4105, Helper]
type = Helper
trigger1 = Time = 41
helpertype = Normal
name = "Effect"
pos = 0,0
stateno = 4106
ID = 4109
ownpal = 1
ignorehitpause = 1
size.xscale = 0.335
size.yscale = 0.335

[State 4105, PlaySnd]
type = PlaySnd
trigger1 = Anim = 4112
value = S100,18
persistent = 0

[State 4105, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = IfElse(Anim = 4108,0.7,6),IfElse(Anim = 4108,0.85,6)

[State 4105, AngleSet]
type = Angleset
trigger1 = 1
value = IfElse(Anim = 4108,65,-35)

[State 4105, VelSet]
type = VelSet
trigger1 = Time <= 10
x = 4
y = -2

[State 4105, VelSet]
type = VelSet
trigger1 = Time = 11
x = 0
y = 0

[State 4105, Explod]
type = Explod
trigger1 = Time = 4
trigger2 = Time = 6
trigger3 = Time = 8
trigger4 = Time = 14
trigger5 = Time = 40
anim = 4109
ID = 4109+IfElse(Time = 4,0,IfElse(Time = 6,1,IfElse(Time = 8,2,IfElse(Time = 14,3,4))))
postype = p1
pos = Floor(Var(0)*Root,FVar(32)),Floor(Var(1)*Root,FVar(33))
sprpriority = 4
ownpal = 1

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(4109)
ID = 4109
scale = ((Var(2)*0.001)-FVar(15))*Root,FVar(32),((Var(2)*0.001)-FVar(15))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(4109) && FVar(15) >= Var(2)*0.001
ID = 4109

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(4100)
ID = 4110
scale = ((Var(3)*0.001)-FVar(16))*Root,FVar(32),((Var(3)*0.001)-FVar(16))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(4110) && FVar(16) >= Var(3)*0.001
ID = 4110

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(4111)
ID = 4111
scale = ((Var(4)*0.001)-FVar(17))*Root,FVar(32),((Var(4)*0.001)-FVar(17))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(4111) && FVar(17) >= Var(4)*0.001
ID = 4111

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(4112)
ID = 4112
scale = ((Var(5)*0.001)-FVar(18))*Root,FVar(32),((Var(5)*0.001)-FVar(18))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(4112) && FVar(18) >= Var(5)*0.001
ID = 4112

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(4113)
ID = 4113
scale = ((Var(6)*0.001) - FVar(19))*Root,FVar(32),((Var(6)*0.001)-FVar(19))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(4113) && FVar(19) >= Var(6)*0.001
ID = 4113

[State 4105, Explod]
type = Explod
trigger1 = Time = 4
trigger2 = Time = 6
trigger3 = Time = 8
trigger4 = Time = 14
trigger5 = Time = 40
anim = 4109
ID = 14109+IfElse(Time = 4,0,IfElse(Time = 6,1,IfElse(Time = 8,2,IfElse(Time = 14,3,4))))
postype = p1
pos = Floor(var(7)*Root,FVar(32)),Floor(Var(8)*Root,FVar(33))
sprpriority = 4
ownpal = 1

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(14109)
ID = 14109
scale = ((Var(9)*0.001)-FVar(20))*Root,FVar(32),((Var(9)*0.001)-FVar(20))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(14109) && FVar(20) >= Var(9)*0.001
ID = 14109

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(14110)
ID = 14110
scale = ((Var(10)*0.001)-FVar(21))*Root,FVar(32),((Var(10)*0.001)-FVar(21))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(14110) && FVar(21) >= Var(10)*0.001
ID = 14110

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(14111)
ID = 14111
scale = ((Var(11)*0.001)-FVar(22))*Root,FVar(32),((Var(11)*0.001)-FVar(22))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(14111) && FVar(22) >= Var(11)*0.001
ID = 14111

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(14112)
ID = 14112
scale = ((Var(12)*0.001)-FVar(23))*Root,FVar(32),((Var(12)*0.001)-FVar(23))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(14112) && FVar(23) >= Var(12)*0.001
ID = 14112

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(14113)
ID = 14113
scale = ((Var(13)*0.001)-FVar(24))*Root,FVar(32),((Var(13)*0.001)-FVar(24))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(14113) && FVar(24) >= Var(13)*0.001
ID = 14113

[State 4105, Explod]
type = Explod
trigger1 = Time = 4
trigger2 = Time = 6
trigger3 = Time = 8
trigger4 = Time = 14
trigger5 = Time = 40
anim = 4109
ID = 24109+IfElse(Time = 4,0,IfElse(Time = 6,1,IfElse(Time = 8,2,IfElse(Time = 14,3,4))))
postype = p1
pos = Floor(Var(6)*Root,FVar(32)),Floor(Var(7)*Root,FVar(33))
sprpriority = 4
ownpal = 1

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(24109)
ID = 24109
scale = ((Var(16)*0.001)-FVar(25))*root,FVar(32),((var(16)*.001)-FVar(25))*root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1  = NumExplod(24109) && FVar(25) >= Var(16)*0.001
ID = 24109

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(24110)
ID = 24110
scale = ((Var(17)*0.001)-FVar(26))*Root,FVar(32),((Var(17)*.001)-FVar(26))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(24110) && FVar(26) >= Var(17)*0.001
ID = 24110

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(24111)
ID = 24111
scale = ((Var(18)*0.001)-FVar(27))*Root,FVar(32),((Var(18)*.001)-FVar(27))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(24111) && FVar(27) >= Var(18)*0.001
ID = 24111

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(24112)
ID = 24112
scale = ((Var(19)*0.001)-FVar(28))*Root,FVar(32),((Var(19)*0.001)-FVar(28))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(24112) && FVar(28) >= Var(19)*0.001
ID = 24112

[State 4105, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(24113)
ID = 24113
scale = ((Var(25)*.001)-FVar(29))*Root,FVar(32),((Var(25)*.001)-FVar(29))*Root,FVar(33)

[State 4105, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(24113) && FVar(29) >= Var(25)*.001
ID = 24113

[State 4105, DestroySelf]
type = DestroySelf
trigger1 = Anim = 4112 && AnimTime = 0
trigger2 = (Anim = 4108 && (Root,MoveType = H || Root,StateNo != 4103))

[StateDef 4106]
type = S
physics = N
ctrl = 0
anim = 4110

[State 4106, VarAdd]
type = VarAdd
trigger1 = 1
fvar(15) = 0.25

[State 4106, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 4106, Trans]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 256,256

[State 4106, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 4-FVar(15),4-FVar(15)

[State 4106, AngleSet]
type = AngleSet
trigger1 = 1
value = -20

[State 4106, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

[StateDef 4107]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0

[State 4107, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 4107, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4113

[State 4107, SelfState]
type = SelfState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[StateDef 6000]
Type = S
Physics = S
MoveType = A
Anim = 6000
VelSet = 0,0
ctrl = 0
sprpriority = 2

[State 6000, VarSet]
type = VarSet
trigger1 = AnimElem = 3
V = 46
Value = 1

[State 6000, VarAdd]
type = VarAdd
trigger1 = AnimElem = 3
var(45) = -50
ignorehitpause = 1

[State 6000, VarSet]
type = VarAdd
triggerall = Var(47) < 3
trigger1 = Var(46) = 1
trigger1 = time = 11
trigger1 = Var(49) <= 0
v = 47
Value = 1

[State 6000, PowerAdd]
type = PowerAdd
trigger1 = Var(46) = 1
trigger1 = time = 10
trigger1 = Var(47) < 3
trigger1 = Var(49) <= 0
value = 200

[State 6000, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 6000, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 10
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 0,30
guard.pausetime = 0,16
sparkno = -1+(0*(var(41) := 8052))
guard.sparkno = -1+(0*(var(42) := 9000))
sparkxy = 0,0+(0*(var(43) := 100 && var(44) := -65))
hitsound = S200,2
guardsound = S300,0
ground.type = high
ground.slidetime = 18
ground.hittime = 18
ground.velocity = -3
airguard.ctrltime = 2
guard.velocity = -3
air.velocity = -1.5,-4.4
envshake.time = 9
envshake.ampl = 3
getpower = 0
givepower = 15
yaccel = 0.4

[State 6000, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 6000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S10000,4

[State 6000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S6000,0+Random%4
Channel = 0

[State 6000, Helper]
type = Helper
trigger1 = AnimElem = 3
Helpertype = normal
StateNo = 6001
ID = 6001
name = "Burst"
postype = p1
pos = ceil(0 * const(size.xscale)), ceil(-53 * const(size.yscale))
size.xscale = 1
size.yscale = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ownpal = 1

[State 6000, Helper]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal
stateno = 6002
ID = 6002
name = "MAX"
postype = p1
pos = ceil(-6 * const(size.xscale)), ceil(-64 * const(size.yscale))
size.xscale = 0.335
size.yscale = 0.335
pausemovetime=-2**31-1
supermovetime=-2**31-1
ownpal = 1

[State 6000, helper]
type = Helper
trigger1 = AnimElem = 3
stateno = 6003
ID = 6003
Name = "Cooldown"
postype = left
facing = 1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
persistent = 0
Helpertype = Normal
pausemovetime=-2**31-1
supermovetime=-2**31-1

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

[StateDef 6001]
Type = A
Physics = N
MoveType = I
Anim = 99999
ctrl = 0
velset = 0,0

[State 6001, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 1
color= 16*time
mul = 16*time, 16*time, 16*time

[State 6001, Explod]
type = Explod
trigger1 = Time = 0
Anim = 6020
ID = 6020
sprpriority = 3
postype = p1
pos = 0,-50
removetime = 16
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6001, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(6020)
ID = 6020
scale = (.0625*time), (.0625*time)
trans = addalpha
alpha = 256-(16*time), 256

[State 6001, Explod]
type = Explod
trigger1 = time = 0
anim = 6021
ID = 6021
sprpriority = -2
postype = p1
pos = 0,-ceil(pos y)
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6001, DestroySelf]
type = DestroySelf
trigger1= time >= 16

[StateDef 6002]
anim = 0
ctrl = 0
sprpriority = -6

[State 6002, Bindtoroot]
type = BindToRoot
trigger1 = 1

[State 6002, Turn]
type = turn
trigger1 = facing != Root,facing

[State 6002, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 6002, VarSet]
type = VarSet
trigger1 = Root, HitPauseTime = 0
var(0) = Root, AnimElemNo(0)

[State 6002, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(Root, Anim)
triggerall = AnimExist(Root, Anim)
trigger1 = Root, Anim < 6003
value = Root, Anim
elem = Var(0)

[State 6002, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(Root,Anim)
triggerall = AnimExist(Root,Anim)
triggerall = Root,HitPauseTime > 0
trigger1 = Root,AnimElemNo(0) > AnimElemNo(0)
value = Root,Anim
elem = Root,AnimElemNo(0)

[State 6002, AssertSpecial]
type = AssertSpecial
trigger1 = Time <= 0
trigger2 = !SelfAnimExist(Root,Anim)
trigger3 = !AnimExist(Root,Anim)
trigger4 = Root,StateNo >= 160
trigger4 = Root,StateNo < 5000
trigger4 = Root,MoveType = H
trigger5 = Root,StateNo >= 6000
trigger5 = Root,MoveType = H
trigger6 = Root,Anim >= 160
trigger6 = Root,Anim < 5000
trigger6 = Root,MoveType = H
trigger7 = Root,Anim >= 6000
trigger7 = Root,MoveType = H
trigger8 = Root,Stateno = [190,194]
trigger9 = Root,Stateno = 5150
flag = Invisible

[State 6002, AngleDraw]
type = angledraw
trigger1 = 1
scale = 1+var(1)*.002,1+var(1)*.0015

[State 6002, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256, 256

[State 6002, PalFx]
type = PalFX
trigger1 = 1
time = 1
add = 255,-220,-220
invertall = 0
color = 256

[State 6002, VarAdd]
type = varadd
trigger1 = 1
var(2) = 1

[State 6002, VarAdd]
type = varadd
trigger1 = var(2) <= 30
var(1) = 1

[State 6002, VarAdd]
type = varadd
trigger1 = var(2) > 30
var(1) = -1

[State 6002, VarAdd]
type = varset
trigger1 = var(2) >= 60
var(2) = 0

[State 6002, DestroySelf]
type = DestroySelf
trigger1 = Root,Var(46) = 0

[StateDef 6003]
type = A
movetype = I
physics = N
anim = 99999
ctrl = 0
velset = 0,0
sprpriority = -99

[State 6003, Null]
type = Null
trigger1 = Root,NumPartner!=0
trigger1 = (Partner,ID) < (Root,ID)
trigger1 = Partner,Authorname = "Kohaku"
trigger1 = var(0):=1

[State 6003, nothitby]
type = nothitby
trigger1 = 1
value = SCA
time = 999

[State 6003, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 6003, Explod]
type = explod
trigger1 = Time = 0
id = 6022
anim = 6022
pos = Ifelse(Teamside = 1,34,282),ifelse(1.0*gamewidth/gameheight<1.34,227,167)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6003, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 300
id = 6022

[State 6003, DestroySelf]
type = DestroySelf
trigger1 = Time >= 300

[StateDef 6004]
type = A
movetype = I
physics = N
anim = 99999
ctrl = 0
velset = 0,0
sprpriority = -99

[State 6004, Null]
type = Null
trigger1 = Root,NumPartner!=0
trigger1 = (Partner,ID) < (Root,ID)
trigger1 = Partner,Authorname = "Kohaku"
trigger1 = var(0):=1

[State 6004, VarRandom]
type = Varrandom
trigger1 = Time = 0
v = 1
range = 0,1

[State 6004, nothitby]
type = nothitby
trigger1 = 1
value = SCA
time = 999

[State 6004, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 6004, PlaySnd]
type = PlaySnd
trigger1 = Var(1) = 0
trigger1 = IsHelper(6004)
trigger1 = Time = 0
value = S1420,0

[State 6004, PlaySnd]
type = PlaySnd
trigger1 = Var(1) = 1
trigger1 = IsHelper(6004)
trigger1 = Time = 0
value = S1420,1

[State 6004, Explod]
type = explod
trigger1 = Var(1) = 0
trigger1 = IsHelper(6004)
trigger1 = time = 0
ID = 6040
anim = IfElse(Teamside = 1,6040,6050)
pos = Ifelse(Teamside = 1,62,257),ifelse(1.0*gamewidth/gameheight<1.34,227,168)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 6004, Explod]
type = explod
trigger1 = Var(1) = 1
trigger1 = IsHelper(6004)
trigger1 = time = 0
ID = 6040
anim = IfElse(Teamside = 1,6041,6051)
pos = Ifelse(Teamside = 1,62,257),ifelse(1.0*gamewidth/gameheight<1.34,227,168)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 6004, PlaySnd]
type = PlaySnd
trigger1 = IsHelper(181)
trigger1 = Time = 0
value = S1440,0

[State 6004, Explod]
type = explod
trigger1 = IsHelper(181)
trigger1 = time = 0
ID = 6060
anim = IfElse(Teamside = 1,6060,6070)
pos = Ifelse(Teamside = 1,62,257),ifelse(1.0*gamewidth/gameheight<1.34,227,168)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 6004, PlaySnd]
type = PlaySnd
trigger1 = Var(1) = 0
trigger1 = IsHelper(6080)
trigger1 = Time = 0
value = S1450,0

[State 6004, PlaySnd]
type = PlaySnd
trigger1 = Var(1) = 1
trigger1 = IsHelper(6080)
trigger1 = Time = 0
value = S1450,1

[State 6004, Explod]
type = explod
trigger1 = Var(1) = 0
trigger1 = IsHelper(6080)
trigger1 = time = 0
ID = 6080
anim = IfElse(Teamside = 1,6081,6091)
pos = Ifelse(Teamside = 1,62,257),ifelse(1.0*gamewidth/gameheight<1.34,227,168)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 6004, Explod]
type = explod
trigger1 = Var(1) = 1
trigger1 = IsHelper(6080)
trigger1 = time = 0
ID = 6080
anim = IfElse(Teamside = 1,6080,6090)
pos = Ifelse(Teamside = 1,62,257),ifelse(1.0*gamewidth/gameheight<1.34,227,168)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 6004, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 120
id = 6040

[State 6004, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 120
id = 6060

[State 6004, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 120
id = 6080

[StateDef 6005]
Type = S
Physics = S
MoveType = I
Anim = 6001
VelSet = 0,0
ctrl = 0
sprpriority = 2

[State 6005, VarSet]
type = VarSet
trigger1 = Time = 0
V = 46
Value = 0

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

[StateDef 6010]
movetype = I
physics = N
anim = 99999
ctrl = 0

[State -2, VarSet]
type = ParentVarSet
trigger1 = root,Var(45) > 500
v = 45
Value = 500

[State -2, VarSet]
type = ParentVarSet
trigger1 = root,Var(45) < 0
v = 45
Value = 0

[State 6010, Null]
type = Null
trigger1 = Root,NumPartner!=0
trigger1 = (Partner,ID) < (Root,ID)
trigger1 = Partner,Authorname = "Kohaku"
trigger1 = var(0):=1

[state ]
type=removeexplod
trigger1=var(1)-root,var(45)/100
trigger1=0*(var(1):=root,var(45)/100)*(var(5):=1)
trigger2=var(2)-(root,var(45)/10)%10
trigger2=0*(var(2):=(root,var(45)/10)%10)*(var(5):=1)
trigger3=var(3)-root,var(45)%10
trigger3=0*(var(3):=root,var(45)%10)*(var(5):=1)
trigger4=var(4)-root,var(47)
trigger4=0*(var(4):=root,var(47))*(var(5):=1)
trigger5=var(5)
trigger5=1||(var(5):=0)

[State 6010, Explod]
type = explod
trigger1 = Numexplod(6010)=0
ID = 6010
anim = IfElse(Teamside = 1,6010,6011)
pos = Ifelse(Teamside = 1,5,314),ifelse(1.0*gamewidth/gameheight<1.34,238,178)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = 1
pausemovetime=-1
supermovetime=-1

[State 6010, Explod]
type = explod
trigger1 = NumExplod(6012) = 0
id = 6012
anim = 6012
pos = Ifelse(Teamside = 1,6,313),ifelse(1.0*gamewidth/gameheight<1.34,235,175)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 0
bindtime = -1
removetime = -1
ontop = 1
facing = ifelse(teamside=1,1,-1)
pausemovetime=-1
supermovetime=-1

[State 6010, ModifyExplod]
type = modifyexplod
trigger1 = 1
id = 6012
Scale = .5*Root,Var(45)/500,0.50

[State 6010, PalFX]
type = PalFx
trigger1 = Root,Var(46)
time = 1
add = (-12*(time+10))%240+240,(-12*(time+10))%240+240,(-12*(time+10))%240+240

[State 6010, Explod]
type = explod
trigger1 = NumExplod(6013) = 0
id = 6013
anim = 6013
pos = Ifelse(Teamside = 1,70,248),ifelse(1.0*gamewidth/gameheight<1.34,228,168)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = ifelse(teamside=1,1,-1)
pausemovetime=-1
supermovetime=-1

[State 6010, ModifyExplod]
type = modifyexplod
trigger1 = 1
id = 6013
Scale = .5*Root,Var(48)/360,0.50

[State 6010, Explod]
type = explod
trigger1 = NumExplod(6014) = 0
trigger1 = var(4)
id = 6014
anim = 6013+var(4)+3*(var(4)>6)
pos = Ifelse(Teamside = 1,3,316),ifelse(1.0*gamewidth/gameheight<1.34,229,169)-(20*(var(0)))
postype = left
scale = 0.5,0.5
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
facing = ifelse(teamside=1,1,-1)
pausemovetime=-1
supermovetime=-1

[State 6010, Explod]
type = Explod
trigger1 = NumExplod(6030) = 0
anim = 6030+Var(1)
ID = 6030
pos = Ifelse(Teamside = 1,113,190),ifelse(1.0*gamewidth/gameheight<1.34,238,178)-(20*(var(0)))
postype = left
bindtime = -1
removetime = -1
scale = 0.5,0.5
ontop = 1
ownpal = 1
pausemovetime=-1
supermovetime=-1

[State 6010, Explod]
type = Explod
trigger1 = NumExplod(6031) = 0
anim = 6030+Var(2)
ID = 6031
pos = Ifelse(Teamside = 1,119,196),ifelse(1.0*gamewidth/gameheight<1.34,238,178)-(20*(var(0)))
postype = left
bindtime = -1
removetime = -1
scale = 0.5,0.5
ontop = 1
ownpal = 1
pausemovetime=-1
supermovetime=-1

[State 6010, Explod]
type = Explod
trigger1 = NumExplod(6032) = 0
anim = 6030+Var(3)
ID = 6032
pos = Ifelse(Teamside = 1,125,202),ifelse(1.0*gamewidth/gameheight<1.34,238,178)-(20*(var(0)))
postype = left
bindtime = -1
removetime = -1
scale = 0.5,0.5
ontop = 1
ownpal = 1
pausemovetime=-1
supermovetime=-1

[StateDef 6200]
type = A
movetype= I
physics = N
poweradd= 0
velset = 0,0
anim = 99999
ctrl = 0
sprpriority = 4

[State 6002, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 6200, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Root,Anim
elem = Root,AnimElemNo(0)

[state 6200, Trans]
type = trans
trigger1 = 1||(fvar(0):=sin(time*pi/120))+(fvar(1):=sin(time*pi/60))
trans = AddAlpha
alpha = floor(256*(1-fvar(0))+.5),floor(256*fvar(0)+.5)

[State 6200, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1+.25*fvar(1),1+.25*fvar(1)

[State 6200, PosSet]
type = Posset
trigger1 = 1
x = Root,Pos x
y = Root,Pos y+16*fvar(1)

[State 6200, PalFX]
type = PalFX
trigger1 = !time
time = -1
mul = 0,128,256
trigger1 = !time

[State 6200, Explod]
type = Explod
trigger1 = time = 0
Anim = 6200
ID = 6200
sprpriority = 20
postype = p1
pos = -10,0
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.5,0.5
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6200, Explod]
type = Explod
trigger1 = time = 0
anim = 6201
ID = 6201
sprpriority = 20
postype = p1
pos = -10,0
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.5,0.5
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6200, Explod]
type = Explod
trigger1 = time = 0
Anim = 6202
ID = 6202
sprpriority = -20
postype = p1
pos = -10,0
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.5,0.5
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6200, Explod]
type = Explod
trigger1 = time = 0
Anim = 6203
ID = 6200
sprpriority = -20
postype = p1
pos = -10,0
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.5,0.5
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6200, DestroySelf]
type = DestroySelf
trigger1 = Time >= 60
trigger2 = Root,MoveType = H

[StateDef 6210]
type = A
movetype= I
physics = N
poweradd= 0
velset = 0,0
anim = 99999
ctrl = 0
sprpriority = 4

[State 6210, Explod]
type = Explod
trigger1 = time = 0
Anim = 6210
ID = 6210
sprpriority = 20
postype = p1
pos = 0,0
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 1,1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6210, Explod]
type = Explod
trigger1 = time = 0
anim = 6211
ID = 6211
sprpriority = 20
postype = p1
pos = 0,0
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 1.5,1.5
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State 6200, DestroySelf]
type = DestroySelf
trigger1 = Time >= 33

[StateDef 8030]
type = A
anim = 99999
velset = 0, 0
sprpriority = 5

[State 8030, PosSet]
type = PosSet
trigger1 = !time = 0
y = 0

[State 8030, Explod]
type = Explod
trigger1 = time = 0 || time = 3 || time = 6
anim = 8030
ID = ifelse((time = 6), 8032, ifelse((time = 3), 8031, 8030))
postype = p1
pos = 0, -4
random = 8, 8
vel = -3 -(random / 1000.0), -2 -(random / 2000.0)
facing = ifelse(random < 500, -1, 1)
vfacing = ifelse(random < 500, -1, 1)
removetime = 16
sprpriority = 3
pausemovetime = -1
supermovetime = -1

[State 8030, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8030)
ID = 8030
scale = 0.1 + (0.025 * time), 0.1 + (0.025 * time)
trans = addalpha
alpha = 256 -(16 * time), 256

[State 8030, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8031)
ID = 8031
scale = 0.1 + (0.025 * (time -3)), 0.1 + (0.025 * (time -3))
trans = addalpha
alpha = 256 -(16 * (time -3)), 256

[State 8030, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8032)
ID = 8032
scale = 0.1 + (0.025 * (time -6)), 0.1 + (0.025 * (time -6))
trans = addalpha
alpha = 256 -(16 * (time -6)), 256

[State 8030, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 22

[State 8030, DestroySelf]
type = DestroySelf
trigger1 = !NumExplod

[StateDef 8050]
type = A
physics = N
movetype = I
anim = 8050
velset=0,0
sprpriority=5

[State 8050, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8050, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8050, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8050, AngleDraw]
type = AngleDraw
trigger1 = time < 10
scale = .3-(time*.03), .3-(time*.03)

[State 8050, AngleDraw]
type = AngleDraw
trigger1= time >= 10
scale = 0,0

[State 8050, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8050, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8050, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8051)
ID = 8051
scale = .15+(.009375*time),.15+(.009375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8050, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8050, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8052)
ID = 8052
scale = .15+(.009375*time),.15+(.009375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8050, Explod]
type = Explod
trigger1= !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8050, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8053)
ID = 8053
scale = .3-(.0375*time),.3-(.0375*time)
trans = addalpha
alpha = 128-(16*time),256

[State 8050, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

[State 8050, DestroySelf]
type = DestroySelf
trigger1 = time >= 16

[StateDef 8051]
type = A
physics = N
movetype = I
anim = 8050
velset = 0,0
sprpriority = 5

[State 8051, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8051, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8051, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8051, AngleDraw]
type = AngleDraw
trigger1 = time<10
scale = .35-(time*.035), .35-(time*.035)

[State 8051, AngleDraw]
type = AngleDraw
trigger1 = time >= 10
scale = 0,0

[State 8051, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8051, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8051, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8051)
ID = 8051
scale =.175+(.0109375*time),.175+(.0109375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8051, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8051, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8052)
ID = 8052
scale = .175+(.0109375*time),.175+(.0109375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8051, Explod]
type = Explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8051, ModifyExplod]
type = ModifyExplod
trigger1= NumExplod(8053)
ID = 8053
scale = .35-(.04375*time),.35-(.04375*time)
trans = addalpha
alpha = 128-(16*time),256

[State 8051, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

[State 8051, DestroySelf]
type = DestroySelf
trigger1 = time >= 16

[StateDef 8052]
type = A
physics = N
movetype = I
anim = 8050
velset=0,0
sprpriority=5

[State 8052, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8052, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8052, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8052, AngleDraw]
type = AngleDraw
trigger1 = time < 10
scale = .4-(time*.04), .4-(time*.04)

[State 8052, AngleDraw]
type = AngleDraw
trigger1 = time >= 10
scale = 0,0

[State 8052, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8052, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8052, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8051)
ID = 8051
scale =.2+(.0125*time),.2+(.0125*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8052, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8052, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8052)
ID = 8052
scale = .2+(.0125*time),.2+(.0125*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8052, Explod]
type = Explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8052, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8053)
ID = 8053
scale = .4-(.05*time),.4-(.05*time)
trans = addalpha
alpha = 128-(16*time),256

[State 8052, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

[State 8052, DestroySelf]
type = DestroySelf
trigger1 = time >= 16

[StateDef 8053]
type = A
physics = N
movetype = I
anim = 8050
velset = 0,0
sprpriority = 5

[State 8053, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 8053, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8053, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8053, AngelDraw]
type = AngleDraw
trigger1 = time < 10
scale = .5-(time*.05), .5-(time*.05)

[State 8053, AngleDraw]
type = AngleDraw
trigger1 = time >= 10
scale = 0,0

[State 8053, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8051)
ID = 8051
scale = .25+(.015625*time),.25+(.015625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8052)
ID = 8052
scale = .25+(.015625*time),.25+(.015625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8054
ID = 8054
postype = p1
vfacing = ifelse(random < 500,-1,1)
sprpriority = -3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8054)
ID = 8054
scale = .5,.5
trans = addalpha
alpha = 256-(32*time),256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8053)
ID = 8053
scale = .5-(.0625*time),.5-(.0625*time)
trans = addalpha
alpha = 256-(32*time),256

[State 8053, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

[State 8053, DestroySelf]
type = DestroySelf
trigger1 = time >= 16

[StateDef 8054]
type = A
physics = N
movetype = I
anim = 8050
velset = 0,0
sprpriority = 5

[State 8054, AssertSpecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8054, Angle]
type = angleset
trigger1 = !time
value = 30*(random%12)

[State 8054, AngleAdd]
type = angleadd
trigger1 = 1
value = 30

[State 8054, AngleDraw]
type = angledraw
trigger1 = time < 10
scale = .45-(time*.045), .45-(time*.045)

[State 8054, AngleDraw]
type = angledraw
trigger1 = time >= 10
scale = 0,0

[State 8054, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8051)
ID = 8051
scale = .225+(.0140625*time),.225+(.0140625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8052)
ID = 8052
scale = .225+(.0140625*time),.225+(.0140625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8054
ID = 8054
postype = p1
vfacing = ifelse(random < 500,-1,1)
sprpriority = -3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8054)
ID = 8054
scale = .4,.4
trans = addalpha
alpha = 256-(32*time),256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8053)
ID = 8053
scale = .45-(.05625*time),.45-(.05625*time)
trans = addalpha
alpha = 192-(24*time),256

[State 8054, RemoveExplod]
type = RemoveExplod
trigger1= time >= 16

[State 8054, DestroySelf]
type = DestroySelf
trigger1= time >= 16

[StateDef 8100]
type = A
velSet = 0,0
anim = 99999

[State 8100, VarSet]
type = VarSet
trigger1 = !Time
var(0) = Parent,var(43)

[State 8100, PosSet]
type = PosSet
trigger1 = PlayerIDexist(var(0))
x = ceil(PlayerID(var(0)), pos x)
y = ceil(PlayerID(var(0)), pos y) + (PlayerID(var(0)), const(size.mid.pos.y))

[State 8100, PosSet]
type = PosSet
trigger1 = PlayerIDexist(var(0))
trigger1 = PlayerID(var(0)), StateType = L
x = ceil(PlayerID(var(0)), pos x)
y = ceil(PlayerID(var(0)), pos y) - 20

[State 8100, Turn]
type = Turn
trigger1 = PlayerIDexist(var(0))
trigger1 = Facing != (PlayerID(var(0)), Facing)

[State 8100, Explod]
type = Explod
trigger1 = PlayerIDexist(var(0))
anim = 8100
sprPriority = 3
posType = P1
random = 40,40
vel = (Random / 2000.0), -0.5 - (Random / 2000.0)
facing = ifElse(Random < 500, -1, 1)
vfacing = ifElse(Random < 500, -1, 1)
scale = 0.5,0.5
ownpal = 1

[State 8100, Explod]
type = Explod
trigger1 = PlayerIDexist(var(0))
anim = 8100
sprPriority = 3
posType = P1
random = 60,60
vel = (Random / 2000.0), -0.5 - (Random / 2000.0)
facing = ifElse(Random < 500, -1, 1)
vfacing = ifElse(Random < 500, -1, 1)
scale = 0.5,0.5
ownpal = 1

[State 8100, DestroySelf]
type = DestroySelf
triggerAll = PlayerIDexist(var(0))
trigger1 = PlayerID(var(0)), ctrl
trigger2 = PlayerID(var(0)), Movetype != H || PlayerID(var(0)), StateNo = 5300
trigger3 = PlayerID(var(0)), StateType = L && (PlayerID(var(0)), StateNo != [5080,5081])

[StateDef 8700]
type = A
physics = N
velset = 0,0
anim = 99999

[State 8700, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S8700,0
channel = 2

[State 8700, Explod]
type = explod
trigger1 = Time = 0
anim = IfElse(TeamSide = 1,8700,8701)
pos = IfElse(Teamside = 1,0,320),110
ID = 8700
sprpriority = -1
postype = Left
removetime = 60
BindTime = -1
pausemovetime = -1
supermovetime = -1
ownpal = 1
scale = 0.335,0.335

[State 8700, RemoveExplod]
type = removeexplod
trigger1 = time >= 60

[State 8700, DestroySelf]
type = destroyself
trigger1 = time >= 60

[StateDef 8710]
type = A
physics = N
velset = 0,0
anim = 99999

[State 8710, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S8710,0+Random%3
channel = 2

[State 8710, Explod]
type = explod
trigger1 = Time = 0
anim = IfElse(TeamSide = 1,8710,8711)
pos = IfElse(Teamside = 1,0,320),125
ID = 8710
sprpriority = -1
postype = Left
removetime = 60
BindTime = -1
pausemovetime = -1
supermovetime = -1
ownpal = 1
scale = 0.335,0.335

[State 8710, RemoveExplod]
type = removeexplod
trigger1 = time >= 60

[State 8710, DestroySelf]
type = destroyself
trigger1 = time >= 60

[StateDef 9000]
type = A
physics = N
movetype = I
anim = 9000
velset = 0,0
sprpriority = 5

[State 9000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 9000, AnglDraw]
type = AngleDraw
trigger1 = 1
scale = .125+(.046875*time), .125+(.046875*time)

[State 9000, Trans]
type = Trans
trigger1 = time < 4
trans = addalpha
alpha = 256, 256

[State 9000, Trans]
type = Trans
trigger1 = time >= 4
trans = addalpha
alpha = 256 - 64*(time-4), 256

[State 9000, DstroySelf]
type = DestroySelf
trigger1 = time >= 8

[statedef 20200]
anim=99999
[state ]
type=null
time=50
anim=-1
p2defmul=1
darken=0
trigger1=1||(var(0):=5*(random%3))||(var(1):=(floor((1.3333333 * GameHeight / GameWidth) * 121))-120)
[state ]
type=explod
anim=20200
id=20200
facing=root,facing
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=1
[state ]
type=explod
anim=20215
id=20200
facing=root,facing
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=1
[state ]
type=explod
anim=20202
id=20200
facing=root,facing
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=1
[state ]
type=explod
anim=20201
id=20200
facing=root,facing
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=1
[state ]
type=explod
anim=20200+var(0)
id=20200
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=var(0)
[state ]
type=explod
anim=20202+var(0)
id=20200
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=var(0)
[state ]
type=explod
anim=20201+var(0)
id=20200
scale=.33333333,.33333333
ontop=1
pausemovetime=2147483647
supermovetime=2147483647
postype=left
pos=160,var(1)
trigger1=var(0)
[state ]
type=playsnd
value=s20200,random%4
volumescale=140
abspan=0
trigger1=1
[state ]
type=changestate
value=20201
trigger1=1
[statedef 20201]
[state ]
type=destroyself
trigger1=numexplod=0
[state ]
type=modifyexplod
id=20200
postype=left
pos=160,var(1)
trigger1=1
[state ]
type=modifyexplod
id=20203
postype=left
pos=0,0
trigger1=numexplod(20203)

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

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

[StateDef -2]

[State -2, PlaySnd]
type = playsnd
triggerall = alive && time = 1
triggerall = stateno = 5000 || stateno = 5010
trigger1 = gethitvar(animtype) >= 2 && random < 500
trigger2 = gethitvar(animtype) = 1 && random < 500
trigger3 = gethitvar(animtype) = 0 && random < 500
value = S5000,0+random%9
channel = 0
ignorehitpause = 1

[State -2, PlaySnd]
type = playsnd
triggerall = alive && time = 1
trigger1 = (stateno = 5000 || stateno = 5010) && numenemy
trigger1 = gethitvar(fall) || (enemynear, hitdefattr = SCA, SA, HA)
trigger2 = (stateno = 5020 || stateno = 5070 || stateno = 5080)
trigger3 = (stateno = 5050 || stateno = 5100) && (prevstateno != [5000, 5199])
value = S5000,0+random%9
channel = 0
ignorehitpause = 1

[State -2, PlaySnd]
type = PlaySnd
triggerall = time = 1
trigger1 = StateNo = [5200,5210]
value = S5200,0+Random%4
persistent = 0
channel = 0

[State -2, PlaySnd]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 5120
value = S5200,0+Random%4
persistent = 0
channel = 0

[State -2, VarSet]
type = Varset
trigger1 = numenemy
fvar(0) = enemynear,gethitvar(hitcount)
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = numenemy
trigger1 = (enemynear,movetype!=H)
trigger2 = !numenemy
fvar(0) = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
fvar(1) = ifelse(fvar(0) = 0, 1, ifelse(fvar(0) = 1, 1, .96875**fvar(0)))
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = fvar(1)*fvar(2)
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
fvar(2) = IfElse(Var(46) = 1,1.1,1)

[State -2, VarSet]
type = VarSet
trigger1 = MoveContact = 1 && var(40) < 0
var(40) = hitpausetime
ignorehitpause = 1

[State -2, Helper]
type = Helper
trigger1 = var(40) = hitpausetime
trigger1 = var(41) >0 || var(42) > 0
trigger1 = MoveContact = 1
helpertype = normal
name="Hit_Spark"
stateNo = Ifelse(MoveGuarded, var(42),var(41))
ID = 8050
postype = p1
pos = Ifelse(P2Dist x < 0, 0, Ifelse(P2Dist x < var(43), ceil(P2Dist x), var(43))), var(44)
ownpal = 1
keyctrl = 0
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
size.xscale = 1
size.yscale = 1

[State -2, Helper]
type = Helper
trigger1 = MoveHit = 1 && Var(40) = HitPauseTime
trigger1 = NumEnemy && Var(26)
trigger1 = !(HitDefAttr = SCA, AT) && (EnemyNear,MoveReversed != 1)
helpertype = normal
stateno = 8700
ID = 8700
name = "Counter"
postype = p1
pos = ifelse(p2dist x<40, 40, ifelse(p2dist x<140, ceil(p2dist x), 140)), -70
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1

[State -2, VarSet]
type = Varset
trigger1 = NumEnemy
var(26) = (EnemyNear,MoveType = A)
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
var(40) = -1

[State -2, VarRangeSet]
type = VarRangeSet
trigger1 = movetype = I
trigger2 = movetype = H && time
trigger3 = var(41)>0||var(42)>0
trigger3 = movecontact=1
first = 40
last = 44
value = -1
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = Var(46) = 1
trigger1 = Var(45) <= 0
trigger2 = Var(46) = 0
trigger2 = Var(45) <=0
v = 45
Value = 0

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveHit = 1
trigger1 = StateNo != 220
trigger1 = StateNo != [800,810]
trigger1 = StateNo != [950,951]
trigger1 = StateNo != [1100,1199]
trigger1 = StateNo != [2000,4999]
v = 45
value = 12

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
trigger1 = MoveGuarded = 1
trigger1 = StateNo != 220
trigger1 = StateNo != [800,810]
trigger1 = StateNo != 950
trigger1 = StateNo != [1100,1199]
trigger1 = StateNo != [2000,4999]
v = 45
value = 6

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 1
trigger1 = MoveContact = 1
trigger1 = StateNo != [800,810]
trigger1 = StateNo != 950
trigger1 = StateNo != 6000
trigger1 = StateNo != [1100,1199]
trigger1 = StateNo != [2000,4999]
v = 45
value = -15

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 1
trigger1 = MoveContact = 1
trigger1 = StateNo = [1100,1199]
v = 45
value = -7

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
trigger1 = MoveType = H
trigger1 = GetHitVar(damage)!=0
trigger1 = StateNo != [120,159]
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
trigger1 = MoveType = H
trigger1 = GetHitVar(damage)!=0
trigger1 = StateNo = [120,159]
v = 45
value = 2

[State -2, VarAdd]
type = VarAdd
triggerall = Var(45) <= 500
triggerall = Var(46) = 0
triggerall = Alive
triggerall = RoundState = 2
triggerall = ((Life*100)/LifeMax) <= 20
trigger1 = StateNo != 3000
trigger1 = StateNo != [4000,4199]
trigger1 = Gametime%10 = 0
v = 45
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = Var(46) = 1
trigger1 = Var(45) <= 0
v = 46
Value = 0

[State -2, VarSet]
type = VarSet
trigger1 = RoundState < 2
trigger1 = Var(48) != 360
trigger2 = Var(48) > 360
var(48) = 360

[State -2, VarAdd]
type = VarAdd
triggerall = Var(49) <= 0
trigger1 = !(NumHelper(1401) || NumHelper(1430))
trigger1 = StateNo != [4000,4199]
trigger1 = Var(48) < 360
trigger1 = time
v = 48
value = 1
ignorehitpause = 1

[State -2, VarAdd]
type = VarAdd
triggerall = Var(49) > 0
trigger1 = !(NumHelper(1401) || NumHelper(1430))
trigger1 = StateNo != [4000,4199]
trigger1 = Var(48) < 360
trigger1 = time
v = 48
value = 4
ignorehitpause = 1

[State -2, VarAdd]
type = VarAdd
trigger1 = var(49) > 0
trigger1 = !numhelper(20100)
trigger1 = StateNo != 3000
trigger1 = StateNo != [4000,4199]
var(49) = -1
IgnoreHitPause = 1

[State -2, VarSet]
type = VarSet
trigger1 = RoundState = 1 
v = 49
value = 0

;[State -2, VarAdd];Testing Purposes
;type = VarAdd
;triggerall = Var(45) <= 500
;trigger1 = Command = "b"
;v = 45
;value = 500

;[State -2, VarSet];Testing Purposes
;type = VarSet
;triggerall = Var(47) <= 3
;trigger1 = Command = "c"
;v = 47
;value = 3

[State -2, PalFX]
type = PalFX
triggerall = Var(46) = 1
trigger1 = !(GameTime % 2)
time = 1
add = 60,60,60
ignorehitpause = 1

[State -2, Helper]
type = Helper
Trigger1 = Var(46) = 1
Trigger1 = NumHelper(6002) = 0
Trigger1 = Var(45) >= 0
helpertype = normal
name = "Aura"
ID = 6002
pos = 0, 0
postype = p1
facing = 1
stateno = 6002
keyctrl = 0
ownpal = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State -2, AssertSpecial]
type = AssertSpecial
flag = NoKOSlow
trigger1 = StateNo = [4000,4199]
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = RoundState >= 2
triggerall = WinKo && !var(37)
trigger1 = StateNo = [4000,4199]
trigger2=movetype=h
trigger2=prevstateno=[4000,4199]
ID = 20150
stateno = 20100
Name = "Super_Combo_Finish"
postype = left
pos = 0,0
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1
ownpal = 1
persistent = 0
size.xscale = 1
size.yscale = 1

[State -2, VarAdd]
type = VarAdd
trigger1 = roundstate = 3
ignorehitpause = 1
var(37) = 1

[State -2, VarSet]
type = Varset
trigger1 = roundstate = 0
ignorehitpause = 1
var(37) = 0

[State -2, Helper]
type = Helper
trigger1 = 1
trigger1 = numhelper(6010) = 0
ID = 6010
name = "MAX_Bar"
stateno = 6010
ownpal = 1
postype = left
pos = 160,
pausemovetime=-2**31-1
supermovetime=-2**31-1
ignorehitpause = 1

[State -2, Helper]
type = Helper
trigger1 = Var(49) <= 0
trigger1 = RoundState = 2
trigger1 = Var(48) = 359
trigger2 = Var(49) > 0
trigger2 = RoundState = 2
trigger2 = Var(48) = 356
stateno = 6004
ID = 6004
Name = "Speech"
postype = left
facing = 1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
persistent = 0
Helpertype = Normal
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State -2, Helper]
type = Helper
triggerall = NumHelper(6080) = 0
triggerall = RoundState = 4
trigger1 = Alive = 0
trigger2 = StateNo = 170
stateno = 6004
ID = 6080
Name = "Speech"
postype = left
facing = 1
sprpriority = 5
ownpal = 1
ignorehitpause = 1
persistent = 0
Helpertype = Normal
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State -2, VarAdd]
type = VarAdd
trigger1 = 100*Life/LifeMax <= 20
v = 27
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = 100*Life/LifeMax > 20
v = 27
value = 0

[State -2, Helper]
type = Helper
trigger1 = Var(27) = 1
persistent = 0
id = 8710
name = "Danger"
pos = 0,0
postype = P1
stateno = 8710
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime=-2**31-1
supermovetime=-2**31-1

[State -2, LifeAdd]
type = LifeAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "VAkiha_K"
trigger1 = Enemy,Var(30) = 1
value = -5
kill = 0

[State -2, PowerAdd]
type = PowerAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "VAkiha_K"
trigger1 = Enemy,Var(30) = 1
value = -26

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Senna_K"
triggerall = Enemy,StateNo = 810
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 6
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Homura_K"
triggerall = Enemy,StateNo = 4003
triggerall = MoveType = H
trigger1 = Enemy,time = 203
v = 45
value = 46

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Taiga_K"
triggerall = Enemy,StateNo = 4103
triggerall = MoveType = H
trigger1 = Enemy,time%8 = 0
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Taiga_K"
triggerall = Enemy,StateNo = 4004
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 3
trigger2 = Enemy,AnimElem = 8
trigger3 = Enemy,AnimElem = 12
trigger4 = Enemy,AnimElem = 16
trigger5 = Enemy,AnimElem = 20
trigger6 = Enemy,AnimElem = 24
trigger7 = Enemy,AnimElem = 28
trigger8 = Enemy,AnimElem = 32
trigger9 = Enemy,AnimElem = 36
trigger10 = Enemy,AnimElem = 40
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Taiga_K"
triggerall = Enemy,StateNo = 4005
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 4
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Rentaro_K"
triggerall = Enemy,StateNo = 4005
triggerall = MoveType = H
trigger1 = Enemy,Time = 16
v = 45
value = 46

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Miyuki_K"
triggerall = Enemy,StateNo = 4104
triggerall = MoveType = H
trigger1 = Enemy,Time >= 24
trigger1 = Enemy,Time%3 = 0
trigger1 = Enemy,Time < 75
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Miyuki_K"
triggerall = Enemy,StateNo = 4105
triggerall = MoveType = H
trigger1 = Enemy,Time = 12
trigger2 = Enemy,Time = 137
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Kirino_K"
triggerall = Enemy,StateNo = 951
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 13
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Kirino_K"
triggerall = Enemy,StateNo = 4005
triggerall = MoveType = H
trigger1 = Enemy,Time = 184
v = 45
value = 50

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Kuroyukihime_K"
triggerall = Enemy,StateNo = 4002
triggerall = MoveType = H
trigger1 = Enemy,Time = 20
v = 45
value = 50

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Selvaria_K"
triggerall = Enemy,StateNo = 810
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 2
trigger2 = Enemy,AnimElem = 9
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Selvaria_K"
triggerall = Enemy,StateNo = 1503 
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 5
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Selvaria_K"
triggerall = Enemy,StateNo = 2502 
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 5
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Selvaria_K"
triggerall = Enemy,StateNo = 4003
triggerall = MoveType = H
trigger1 = Enemy,Time%2 = 0
trigger1 = Enemy,Time > 45
trigger1 = Enemy,Time <= 77
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Emi_K"
triggerall = Enemy,StateNo = 810 
triggerall = MoveType = H
trigger1 = Enemy,AnimElem = 4
v = 45
value = 4

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Emi_K"
triggerall = Enemy,StateNo = 4004 
triggerall = MoveType = H
trigger1 = Enemy,Time = 95
v = 45
value = 50

[State -2, VarAdd]
type = VarAdd
triggerall = NumEnemy
triggerall = Enemy,AuthorName = "Kohaku" && Enemy,Name = "Emi_K"
triggerall = Enemy,StateNo = 4108 
triggerall = MoveType = H
trigger1 = Enemy,Time = 4
trigger2 = Enemy,Time = 9
trigger3 = Enemy,Time = 14
trigger4 = Enemy,Time = 19
trigger5 = Enemy,Time = 24
trigger6 = Enemy,Time = 29
trigger7 = Enemy,Time = 34
trigger8 = Enemy,Time = 39
trigger9 = Enemy,Time = 44
trigger10 = Enemy,Time = 49
trigger11 = Enemy,Time = 52
trigger12 = Enemy,Time = 55
trigger13 = Enemy,Time = 58
trigger14 = Enemy,Time = 61
trigger15 = Enemy,Time = 64
trigger16 = Enemy,Time = 67
trigger17 = Enemy,Time = 70
trigger18 = Enemy,Time = 73
trigger19 = Enemy,Time = 74
trigger20 = Enemy,Time = 75
trigger21 = Enemy,Time = 76
trigger21 = Enemy,Time = 77
trigger22 = Enemy,Time = 78
trigger23 = Enemy,Time = 79
trigger24 = Enemy,Time = 80
trigger25 = Enemy,Time = 81
trigger26 = Enemy,Time = 104
v = 45
value = 2

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(211)
trigger1 = Stateno != 210
ID = 211

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(221)
trigger1 = Stateno != 220
ID = 221

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(411)
trigger1 = Stateno != 410
ID = 411

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(421)
trigger1 = Stateno != 420
ID = 421

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(601)
trigger1 = Stateno != 600
ID = 601

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(611)
trigger1 = Stateno != 610
ID = 611

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(621)
trigger1 = Stateno != 620
ID = 621

[State -2, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Item = %d"
params = var(12)

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

[Statedef -3]

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(20) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact
trigger3 = Statetype = A
trigger3 = (Stateno = [600,699])
trigger3 = MoveContact
var(20) = 1

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(21) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [1000,1999])
trigger2 = MoveContact
var(21) = 1

[State -3, VarSet]
type = VarSet
trigger1 = 1
var(22) = 0

[State -3, VarSet]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [2000,3999])
trigger2 = stateno != [4000,4999]
trigger2 = MoveContact
var(22) = 1

[State -3, VarSet]
type = Varset
trigger1 = fvar(32) = 0
fvar(32) = Const(size.xscale)*2.985074626865672

[State -3, VarSet]
type = Varset
trigger1 = fvar(33)=0
fvar(33) = Const(size.yscale)*2.985074626865672

[State -3, ChangeState]
type = ChangeState
trigger1 = !alive && (stateno = [5000,5010])
trigger1 = (prevstateno = [120,121]) || (prevstateno = [130,131]) || (prevstateno = [140,141]) || (prevstateno = [150,153])
value = 5950
ignorehitpause = 1

[State -3, AssertSpecial]
type = AssertSpecial
trigger1 = (stateno = [5000,5010])
trigger1 = (prevstateno = [120,121]) || (prevstateno = [130,131]) || (prevstateno = [140,141]) || (prevstateno = [150,153])
flag = nokosnd
ignorehitpause = 1

[State -3, Width]
type = Width
trigger1 = 1
edge = 4,0
ignorehitpause = 1

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