; 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 = 250			;Volume offset (negative for softer)
IntPersistIndex = 30,32,60	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,
  				;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
  				;If omitted, then it defaults to 60 and 40 for integer and float
  				;variables repectively, meaning that none are persistent, i.e. all
  				;are reset. If you want your variables to persist between matches,
  				;you need to override state 5900 from common1.cns.


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

[Velocity]
walk.fwd  = 3.5		;Walk forward
walk.back = -3.5		;Walk backward
run.fwd  = 7		;Run forward (x, y)
run.back = -7,-3	;Hop backward (x, y)
jump.neu = 0,-9		;Neutral jumping velocity (x, y)
jump.back = -3.5		;Jump back Speed (x, y)
jump.fwd = 3.5		;Jump forward Speed (x, y)
runjump.back = -7;Running jump speeds (opt)
runjump.fwd = 7	;.
airjump.neu = 0,-7.5	;.
airjump.back = -3.5	;Air jump speeds (opt)
airjump.fwd = 3.5		;.

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

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

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

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

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

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

[State 180, Overdrive Win]
type = changestate
trigger1 = prevstateno = 182
value = prevstateno

[State 180, 1]
type = ChangeState
trigger1 = Matchover
value = 183

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 181, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = S0,6

[State 181, Explod]
Type = Explod
Trigger1 = AnimElem = 8
IgnoreHitPause = 0
Anim = 2106
ID = 2106
Pos = -10, -90
PosType = P1
BindTime = -1
RemoveTime = -1
SuperMove = 0
Scale = 2.0, 2.0
SprPriority = 10

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

[StateDef 182]
type = S
movetype = I
physics = S
velset = 0,0
anim = 4521
sprpriority = 1

[state win]
type=helper
postype=left
stateno=19000
ownpal=1
supermovetime=44444444
pausemovetime=44444444
triggerall=time=200
triggerall=matchover
trigger1=teammode=single
trigger2=teammode=simul
trigger2=id<partner,id

[State 182, AssertSpecial]
type=assertspecial
flag=roundnotover
trigger1=time=[1,201]

[State 182, AssertSpecial]
type=assertspecial
flag = NoAutoTurn
flag2 = NoMusic
trigger1= time = 200
triggerall = Matchover

[state invul]
type=hitby
value=
time=-1
trigger1=!time

[state push]
type=playerpush
value=0
trigger1=1

[state camera]
type=screenbound
value=0
movecamera=1,0
trigger1=anim=4521

[State 182]
type = ScreenBound
trigger1 = 1
value = 1

[State 182]
type = nothitby
trigger1 = 1
value = SCA

[State 182, win]
type = changestate
trigger1 = prevstateno = 4507 && time > 240
value = 180
ctrl = 1

[StateDef 183]
type = S
movetype = I
physics = S
velset = 0,0
anim = 181
sprpriority = 1

[State 181, AssertSpecial]
type=assertspecial
flag=roundnotover
flag2=nomusic
flag3=noautoturn
trigger1=1

[state invul]
type=hitby
value=
time=-1
trigger1=!time

[state push]
type=playerpush
value=0
trigger1=1

[state camera]
type=screenbound
value=0
movecamera=1,0
trigger1=anim=181

[state win]
type=helper
postype=left
stateno=19000
ownpal=1
supermovetime=44444444
pausemovetime=44444444
triggerall=time=20
triggerall=matchover
trigger1=teammode=single
trigger2=teammode=simul
trigger2=id<partner,id

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

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

[State 190, Helper]
type = Helper
trigger1 = time = 0
ID = 191
pos = 350,0
postype = p1
stateno = 191
helpertype = normal
name = "intro"
keyctrl = 0
supermovetime = 1

[State 190, Helper]
type = Helper
trigger1 = time = 0
ID = 192
pos = 400,0
postype = p1
stateno = 192
helpertype = normal
name = "Sakuya"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[Statedef 191]
type = S
physics = S
Anim = 190
sprpriority = 0

[State 191, VelSet]
type = VelSet
trigger1 = time
x = -2
y = 0

[State 191, DestroySelf]
type = DestroySelf
trigger1 = (parentDist X > 0)

[Statedef 192]
type = S
physics = S
Anim = 191
sprpriority = 0

[State 192, VelSet]
type = VelSet
trigger1 = time
x = -2
y = 0

[State 192, VelSet]
type = VelSet
trigger1 = Anim = 193
x = 0
y = 0

[State 192, ChangeAnim]
type = Changestate
trigger1 = (parentDist X > 30)
value = 193

[Statedef 193]
type = S
physics = S
Anim = 193
sprpriority = 0

[State 193, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 193 && animtime = 0
value = 192

[State 193, ChangeState]
type = ChangeState
trigger1 = Anim = 192 && animtime = 0
value = 194

[Statedef 194]
type = S
physics = S
Anim = 191
sprpriority = 0

[State 194, VelSet]
type = VelSet
trigger1 = time
x = -2
y = 0

[State 194, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -60

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

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

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

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

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

[State 200, 3]
type = CtrlSet
trigger1 = Time = 9
value = 1

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

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

[State 210, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 6

[State 210]
type = explod
trigger1 = animelem = 2
anim = 211
ownpal = 1
sprpriority = 5
postype = p1
pos = 20,-50
bindtime = -1
removetime = -2
removeongethit = 1
ignorehitpause = 0
id = 211

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage  = 20
guardflag = MA
pausetime = 6,9
sparkno = S8051*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-60
hitsound   = S200,8
guardsound = S300,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -2.5,-4

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

[StateDef 215]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 215
poweradd = 35
sprpriority = 2

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

[State 215]
type = explod
trigger1 = animelem = 1
anim = 216
ownpal = 1
sprpriority = 5
postype = p1
pos = 30,-45
bindtime = -1
removetime = -2
removeongethit = 1
ignorehitpause = 0
id = 216

[State 210, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 6

[State 215, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 20
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 9
sparkno = S8051*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -60
hitsound = S200, 8
guardsound = S300,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 15
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

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

[State 210, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 6

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

[State 220]
type = explod
trigger1 = animelem = 5
anim = 221
ownpal = 1
sprpriority = 5
postype = p1
pos = 30,-45
bindtime = -1
removetime = -2
removeongethit = 1
ignorehitpause = 0
id = 221

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
animtype  = Heavy
damage = 40
guardflag = MA
pausetime = 6,9
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,8
guardsound = S300,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3
air.velocity = -4,-4

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

[StateDef 225]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 225
poweradd = 40
sprpriority = 2

[State 225]
type = explod
trigger1 = animelem = 6
anim = 226
ownpal = 1
sprpriority = 5
postype = p1
pos = 70,-45
bindtime = -1
removetime = -2
removeongethit = 1
ignorehitpause = 0
id = 226

[State 225, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,2
volume = 255

[State 225, 1]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
damage = 50
animtype = Hard
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 7, 10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -20, -76
hitsound = S200,6
guardsound = S300,4
ground.type = High
ground.slidetime = 5
ground.hittime  = 15
ground.velocity = -8,-4
airguard.velocity = -1,4
air.type = High
air.velocity = -8,-4.5
air.hittime = 12
fall = 1
fall.recovertime = 40

[State 225, end]
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
poweradd= 15
ctrl = 0
anim = 400

[State 400, Explod]
Type = Explod
Trigger1 = AnimElem = 3
Persistent = 0
IgnoreHitPause = 0
Anim = 401
ID = 401
Pos = 14,-80
PosType = P1
BindTime = -1
SuperMove = 0
SprPriority = 5
OwnPal = 1
RemoveOnGetHit = 1

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

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage = 10
priority = 3
animtype = Light
hitflag = MAF
guardflag = MA
pausetime = 6,6
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-42
hitsound   = S200,8
guardsound = S300,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -3
air.velocity = -1.5,-4

[State 400, 3]
type = CtrlSet
trigger1 = Time = 7
value = 1

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

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

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

[State 410, VelSet]
type = VelSet
trigger1 = time
x = 4

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA
damage = 15
priority  = 3,Hit
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-22
hitsound   = S200,1
guardsound = S300,4
ground.type = Low
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -4
air.velocity = -1.5,-4

[State 410, 5]
type = ChangeState
trigger1 = Time = 20
value = 411
ctrl = 1

[StateDef 411]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 411
poweradd = 0
sprpriority = 2

[State 411, VelAdd]
type = VelAdd
trigger1 = time
x = 1
y = 0
;ignorehitpause =
;persistent =

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

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

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

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage  = 45
priority  = 3
animtype  = Up
hitflag = M
guardflag = MA
hitflag = MAFD
pausetime = 10,11
sparkno = S8052*10**(random%4)
guard.sparkno = S9000
pausetime = 15,16
sparkxy = -10,-42
hitsound   = S200,8
guardsound = S300,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 26
ground.velocity = -1,-7
airguard.velocity = -2.9,-1.6
air.type = High
air.velocity = -1,-7
down.velocity = -3,-3
air.hittime = 26
fall = 1
fall.recovertime = 42

[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
poweradd= 11
ctrl = 0
juggle = 2
anim = 600

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

[State 600, 2]
type = HitDef
trigger1 = animelem = 4
attr = A, NA
damage  = 18
hitflag = MAFD
guardflag = MA
priority = 4,Hit
pausetime = 6,6
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-50
hitsound   = S200,0
guardsound = s300,4
animtype = light
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
fall.recovertime = 19
ground.velocity = -3
air.velocity = -1,-4
air.fall = 1

[State 600, VelSet]
type = Veladd
trigger1 = PrevStateno = 101
trigger1 = time
y = 0.5

[State 600, StateTypeSet]
Type = StateTypeSet
Trigger1 = MoveContact
Trigger1 = AnimElem = 5
MoveType = I

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

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

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

[State 610, 2]
type = HitDef
trigger1 = animelem = 4
attr = A, NA
damage  = 25
hitflag = MAFD
guardflag = HA
priority = 6,Hit
pausetime = 8,8
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-50
hitsound   = S200,0
guardsound = S300,4
animtype = Medium
ground.type = Low
ground.slidetime = 9
ground.hittime  = 11
fall.recovertime = 22
ground.velocity = -5
air.velocity = -2,-4.5
air.fall = 1

[State 610, VelSet]
type = Veladd
trigger1 = PrevStateno = 101
trigger1 = time
y = 0.5

[State 610, StateTypeSet]
Type = StateTypeSet
Trigger1 = MoveContact
Trigger1 = AnimElem = 5
MoveType = I

[State 610, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 17
Value = 44
Elem = 2

[State 610, ChangeState]
Type = ChangeState
Trigger1 = Time = 17
Value = 51
Ctrl = 1

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

[State 620, Explod]
Type = Explod
Trigger1 = AnimElem = 4
Persistent = 0
IgnoreHitPause = 0
Anim = 621
ID = 621
Pos = -3,10
PosType = P1
BindTime = -1
SuperMove = 0
SprPriority = 5
OwnPal = 1
RemoveOnGetHit = 1

[State 620, VelSet]
type = Veladd
trigger1 = PrevStateno = 101
trigger1 = time
y = 0.5

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

[State 620, 1]
type = HitDef
trigger1 = animelem = 5
attr = A, NA
damage = 45
hitflag = MAFD
guardflag = HA
priority = 7,Hit
pausetime = 14,10
sparkno = S8053*10**(random%4)
guard.sparkno = S9000
sparkxy = -10,-70
hitsound   = S200,8
guardsound = S300,0
animtype = Heavy
ground.type = High
ground.slidetime = 13
ground.hittime = 14
fall.recover = 0
ground.velocity = -5
air.velocity = -4,20
air.fall = 1
yaccel = .44

[State 620, StateTypeSet]
Type = StateTypeSet
Trigger1 = MoveContact
Trigger1 = AnimElem = 6
MoveType = I

[State 620, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 31
Value = 44
Elem = 2

[State 620, ChangeState]
Type = ChangeState
Trigger1 = Time = 31
Value = 51
Ctrl = 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
sprpriority = 2
; 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]
type = HitDef
Trigger1 = AnimElem = 3
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 810
p2stateno = 820
guard.dist = 0
fall = 1
fall.recover = 0

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

;Attributes: Standing, Normal Throw
;Affect only ground people who are not being hit
;Throw has low priority, must be miss or dodge type.
;No spark
;Draw in front of p2
;Turn if holding forwards
;Force p2 to face player
;On success, player changes to state 810
;If hit, p2 changes to state 820 in player's cns
;Force p2 into falling down

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

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

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

[State 810]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = 70, 20

[State 810]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(8) < 0
pos = 52, 12

[State 810]
type = PlaySnd
trigger1 = AnimElem = 4
value = s100,8

[State 810]
type = explod
trigger1 = AnimElem = 4
anim = 4022
ID = 4022
postype = p2
pos = 0,-40
vel = -10+(random/50.0), -5-(random/200.0)
accel = 0, .5
facing = ifelse(random<500, -1, 1)
vfacing = ifelse(random<500, -1, 1)
trans = addalpha
alpha = 256,128
sprpriority = 5
scale= .5, .5
ownpal = 1

[State 810]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -50

[State 810]
type = PlaySnd
trigger1 = AnimElem = 6
value = s200,8

[State 810]
type = null
trigger1 = time = 65
value = s100,7

[State 810]
type = TargetLifeAdd
trigger1 = AnimElem = 8
value = -30

[State 812, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 8051*10**(random%4)
ID = 8051
pos = -20,-45
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 2

[State 810]
type = null
trigger1 = AnimElem = 8
value = s200,8

[State 810]
type = TargetBind
trigger1 = AnimElem = 8
pos = 40, 6

[State 810]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = 80, 0

[State 810]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = 120, 0

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

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

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

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

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

[State 821]
type = Velset
Trigger1 = time = 0
x = -10
y = -2.5

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

[State 821]
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 821]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 821]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

[StateDef 1000]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 1000
SprPriority = 2

[State 1000, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 4
Value = S100,10

[State 1000, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1000, VelSet]
Type = VelSet
Trigger1 = AnimElem = 8
X = 15
Y = 0

[State 1000, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 8
Physics = N

[State 1000, VelSet];Œ¸‘¬
Type = VelSet
Trigger1 = AnimElem = 9
Trigger2 = MoveGuarded
Persistent = 0
X = 5

[State 1000, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 9
Physics = S

[State 1000, PlayerPush]
Type = PlayerPush
Trigger1 = AnimElem = 8, >=0
Trigger1 = AnimElem = 9, <0
Value = 0

[State 1000, Helper]
Type = helper
Trigger1 = AnimElem = 6
Persistent = 0
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 1007
StateNo = 1007
Name = "Circle"

[State 1000, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Attr = S, SA
Damage = 70, 10
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 110
Priority = 5, Hit
PauseTime = 0, 0
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Guard.Velocity = -7
Air.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = 20
Guard.Kill = 0
GivePower = 0, 30

[State 1000, VarSet]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1000, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1000, Helper]
Type = null
TriggerAll = Var(12) = 1000
TriggerAll = NumTarget > 0
Trigger1 = Var(35) = 1
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
PosType = P2
Pos = 0, 0
ID = 7043
StateNo = 7043
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = " "

[State 1000, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1000, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1001

[StateDef 1001]
Type = S
MoveType = A
Physics = S
Anim = 1001
SprPriority = 2
MoveHitPersist = 1

[State 1001, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 1002]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 1000
SprPriority = 2

[State 1002, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 4
Value = S100,10

[State 1002, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1002, VelSet]
Type = VelSet
Trigger1 = AnimElem = 8
X = 30
Y = 0

[State 1002, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 8
Physics = N

[State 1002, VelSet]
Type = VelSet
Trigger1 = AnimElem = 9
Trigger2 = MoveGuarded
Persistent = 0
X = 5

[State 1002, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 9
Physics = S

[State 1002, PlayerPush]
Type = PlayerPush
Trigger1 = AnimElem = 8, >=0
Trigger1 = AnimElem = 9, <0
Value = 0

[State 1002, Helper]
Type = helper
Trigger1 = AnimElem = 6
Persistent = 0
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 1007
StateNo = 1007
Name = "Circle"

[State 1002, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Attr = S, SA
Damage = 60, 10
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 110
Priority = 5, Hit
PauseTime = 0, 0
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Guard.Velocity = -7
Air.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = 25
GivePower = 0, 30

[State 1002, VarSet]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1002, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1002, Helper]
Type = null
TriggerAll = Var(12) = 1000
TriggerAll = NumTarget > 0
Trigger1 = Var(35) = 1
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
PosType = P2
Pos = 0, 0
ID = 7043
StateNo = 7043
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = " "

[State 1002, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1002, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1001

[StateDef 1003]
Type = S
MoveType = A
Physics = S
Anim = 1001
SprPriority = 2
MoveHitPersist = 1

[State 1003, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 1004]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 1002
SprPriority = 2

[State 1004, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1004, VelSet]
Type = VelSet
Trigger1 = AnimElem = 8
X = 15
Y = 0

[State 1004, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 8
Physics = N

[State 1004, VelSet]
Type = VelSet
Trigger1 = AnimElem = 9
Trigger2 = MoveGuarded
Persistent = 0
X = 5

[State 1004, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 9
Physics = S

[State 1004, PlayerPush]
Type = PlayerPush
Trigger1 = AnimElem = 8, >=0
Trigger1 = AnimElem = 9, <0
Value = 0

[State 1004, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 4
Value = S100,10

[State 1004, Helper]
Type = helper
Trigger1 = AnimElem = 6
Persistent = 0
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 1007
StateNo = 1007
Name = "Circle"

[State 1004, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Attr = S, SA
Damage = 40, 10
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 110
Priority = 5, Hit
PauseTime = 0, 0
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -5-(2*Var(35)),-5.5-(1*Var(35))
Guard.Velocity = -5
Air.Velocity = -5-(2*Var(35)),-5.5-(1*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GivePower = 0, 20

[State 1004, VarSet]
Type = VarSet
TriggerAll = Var(12) = 1010
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.90

[State 1004, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1004, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1004, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1005

[StateDef 1005]
Type = S
MoveType = A
Physics = S
Anim = 1003
SprPriority = 2

[State 1005, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 2
Value = S100,10

[State 1005, VelSet]
Type = VelSet
Trigger1 = AnimElem = 6
X = 15
Y = 0

[State 1005, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 6
Physics = N

[State 1005, VelSet]
Type = VelSet
Trigger1 = AnimElem = 7
Trigger2 = MoveGuarded
Persistent = 0
X = 5

[State 1005, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 7
Physics = S

[State 1005, PlayerPush]
Type = PlayerPush
Trigger1 = AnimElem = 6, >=0
Trigger1 = AnimElem = 7, <0
Value = 0

[State 1005, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 2
Value = S206, 7

[State 1005, Helper]
Type = helper
Trigger1 = AnimElem = 4
Persistent = 0
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 1007
StateNo = 1007
Name = "Circle"

[State 1005, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Attr = S, NA
Damage = 40,10
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 110
Priority = 5, Hit
PauseTime = 0, 0
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Guard.Velocity = -7
Air.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 0
P2Facing = 1
GivePower = 0, 20

[State 1005, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Trigger1 = P2StateType != A
Attr = S, NA
Damage = 40, 10
AnimType = Hard
Air.AnimType = Back
GuardFlag = M
Guard.Dist = 110
PauseTime = 0, 0
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Guard.Velocity = -7
Air.Velocity = 7+(2*Var(35)),-5.5-(1*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GivePower = 0, 20

[State 1005, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Trigger1 = P2StateType = A
Attr = S, NA
Damage = 40, 10
AnimType = Hard
Air.AnimType = Back
GuardFlag = M
Guard.Dist = 110
PauseTime = 0, 0
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -7-(2*Var(35)),-5.5-(1*Var(35))
Guard.Velocity = -7
Air.Velocity = 7+(2*Var(35)),-5.5-(1*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GivePower = 0, 20
P2Facing = -1

[State 1005, VarSet]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.90

[State 1005, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1005, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1005, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1006

[StateDef 1006]
Type = S
MoveType = A
Physics = S
Anim = 1004
SprPriority = 2
MoveHitPersist = 1

[State 1006, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 1007]
Type = A
MoveType = I
Physics = N
Anim = 1005
SprPriority = 5

[State 1007, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 1007, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 2
Value = 150

[State 1007, VarAdd]
Type = VarAdd
Trigger1 = Time = [1,2]
V = 2
Value = 40

[State 1007, VarAdd]
Type = VarAdd
Trigger1 = Time = [3,4]
V = 2
Value = 35

[State 1007, VarAdd]
Type = VarAdd
Trigger1 = Time = 5
V = 2
Value = 30

[State 1007, VarAdd]
Type = VarAdd
Trigger1 = Time > 5
V = 2
Value = 20

[State 1007, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 3
Value = 40

[State 1007, VarAdd]
Type = VarAdd
Trigger1 = Time > 0
V = 3
Value = 10

[State 1007, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 1
Value = 255

[State 1007, VarAdd]
Type = VarAdd
Trigger1 = Time > 0
Trigger1 = Var(1) > 0
V = 1
Value = -36

[State 1007, VarSet]
Type = VarSet
Trigger1 = Var(1) < 0
V = 1
Value = 0

[State 1007, Trans]
Type = Trans
Trigger1 = 1
Trans = Add

[State 1007, PalFX]
Type = PalFX
Trigger1 = 1
Time = 1
Add = 0, 0, 0
Mul = Var(1), Var(1), Var(1)

[State 1007, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = 0
Scale = 0.5*Var(2)/242, 0.5*Var(3)/242

[State 1007, DestroySelf]
Type = DestroySelf
Trigger1 = Var(1) = 0

[StateDef 1100]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 1100
SprPriority = 2

[State 1100, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1100, NotHitBy]
Type = NotHitBy
Trigger1 = Time = 0
Value = , AA, AT
Time = 13

[State 1100, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1101

[StateDef 1101]
Type = A
MoveType = A
Physics = N
Anim = 1101

[State 1101, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 6
Y = -4

[State 1101, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,16

[State 1101, Explod]
Type = Explod
Trigger1 = Time = 0
Persistent = 0
IgnoreHitPause = 0
Anim = 1105
ID = 1105
Pos = 0, -25
PosType = P1
BindTime = -1
SuperMove = 0
SprPriority = 10
OwnPal = 1
RemoveOnGetHit = 1

[State 1101, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Attr = A, SA
Damage = 80,15
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 70
Priority = 5, Hit
PauseTime = 10, 10
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -3-(2*Var(35)),-8-(2*Var(35))
Guard.Velocity = -3
Air.Velocity = -3-(2*Var(35)),-8-(2*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = 25
GivePower = 0, 30

[State 1101, VarSet]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1101, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1101, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1101, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1102

[StateDef 1102]
Type = A
MoveType = I
Physics = N
Anim = 1102

[State 1102, VelAdd]
Type = VelAdd
Trigger1 = Time > 1
Y = 0.38

[State 1102, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Value = 1103

[StateDef 1103]
Type = C
MoveType = A
Physics = C
Anim = 1103
SprPriority = 2

[State 1103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 1103, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1103, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 1103, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 1104]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 1100
SprPriority = 2

[State 1104, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1104, NotHitBy]
Type = NotHitBy
Trigger1 = Time = 0
Value = , AA, AT
Time = 13

[State 1104, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1105

[StateDef 1105]
Type = A
MoveType = A
Physics = N
Anim = 1101

[State 1105, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 4
Y = -8

[State 1105, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,16

[State 1105, Explod]
Type = Explod
Trigger1 = Time = 0
Persistent = 0
IgnoreHitPause = 0
Anim = 1105
ID = 1105
Pos = 0, -20
PosType = P1
BindTime = -1
SuperMove = 0
SprPriority = 10
OwnPal = 1
RemoveOnGetHit = 1

[State 1105, HitDef]
Type = HitDef
Trigger1 = AnimElem = 3
Trigger2 = AnimElem = 4
Trigger3 = AnimElem = 5
Attr = A, SA
Damage = 38,15
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 70
Priority = 5, Hit
PauseTime = 5,5
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24+(24*Var(35))
Ground.HitTime  = 24+(24*Var(35))
Ground.Velocity = -3-(2*Var(35)),-8-(2*Var(35))
Guard.Velocity = -3
Air.Velocity = -3-(2*Var(35)),-10-(2*Var(35))
Fall = 1
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = 35
GivePower = 0, 30

[State 1105, VarSet]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1105, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1105, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1105, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1106

[StateDef 1106]
Type = A
MoveType = I
Physics = N
Anim = 1102

[State 1106, VelAdd]
Type = VelAdd
Trigger1 = Time > 1
Y = 0.38

[State 1106, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Value = 1103

[StateDef 1107]
Type = C
MoveType = A
Physics = C
Anim = 1103
SprPriority = 2

[State 1107, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 1107, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1107, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 1107, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 1108]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 1100
SprPriority = 2

[State 1108, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1108, NotHitBy]
Type = NotHitBy
Trigger1 = Time = 0
Value = , AA, AT
Time = 17

[State 1108, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1109

[StateDef 1109]
Type = A
MoveType = A
Physics = N
Anim = 1104

[State 1109, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 6
Y = -4

[State 1109, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100, 16

[State 1109, Explod]
Type = Explod
Trigger1 = Time = 0
Persistent = 0
IgnoreHitPause = 0
Anim = 1105
ID = 1105
Pos = 0,-20
PosType = P1
BindTime = -1
SuperMove = 0
SprPriority = 10
OwnPal = 1
RemoveOnGetHit = 1
scale = 1.5,1.5

[State 1109, HitDef]
Type = HitDef
Trigger1 = AnimElem = 3
Trigger2 = AnimElem = 4
Trigger3 = AnimElem = 5
Attr = A, SA
Damage = 30,10
AnimType = Hard
Air.AnimType = Back
GuardFlag = MA
Guard.Dist = 80
Priority = 5, Hit
PauseTime = 5,5
SparkXY = -10, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime  = 24
Ground.Velocity = -4,-6
Guard.Velocity = -5
Air.Velocity = -4,-6
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GetPower = 80, 80
GivePower = 0, 40

[State 1109, VarSet]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1109, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1110

[StateDef 1110]
Type = A
MoveType = I
Physics = N
Anim = 1102

[State 1110, VelMul]
Type = VelMul
Trigger1 = Time > 3
Trigger1 = Vel X > 1.5
X = 0.95

[State 1110, VelAdd]
Type = VelAdd
Trigger1 = Time > 3
Y = 0.3

[State 1110, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Value = 1111

[StateDef 1111]
Type = C
MoveType = A
Physics = C
Anim = 1103
SprPriority = 2

[State 1103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 1111, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1111, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 1111, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[Statedef 1200]
type = S
physics = N
movetype = A
ctrl = 0
Velset = 0,0
sprpriority = 2
anim = 1200

[State 1200]
type = Helper
trigger1 = AnimElemTime(6) = 0
pos = 20,-50
postype = p1
ID = 1203
name = "Start_up"
sprpriority = 5
stateno = 1212
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1200]
type = Helper
trigger1 = animelemtime(6) = 0
pos = 19,-49
postype = p1
ID= 1201
pausemovetime = 0
name = "Servant_Flier"
sprpriority = 5
stateno = 1201
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1200]
type = PlaySnd
trigger1 = animelemtime(6) = 0
value = s100,23

[State 1200]
type = Varset
trigger1 = animelemtime(6) = 0
v = 43
value = 60

[State 1200]
type = Varadd
trigger1 = animelemtime(6) = 0
fv = 11
value = -25

[State 1200]
type = ChangeState
trigger1 = !animtime
value = 0
Ctrl = 1

[Statedef 1201]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3

[State 1201]
type = Varset
trigger1 = 1
fv = 0
value = ishelper(1201)*20

[State 1201]
type = Varset
trigger1 = 1
fv = 1
value = 0.75

[State 1201]
type = Varset
trigger1 = 1
v = 1
value = 774

[State 1201]
type = Changeanim
trigger1 = 1
value = 1201

[State 1201]
type = ChangeState
trigger1 = 1
value = 1202

[Statedef 1202]
type    = A
movetype= A
physics = N
sprpriority = 8
ctrl = 0

[State 1202]
type = Varset
trigger1 = p2dist y+enemynear,const(size.mid.pos.y) != 0
trigger1 = p2dist x != 0
fv = 2
value = atan((p2dist y+enemynear,const(size.mid.pos.y))/(p2dist x))*180/pi*ifelse(p2dist x > 0, 1 ,-1)

[State 1202]
type = Varadd
trigger1 = fVar(2)-fVar(0) > 0
fv = 0
value = ifelse(fVar(2)-fVar(0) < 0.5, fVar(2)-fVar(0) ,0.5)*(1-(prevstateno != 1201)*(time < 3)*0.9)

[State 1202]
type = Varadd
trigger1 = fVar(2)-fVar(0) < 0
fv = 0
value = ifelse(fVar(2)-fVar(0) > -0.5, fVar(2)-fVar(0) ,-0.5)*(1-(prevstateno != 1201)*(time < 3)*0.9)

[State 1202]
type = Velset
trigger1 = time < 3
trigger2 = prevstateno != 1201
x = cos(fvar(0)*pi/180)*0.6
y = sin(fvar(0)*pi/180)*0.6

[State 1202]
type = Velset
trigger1 = prevstateno = 1201
trigger2 = prevstateno != 1201
trigger2 = time > 2
x = cos(fvar(0)*pi/180)*6
y = sin(fvar(0)*pi/180)*6

[State 1202]
type = Angleset
trigger1 = 1
value = -fVar(0)

[State 1202]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1202]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 1202]
type = AngleDraw
trigger1 = 1
scale = fVar(1),fVar(1)

[State 1202]
type = Helper
trigger1 = movehit
pos = 0,0
postype = p1
ID = 1203
pausemovetime = 0
name = "Hit"
sprpriority = 5
stateno = 1203
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1202]
type = hitby
trigger1 = 1
value = SCA,AP
time = 99999999

[State 1202]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
slot = 0
stateno = stateno
time = 99999999

[State 1202]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP
animtype  = hard
damage = 50,10
priority = 1,Hit
hitflag = MAFP
guardflag = MAF
getpower = 50,50
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
pausetime = 0,3
guard.pausetime = 0,3
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = High
ground.slidetime = 22+(p2movetype = A)*7
ground.hittime  = 22+(p2movetype = A)*7
guard.slidetime = 12
guard.hittime = 12
ground.velocity = -2.5,-5
air.animtype = Back
airguard.velocity = -2.5,-8
air.velocity = -2.5,-5
fall = 1
fall.recovertime = ceil(60*root,fVar(1)*(1+(p2movetype = A)))
fall.recover = ifelse(root,var(56)+2>=100,0,1)
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 20
numhits = 0

[State 1202]
type = HitAdd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1202]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 56
value = 2
persistent = 0
IgnoreHitPause = 1

[State 1202]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 2
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1202]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 48
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1202]
type = ParentVarset
trigger1 = !movehit*MoveGuarded
trigger1 = enemynear,movetype = H
v = 48
value = 2
persistent = 0
IgnoreHitPause = 1

[State 1202]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
fvar(3) = 12.5*(1+(p2movetype = A)*0.333)
ignorehitpause = 1
persistent = 0

[state 1202]
type = varadd
trigger1 = 1
v = 0
value = 1
ignorehitpause = 1

[state 1202]
type = varadd
trigger1 = prevstateno != 1201
trigger1 = !time
v = 2
value = 1
ignorehitpause = 1

[state 1202]
type = varadd
trigger1 = Movereversed
v = 3
value = 1
ignorehitpause = 1

[State 1202]
type = null
trigger1 = (root,stateno != [150,159])*(root,movetype = H)
trigger2 = rootdist x < -640
trigger3 = pos y != [-600,25]
trigger4 = (Var(2) = 10)+(Var(3) = 19)
pos = 0,0
postype = p1
ID = 1204
pausemovetime = 0
name = "eff"
sprpriority = 100
stateno = 1204
helpertype = normal
keyctrl = 0
ownpal = 1
IgnoreHitPause = 1

[state 1202]
type = varadd
trigger1 = (root,stateno != [150,159])*(root,movetype = H)
trigger2 = rootdist x < -640
trigger3 = pos y != [-600,25]
trigger4 = (Var(2) = 10)+(Var(3) = 19)
v = 5
value = 1
ignorehitpause = 1

[State 1202, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -60

[State 1202]
type = ChangeState
trigger1 = (Var(2) < 10)*(Var(3) < 19)
trigger1 = movecontact+Movereversed
value = stateno

[Statedef 1203]
type    = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0
anim = 1202

[state 1203]
type = varset
trigger1 = !time
fv = 0
value = 1.5

[state 1203]
type = varset
trigger1 = 1
fv = 0
value = fVar(0)-fVar(0)*0.1

[State 1203]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1203]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 1203]
type = AngleSet
trigger1 = !time
value = Var(0)

[State 1203]
type = AngleDraw
trigger1 = 1
scale = fVar(0),fVar(0)

[State 1203]
type = PalFX
trigger1 = time < 32
time = 1
add = 0,0,0
mul = 256-time*8,256-time*8,256-time*8
invertall = 0
color = 256

[State 1203]
type = Destroyself
trigger1 = time = 32

[Statedef 1204]
type = A
physics = N
movetype = I
ctrl = 0
Velset = 0,0
sprpriority = 9
anim = 11010

[State 1204]
type = VarRandom
trigger1 = !time
v = 0
range = 1,360

[State 1204]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1204]
type = Angleset
trigger1 = !time
value = Var(0)

[State 1204]
Type = Trans
trigger1 = 1
Trans = Add

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

[State 1204]
type = DestroySelf
trigger1 = !animtime

[Statedef 1205]
type = S
physics = N
movetype = A
ctrl = 0
Velset = 0,0
sprpriority = 2
anim = 1200

[State 1205]
type = Helper
trigger1 = AnimElemTime(6) = 0
pos = 20,-50
postype = p1
ID = 1203
name = "Start_up"
sprpriority = 5
stateno = 1212
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1205]
type = Helper
trigger1 = animelemtime(6) = 0
pos = 19,-49
postype = p1
ID= 1206
pausemovetime = 0
name = "Servant_Flier"
sprpriority = 5
stateno = 1206
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1205]
type = PlaySnd
trigger1 = animelemtime(6) = 0
value = s100,23

[State 1205]
type = Varset
trigger1 = animelemtime(6) = 0
v = 43
value = 60

[State 1205]
type = Varadd
trigger1 = animelemtime(6) = 0
fv = 11
value = -25

[State 1205]
type = ChangeState
trigger1 = !animtime
value = 0
Ctrl = 1

[Statedef 1206]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3

[State 1206]
type = Varset
trigger1 = 1
fv = 0
value = ishelper(1201)*20-ishelper(1206)*20

[State 1206]
type = Varset
trigger1 = 1
fv = 1
value = 0.75

[State 1206]
type = Varset
trigger1 = 1
v = 1
value = 774

[State 1206]
type = Changeanim
trigger1 = 1
value = 1201

[State 1206]
type = ChangeState
trigger1 = 1
value = 1207

[Statedef 1207]
type    = A
movetype= A
physics = N
sprpriority = 8
ctrl = 0

[State 1207]
type = Varset
trigger1 = p2dist y+enemynear,const(size.mid.pos.y) != 0
trigger1 = p2dist x != 0
fv = 2
value = atan((p2dist y+enemynear,const(size.mid.pos.y))/(p2dist x))*180/pi*ifelse(p2dist x > 0, 1 ,-1)

[State 1207]
type = Varadd
trigger1 = fVar(2)-fVar(0) > 0
fv = 0
value = ifelse(fVar(2)-fVar(0) < 0.5, fVar(2)-fVar(0) ,0.5)*(1-(prevstateno != 1201)*(time < 3)*0.9)

[State 1207]
type = Varadd
trigger1 = fVar(2)-fVar(0) < 0
fv = 0
value = ifelse(fVar(2)-fVar(0) > -0.5, fVar(2)-fVar(0) ,-0.5)*(1-(prevstateno != 1201)*(time < 3)*0.9)

[State 1207]
type = Velset
trigger1 = time < 3
trigger2 = prevstateno != 1206
x = cos(fvar(0)*pi/180)*0.6
y = sin(fvar(0)*pi/180)*0.6

[State 1207]
type = Velset
trigger1 = prevstateno = 1206
trigger2 = prevstateno != 1206
trigger2 = time > 2
x = cos(fvar(0)*pi/180)*6
y = sin(fvar(0)*pi/180)*6

[State 1207]
type = Angleset
trigger1 = 1
value = -fVar(0)

[State 1207]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1207]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 1207]
type = AngleDraw
trigger1 = 1
scale = fVar(1),fVar(1)

[State 1207]
type = Helper
trigger1 = movehit
pos = 0,0
postype = p1
ID = 1203
pausemovetime = 0
name = "Hit"
sprpriority = 5
stateno = 1203
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1207]
type = hitby
trigger1 = 1
value = SCA,AP
time = 99999999

[State 1207]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
slot = 0
stateno = stateno
time = 99999999

[State 1207]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP
animtype  = hard
damage = 50,10
priority = 1,Hit
hitflag = MAFP
guardflag = MAF
getpower = 50,50
sparkno= -1
guard.sparkno= S9000
pausetime = 0,3
guard.pausetime = 0,3
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = High
ground.slidetime = 22+(p2movetype = A)*7
ground.hittime  = 22+(p2movetype = A)*7
guard.slidetime = 12
guard.hittime = 12
ground.velocity = -2.5,-5
air.animtype = Back
airguard.velocity = -2.5,-8
air.velocity = -2.5,-5
fall = 1
fall.recovertime = ceil(60*root,fVar(1)*(1+(p2movetype = A)))
fall.recover = ifelse(root,var(56)+2>=100,0,1)
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 20
numhits = 0

[State 1207]
type = HitAdd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1207]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 56
value = 2
persistent = 0
IgnoreHitPause = 1

[State 1207]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 2
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1207]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 48
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1207]
type = ParentVarset
trigger1 = !movehit*MoveGuarded
trigger1 = enemynear,movetype = H
v = 48
value = 2
persistent = 0
IgnoreHitPause = 1

[State 1207]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
fvar(3) = 12.5*(1+(p2movetype = A)*0.333)
ignorehitpause = 1
persistent = 0

[state 1207]
type = varadd
trigger1 = 1
v = 0
value = 1
ignorehitpause = 1

[state 1207]
type = varadd
trigger1 = prevstateno != 1206
trigger1 = !time
v = 2
value = 1
ignorehitpause = 1

[state 1207]
type = varadd
trigger1 = Movereversed
v = 3
value = 1
ignorehitpause = 1

[State 1207]
type = null
trigger1 = (root,stateno != [150,159])*(root,movetype = H)
trigger2 = rootdist x < -640
trigger3 = pos y != [-600,25]
trigger4 = (Var(2) = 10)+(Var(3) = 19)
pos = 0,0
postype = p1
ID = 1204
pausemovetime = 0
name = "eff"
sprpriority = 100
stateno = 1204
helpertype = normal
keyctrl = 0
ownpal = 1
IgnoreHitPause = 1

[state 1207]
type = varadd
trigger1 = (root,stateno != [150,159])*(root,movetype = H)
trigger2 = rootdist x < -640
trigger3 = pos y != [-600,25]
trigger4 = (Var(2) = 10)+(Var(3) = 19)
v = 5
value = 1
ignorehitpause = 1

[State 1207, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -60

[State 1207]
type = ChangeState
trigger1 = (Var(2) < 10)*(Var(3) < 19)
trigger1 = movecontact+Movereversed
value = stateno

[Statedef 1209]
type = S
physics = N
movetype = A
ctrl = 0
Velset = 0,0
sprpriority = 2
anim = 1200

[State 1209]
type = Helper
trigger1 = AnimElemTime(6) = 0
pos = 20,-50
postype = p1
ID = 1203
name = "Start_up"
sprpriority = 5
stateno = 1212
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1209]
type = Helper
trigger1 = animelemtime(6) = 0
pos = 19,-49
postype = p1
ID= 1201
pausemovetime = 0
name = "Servant_Flier"
sprpriority = 5
stateno = 1210
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1209]
type = Helper
trigger1 = animelemtime(6) = 0
pos = 19,-49
postype = p1
ID= 1206
pausemovetime = 0
name = "Servant_Flier"
sprpriority = 5
stateno = 1210
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1209]
type = PlaySnd
trigger1 = animelemtime(6) = 0
value = s100,23

[State 1209]
type = Varset
trigger1 = animelemtime(6) = 0
v = 43
value = 60

[State 1209]
type = Varadd
trigger1 = animelemtime(6) = 0
fv = 11
value = -25

[State 1209]
type = ChangeState
trigger1 = !animtime
value = 0
Ctrl = 1

[Statedef 1210]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3

[State 1210]
type = Varset
trigger1 = 1
fv = 0
value = ishelper(1201)*20-ishelper(1206)*20

[State 1210]
type = Varset
trigger1 = 1
fv = 1
value = 0.75

[State 1210]
type = Varset
trigger1 = 1
v = 1
value = 774

[State 1210]
type = Changeanim
trigger1 = 1
value = 1201

[State 1210]
type = ChangeState
trigger1 = 1
value = 1211

[Statedef 1211]
type    = A
movetype= A
physics = N
sprpriority = 8
ctrl = 0

[State 1211]
type = Varset
trigger1 = p2dist y+enemynear,const(size.mid.pos.y) != 0
trigger1 = p2dist x != 0
fv = 2
value = atan((p2dist y+enemynear,const(size.mid.pos.y))/(p2dist x))*180/pi*ifelse(p2dist x > 0, 1 ,-1)

[State 1211]
type = Varadd
trigger1 = fVar(2)-fVar(0) > 0
fv = 0
value = ifelse(fVar(2)-fVar(0) < 0.5, fVar(2)-fVar(0) ,0.5)*(1-(prevstateno != 1201)*(time < 3)*0.9)

[State 1211]
type = Varadd
trigger1 = fVar(2)-fVar(0) < 0
fv = 0
value = ifelse(fVar(2)-fVar(0) > -0.5, fVar(2)-fVar(0) ,-0.5)*(1-(prevstateno != 1201)*(time < 3)*0.9)

[State 1211]
type = Velset
trigger1 = time < 3
trigger2 = prevstateno != 1210
x = cos(fvar(0)*pi/180)*0.6
y = sin(fvar(0)*pi/180)*0.6

[State 1211]
type = Velset
trigger1 = prevstateno = 1210
trigger2 = prevstateno != 1210
trigger2 = time > 2
x = cos(fvar(0)*pi/180)*6
y = sin(fvar(0)*pi/180)*6

[State 1211]
type = Angleset
trigger1 = 1
value = -fVar(0)

[State 1211]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1211]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 1211]
type = AngleDraw
trigger1 = 1
scale = fVar(1),fVar(1)

[State 1211]
type = Helper
trigger1 = movehit
pos = 0,0
postype = p1
ID = 1203
pausemovetime = 0
name = "Hit"
sprpriority = 5
stateno = 1203
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
persistent = 0
IgnoreHitPause = 1

[State 1211]
type = hitby
trigger1 = 1
value = SCA,AP
time = 99999999

[State 1211]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
slot = 0
stateno = stateno
time = 99999999

[State 1211]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP
animtype  = hard
damage = 30,5
priority = 1,Hit
hitflag = MAFP
guardflag = MAF
sparkno = S8050*10**(random%4)
guard.sparkno= S9000
pausetime = 0,3
guard.pausetime = 0,3
sparkxy = 0,0
hitsound = S200,2
guardsound = S300,0
ground.type = High
ground.slidetime = 18+(p2movetype = A)*3
ground.hittime  = 18+(p2movetype = A)*3
guard.slidetime = 12
guard.hittime = 12
ground.velocity = -2
air.animtype = Back
airguard.velocity = -2,-6
air.velocity = -2,-4
fall.recovertime = 20
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
guard.dist = 20
numhits = 0
air.fall = 1

[State 1211]
type = HitAdd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1211]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 56
value = 2
persistent = 0
IgnoreHitPause = 1

[State 1211]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 2
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1211]
type = ParentVarset
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
v = 48
value = 1
persistent = 0
IgnoreHitPause = 1

[State 1211]
type = ParentVarset
trigger1 = !movehit*MoveGuarded
trigger1 = enemynear,movetype = H
v = 48
value = 2
persistent = 0
IgnoreHitPause = 1

[State 1211]
type = ParentVaradd
trigger1 = movehit*!MoveGuarded
trigger1 = enemynear,movetype = H
fvar(3) = 12.5*(1+(p2movetype = A)*0.333)
ignorehitpause = 1
persistent = 0

[state 1211]
type = varadd
trigger1 = 1
v = 0
value = 1
ignorehitpause = 1

[state 1211]
type = varadd
trigger1 = prevstateno != 1210
trigger1 = !time
v = 2
value = 1
ignorehitpause = 1

[state 1211]
type = varadd
trigger1 = Movereversed
v = 3
value = 1
ignorehitpause = 1

[State 1211]
type = null
trigger1 = (root,stateno != [150,159])*(root,movetype = H)
trigger2 = rootdist x < -640
trigger3 = pos y != [-600,25]
trigger4 = (Var(2) = 10)+(Var(3) = 19)
pos = 0,0
postype = p1
ID = 1204
pausemovetime = 0
name = "eff"
sprpriority = 100
stateno = 1204
helpertype = normal
keyctrl = 0
ownpal = 1
IgnoreHitPause = 1

[state 1211]
type = varadd
trigger1 = (root,stateno != [150,159])*(root,movetype = H)
trigger2 = rootdist x < -640
trigger3 = pos y != [-600,25]
trigger4 = (Var(2) = 10)+(Var(3) = 19)
v = 5
value = 1
ignorehitpause = 1

[State 1211, DestroySelf]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -60

[State 1211]
type = ChangeState
trigger1 = (Var(2) < 10)*(Var(3) < 19)
trigger1 = movecontact+Movereversed
value = stateno

[Statedef 1212]
type    = A
physics = N
Velset = 0,0
sprpriority = 5
ctrl = 0
anim = 1203

[State 1212, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,1

[State 1212]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1212]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 1212]
type = PalFX
trigger1 = time < 16
time = 1
add = 0,0,0
mul = 256-time*8,256-time*8,256-time*8
invertall = 0
color = 256

[State 1212]
type = Destroyself
trigger1 = time = 16

[StateDef 1300]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 40
SprPriority = 1

[State 1300, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1300, ChangeState]
Type = ChangeState
Trigger1 = Time = 0
Value = 1301

[StateDef 1301]
Type = U
MoveType = U
Physics = U

[State 1301, VelSet]
Type = VelSet
Trigger1 = AnimTime = 0
X = IfElse(BackEdgeDist>200, -BackEdgeDist/16, -12.5)
Y = -8

[State 1301, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1302

[StateDef 1302]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1300
SprPriority = 1

[State 1302]
type = Explod
trigger1 = AnimElem = 1
anim = 6102
pos = 20,-48
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 0.5,0.5
sprpriority = 0
;ignorehitpause =
;persistent =

[State 1302]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,24

[State 1302, PlayerPush]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 1302]
Type = NotHitBy
Trigger1 = 1
Value = , NP
Time = 1

[State 1302]
Type = ChangeState
Trigger1 = time >= 19
Value = 1303

[State 1302, VarAdd]
Type = null
Trigger1 = 1
V = 21
Value = 1

[StateDef 1303]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1301
SprPriority = 1

[State 1303, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1303, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 22
Value = Floor(BackEdgeDist)

[State 1303, PosAdd]
Type = PosAdd
Trigger1 = Time > 0
Trigger1 = Var(22) <= 5
X = Floor(Var(22)-BackEdgeDist)

[State 1303, VarSet]
Type = VarSet
Trigger1 = Time > 0
Trigger1 = Floor(BackEdgeDist) <= 5
V = 22
Value = Floor(BackEdgeDist)

[State 1303, PosAdd]
Type = PosAdd
Trigger1 = Time = 0
Trigger1 = Var(22) > 5
Trigger1 = BackEdgeDist > 5
X = IfElse(BackEdgeDist<15, -Floor(BackEdgeDist), -15)

[State 1303, PosAdd]
Type = PosAdd
Trigger1 = Time > 0
Trigger1 = Var(22) > 5
Trigger1 = BackEdgeDist > 5
X = IfElse(BackEdgeDist-5>4, -8, -4)

[State 1303, VarSet]
Type = VarSet
Trigger1 = Time = 10
FV = 15
Value = 28

[State 1303, ChangeState]
Type = ChangeState
Trigger1 = Time > 10
Value = 1304

[StateDef 1304]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1302
SprPriority = 1
poweradd = 30

[State 1304, VelSet]
Type = VelSet
Trigger1 = AnimElem = 1, =0
X = 25*Cos(FVar(15)*Pi/180)
Y = 25*Sin(FVar(15)*Pi/180)

[State 1304, PlayerPush]
Type = PlayerPush
Trigger1 = !(MoveHit && (Pos Y > -20))
Value = 0

[State 1304, Helper]
Type = Helper
Trigger1 = AnimElem = 2
Persistent = 0
IgnoreHitPause = 1
PauseMoveTime = 99999
SuperMoveTime = 99999
OwnPal = 1
PosType = P1
Pos = 0,-20
ID = 1310
StateNo = 1310
Name = "Demon_Lord_Arrow"

[State 1304, HitDef]
Type = HitDef
Trigger1 = !MoveContact
;Trigger1 = AnimElem = 2, >=0
Attr = A, SA
Damage = 40, 10
AnimType = Hard
Air.AnimType = Back
HitFlag = MAF
GuardFlag = HA
Guard.Dist = 80
Priority = 5, Hit
PauseTime = 10,10
SparkXY = 0, -10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 34
Ground.HitTime  = 34
Ground.Velocity = -6-(2*Var(35))
Air.Velocity = -3-(2*Var(35)),-3
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(40*FVar(10))+(40*Var(35))
GivePower = 0, 30

[State 1304, Varset]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1304, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1304, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1304, TargetFacing]
Type = TargetFacing
TriggerAll = NumTarget > 0
TriggerAll = MoveHit
trigger1 = Target,StateType = S
trigger2 = Target,StateType = C
Value = -1
Persistent = 0
IgnoreHitPause = 1

[State 1304, TargetState]
Type = TargetState
TriggerAll = NumTarget > 0
TriggerAll = MoveHit
trigger1 = Target,StateType = S
trigger2 = Target,StateType = C
Value = 1307
Persistent = 0
IgnoreHitPause = 1

[State 1304, ChangeState]
Type = ChangeState
Trigger1 = MoveGuarded
Value = 1305

[State 1304, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Value = 1306

[State 1304, AngleDraw]
Type = AngleDraw
Trigger1 = AnimElem = 2, >=0
IgnoreHitPause = 1
Value = -(FVar(15)-14)

[StateDef 1305]
Type = A
MoveType = I
Physics = A
Ctrl = 0
Anim = 43
SprPriority = 0

[State 1305, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = -2.5
Y = -7

[StateDef 1306]
Type = C
MoveType = I
Physics = C
Ctrl = 0
Anim = 1303
SprPriority = 0
MoveHitPersist = 1

[State 1306, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 1306, VelMul]
Type = VelMul
Trigger1 = Time = 0
X = 0.2

[State 1306, VelSet]
Type = VelSet
Trigger1 = Time = 0
Y = 0

[State 1306, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 1306, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 1307]
Type = S
MoveType = H
Physics = N
Ctrl = 0
VelSet = 0, 0

[State 1307, SelfState]
Type = SelfState
Trigger1 = Life = 0
Value = 5020

[State 1307, ChangeAnim]
Type = ChangeAnim
Trigger1 = !SelfAnimExist(5975)
Trigger1 = GetHitVar(HitShakeTime) > 0
Value = 5012

[State 1307, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 1307, HitVelSet]
Type = HitVelSet
Trigger1 = GetHitVar(HitShakeTime) <= 2
X = 1

[State 1307, ChangeState]
Type = ChangeState
Trigger1 = GetHitVar(HitShakeTime) <= 1
Value = 1308

[StateDef 1308]
Type = S
MoveType = H
Physics = S

[State 1308, ChangeAnim]
Type = ChangeAnim
Trigger1 = !SelfAnimExist(5400)
Value = 5012

[State 1308, PosAdd]
Type = PosAdd
Trigger1 = !SelfAnimExist(5400)
X = IfElse(Time%2=0, 1, -1)

[State 1308, HitVelSet]
Type = HitVelSet
Trigger1 = Time = 0
X = 1

[State 1308, HitFallSet]
Type = HitFallSet
Trigger1 = Time = 0
Value = 0

[State 1308, DefenceMulSet]
Type = DefenceMulSet
Trigger1 = HitOver
Value = 1

[State 1308, ChangeState]
Type = ChangeState
Trigger1 = Time = 25
Value = 1309

[Statedef 1309]
Type = S
MoveType = H
Physics = S
Velset = 0, 0

[State 1309, ChangeAnim]
Type = ChangeAnim
Trigger1 = !SelfAnimExist(5400)
Value = 5012

[State 1309, DefenceMulSet]
Type = DefenceMulSet
Trigger1 = HitOver
Value = 1

[State 1309, SelfState]
Type = SelfState
Trigger1 = Time = 9
Value = 0
Ctrl = 1

[StateDef 1310]
Type = A
MoveType = I
Physics = N
Anim = 1304
SprPriority = 10

[State 1310, VarSet]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = -(Root,FVar(15)-14)

[State 1310, DestroySelf]
Type = DestroySelf
Trigger1 = Root,StateNo != 1304

[State 1310, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 99999
Facing = 1
Pos = -30,-60

[State 1310, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = FVar(1)

[State 1310, Trans]
Type = Trans
Trigger1 = 1
Trans = Add

[State 1310, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[StateDef 1311]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 40
SprPriority = 1

[State 1311, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1311, ChangeState]
Type = ChangeState
Trigger1 = Time = 0
Value = 1312

[StateDef 1312]
Type = U
MoveType = U
Physics = U

[State 1312, VelSet]
Type = VelSet
Trigger1 = AnimTime = 0
X = IfElse(BackEdgeDist>200, -BackEdgeDist/16, -12.5)
Y = -8

[State 1312, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1313

[StateDef 1313]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1300
SprPriority = 1

[State 1313]
type = Explod
trigger1 = AnimElem = 1
anim = 6102
pos = 20,-48
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 0.5,0.5
sprpriority = 0
;ignorehitpause =
;persistent =

[State 1313]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,24

[State 1313, PlayerPush]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 1313]
Type = NotHitBy
Trigger1 = 1
Value = , NP
Time = 1

[State 1313]
Type = ChangeState
Trigger1 = time >= 19
Value = 1314

[State 1313, VarAdd]
Type = null
Trigger1 = 1
V = 21
Value = 1

[StateDef 1314]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1301
SprPriority = 1

[State 1314, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1314, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 22
Value = Floor(BackEdgeDist)

[State 1314, PosAdd]
Type = PosAdd
Trigger1 = Time > 0
Trigger1 = Var(22) <= 5
X = Floor(Var(22)-BackEdgeDist)

[State 1314, VarSet]
Type = VarSet
Trigger1 = Time > 0
Trigger1 = Floor(BackEdgeDist) <= 5
V = 22
Value = Floor(BackEdgeDist)

[State 1314, PosAdd]
Type = PosAdd
Trigger1 = Time = 0
Trigger1 = Var(22) > 5
Trigger1 = BackEdgeDist > 5
X = IfElse(BackEdgeDist<15, -Floor(BackEdgeDist), -15)

[State 1314, PosAdd]
Type = PosAdd
Trigger1 = Time > 0
Trigger1 = Var(22) > 5
Trigger1 = BackEdgeDist > 5
X = IfElse(BackEdgeDist-5>4, -8, -4)

[State 1314, VarSet]
Type = VarSet
Trigger1 = Time = 10
FV = 15
Value = 45

[State 1314, ChangeState]
Type = ChangeState
Trigger1 = Time > 10
Value = 1315

[StateDef 1315]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1302
SprPriority = 1
poweradd = 20

[State 1315, VelSet]
Type = VelSet
Trigger1 = AnimElem = 1, =0
X = 25*Cos(FVar(15)*Pi/180)
Y = 25*Sin(FVar(15)*Pi/180)

[State 1315, PlayerPush]
Type = PlayerPush
Trigger1 = !(MoveHit && (Pos Y > -20))
Value = 0

[State 1315, Helper]
Type = Helper
Trigger1 = AnimElem = 2
Persistent = 0
IgnoreHitPause = 1
PauseMoveTime = 99999
SuperMoveTime = 99999
OwnPal = 1
PosType = P1
Pos = 0,-20
ID = 1321
StateNo = 1321
Name = "Demon_Lord_Arrow"

[State 1315, HitDef]
Type = HitDef
Trigger1 = !MoveContact
;Trigger1 = AnimElem = 2, >=0
Attr = A, SA
Damage = 40, 10
AnimType = Hard
Air.AnimType = Back
HitFlag = MAF
GuardFlag = HA
Guard.Dist = 80
Priority = 5, Hit
PauseTime = 10,10
SparkXY = 0, -10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 34
Ground.HitTime  = 34
Ground.Velocity = -6-(2*Var(35))
Air.Velocity = -3-(2*Var(35)),-3
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(40*FVar(10))+(40*Var(35))
GivePower = 0, 30

[State 1315, Varset]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1315, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1315, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1315, TargetFacing]
Type = TargetFacing
TriggerAll = NumTarget > 0
TriggerAll = MoveHit
trigger1 = Target,StateType = S
trigger2 = Target,StateType = C
Value = -1
Persistent = 0
IgnoreHitPause = 1

[State 1315, TargetState]
Type = TargetState
TriggerAll = NumTarget > 0
TriggerAll = MoveHit
trigger1 = Target,StateType = S
trigger2 = Target,StateType = C
Value = 1307
Persistent = 0
IgnoreHitPause = 1

[State 1315, ChangeState]
Type = ChangeState
Trigger1 = MoveGuarded
Value = 1305

[State 1315, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Value = 1306

[State 1315, AngleDraw]
Type = AngleDraw
Trigger1 = AnimElem = 2, >=0
IgnoreHitPause = 1
Value = -(FVar(15)-14)

[StateDef 1316]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 40
SprPriority = 1

[State 1316, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1316, ChangeState]
Type = ChangeState
Trigger1 = Time = 0
Value = 1317

[StateDef 1317]
Type = U
MoveType = U
Physics = U

[State 1317, VelSet]
Type = VelSet
Trigger1 = AnimTime = 0
X = IfElse(BackEdgeDist>200, -BackEdgeDist/16, -12.5)
Y = -8

[State 1317, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 1318

[StateDef 1318]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1300
SprPriority = 1

[State 1318]
type = Explod
trigger1 = AnimElem = 1
anim = 6102
pos = 20,-48
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 0.5,0.5
sprpriority = 0
;ignorehitpause =
;persistent =

[State 1318]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,24

[State 1318, PlayerPush]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 1318]
Type = NotHitBy
Trigger1 = 1
Value = , NP
Time = 1

[State 1318]
Type = ChangeState
Trigger1 = time >= 19
Value = 1319

[State 1318, VarAdd]
Type = null
Trigger1 = 1
V = 21
Value = 1

[StateDef 1319]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1301
SprPriority = 1

[State 1319, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 1319, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 22
Value = Floor(BackEdgeDist)

[State 1319, PosAdd]
Type = PosAdd
Trigger1 = Time > 0
Trigger1 = Var(22) <= 5
X = Floor(Var(22)-BackEdgeDist)

[State 1319, VarSet]
Type = VarSet
Trigger1 = Time > 0
Trigger1 = Floor(BackEdgeDist) <= 5
V = 22
Value = Floor(BackEdgeDist)

[State 1319, PosAdd]
Type = PosAdd
Trigger1 = Time = 0
Trigger1 = Var(22) > 5
Trigger1 = BackEdgeDist > 5
X = IfElse(BackEdgeDist<15, -Floor(BackEdgeDist), -15)

[State 1319, PosAdd]
Type = PosAdd
Trigger1 = Time > 0
Trigger1 = Var(22) > 5
Trigger1 = BackEdgeDist > 5
X = IfElse(BackEdgeDist-5>4, -8, -4)

[State 1319, VarSet]
Type = VarSet
Trigger1 = Time = 10
FV = 16
Value = IfElse((P2Dist X)>0.01, (P2Dist X)+50*(P2Dist X/320.0), 0.01)

[State 1319, VarSet]
Type = VarSet
Trigger1 = Time = 10
FV = 15
Value = 90-(180.0/Pi)*Atan(FVar(16)/160.0)

[State 1319, VarSet]
Type = VarSet
Trigger1 = Time = 10
Trigger1 = FVar(15) < 24
FV = 15
Value = 24

[State 1319, VarSet]
Type = VarSet
Trigger1 = Time = 10
Trigger1 = FVar(15) > 80
FV = 15
Value = 80

[State 1319, ChangeState]
Type = ChangeState
Trigger1 = Time > 10
Value = 1320

[StateDef 1320]
Type = A
MoveType = A
Physics = N
Ctrl = 0
Anim = 1302
SprPriority = 1
poweradd = 30

[State 1320, VelSet]
Type = VelSet
Trigger1 = AnimElem = 1, =0
X = 20*Cos(FVar(15)*Pi/180)
Y = 20*Sin(FVar(15)*Pi/180)

[State 1320, PlayerPush]
Type = PlayerPush
Trigger1 = !(MoveHit && (Pos Y > -20))
Value = 0

[State 1320, Helper]
Type = Helper
Trigger1 = AnimElem = 2
Persistent = 0
IgnoreHitPause = 1
PauseMoveTime = 99999
SuperMoveTime = 99999
OwnPal = 1
PosType = P1
Pos = 0,-20
ID = 1322
StateNo = 1322
Name = "Demon_Lord_Arrow"

[State 1320, HitDef]
Type = HitDef
Trigger1 = !MoveContact
;Trigger1 = AnimElem = 2, >=0
Attr = A, SA
Damage = 80,20
AnimType = Hard
Air.AnimType = Back
HitFlag = MAF
GuardFlag = HA
Guard.Dist = 80
Priority = 5, Hit
PauseTime = 10,10
SparkXY = 0, -10
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
Ground.Type = High
Ground.SlideTime = 34
Ground.HitTime  = 34
Ground.Velocity = -9-(2*Var(35)),-3
Air.Velocity = -6-(2*Var(35)),-3
Air.Fall = 1
Fall = 1
Fall.Recover = 0
GivePower = 0, 30

[State 1320, Varset]
Type = VarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = FVar(10) * 0.85

[State 1320, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType = A
V = 35
Value = 1

[State 1320, VarSet]
Type = VarSet
Trigger1 = !MoveHit
Trigger1 = P2MoveType != A
V = 35
Value = 0

[State 1320, TargetFacing]
Type = TargetFacing
TriggerAll = NumTarget > 0
TriggerAll = MoveHit
trigger1 = Target,StateType = S
trigger2 = Target,StateType = C
Value = -1
Persistent = 0
IgnoreHitPause = 1

[State 1320, ChangeState]
Type = ChangeState
Trigger1 = MoveGuarded
Value = 1305

[State 1320, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Value = 1323

[State 1320, AngleDraw]
Type = AngleDraw
Trigger1 = AnimElem = 2, >=0
IgnoreHitPause = 1
Value = -(FVar(15)-14)

[StateDef 1321]
Type = A
MoveType = I
Physics = N
Anim = 1304
SprPriority = 10

[State 1321, VarSet]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = -(Root,FVar(15)-14)

[State 1321, DestroySelf]
Type = DestroySelf
Trigger1 = Root,StateNo != 1315

[State 1321, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 99999
Facing = 1
Pos = -30,-60

[State 1321, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = FVar(1)

[State 1321, Trans]
Type = Trans
Trigger1 = 1
Trans = Add

[StateDef 1322]
Type = A
MoveType = I
Physics = N
Anim = 1304
SprPriority = 10

[State 1322, VarSet]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = -(Root,FVar(15)-14)

[State 1322, DestroySelf]
Type = DestroySelf
Trigger1 = Root,StateNo != 1320

[State 1322, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 99999
Facing = 1
Pos = -30,-60

[State 1322, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = FVar(1)

[State 1322, Trans]
Type = Trans
Trigger1 = 1
Trans = Add

[State 1322, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[StateDef 1323]
Type = C
MoveType = I
Physics = C
Ctrl = 0
Anim = 1305
SprPriority = 0
MoveHitPersist = 1

[State 1323, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 1323, VelMul]
Type = VelMul
Trigger1 = Time = 0
X = 0.2

[State 1323, VelSet]
Type = VelSet
Trigger1 = Time = 0
Y = 0

[State 1323, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 1323, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 2000]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 2000
SprPriority = 1

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,11

[State 2000]
type = Explod
trigger1 = time = 0
anim = 10300
postype = p1
pos = 0,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 2000, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 114
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State -1]
Type = Helper
Trigger1 = time = 0
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 2000, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = -1000
;ignorehitpause =
;persistent =

[State 2000, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 2000, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 2000, SuperPause]
Type = Superpause
Trigger1 = Time = 0
Time = 40
MoveTime = 40
Darken = 0
Pos = 0,-45
Anim = -1
Sound = S0,5
unhittable = 1

[State 2000, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 2000, PlayerPush]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 2000, Helper]
Type = Helper
Trigger1 = Time = 0
OwnPal = 1
PosType = P1
Pos = 0,-91
ID = 2004
StateNo = 2004
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = "Spear_The_Gungnir"

[State 2000, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 2001

[StateDef 2001]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 2001
SprPriority = 1

[State 2001, VarAdd]
Type = VarAdd
Trigger1 = Var(41) = 0
Trigger1 = AnimElem = 7
V = 40
Value = -750

[State 2001, VarSet]
Type = VarSet
Trigger1 = Var(41) = 0
Trigger1 = AnimElem = 7
V = 42
Value = 60

[State 2001, AttackDist]
Type = AttackDist
Trigger1 = Animelem = 6, >=0
Trigger1 = Animelem = 8, <0
Value = 320

[State 2001, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 7
Value = S206, 8

[State 2001, Helper]
Type = Helper
Trigger1 = AnimElem = 7
PauseMoveTime = 0
Persistent = 0
OwnPal = 1
PosType = P1
Pos = 105,-67
ID = 2005
StateNo = 2005
Size.XScale = 1.5
Size.YScale = 1.5
Name = "Spear_The_Gungnir"

[State 2001, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S100,18

[State 2001, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 2002

[StateDef 2002]
Type = S
MoveType = I
Physics = S
Ctrl = 0
Anim = 2002
SprPriority = 1

[State 2002, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 2003

[StateDef 2003]
Type = S
MoveType = I
Physics = S
Ctrl = 0
Anim = 2003
SprPriority = 1

[State 2003, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 2004]
Type = A
MoveType = I
Physics = N
Anim = 2004
SprPriority = 10

[State 2004, VarSet]
Type = VarSet
Trigger1 = Time = 0
Persistent = 0
V = 2
Value = IfElse((Root,Var(12)=3070),1,0)

[State 2004, DestroySelf]
Type = DestroySelf
Trigger1 = Root,MoveType = H
Trigger2 = Root,Anim = 2002
Trigger3 = Root,MoveType = A
Trigger3 = Root,AnimElem = 7

[State 2004, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 1
Value = 0

[State 2004, VarSet]
Type = VarSet
Trigger1 = Root,Anim = 2001
Trigger1 = Root,MoveType = A
Trigger1 = Root,AnimElem = 1
Persistent = 0
V = 1
Value = 58

[State 2004, VarSet]
Type = VarSet
Trigger1 = Root,Anim = 2001
Trigger1 = Root,MoveType = A
Trigger1 = Root,AnimElem = 2
Persistent = 0
V = 1
Value = 70

[State 2004, VarSet]
Type = VarSet
Trigger1 = Root,Anim = 2001
Trigger1 = Root,MoveType = A
Trigger1 = Root,AnimElem = 5
Persistent = 0
V = 1
Value = 108

[State 2004, VarSet]
Type = VarSet
Trigger1 = Root,Anim = 2001
Trigger1 = Root,MoveType = A
Trigger1 = Root,AnimElem = 6
Persistent = 0
V = 1
Value = 157

[State 2004, BindToRoot]
Type = BindToRoot
Trigger1 = Var(1) = 0
Time = 1
Facing = 1
Pos = 0, -91

[State 2004, BindToRoot]
Type = BindToRoot
Trigger1 = Var(1) = 58
Time = 1
Facing = 1
Pos = -38, -46

[State 2004, BindToRoot]
Type = BindToRoot
Trigger1 = Var(1) = 70
Time = 1
Facing = 1
Pos = -52, -33

[State 2004, BindToRoot]
Type = BindToRoot
Trigger1 = Var(1) = 108
Time = 1
Facing = 1
Pos = -28, -66

[State 2004, BindToRoot]
Type = BindToRoot
Trigger1 = Var(1) = 157
Time = 1
Facing = 1
Pos = 45, -80

[State 2004, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2004, Trans]
Type = Trans
Trigger1 = 1
Trans = Add

[State 2004, AngleDraw]
Type = AngleDraw
Trigger1 = Var(2) = 0
Value = -Var(1)
Scale = 1.2, 1.2

[State 2004, AngleDraw]
Type = AngleDraw
Trigger1 = Var(2) = 1
Value = -Var(1)
Scale = 1.5, 1.5

[StateDef 2005]
Type = A
MoveType = A
Physics = N
Anim = 2005
SprPriority = 10

[State 2005, VelSet]
Type = VelSet
Trigger1 = Time = 1
X = 22.5
Y = 0

[State 2005, Explod]
Type = Explod
Trigger1 = Time = 0
Persistent = 0
IgnoreHitPause = 0
Anim = 2006
ID = 2006
Pos = -80, 0
PosType = P1
Facing = 1
BindTime = -1
SuperMove = 0
SprPriority = 10
Scale = 1.2, 1.2
trans = Add

[State 2005, HitDef]
Type = HitDef
Trigger1 = 1
Persistent = 0
Attr = A, HP
AnimType  = Hard
Air.AnimType = Back
Damage = 250,60
Hitsound = S200,4
Guard.sound = S300,0
Sparkno = -1
Guard.sparkno = S9000
GuardFlag = H
Guard.Dist = 320
Priority = 6, Hit
SprPriority = 10
GetPower = 0, 0
GivePower = 0, 50
PauseTime = 0, 1
SparkXY = 0, 0
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime  = 32
Ground.Velocity = -9,-4
Guard.Velocity = -9
Air.Velocity = -9,-4
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
GetPower  = 0, 0
GivePower = 0, 0
p2stateno = 2007

[State 2005]
Type = Helper
Trigger1 = movehit = 1
StateNo = 4013
ID = 4014
Name = "Spear_Hit"
Pos = 0,-50
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 2005]
Type = Helper
Trigger1 = movehit = 1
StateNo = 4013
ID = 4014
Name = "Spear_Hit"
Pos = 0,-50
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 2005, ParentVarSet]
Type = ParentVarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = Parent,FVar(10) * 0.50

[State 2005, ParentVarSet]
Type = ParentVarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
V = 17
Value = 7

[State 2005, ParentVarSet]
Type = ParentVarSet
Trigger1 = MoveGuarded
Persistent = 0
IgnoreHitPause = 1
V = 18
Value = 1

[State 2005, ChangeState]
Type = ChangeState
Trigger1 = !(ScreenPos X = [-300,620])
Value = 2006

[State 2005, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 2005, Trans]
Type = Trans
Trigger1 = 1
IgnoreHitPause = 1
Trans = Add

[State 2005, AngleDraw]
Type = AngleDraw
Trigger1 = 1
IgnoreHitPause = 1
Value = -180
Scale = 1.5, 1.5

[State 2005, SprPriority]
Type = SprPriority
Trigger1 = 1
IgnoreHitPause = 1
Value = 10

[StateDef 2006]
Type = A
MoveType = I
Physics = N
SprPriority = 10

[State 2006, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = Invisible

[State 2006, RemoveExplod]
Type = RemoveExplod
Trigger1 = NumExplod(2006) > 0
ID = 2006

[State 2006, DestroySelf]
Type = DestroySelf
Trigger1 = Time > 0

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

[State 2007]
type = ChangeAnim2
trigger1 = 1
value = 6000

[State 2007]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 2008

[Statedef 2008]
type = A
movetype= H
physics = N

[State 2008]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 2008]
type = VelAdd
trigger1 = 1
y = .45

[State 2008]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 2008]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 2009

[State 2008]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

[Statedef 2009]
type = A
movetype= H
physics = N

[State 2009]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 2009]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 2009]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 2009]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 2009]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(screenpos y) - 50
postype = back
sprpriority = 3

[State 2009]
type = ChangeAnim2
trigger1 = Time = 0
value = 6002

[State 2009]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 2009]
type = ChangeState
trigger1 = AnimTime = 0
value = 2010

[Statedef 2010]
type = A
movetype= H
physics = N

[State 2010]
type = NotHitBy
trigger1 = 1
value = , AT

[State 2010]
type = VelSet
trigger1 = Time = 0
y = -8

[State 2010]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 2010]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 2010]
type = VelAdd
trigger1 = 1
y = .45

[State 2010]
type = AngleAdd
trigger1 = 1
value = 25

[State 2010]
type = AngleDraw
trigger1 = 1

[State 2010]
type = null
trigger1 = command = "recovery"
trigger1 = Time > 30
value = 5210

[State 2010]
type = ChangeAnim2
trigger1 = Time = 0
value = 6003

[State 2010]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= -10)
value = 5100

[StateDef 2100]
Type = S
MoveType = A
Physics = N
Ctrl = 0
Anim = 2100
SprPriority = 2

[State 2100, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 2100, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 2100, VelSet]
Type = VelSet
Trigger1 = Time = 33
X = 0
Y = -8

[State 2100, VelMul]
Type = VelMul
Trigger1 = Time > 33
Y = 0.99

[State 2100, VarAdd]
Type = VarAdd
Trigger1 = Var(41) = 0
Trigger1 = Time = 37
V = 40
Value = -500

[State 2100, VarSet]
Type = VarSet
Trigger1 = Var(41) = 0
Trigger1 = Time = 37
V = 42
Value = 60

[State 2100]
type = Explod
trigger1 = time = 0
anim = 10300
postype = p1
pos = 0,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 2100, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 114
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State -1]
Type = Helper
Trigger1 = time = 0
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 2100, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = -1000
;ignorehitpause =
;persistent =

[State 2100, SuperPause]
Type = SuperPause
Trigger1 = Time = 0
Time = 40
MoveTime = 40
Darken = 0
Pos = 0,-50
Anim = -1
Sound = S0,5
unhittable = 1

[State 2100, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 2100, PlayerPush]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 2100, ScreenBound]
Type = ScreenBound
Trigger1 = Time >= 33
Value = 1
Movecamera = 1, 0

[State 2100, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 37
Value = S100,3

[State 2100, Helper]
Type = Helper
Trigger1 = Time = 37
OwnPal = 1
PosType = P1
Pos = 0, -Ceil(Pos Y)
ID = 2104
StateNo = 2104
Size.XScale = 2.0
Size.YScale = 2.0
Name = "Scarlet_Devil"

[State 2100, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 2101

[StateDef 2101]
Type = A
MoveType = A
Physics = N
Anim = 2101
SprPriority = 1

[State 2101, VelMul]
Type = VelMul
Trigger1 = 1
Y = 0.94

[State 2101, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 2101, ScreenBound]
Type = ScreenBound
Trigger1 = 1
Value = 1
Movecamera = 1, 0

[State 2101, EnvShake]
Type = EnvShake
Trigger1 = TimeMod = 4, 0
Trigger1 = Time <= 150
Time = 4
Freq = 60
Ampl = 5
Phase = 0

[State 2101, ChangeState]
Type = ChangeState
Trigger1 = Time > 184
Value = 2102

[StateDef 2102]
Type = A
MoveType = I
Physics = N
Anim = 2102
SprPriority = 1

[State 2102, VelAdd]
Type = VelAdd
Trigger1 = 1
Y = Const(Movement.YAccel)

[State 2102, ScreenBound]
Type = ScreenBound
Trigger1 = 1
Value = 1
Movecamera = 1, 0

[State 2102, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Trigger1 = Vel Y > 0
Value = 2103

[StateDef 2103]
Type = S
MoveType = I
Physics = S
Anim = 2103
SprPriority = 2

[State 2103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 2103, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 2103, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 2103, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 2104]
Type = S
MoveType = A
Physics = N
Anim = 2104
SprPriority = 10

[State 2104, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 1
Value = 0

[State 2104, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 2
Value = 20

[State 2104, Explod]
Type = Explod
Trigger1 = Time = 0
IgnoreHitPause = 0
Anim = 2106
ID = 2106
Pos = -10, -90
PosType = P1
BindTime = -1
RemoveTime = -1
SuperMove = 0
Scale = 2.0, 2.0
SprPriority = 10

[State 2104, ChangeState]
Type = ChangeState
Trigger1 = Time > 4
Value = 2105

[State 2104, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2104, ScreenBound]
Type = ScreenBound
Trigger1 = 1
Value = 1
MoveCamera = 1, 1

[State 2104, VarAdd]
Type = VarAdd
Trigger1 = Time > 0
V = 1
Value = 1

[State 2104, SprPriority]
Type = SprPriority
Trigger1 = 1
Value = 10

[StateDef 2105]
Type = S
MoveType = A
Physics = N
SprPriority = 10

[State 2105, HitDef]
Type = HitDef
Trigger1 = !MoveContact
Attr = S, HA
AnimType = Hard
Air.AnimType = Back
Damage = 12,5
GuardFlag = M
Guard.Dist = 95
Hitsound = S200,6
Guard.sound = S300,0
Priority = 6, Hit
SprPriority = 10
GetPower = 0, 0
GivePower = 0, 3
PauseTime = 0, 4
SparkXY = 0, Floor((P2Dist Y)-40)
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime  = 32
Ground.Velocity = 0,-7
Guard.Velocity = -3
Air.Velocity = 0,-7
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
p2stateno = 2108

[State 2105, ParentVarSet]
Type = ParentVarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 10
Value = Parent,FVar(10) * 0.98

[State 2105, ParentVarSet]
Type = ParentVarSet
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
V = 17
Value = 3

[State 2105, ParentVarSet]
Type = ParentVarSet
Trigger1 = MoveGuarded
Persistent = 0
IgnoreHitPause = 1
V = 18
Value = 1

[State 2105, ChangeState]
Type = ChangeState
Trigger1 = MoveContact
Trigger1 = Var(2) > 0
Value = 2106

[State 2105, ChangeState]
Type = ChangeState
Trigger1 = Var(1) > 154
Trigger2 = Root,MoveType = H
Value = 2107

[State 2105, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag = NoShadow

[State 2105, ScreenBound]
Type = ScreenBound
Trigger1 = 1
IgnoreHitPause = 1
Value = 1
MoveCamera = 1, 1

[State 2105, VarAdd]
Type = VarAdd
Trigger1 = 1
V = 1
Value = 1

[State 2105, SprPriority]
Type = SprPriority
Trigger1 = 1
IgnoreHitPause = 1
Value = 10

[StateDef 2106]
Type = S
MoveType = A
Physics = N
SprPriority = 10

[State 2106, VarAdd]
Type = VarAdd
Trigger1 = Time = 0
V = 2
Value = -1

[State 2106, ChangeState]
Type = ChangeState
Trigger1 = Time > 4
Trigger1 = Var(2) > 0
Value = 2105

[State 2106, ChangeState]
Type = ChangeState
Trigger1 = Var(1) > 154
Trigger2 = Root,MoveType = H
Value = 2107

[State 2106, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2106, ScreenBound]
Type = ScreenBound
Trigger1 = 1
Value = 1
MoveCamera = 1, 1

[State 2106, VarAdd]
Type = VarAdd
Trigger1 = 1
V = 1
Value = 1

[State 2106, SprPriority]
Type = SprPriority
Trigger1 = 1
Value = 10

[StateDef 2107]
Type = S
MoveType = I
Physics = N
Anim = 2105
SprPriority = 10

[State 2107, RemoveExplod]
Type = RemoveExplod
Trigger1 = Time = 0
Trigger1 = NumExplod(2106) > 0
ID = 2106

[State 2107, Explod]
Type = Explod
Trigger1 = Time = 0
Anim = 2107
ID = 2107
Pos = -10, -90
PosType = P1
BindTime = -1
SuperMove = 0
Scale = 2.0, 2.0
SprPriority= 10

[State 2107, DestroySelf]
Type = DestroySelf
Trigger1 = AnimTime = 0

[State 2107, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2107, ScreenBound]
Type = ScreenBound
Trigger1 = 1
Value = 1
MoveCamera = 1, 1

[State 2107, SprPriority]
Type = SprPriority
Trigger1 = 1
Value = 10

[Statedef 2108]
type = A
movetype= H
physics = N

[State 2108]
type = NotHitBy
trigger1 = 1
value = , AT

[State 2108]
type = VelSet
trigger1 = Time = 0
y = -4

[State 2108]
type = VelSet
trigger1 = Time = 0
x = 0

[State 2108]
type = VelAdd
trigger1 = 1
y = .35

[State 2108]
type = AngleAdd
trigger1 = 1
value = 25

[State 2108]
type = AngleDraw
trigger1 = 1

[State 2108]
type = null
trigger1 = command = "recovery"
trigger1 = Time > 40
value = 5210

[State 2108]
type = ChangeAnim2
trigger1 = Time = 0
value = 6003

[State 2108]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= -10)
value = 5100

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

[State 2200]
type = NotHitBy
trigger1 = !time
time = 22
value = SCA

[State 2200]
type = Explod
trigger1 = AnimElem = 3
anim = 10300
postype = p1
pos = 0,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 2200, AfterImage]
type = AfterImage
trigger1 = AnimElem = 3
time = 46
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State -1]
Type = Helper
trigger1 = AnimElem = 3
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 2200, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 3
value = -1000
;ignorehitpause =
;persistent =

[State 2200, SuperPause]
Type = SuperPause
trigger1 = AnimElem = 3
Time = 30
MoveTime = 0
Darken = 0
Pos = 0,-50
Anim = -1
Sound = S0,5
unhittable = 1

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,27

[State 2200]
Type = Velset
Trigger1 = Time = [22,60]
x = 3

[State 2200]
type = HitDef
Trigger1 = AnimElem = 6
attr = S, NT
hitflag = M-
priority = 5, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 2202
p2stateno = 2205
guard.dist = 0
fall = 1
fall.recover = 0

[State 2200]
type = ChangeState
Trigger1 = Time = 60
value = 2201

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

[State 2201, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 38
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 2201]
Type = Velset
Trigger1 = Time = [1,8]
x = 3

[State 2201]
Type = Velset
Trigger1 = Time = [8,28]
x = 2

[State 2201]
Type = Velset
Trigger1 = AnimElem = 5
x = 0

[State 2201]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

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

[State 2202, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,0

[State 2202, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2202, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S100,7

[State 2202]
type = explod
trigger1 = AnimElem = 5
ID = 4021
Anim = 4022
postype = p2
pos = 34,0
facing = 1
trans = addalpha
alpha = 256,128
sprpriority = 1
scale = .5, .5
ownpal = 1

[State 2202, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 120
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 2202, TargetBind]
type = TargetBind
trigger1 = time = 0
id = -1
pos = 64,-57

[State 2202, PlaySnd]
type = PlaySnd
trigger1 = Time = 27
value = S100,26

[State 2202, LifeAdd]
type = TargetLifeAdd
Trigger1 = Time > 27
trigger1 = Time%2 = 0
value = -5
absolute = 1

[State 2202, LifeAdd]
type = LifeAdd
Trigger1 = Time > 27
trigger1 = Time%2 = 0
value = 1
absolute = 1

[State 2202]
Type = ChangeState
Trigger1 = Time = 120
Value = 2203

[StateDef 2203]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 2203
sprpriority = 2

[State 2203, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2203, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 30
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 2203, PosAdd]
type = PosAdd
trigger1 = time = 0
y = -30

[State 2203, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S200,2

[State 2203, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A
movetype = I
physics = N

[State 2203, TargetState]
type = TargetState
trigger1 = AnimElem = 3
value = 2206

[State 2203, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 8050*10**(random%4)
ID = 8050
pos = 30,-30
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 4

[State 2203, VelSet]
type = VelSet
trigger1 = animelem = 3
x = -3.5
y = -6

[State 2203]
type = veladd
trigger1 = AnimElemTime(4) > 0
Y = 0.6

[State 2203]
type = ChangeState
Trigger1 = Vel Y > 0
trigger1 = Pos Y > 0
value = 2204

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

[State 2204, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2204, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 40
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

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

[State 2204, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S0,0

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

[StateDef 2205]
type = S
movetype= H
physics = S
velset = 0,0
ctrl = 0
sprpriority = 1

[State 2205, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 2205

[State 2205, ChangeState]
type = SelfState
trigger1 = Time >= 150
value = 0
Ctrl = 1

[StateDef 2206]
type = A
movetype= H
physics = N
facep2 = 1

[State 2206]
type = velset
Trigger1 = time = 0
x = -6
y = -3

[State 2206]
type = nothitby
trigger1 = 1
value = SCA
time = 2

[State 2206]
type = veladd
Trigger1 = 1
y = .44

[State 2206]
type = selfstate
Trigger1 = !time
value = 5050
ctrl = 0

[State 2206]
type = changestate
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 2207
ctrl = 0

[StateDef 2207]
type = L
movetype= H
physics = N

[State 2207]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 2207]
type = selfstate
trigger1 = time > const(data.liedown.time) + 20
value = 5120

[State 2207]
type = nothitby
trigger1 = 1
value = SCA
time = 2

[State 2207]
type = FallEnvShake
trigger1 = Time = 0

[State 2207]
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 2207]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
triggerall = prevstateno != 604
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 2207]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
triggerall = prevstateno != 604
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 2207]
type = PosSet
trigger1 = Time = 0
y = 0

[State 2207]
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 2207]
type = PlaySnd
trigger1 = Time = 0
trigger1 = enemynear,stateno < 610
trigger1 = prevstateno != 804
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 2207]
type = VelSet
trigger1 = Time = 0
y = 0

[State 2207]
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110 + (anim % 10)

[State 2207]
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110

[State 2207]
type = selfState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 2207]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 2207]
type = VelMul
trigger1 = 1
x = 0.85

[Statedef 3000]
type = S
movetype= A
physics = N
ctrl = 0
Velset = 0,0
anim = 3000

[State 3000]
type = Explod
trigger1 = AnimElem = 5 && Anim = 3000
anim = 10350
postype = p1
pos = -15,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 3000]
type = SuperPause
trigger1 = AnimElem = 5 && Anim = 3000
time = 30
movetime = 0
anim = -1
sound = S0,9
pos = 999,999
darken = 0
unhittable = 1

[State 3000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 5 && Anim = 3000
time = 130
PalBright = 0,0,0
PalContrast = 128,128,256
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State -1]
Type = Helper
Trigger1 = AnimElem = 5 && Anim = 3000
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3000, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 5 && Anim = 3000
value = -2000
;ignorehitpause =
;persistent =

[State 3000]
type = hitby
trigger1 = time = [17,30]
value = SCA, AP, AT
time = 2

[State 3000]
type = Nothitby
trigger1 = time = [0,16]
value = SCA, AA, AP, AT

[State 3000]
type = Varset
trigger1 = time = 9
v = 46
value = Var(29)

[State 3000]
type = VarRangeSet
trigger1 = time = 9
value = 0
first = 25+(fVar(26)+(Var(35)=3) > 0)
last = 29

[State 3000]
type = Helper
trigger1 = time > 23
trigger1 = anim = 3000
trigger1 = random < 250
pos = 42,-62
postype = p1
ID= 3001
pausemovetime = 0
supermovetime = 0
name = "Dracula_Cradle"
sprpriority = 100
stateno = 3001
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 3000]
type = Helper
trigger1 = time = 23
pos = 42,-62
postype = p1
ID=3002
pausemovetime = 0
supermovetime = 0
name = "Dracula_Cradle"
sprpriority = 100
stateno = 3002
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 3000]
type = PlaySnd
trigger1 = time = 23
value = s100,4

[State 3000]
type = statetypeset
trigger1 = time = 23
statetype = A

[State 3000]
type = Velset
trigger1 = time = 23
x = 15
y = -7.5

[State 3000]
type = Velmul
trigger1 = anim = 3001
x = 0.2
y = 0.5
persistent = 0

[State 3000]
type = statetypeset
trigger1 = anim = 3000
trigger1 = !animtime
movetype = I

[State 3000]
type = Veladd
trigger1 = anim = 3001
y = 0.25

[State 3000]
type = ChangeAnim
trigger1 = anim = 3000
trigger1 = !animtime
value = 3001

[State 3000]
type = ChangeAnim
trigger1 = anim = 3001
trigger1 = pos y > -5
trigger1 = Vel y > 0
value = 3002

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3002 && AnimElem = 1
value = S0,0

[State 3000]
type = statetypeset
trigger1 = anim = 3002
statetype = S

[State 3000]
type = Velset
trigger1 = anim = 3002
x = 0
y = 0

[State 3000]
type = posset
trigger1 = anim = 3002
y = 0

[State 3000]
type = HitDef
trigger1 = time > 22
trigger1 = time%3 = 1
attr = S, HA
animtype  = hard
damage = 24,10
hitflag = MAF
guardflag = MA
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
pausetime = 0,1
guard.pausetime = 0,1
sparkxy = -15,ceil(p2dist y)-50
hitsound = S200,6
guardsound = S300,4
ground.type = High
ground.slidetime = 22+(p2movetype = A)*7
ground.hittime  = 22+(p2movetype = A)*7
guard.slidetime = 12
guard.hittime = 12
ground.velocity = -7.5,-12.5+(time>96)*3.5
air.animtype = Back
airguard.velocity = -2.5,-8.5
air.velocity = -7.5,-12.5+(time>96)*3.5
fall = 1
fall.recover = 0
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
AirGuard.CornerPush.VelOff = 0
getpower = 0

[State 3000]
type = Varadd
trigger1 = movehit
v = 56
value = 1
IgnoreHitPause = 1

[State 3000]
type = null
trigger1 = Movecontact
value = s0,2+Moveguarded*11
ignorehitpause = 1
channel = 7

[State 3000]
type = null
trigger1 = movehit
value = 1046
ignorehitpause = 1

[State 3000]
type = Varadd
trigger1 = movehit
fvar(3) = 50*(1+(p2movetype = A)*0.333)*(1+(Var(35)=2)*0.25)
ignorehitpause = 1

[State 3000]
type = Varadd
trigger1 = MoveGuarded
fvar(3) = 10*(1+(p2movetype = A)*0.333)*(1+(Var(35)=2)*0.25)
ignorehitpause = 1

[State 3000]
type = MoveHitReset
trigger1 = 1
ignorehitpause = 1

[State 3000]
type = ChangeState
trigger1 = Anim = 3002
trigger1 = !AnimTime
value = 0
Ctrl=1

[Statedef 3001]
type    = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0

[State 3001]
type = VarRandom
trigger1 = !time
v = 0
range = 0,359

[State 3001]
type = VarRandom
trigger1 = !time
v = 1
range = 0,1

[State 3001]
type = VarRandom
trigger1 = !time
v = 2
range = 65,65

[State 3001]
type = Changeanim
trigger1 = 1
value = 3003
elem = 1

[State 3001]
type = Varadd
trigger1 = 1
v = 0
value = ifelse(Var(1)=0,3,-3)

[State 3001]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3001]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 3001]
type = Angleset
trigger1 = 1
value = -60

[State 3001]
type = AngleDraw
trigger1 = 1
scale = Var(2)*0.01*(1+(time+1)*0.2),Var(2)*0.01*0.375*(1+(time+1)*0.2)

[State 3001]
type = PalFX
trigger1 = time < 26
time = 1
add = 0,0,0
mul = 256-time*10,256-time*10,256-time*10
invertall = 0
color = 256

[State 3001]
type = Destroyself
trigger1 = time = 26

[Statedef 3002]
type = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0

[State 3002]
type = BindToParent
trigger1 = 1
pos = -21,-3

[State 3002]
type = Varadd
trigger1 = time = [1,24]
trigger1 = fVar(0) < 2
fv = 0
value = 0.25-(time+1)*0.01

[State 3002]
type = Changeanim
trigger1 = !time
value = 2106
elem = 2

[State 3002]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3002]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 3002]
type = Angleset
trigger1 = 1
value = 120

[State 3002]
type = AngleDraw
trigger1 = 1
scale = fVar(0),fVar(0)

[State 3002]
type = Destroyself
trigger1 = root,anim != 3000

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

[State 3100, NotHitBy]
type = NotHitBy
trigger1 = AnimElem = 9
value = SCA
time = 14

[State 3100]
type = Explod
Trigger1 = AnimElem = 7
anim = 10350
postype = p1
pos = -15,-40
facing = 1
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
sprpriority = 3

[State 3100, Helper]
Type = Helper
Trigger1 = AnimElem = 8
PauseMoveTime = 0
Persistent = 0
OwnPal = 1
PosType = P1
Pos = -45,-22
ID = 3102
StateNo = 3102
Name = "Charge"

[State 3100]
type = SuperPause
Trigger1 = AnimElem = 7
time = 30
movetime = 0
anim = -1
sound = S0,9
pos = 999,999
darken = 0
unhittable = 1

[State 3100, AfterImage]
type = AfterImage
Trigger1 = AnimElem = 7
time = 96
PalBright = 0,0,0
PalContrast = 128,128,256
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State -1]
Type = Helper
Trigger1 = AnimElem = 7
StateNo = 6010
ID = 10001
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3100]
type = Helper
trigger1 = AnimElemTime(8) = 0
helpertype = normal
stateno = 3103
ID = 3103
name = "Particles"
postype = p1
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 3100, PowerAdd]
type = PowerAdd
Trigger1 = AnimElem = 7
value = -2000
;ignorehitpause =
;persistent =

[State 3100, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 8
Value = S100,29

[State 3100, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 11
Value = S100,30

[State 3100]
Type = Velset
Trigger1 = AnimElem = 11
x = 20

[State 3100]
Type = Velset
Trigger1 = AnimElem = 12
x = 0

[State 3100]
Type = Explod
Trigger1 = AnimElem = 9
Anim = 3102
ID = 3102
Pos = 40,30
PosType = P1
Ownpal = 1
SprPriority = 10
BindTime = -1
IgnoreHitPause = 1
Persistent = 0
scale = 2,2

[State 3100]
Type = EnvShake
Trigger1 = AnimElem = 11
Time = 20
Freq = 40
Ampl = 40

[State 3100]
type = HitDef
trigger1 = animelem = 11
attr = S, SA
animtype = heavy
getpower = 0
damage = 400,42
priority = 5
hitflag = MAFD
guardflag =
pausetime = 0,0
guard.pausetime = 0,0
guard.sparkno = S9000
sparkno = -1
sparkxy = -25,-53
hitsound = S200,4
guardsound = s300,0
ground.type = Low
ground.slidetime = 25
ground.hittime  = 24
ground.velocity = -20,-10
guard.velocity = -12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.velocity = -20,-8
envshake.time=16
envshake.freq=80
envshake.ampl=15
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 2007

[State 3100, ChangeState]
Type = ChangeState
Trigger1 = Time = 148
Value = 3101

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

[State 3101, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 3102]
Type = A
Physics = N
Ctrl = 0
Anim = 3103
SprPriority = 1

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

[State 3102, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3102]
type = angledraw
trigger1 = time = [1,60]
scale = 0.1 + (time-0)*0.01,0.1 + (time-0)*0.01

[State 3102, DestroySelf]
type = DestroySelf
trigger1 = time = 60
trigger2 = Parent,movetype = H

[StateDef 3103]
Type = A
Physics = N
Movetype = I
Anim = 99999
Ctrl = 0
Velset = 0,0

[State 3103]
type = bindtoroot
trigger1= !(time%8)
pos = ceil(-193+(random/3.125)),ceil(82-(random/3.125))

[State 3103]
type = Explod
trigger1 = (time%8)=1
anim = 3104
pos = -33,54
sprpriority = ifelse(random<750,5,-1)
postype = p1
vel = ((rootdist x-7)/32.0), ((rootdist y-78)/32.0)
scale = ifelse(random<500,.2,-.2), ifelse(random<500,.2,-.2)
pausemovetime = 9999
supermovetime = 9999
ownpal = 1

[State 3103]
type = removeexplod
trigger1 = time = 60

[State 3103]
type = destroyself
trigger1 = time = 60

[StateDef 3500]
type = S
movetype = A
physics = S
juggle = 0
anim = 3500
ctrl = 0

[state 3500]
type = VarSet
trigger1 = Time = 0
var(33) = 420

[State 3500, Helper]
type = Helper
trigger1 = time = 0
helpertype = Normal
name = "Patchouli"
ID = 3501
stateno = 3501
pos =  -10,-100
postype = back
facing = 1
ownpal = 1
removeongethit = 1

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

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

[State 3501]
type = velset
trigger1 = time = 0
X = (parentdist X+72) / 8
Y = 0

[State 3501]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 3501, end]
type = ChangeAnim
trigger1 = time = 6
value = 3502

[State 3501]
type = Gravity
trigger1 = 1

[State 3501]
type = PosSet
trigger1 = Pos Y > 0
y = 1

[State 3501]
Type = ChangeState
Trigger1 = Vel Y > 0
Trigger1 = Pos Y > 0
Value = 3502

[StateDef 3502]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3503
sprpriority = 3

[State 3502, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3502, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S0,0

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

[StateDef 3503]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3504
sprpriority = 3

[State 3503]
type = turn
triggerall = (P2Dist X < 0)
trigger1 = Anim = 3504
trigger2 = AnimElem = 1

[State 3503, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3503, end]
type = Changestate
trigger1 = Time = 6
value = 3504
ctrl = 1

[StateDef 3504]
Type = S
Physics = S
Ctrl = 0
Anim = 3505

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

[State 3504]
type = HitOverride
trigger1 = Anim = 3505
attr = SCA, NA, SA, HA, NP, SP, HP
time = -1
stateno = 3510

[State 3504]
type = nothitby
trigger1 = Anim = 3505
value = , NT, ST, HT
time = -1

[State 3504]
Type = helper
Trigger1 = Time = 15
Stateno = 3513
ID = 3513
Pos = 50,-50
PosType = P1
OwnPal = 1
Keyctrl = 0
Name = "Summer_Red"
Size.XScale = IfElse(Var(2)>=3,1.25,1)
Size.YScale = IfElse(Var(2)>=3,1.25,1)

[State 3504]
Type = helper
Trigger1 = Time = 15
Stateno = 3513
ID = 3513
Pos = 50,-50
PosType = P1
OwnPal = 1
Keyctrl = 0
Name = "Summer_Red"
Size.XScale = 1.25
Size.YScale = 1.25

[State 3504]
Type = Explod
Trigger1 = Time = 15
Anim = 3512
ID = 3512
PosType = P1
Pos = 60,-50
OwnPal = 1
Scale = 1,1
SprPriority = 8

[State 3504]
Type = PlaySnd
Trigger1 = Time = 15
Value = S100, 12
Channel = 11

[State 3504]
Type = VarAdd
Trigger1 = Time = 15
FV = 24
Value = -0.2

[State 3504]
Type = VarSet
Trigger1 = Time = 13
V = 54
Value = 100

[State 3504]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 3505
Ctrl = 1

[StateDef 3505]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3504
sprpriority = 2

[State 3505]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3504
trigger1 = Time = 8
Value = 3509

[State 3505, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3505, end]
type = ChangeState
trigger1 = Time = 8
value = 3506
ctrl = 1

[StateDef 3506]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3506
sprpriority = 2

[State 3506, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

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

[statedef 3507]
type = S
movetype = I
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3507
sprpriority = 2

[State 3507]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[State 3507]
type = velset
trigger1 = AnimElemTime(4) >= 0
trigger1 = AnimElemTime(8) <= 0
X = 0
Y = -3.5

[State 3507]
type = ChangeState
trigger1 = AnimElem = 8
ctrl = 1
value = 3508

[statedef 3508]
type = A
movetype = I
physics = A
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3501
sprpriority = 2

[State 3508, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,2

[State 3507]
type = velset
trigger1 = AnimElem = 1
X =  0
Y =  0

[State 3508]
type = velset
trigger1 = AnimElemTime(2) >= 0
X =  4
Y = -3

[State 3508]
type = velset
trigger1 = AnimElemTime(2) >= 0
X = 5
Y = -3

[State 3508]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
Trigger1 = animelem <= 4
Value = 3509

[State 3508]
type = DestroySelf
trigger1 = frontEdgeBodyDist <= -60

[statedef 3509]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3504
sprpriority = 3
facep2 = 1

[State 3509]
type = nothitby
trigger1 = 1
value = SCA

[State 3509]
type = ScreenBound
trigger1 = 1
value = 1

[State 3509]
type = turn
trigger1 = (P2Dist X < 0)

[State 3509]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3511

[State 3509]
type = ChangeState
triggerall = RoundState = 4
trigger1 = parent, stateno = 170
trigger2 = parent, alive = 0
value = 3512

[Statedef 3510]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3508
sprpriority = 1

[State 3510, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,8
channel = 0

[State 3510]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3508
trigger1 = AnimTime = 0
Value = 3509

[State 3510]
type = velset
trigger1 = AnimElemTime(3) <= 0
X =  -0.8

[State 3510, ChangeState]
type = ChangeState
trigger1 = Animtime = 0
value = 3507
ctrl = 1

[StateDef 3511]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3509
sprpriority = 1
facep2 = 1

[State 3511]
type = ScreenBound
trigger1 = 1
value = 1

[State 3511]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3512]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3510
sprpriority = 0
facep2 = 1

[State 3512]
type = ScreenBound
trigger1 = 1
value = 1

[State 3512]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3513]
Type = A
MoveType = A
Physics = N
SprPriority = 8
VelSet = 0,0

[State 3513]
Type = ChangeAnim
Trigger1 = Root,Var(2) = [3,4]
Trigger2 = Root,Var(43) = 10
Value = 3511
IgnoreHitPause = 1
Persistent = 0

[State 3513]
Type = ChangeAnim
Trigger1 = Root,Var(2) != [3,4]
Trigger1 = Root,Var(43) != 10
Value = 3511
IgnoreHitPause = 1
Persistent = 0

[State 3513]
Type = VelSet
Trigger1 = 1
X = 8

[State 3513]
Type = HitDef
Trigger1 = Time >= 1
Attr = A, SP
Damage = 50,10
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 7, Hit
PauseTime = 0, 0
Hitsound = S200,2
Guard.sound = S300,0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
Sparkxy = 0, -20
Ground.Type = High
Air.Type = High
Ground.SlideTime = 16
Ground.HitTime = 16
Air.HitTime = 16
Ground.Velocity = -5,-4
Air.Velocity = -5,-4
AirGuard.Velocity = -5,-4
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GivePower = 0,0
NumHits = 1

[State 3513]
Type = HitDef
Trigger1 = Time >= 1
Attr = A, SP
Damage = 50,10
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 7, Hit
PauseTime = 0, 0
Hitsound = S200,2
Guard.sound = S300,0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
Sparkxy = 0, -20
Ground.Type = High
Air.Type = High
Ground.SlideTime = 16
Ground.HitTime = 16
Air.HitTime = 16
Ground.Velocity = -5,-4
Air.Velocity = -5,-4
AirGuard.Velocity = -5,-4
Fall = 1
Air.Fall = 1
Fall.Recover = 0
GivePower = 0,0
NumHits = 1

[State 3513]
Type = Explod
Trigger1 = Movehit
Anim = 3513
ID = 3513
Postype = P2
Pos = 0,-50
OwnPal = 1
SprPriority = 8
IgnoreHitPause = 1
Persistent  = 0

[State 3513]
Type = Helper
Trigger1 = Movecontact
Stateno  = 3514
ID = 3514
Postype  = P2
Pos = 0,-50
Ownpal = 1
Keyctrl = 0
IgnoreHitPause = 1
Persistent = 0

[State 3513]
Type = ParentVarAdd
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 12
Value = 40

[State 3513]
Type = ParentVarSet
Trigger1 = Root,Var(43) != 10
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 32
Value = Floor(Root,FVar(18)*(120+(Root,Var(2)*0.1*120)))

[State 3513]
Type = ParentVarSet
Trigger1 = Root,Var(43) = 10
Trigger1 = MoveHit
Persistent = 0
IgnoreHitPause = 1
FV = 32
Value = Floor(Root,FVar(18)*170)

[State 3513]
Type = VarRandom
Trigger1 = 1
V = 55
Range = -15,15

[State 3513]
Type = VarRandom
Trigger1 = 1
V = 56
Range = 0,8

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 1
Trigger1 = 1
FV = 23
Value = 0.025

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 2
Trigger1 = 1
FV = 23
Value = 0.05

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 3
Trigger1 = 1
FV = 23
Value = 0.075

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 4
Trigger1 = 1
FV = 23
Value = 0.1

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 5
Trigger1 = 1
FV = 23
Value = 0.125

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 6
Trigger1 = 1
FV = 23
Value = 0.15

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 7
Trigger1 = 1
FV = 23
Value = 0.175

[State 3513]
Type = VarSet
Trigger1 = Var(56) = 8
Trigger1 = 1
FV = 23
Value = 0.2

[State 3513]
Type = VarRandom
Trigger1 = 1
V = 57
Range = 0,8

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 1
Trigger1 = 1
FV = 24
Value = 0.025

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 2
Trigger1 = 1
FV = 24
Value = 0.05

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 3
Trigger1 = 1
FV = 24
Value = 0.075

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 4
Trigger1 = 1
FV = 24
Value = 0.1

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 5
Trigger1 = 1
FV = 24
Value = 0.125

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 6
Trigger1 = 1
FV = 24
Value = 0.15

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 7
Trigger1 = 1
FV = 24
Value = 0.175

[State 3513]
Type = VarSet
Trigger1 = Var(57) = 8
Trigger1 = 1
FV = 24
Value = 0.2

[State 3513]
Type = Explod
Trigger1 = Root,Var(2) < 4
Anim = 3514+Random%2
ID = 3514
PosType = P1
Pos = -20,Var(55)
OwnPal = 1
Scale = 1,1
Accel = -FVar(23),(-FVar(24))*2.25
SprPriority = 5
Persistent = 3

[State 3513]
Type = Projectile
Trigger1 = Root,Var(2) = 4 || Root,Var(43) = 10
ProjID = 3515
ProjAnim = 3515
ProjHitAnim = -1
ProjreMove = 1
ProjreMoveTime = 21
ProjHeightbound = -500,500
ProjHits = 1
Postype = P1
Velocity = -5,-5*Sin(Time*0.1)
Accel = 0,0
OffSet = 0,0
ProjShadow = 0,0,0
SprPriority = 7
Attr = A, SA
Damage = IfElse(Root,Var(43)=10,14,10+Root,Var(2)),1
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 4, Hit
PauseTime = 0, 0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
Sparkxy = 0, -50
Ground.Type = High
Air.Type = High
Ground.SlideTime = 16
Ground.HitTime = 16
Air.HitTime = 16
Ground.Velocity = -5
Air.Velocity = -2,-3
AirGuard.Velocity = -2,-3
Kill = 1
Fall = 0
Air.Fall = 1
Fall.Recover = 0
GivePower = 0,0
Persistent = 5

[State 3513]
Type = Projectile
Trigger1 = Root,Var(2) = 4 || Root,Var(43) = 10
ProjID = 3515
ProjAnim = 3515
ProjHitAnim = -1
ProjreMove = 1
ProjreMoveTime = 21
ProjHeightbound = -500,500
ProjHits = 1
Postype = P1
Velocity = -5,5*Sin(Time*0.1)
Accel = 0,0
OffSet = 0,0
ProjShadow = 0,0,0
SprPriority = 7
Attr = A, SA
Damage = IfElse(Root,Var(43)=10,14,10+Root,Var(2)),1
AnimType = Hard
HitFlag = MAF
GuardFlag = MA
Priority = 4, Hit
PauseTime = 0, 0
sparkno = S8050*10**(random%4)
Guard.SparkNo = S9000
Sparkxy = 0, -50
Ground.Type = High
Air.Type = High
Ground.SlideTime = 16
Ground.HitTime = 16
Air.HitTime = 16
Ground.Velocity = -5
Air.Velocity = -2,-3
AirGuard.Velocity = -2,-3
Kill = 1
Fall = 0
Air.Fall = 1
Fall.Recover = 0
GivePower = 0,0
Persistent = 5

[State 3513]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 3513]
Type = DestroySelf
Trigger1 = FrontEdgeDist <= -80
Trigger2 = MoveContACT

[StateDef 3514]
Type = A
Physics = N
Anim = 3516
SprPriority = 9
VelSet = 0,0

[State 3514]
Type = Trans
Trigger1 = 1
Trans = Add

[State 3514]
Type = VarAdd
Trigger1 = Var(40) < 256
V = 40
Value = 16

[State 3514]
Type = VarSet
Trigger1 = Var(40) >= 256
V = 40
Value    = 256

[State 3514]
Type = PalFx
Trigger1 = 1
Time = 1
Add = 0,0,0
Mul = 256-Var(40),256-Var(40),256-Var(40)

[State 3514]
Type = AngleDraw
Trigger1 = 1
Scale = 0.4+FVar(20),0.4+FVar(20)

[State 3514]
Type = VarAdd
Trigger1 = 1
FV = 20
IgnoreHitPause = 1
Value = 0.1

[State 3514]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 3514]
Type = DestroySelf
Trigger1 = Time >= 16
Trigger2 = Var(40) >= 256

[StateDef 3600]
type = S
movetype = A
physics = S
juggle = 0
anim = 3500
ctrl = 0

[state 3600]
type = VarSet
trigger1 = Time = 0
var(33) = 540

[State 3600, Helper]
type = Helper
trigger1 = time = 0
ID = 3601
pos = -10,-90
postype = back
stateno = 3601
helpertype = normal
name = "Arcueid"
keyctrl = 0
ownpal = 1
supermovetime = 1

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

[Statedef 3601]
type = A
movetype = I
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3600
sprpriority = 2
facep2 = 1

[State 3601]
type = velset
trigger1 = time = 0
X = (parentdist X+72) / 8
Y = 6

[State 3601]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[State 3601]
type = Gravity
trigger1 = 1

[State 3601]
type = PosSet
trigger1 = Pos Y > 0
y = 1

[State 3601]
Type = ChangeState
Trigger1 = Vel Y > 0
Trigger1 = Pos Y > 0
Value = 3602

[StateDef 3602]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3601
sprpriority = 2

[State 3602, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3602, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S0,0

[State 3602, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3603

[StateDef 3603]
type = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3602
sprpriority = 2

[State 3603]
type = turn
triggerall = (P2Dist X < 0)
trigger1 = Anim = 3602
trigger2 = AnimElem = 1

[State 3603, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3603, end]
type = ChangeState
trigger1 = Time = 3
value = 3604
ctrl = 1

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

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

[State 3604, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3604, VelSet]
type = VelSet
trigger1 = AnimElem = 4
x = 8

[State 3604, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = S100,22

[State 3604, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = S0,16
channel = 0

[State 3604]
type = HitDef
trigger1 = AnimElem = 5
attr = S, SA
damage = 15,5
animtype = light
getpower = 70,10
givepower = 40,8
guardflag = MA
hitflag = MAF
pausetime = 2,10
sparkno = S8051*10**(random%4)
sparkxy = -12,-46
hitsound = s200,8
guardsound = s300,0
guard.sparkno = s9000
ground.type = high
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -2
air.velocity = -2,-1

[State 3604]
type = Explod
trigger1 = animelemtime(5) = 0
anim = 3611
id = 3611
pos = -12,-36
postype = p1
bindtime = -1
ownpal = 1
sprpriority = 5
persistent = 0
ignorehitpause = 1
removeongethit = 1
scale = 0.6,0.6

[State 3604]
type = HitOverride
trigger1 = Anim = 3603
attr = SCA, NA, SA, HA, NP, SP, HP
time = -1
stateno = 3610

[State 3604]
type = nothitby
trigger1 = Anim = 3603
value = , NT, ST, HT
time = -1

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

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

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

[State 3605, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = S100,22

[State 3605, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 7

[State 3605, Hit2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
damage = 25,5
animtype = medium
getpower = 80,10
givepower = 40,8
guardflag = MA
hitflag = MAF
pausetime = 2,10
sparkno = S8051*10**(random%4)
sparkxy = -12,-46
hitsound = s200,8
guardsound = s300,0
guard.sparkno = s9000
ground.type = high
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -2.5
air.velocity = -3,-2

[State 3605]
type = Explod
trigger1 = animelemtime(4) = 0
anim = 3612
id = 3612
pos = -12,-36
postype = p1
bindtime = -1
ownpal = 1
sprpriority = 5
persistent = 0
ignorehitpause = 1
removeongethit = 1
scale = 0.6,0.6

[State 3605, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3605]
type = HitOverride
trigger1 = Anim = 3604
attr = SCA, NA, SA, HA, NP, SP, HP
time = -1
stateno = 3610

[State 3605]
type = nothitby
trigger1 = Anim = 3604
value = , NT, ST, HT
time = -1

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

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

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

[State 3606, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = S100,22

[State 3606, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = S0,15
channel = 0

[State 3606, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 6

[State 3606, Hit3]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
damage = 40,10
animtype = hard
getpower = 30,2
givepower = 10,4
guardflag = MA
hitflag = MAF
pausetime = 4,8
sparkno = S8052*10**(random%4)
sparkxy = -12,-46
hitsound = s200,8
guardsound = s300,0
guard.sparkno = s9000
ground.type = high
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -4,4
air.velocity = -4,6
fall = 1
fall.damage = 5
fall.envshake.ampl = 4
fall.envshake.freq = 90
fall.envshake.time = 20
fall.recover = 0

[State 3606]
type = Explod
trigger1 = animelemtime(4) = 0
anim = 3613
id = 3613
pos = 0,-36
postype = p1
bindtime = -1
ownpal = 1
sprpriority = 5
persistent = 0
ignorehitpause = 1
removeongethit = 1
scale = 0.6,0.6

[State 3606, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3606]
type = HitOverride
trigger1 = Anim = 3605
attr = SCA, NA, SA, HA, NP, SP, HP
time = -1
stateno = 3610

[State 3606]
type = nothitby
trigger1 = Anim = 3605
value = , NT, ST, HT
time = -1

[State 3606, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3607

[StateDef 3607]
type = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3602
sprpriority = 2

[State 3607, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3607]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3602
trigger1 = Time = 3
Value = 3611

[State 3607, end]
type = ChangeState
trigger1 = Time = 3
value = 3608

[StateDef 3608]
type = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3606
sprpriority = 2

[State 3608, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(7) = 0
value = S0,17
volume = 255

[State 3608, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 3608, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 3609

[StateDef 3609]
type = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3607
sprpriority = 2

[State 3609, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S0,3

[State 3609, DestroySelf]
type = DestroySelf
trigger1 = time = 19
;ignorehitpause =
;persistent =

[Statedef 3610]
type = S
movetype = H
physics = S
velset = 0,0
poweradd = 0
ctrl = 0
anim = 3608
sprpriority = 1

[State 3610, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,18
channel = 0

[State 3610]
type = velset
trigger1 = AnimElemTime(3) <= 0
X =  -0.8

[State 3610]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 3608
trigger1 = AnimTime = 0
Value = 3611

[State 3610]
Type = Changestate
trigger1 = AnimTime = 0
value = 3609

[Statedef 3611]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3602
sprpriority = 1
facep2 = 1

[State 3611]
type = nothitby
trigger1 = 1
value = SCA

[State 3611]
type = ScreenBound
trigger1 = 1
value = 1

[State 3611]
type = turn
trigger1 = (P2Dist X < 0)

[State 3611]
type = ChangeState
trigger1 = RoundState = 4
trigger1 = parent, stateno = [181,189]
value = 3612

[State 3611]
type = ChangeState
triggerall = RoundState = 4
trigger1 = parent, stateno = 170
trigger2 = parent, alive = 0
value = 3613

[StateDef 3612]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3609
sprpriority = 1
facep2 = 1

[State 3612, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = S400,Random%4

[State 3612, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 3612]
type = ScreenBound
trigger1 = 1
value = 1

[State 3612]
type = nothitby
trigger1 = 1
value = SCA

[StateDef 3613]
type = S
movetype = I
physics = S
velset = 0,0
anim = 3610
sprpriority = 0
facep2 = 1

[State 3613]
type = ScreenBound
trigger1 = 1
value = 1

[State 3613]
type = nothitby
trigger1 = 1
value = SCA

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

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

[State 4000, NotHitBy]
type = NotHitBy
trigger1 = AnimElem = 1
value = SCA
time = 20

[State 4000]
Type = null
Trigger1 = AnimElem = 2
Name = "Hyper"
Stateno = 10400
ID = 10400
Pos = 15,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 2
Name = "Hyper"
Stateno = 10401
ID = 10401
Pos = 15,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
Type = Helper
Trigger1 = AnimElem = 2
Name = "Hyper"
Stateno = 10402
ID = 10402
Pos = 15,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4000]
type = SuperPause
trigger1 = AnimElem = 2
time = 30
movetime = 0
anim = -1
sound = S0,10
pos = 999,999
darken = 0
unhittable = 1

[State 4000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 2
time = 54
PalBright = 0,0,0
PalContrast = 256,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State -1]
Type = Helper
Trigger1 = AnimElem = 2
StateNo = 6020
ID = 10002
Name = "EX_Effect"
Pos = -22,-85
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 5
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4000]
trigger1 = AnimElem = 1
type = NotHitBy
time = 18
value = SCA

[State 4000, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 2
value = -3000

[State 4000, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, HT
damage = 0,0
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 5,Hit
pausetime = 0,0
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
sparkxy = -10, -76
hitsound = S100,8
guardsound = S300,4
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
p2stateno = 4011

[State 4000]
type = explod
trigger1 = movehit = 1
anim = 4022
ID = 4022
postype = p2
pos = 0,-40
vel = -10+(random/50.0), -5-(random/200.0)
accel = 0, .5
facing = ifelse(random<500, -1, 1)
vfacing = ifelse(random<500, -1, 1)
trans = addalpha
alpha = 256,128
sprpriority = 5
scale= .5, .5
ownpal = 1

[State 4000]
type = Changestate
trigger1= AnimElem = 5 >= 0 && movehit
value = 4001

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

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

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = Time % 90 = 0
value = S0,19
volume = 255

[State 4001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4001, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 626
PalBright = 0,0,0
PalContrast = 256,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 4001, TargetBind]
type = TargetBind
trigger1 = time = [0,180]
id = -1
pos = 60,0

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = time = 60
trigger2 = time = 120
value = S100,7

[State 4001]
type = explod
trigger1 = time = 60
trigger2 = time = 120
anim = 4021
ID = 4021
postype = p2
pos = 0,-40
vel = -4+(random/125.0), -7.5-(random/400.0)
accel = 0, .5
facing = ifelse(random<500, -1, 1)
vfacing =ifelse(random<500, -1, 1)
trans = addalpha
alpha = 256,128
sprpriority = 5
scale = .5, .5
ownpal = 1

[State 4001]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4001]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4001, end]
type = ChangeState
trigger1 = Time = 180
value = 4002

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

[State 4002, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4002, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,8

[State 4002]
type = explod
trigger1 = time = 0
anim = 4022
ID = 4022
postype = p2
pos = 0,-40
vel = -10+(random/50.0), -5-(random/200.0)
accel = 0, .5
facing = ifelse(random<500, -1, 1)
vfacing = ifelse(random<500, -1, 1)
trans = addalpha
alpha = 256,128
sprpriority = 5
scale= .5, .5
ownpal = 1

[State 4002]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4002]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4002, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 4003

[StateDef 4003]
Type = S
MoveType= I
Physics = S
PowerAdd= 0
Ctrl = 0
VelSet = 0,0
Anim = 4003
SprPriority = 0

[State 4003, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4003]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4003]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4003, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 3
Value = S0,2

[State 4003, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 4003, Explod]
Type = Explod
Trigger1 = Time = 4
Pos = 0, 0
PosType = P1
SprPriority = 0
RemoveGetHit = 1
Anim = 4006
ID = 4006

[State 4003, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 4004

[StateDef 4004]
Type = A
MoveType= I
Physics = N
VelSet = -11,-17
Anim = 4004
SprPriority = 0

[State 4004, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4004]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4004]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4004, VelAdd]
Type = VelAdd
Trigger1 = Time = [1,4]
Y = 2

[State 4004, VelAdd]
Type = VelAdd
Trigger1 = Time = [5,11]
Y = 3.2

[State 4004, VelAdd]
Type = VelAdd
Trigger1 = Time = [12,14]
Y = 4

[State 4004, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 4004, ChangeState]
Type = ChangeState
Trigger1 = Pos Y >= 0
Trigger1 = Vel Y > 0
Value = 4005

[StateDef 4005]
Type = S
MoveType= I
Physics = S
VelSet = 0, 0
Anim = 4005
SprPriority = 0

[State 4005, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4005]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4005]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4005, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 4005, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 4006

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

[State 4006, PlaySnd]
type = PlaySnd
trigger1 = Time % 90 = 0
trigger1 = Anim = 4007
value = S0,19
volume = 255

[State 4006, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4006]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4006]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4006, Helper]
type = Helper
trigger1 = AnimElem = 6
helpertype = Normal
name = "Soul"
ID = 4010
stateno = 4010
pos = 100,-50
postype = P1
facing = 1
ownpal = 1
removeongethit = 1

[State 4006, end]
type = ChangeAnim
trigger1 = Time = 120
value = 4008

[State 4006, end]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 4008
value = 4007

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

[State 4001, PlaySnd]
type = PlaySnd
trigger1 = Time = 30
trigger1 = Anim = 4009
value = S0,19
volume = 255

[State 4007, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4007]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4007]
type = BGPalFx
trigger1 = 1
time = 1
add = -240,-240,-240
ignorehitpause = 1

[State 4007, end]
type = ChangeAnim
trigger1 = Time = 80
value = 4010

[State 4007, end]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 4010
value = 4008

[Statedef 4008]
Type = S
MoveType = A
Physics = N
Anim = 4011
Ctrl = 0

[State 4008, PlaySnd]
type = PlaySnd
trigger1 = Time % 90 = 0
trigger1 = Anim = 4011
value = S0,19
volume = 255

[State 4008, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 4008]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
;flag3 = nomusic
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State 4008]
type = BGPalFx
trigger1 = 1
add = -240,-240,-240
ignorehitpause = 1
time = 1
supermovetime = 9999
pausemovetime = 9999

[State 4008]
type = Helper
trigger1 = (Anim = 4011) && (AnimElemTime(2)= 70)
name = "cut-in"
stateno = 4900
ownpal = 1
postype = left
pos = 160
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999
size.xscale = .625
size.yscale = .625

[State 4008, PlaySnd]
type = PlaySnd
trigger1 = (Anim = 4011) && (AnimElemTime(2)= 70)
value = S100,25

[State 4008]
type = SuperPause
trigger1 = (Anim = 4011) && (AnimElemTime(2)= 70)
anim = -1
time = 50
movetime = 50
darken = 0

[State 4008, PlaySnd]
type = PlaySnd
trigger1 = (Anim = 4011) && (AnimElemTime(2)= 70)
value = S0,14

[State 4008]
Type = PosAdd
Trigger1 = (Anim = 4011) && ((AnimElem = 7)||(AnimElem = 8))
X = 16

[State 4008]
Type = VarRangeSet
Trigger1 = (Anim = 4011) && (AnimElem = 2,=4)
Value = 0
First = 35
Last = 37

[State 4008]
Type = VarAdd
Trigger1 = (Anim = 4011) && (AnimElem = 2,=4)
fvar(38) = -3000
IgnoreHitPause = 1
Persistent = 1

[State 4008]
Type = VarAdd
Trigger1 = MoveHit = 1
fvar(39) = -20*fvar(39)/100.
IgnoreHitPause = 1
Persistent = 10

[State 4008]
Type = VarAdd
Trigger1 = MoveHit = 1
fvar(27) = 50
IgnoreHitPause = 1
Persistent = 10

[State 4008]
Type = VarSet
Trigger1 = MoveContact = 1
var(7) = IfElse(MoveHit,7,15)
IgnoreHitPause = 1
Persistent = 10

[State 4008]
Type = StateTypeSet
Trigger1 = (Anim = 4011) && (AnimElem = 10)
MoveType = I

[State 4008]
Type = Helper
Trigger1 = (Anim = 4011) && (AnimElemTime(2)= 45)
StateNo = 4009
ID = 4009
Name = "Destiny"
Pos = 13,-102
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = 1
Size.YScale = 1

[State 4008]
Type = PlaySnd
Trigger1 = (Anim = 4011) && (AnimElem = 8)
Value = s100,6

[State 4008]
Type = PlaySnd
Trigger1 = (Anim = 4011) && (AnimElem = 9)
Value = s100,19

[State 4008]
Type = ChangeAnim
Trigger1 = AnimTime = 250
Value = 4012

[State 4008, end]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 4012
value = 0
ctrl = 1

[Statedef 4009]
Physics = N
Anim = 4013
SprPriority = 6

[State 4009]
Type = PlaySnd
Trigger1 = time = 0
Value = s100,11

[State 4009]
Type = AfterImage
Trigger1 = (Time = 0)
Trans = Add
Time = 3
Length = 20
TimeGap = 2
FrameGap = 4
PalBright = 0,0,0
PalContrast = 255,128,128
PalAdd = 0,0,0
PalMul = .8,.4,.4

[State 4009]
Type = AfterImageTime
Trigger1 = 1
Time = 2

[State 4009]
Type = ChangeAnim
Trigger1 = Root,HitPauseTime != 0
Value = Anim
Elem = AnimElemNo(-1)

[State 4009]
Type = VarAdd
Trigger1 = (Time > 0) && (Root,HitPauseTime = 0)
var(5) = 1

[State 4009]
Type = VarAdd
Trigger1 = (var(5) > 49)
var(6) = 1

[State 4009]
Type = VarAdd
Trigger1 = (var(6) = [2,30])
var(7) = -4
IgnoreHitPause = 1
Persistent = 5

[State 4009]
Type = VarAdd
Trigger1 = var(5) > 64
var(0) = 12

[State 4009]
Type = VarSet
Trigger1 = var(5) = 0 || var(5) = 69
var(1) = 13-(var(5)=29)*63

[State 4009]
Type = VarSet
Trigger1 = var(5) = 32
var(1) = -54

[State 4009]
Type = VarSet
Trigger1 = var(5) = 38 || var(5) = 44
var(1) = -54+(var(5)=44)*12

[State 4009]
Type = VarSet
Trigger1 = var(5) = 47 || var(5) = 50
var(1) = 28+(var(5)=50)*18

[State 4009]
Type = VarSet
Trigger1 = var(5) = 0 || var(5) = 29
var(2) = -107+(var(5)=29)*36

[State 4009]
Type = VarSet
Trigger1 = var(5) = 32 || var(5) = 35
var(2) = -29+(var(5)=35)*3

[State 4009]
Type = VarSet
Trigger1 = var(5) = 38 || var(5) = 44
var(2) = -25-(var(5)=44)*46

[State 4009]
Type = VarSet
Trigger1 = var(5) = 47 || var(5) = 50
var(2) = -82+(var(5)=50)*87

[State 4009]
Type = VarSet
Trigger1 = var(5) = 53
var(2) = 9

[State 4009]
Type = VarSet
Trigger1 = var(5) = 0 || var(5) = 29
var(3) = 90+(var(5)=29)*45

[State 4009]
Type = VarSet
Trigger1 = var(5) = 32 || var(5) = 35
var(3) = 165+(var(5)=35)*5

[State 4009]
Type = VarSet
Trigger1 = var(5) = 44 || var(5) = 47
var(3) = 135-(var(5)=47)*135

[State 4009]
Type = VarSet
Trigger1 = var(5) = 50
var(3) = 10

[State 4009]
Type = VarSet
Trigger1 = var(5) = 66
var(3) = -5

[State 4009]
Type = VarAdd
Trigger1 = var(5) = [0,15]
fvar(0) = IfElse(var(5)=0,1.9375,-.0625)

[State 4009]
Type = VarAdd
Trigger1 = var(5) = [0,15]
fvar(1) = .0625

[State 4009]
Type = VarAdd
Trigger1 = var(5) = [75,90]
fvar(0) = .0625

[State 4009]
Type = VarAdd
Trigger1 = var(5) = [75,90]
fvar(1) = -.0625

[State 4009]
Type = BindToRoot
Trigger1 = 1
Time = 1
Pos = var(1),var(2)

[State 4009]
Type = Trans
Trigger1 = !var(0)
Trans = Add

[State 4009]
Type = Trans
Trigger1 = var(0)
Trans = AddAlpha
Alpha = 256-var(0),256

[State 4009]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[State 4009]
Type = EnvShake
Trigger1 = (var(6) = [1,30])
Time  = 5
Ampl  = 22+var(7)
Freq  = 100
Phase = 100
Persistent = 5

[State 4009]
Type = SprPriority
Trigger1 = var(5) = 29 || var(5) = 50
Value = -1+(var(5)=40)*7

[State 4009]
Type = AngleDraw
Trigger1 = 1
Value = var(3)
Scale = fvar(0),fvar(1)

[State 4009]
Type = DestroySelf
Trigger1 = (var(5) > 94) || (Root,MoveType = H)

[Statedef 4010]
Type = A
Physics = N
Anim = 4014
SprPriority = 6

[State 4010, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S100,21

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

[State 4010]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[state fadein]
type=null
trans=addalpha
alpha=ifelse(time<=7,32*(time+1),256),ifelse(time<=8,256,(16-time)*32)
trigger1=time<=16

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

[State 4010, VelSet]
type = VelSet
trigger1 = Root,Anim = 4009
y = -1.2

[State 4010, VelSet]
type = VelSet
trigger1 = Root,Anim = 4010
y = 0
x = 0

[State 4010, Explod]
type = Explod
trigger1 = time = 288
anim = 4015
ID = 4015
pos = 0,0
postype = back
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 10
persistent = 0

[State 4010, Explod]
type = Explod
trigger1 = Time = 350
anim = 4024
supermove = 1
pausemovetime = 99999
pos = 0,0
postype = back
bindtime = -1
sprpriority = 9
ownpal = 1

[State 4010, Explod]
type = Explod
trigger1 = time = 290
anim = 4019
ID = 4015
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1
sprpriority = 10

[State 4010]
Type = Helper
Trigger1 = time = 350
StateNo = 4013
ID = 4013
Name = "SoulBreak"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 4010]
Type = Helper
Trigger1 = time = 350
StateNo = 4013
ID = 4013
Name = "SoulBreak"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 4010, PlaySnd]
type = PlaySnd
trigger1 = time = 290
value = S100,5

[State 4011, PlaySnd]
type = PlaySnd
trigger1 = time = 350
value = S0,12

[State 4010, DestroySelf]
type = DestroySelf
trigger1 = Time = 350

[Statedef 4011]
type = S
physics = S
movetype = H
ctrl = 0
velset= 0,0
sprpriority = 1

[State 4011, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 4011]
type = changeanim2
trigger1 = Time = 0
value = 4016

[State 4011]
type = changeanim2
trigger1 = Time = 180
value = 4023

[State 4011]
type = changeanim2
trigger1 = Time = 560
value = 4018

[State 4011, LifeAdd]
type = LifeAdd
trigger1 = time = 560
value = -479
absolute = 1

[State 4011]
type = Changestate
trigger1 = time = 620 && Anim = 4018
value = 4012

[Statedef 4012]
type = S
physics = S
movetype = H
ctrl = 0
velset= 0,0
sprpriority = 1

[State 4012]
type = changeanim2
trigger1 = !time && !selfanimexist(5950)
value = 4017

[State 4012]
type = posset
trigger1 = 1
y = 0

[State 4012]
type = velset
trigger1 = 1
y = 0

[State 4012]
type = gamemakeanim
trigger1 = anim = 4017 && animelem = 7
value = 60
pos = 0,0
under = sysvar(1)<=14

[State 4012]
type = playsnd
trigger1 = anim = 4017 && animelem = 7
value = f7,0

[State 4012]
type = changeanim
trigger1 = time>=110 && selfanimexist(5111)
value = 5111

[State 4012]
type = selfstate
trigger1 = time>=130
value = ifelse(alive,5120,5150)

[Statedef 4013]
type = A
physics = N
ctrl = 0
anim = IfElse(Parent,Stateno = 2005,2007,4020)
velset = 0,0

[State 4013]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 4013]
type = Trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256-floor(Time*19.2),256
time = 1

[State 4013]
type = SprPriority
trigger1 = 1
value = 4

[State 4013]
type = varrandom
trigger1 = Time = 0
v = 0
range = 20,60

[State 4013]
type = varrandom
trigger1 = Time = 0
v = 1
range = 1,360

[State 4013]
type = AngleSet
trigger1 = Time = 0
value = var(1)

[State 4013]
type = AngleDraw
trigger1 = 1
scale = 0.1+Time*0.4*var(0)*0.01,0.1+Time*0.4

[State 4013]
type = DestroySelf
trigger1 = time = 20

[StateDef 4500]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 4500
SprPriority = 2

[State 4500, NotHitBy]
type = NotHitBy
trigger1= !time
time = 20
value = SCA

[State 4500, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S0,13

[State 4500]
Type = null
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10400
ID = 10400
Pos = 0,-40
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10450
ID = 10450
Pos = 0,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
Type = Helper
Trigger1 = AnimElem = 3
Name = "Hyper"
Stateno = 10451
ID = 10451
Pos = 0,-30
PosType = P1
OwnPal = 1
SuperMoveTime = 999
PauseMoveTime = 999
IgnoreHitPause = 1
Persistent = 0

[State 4500]
type = SuperPause
trigger1 = AnimElem = 3
time = 30
movetime = 0
anim = -1
sound = S0,10
pos = 999,999
darken = 0
unhittable = 1

[State 4500]
type = PowerAdd
trigger1 = AnimElem = 3
value = -3000
ignorehitpause = 1

[State 4500]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal
stateno = 7000
id = 7000
postype = Left
pos = 0, 0
keyctrl = 0
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[State 4500]
type = Helper
trigger1 = AnimElem = 3
persistent = 0
id = 7050
name = "Face"
pos = 0,0
postype = P1
stateno = 7050
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4500, PlaySnd]
Type = PlaySnd
Trigger1 = AnimElem = 4
Value = S100,10

[State 4500, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 4500, VelSet]
Type = VelSet
Trigger1 = AnimElem = 8
X = 15
Y = 0

[State 4500, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 8
Physics = N

[State 4500, VelSet]
Type = VelSet
Trigger1 = AnimElem = 9
Trigger2 = MoveGuarded
Persistent = 0
X = 5

[State 4500, StateTypeSet]
Type = StateTypeSet
Trigger1 = AnimElem = 9
Physics = S

[State 4500, PlayerPush]
Type = PlayerPush
Trigger1 = AnimElem = 8, >=0
Trigger1 = AnimElem = 9, <0
Value = 0

[State 4500, Helper]
Type = helper
Trigger1 = AnimElem = 6
Persistent = 0
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 1007
StateNo = 1007
Name = "Circle"

[State 4500]
type = HitDef
Trigger1 = animelemtime(8) >= 0
trigger1 = !MoveContact
attr = S, HT
damage = 0, 20
hitflag = MAF
guardflag = HA
priority = 5, hit
SparkXY = 0, -50
sparkno = S8050*10**(random%4)
guard.sparkno = S9000
HitSound = S200,6
GuardSound = S300,4
p1stateno = 4502
p2stateno = 4518
fall = 1
kill=0
guard.kill = 0
ID = 4500

[State 4500, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 4501

[StateDef 4501]
Type = S
MoveType = A
Physics = S
Anim = 4502
SprPriority = 2
MoveHitPersist = 1

[State 4501, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[Statedef 4502]
type    = S
movetype= A
physics = S
velset = 18,0
anim = 4501
poweradd = 0

[State 4502, ScreenBound]
type = ScreenBound
Trigger1 = FrontEdgeDist <= 0
value = 0

[State 4502, TargetBind]
type = TargetBind
trigger1 = time = 0
id = -1
pos = 25,0

[State 4502]
Type = Helper
Trigger1 = Anim = 4503 && animelem = 4
Stateno = 4508
ID = 4508
Pos = 200,-120
PosType = P1
OwnPal = 1
Keyctrl = 0
velset = 0,0
facing = -1
Name = "Arcueid"

[State 4502]
type = PlayerPush
trigger1 = 1
value = 0

[State 4502]
type = EnvShake
trigger1 = time =0
time = 15
freq = 120
ampl = -8
phase = 60

[State 4502]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State 4502, ChangeAnim]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 4503

[State 4502, ScreenBound]
type = ScreenBound
Trigger1 = Anim = 4503
value = 0

[State 4502]
type = turn
trigger1 = Anim = 4503 && AnimElem = 4

[State 4502]
type = ChangeState
trigger1 = Anim = 4503 && time = 200
value = 4503

[StateDef 4503]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 4504
SprPriority = 2

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

[State 4503, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 6
trigger2 = time = 8
trigger3 = time = 17
trigger4 = time = 18
trigger5 = time = 27
trigger6 = time = 34
trigger7 = time = 40
trigger8 = time = 46
trigger9 = time = 51
trigger10 = time = 56
trigger11 = time = 61
trigger12 = time = 72
trigger13 = time = 74
trigger14 = time = 84
trigger15 = time = 85
trigger16 = time = 94
trigger17 = time = 95
trigger18 = time = 108
trigger19 = time = 110
trigger20 = time = 119
trigger21 = time = 122
trigger22 = time = 129
trigger23 = time = 132
trigger24 = time = 142
trigger25 = time = 148
trigger26 = time = 152
value = -14
kill = 0
absolute = 1

[State 4503, HitAdd]
type = HitAdd
trigger1 = time = 6
trigger2 = time = 8
trigger3 = time = 17
trigger4 = time = 18
trigger5 = time = 27
trigger6 = time = 34
trigger7 = time = 40
trigger8 = time = 46
trigger9 = time = 51
trigger10 = time = 56
trigger11 = time = 61
trigger12 = time = 72
trigger13 = time = 74
trigger14 = time = 84
trigger15 = time = 85
trigger16 = time = 94
trigger17 = time = 95
trigger18 = time = 108
trigger19 = time = 110
trigger20 = time = 119
trigger21 = time = 122
trigger22 = time = 129
trigger23 = time = 132
trigger24 = time = 142
trigger25 = time = 148
trigger26 = time = 152
value = 1

[State 4503, PlaySnd]
type = PlaySnd
trigger1 = time = 6
trigger2 = time = 8
trigger3 = time = 17
trigger4 = time = 18
trigger5 = time = 27
trigger6 = time = 34
trigger7 = time = 40
trigger8 = time = 46
trigger9 = time = 51
trigger10 = time = 56
trigger11 = time = 61
trigger12 = time = 72
trigger13 = time = 74
trigger14 = time = 84
trigger15 = time = 85
trigger16 = time = 94
trigger17 = time = 95
trigger18 = time = 108
trigger19 = time = 110
trigger20 = time = 119
trigger21 = time = 122
trigger22 = time = 129
trigger23 = time = 132
trigger24 = time = 142
trigger25 = time = 148
trigger26 = time = 152
value = S200,8
volume = 0

[State 4503, Explod]
type = Explod
trigger1 = time = 8
trigger2 = time = 18
trigger3 = time = 34
trigger4 = time = 46
trigger5 = time = 56
trigger6 = time = 72
trigger7 = time = 84
trigger8 = time = 94
trigger9 = time = 110
trigger10 = time = 122
trigger11 = time = 132
trigger12 = time = 148
anim = 8051*10**(random%4)
pos = -35+random%60, -93+random%70
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 8

[State 4503, ChangeState]
type = ChangeState
trigger1 = Time = 152
value = 4504

[StateDef 4504]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 4506
SprPriority = 2

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

[State 4504, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4505

[StateDef 4505]
Type = A
MoveType = A
Physics = A
Ctrl = 0
Anim = 4507
SprPriority = 2

[State 4505, Explod]
Type = Explod
Trigger1 = Time = 0
Persistent = 0
IgnoreHitPause = 0
Anim = 1105
ID = 1105
Pos = 0,-20
PosType = P1
BindTime = -1
SuperMove = 0
SprPriority = 10
OwnPal = 1
RemoveOnGetHit = 1
scale = 1.5,1.5
Removetime = -2

[State 4505]
Type = Explod
Trigger1 = Time = 6
Anim = 4524
ID = 4524
Pos = -32,222
PosType = Back
Ownpal = 1
SprPriority = 5
BindTime = -1
IgnoreHitPause = 1
Persistent = 0

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

[State 4505, HitAdd]
type = HitAdd
trigger1 = time = 0
value = 2

[State 4505, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,9

[State 4505, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 0
value = -50
kill = 0
absolute = 1

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

[State 4505, VelSet]
type = VelSet
trigger1 = time = [0,11]
x = 6
y = -6

[State 4505, VelMul]
type = VelMul
trigger1 = time = [12,84]
x = 0.75
y = -0.75

[State 4505, ChangeState]
type = ChangeState
trigger1 = Time = 84
value = 4506

[StateDef 4506]
type = S
movetype = A
physics = S
juggle = 0
anim = 99999
ctrl = 0
velset = 0,0

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

[State 4505, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 110
value = -200
kill = 1
absolute = 1

[State 4506, Helper]
type = Helper
trigger1 = time = 0
ID = 4516
pos = -350,-5
postype = P2
stateno = 4516
helpertype = normal
name = "Final"
keyctrl = 0
ownpal = 0

[State 4506, end]
type = ChangeState
trigger1 = Time = 190
value = 4507

[StateDef 4507]
type = S
movetype = I
physics = S
juggle = 0
anim = 4514
ctrl = 0

[State 4507, Turn]
type = Turn
trigger1 = time = 0

[state 4507,pos]
type = posset
trigger1 = Anim = 4514 && time = 0
Trigger1 = Facing = 1
x = (enemynear,pos X) - 50
y = 0

[state 4507,pos]
type = posset
trigger1 = Anim = 4514 && time = 0
Trigger1 = Facing = -1
x = (enemynear,pos X) + 50
y = 0

[State 4507, end]
type = ChangeAnim
trigger1 = Time = 60
value = 4515

[State 4507, end]
type = changestate
trigger1= anim = 4514 && animelemtime(16) >= 0 && winko
value = 182

[State 4507, ChangeState]
type = ChangeState
trigger1 = Anim = 4515 && AnimTime = 0
value = 0
ctrl = 1

[StateDef 4508]
type = A
movetype= I
physics = N
velset = 18,7
anim = 3600
poweradd = 0
SprPriority = 2
ctr=0

[State 4508]
type = posset
trigger1 = pos y >=0
y = 0

[State 4508]
type = velset
trigger1 = pos y =0
x = 6
y = 0

[State 4508]
type = PlayerPush
trigger1 = 1
value = 0

[State 4508]
type = changestate
trigger1 = pos y =0
value = 4509

[StateDef 4509]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3601
sprpriority = 2

[State 4509, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,0

[State 4509, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 4510

[StateDef 4510]
type = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3606
sprpriority = 2

[State 4510]
type = turn
trigger1 = time = 0

[State 4510]
type = PlaySnd
trigger1 = animelemtime(6) = 12
value = S0,20

[State 4510, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 4511

[StateDef 4511]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 4505
SprPriority = 2

[State 4511, Explod]
type = Explod
trigger1 = time = 6
trigger2 = time = 17
trigger3 = time = 27
trigger4 = time = 40
trigger5 = time = 51
trigger6 = time = 61
trigger7 = time = 74
trigger8 = time = 85
trigger9 = time = 95
trigger10 = time = 108
trigger11 = time = 119
trigger12 = time = 129
trigger13 = time = 142
trigger14 = time = 152
anim = 8052*10**(random%4)
pos = -35+random%60, -93+random%70
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 8

[State 4511, ChangeState]
type = ChangeState
trigger1 = Time = 152
value = 4512

[StateDef 4512]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 4508
SprPriority = 2

[State 4512, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4513

[StateDef 4513]
Type = A
MoveType = A
Physics = A
Ctrl = 0
Anim = 4509
SprPriority = 2

[State 4513]
Type = Explod
Trigger1 = Time = 3
Anim = 4524
ID = 4524
Pos = -32,222
PosType = Back
Ownpal = 1
SprPriority = 5
BindTime = -1
IgnoreHitPause = 1
Persistent = 0

[State 4513, Explod]
Type = Explod
Trigger1 = AnimElemTime(1) = 0
Anim = 4523
ID = 4523
Pos = 0,-10
Postype = p1
Bindtime = -1
Ownpal = 1
Sprpriority = 5
Persistent = 0
Ignorehitpause = 1
Removeongethit = 1
Scale = 0.8,0.8

[State 4513, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,4

[State 4513, VelSet]
type = VelSet
trigger1 = time = [0,11]
x = 7
y = -6

[State 4513, VelMul]
type = VelMul
trigger1 = time = [12,84]
x = 0.75
y = -0.75

[State 4513, ChangeState]
type = ChangeState
trigger1 = Time = 63
value = 4514

[StateDef 4514]
type = S
movetype = A
physics = S
juggle = 0
anim = 99999
ctrl = 0
velset = 0,0

[State 4514, Helper]
type = Helper
trigger1 = time = 0
ID = 4517
pos = 375,10
postype = P2
stateno = 4517
helpertype = normal
name = "Final"
keyctrl = 0
ownpal = 1

[State 4514, end]
type = ChangeState
trigger1 = Time = 210
value = 4515

[StateDef 4515]
type = S
movetype = I
physics = S
juggle = 0
anim = 4516
ctrl = 0

[State 4515, BindToParent]
type = BindToParent
trigger1 = Root,Anim = 4514
time = 1
pos = 0,0

[State 4515, end]
type = ChangeAnim
trigger1 = Time = 60
value = 4517

[State 4515]
Type = ChangeState
Trigger1 = RoundState = 3 || RoundState = 4
trigger1 = Anim = 4516
trigger1 = AnimElemTime(1) > 0
trigger1 = Pos Y >= 0
Value = 4520

[State 4515, ChangeState]
type = ChangeState
trigger1 = Anim = 4517 && AnimTime = 0
value = 3609

[StateDef 4516]
type = S
movetype = I
physics = S
juggle = 0
anim = 4510
ctrl = 0
sprpriority = 3

[State 4516, PlaySnd]
type = PlaySnd
trigger1 = time = 109
value = S200,5

[State 4516, Explod]
type = Explod
trigger1 = time = 109
anim = 4019
ID = 4019
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.5,1
sprpriority = 10

[State 4516, HitAdd]
type = HitAdd
trigger1 = time = 109
value = 1

[State 4516, VelSet]
type = VelSet
trigger1 = time
x = 2.7

[State 4516]
type = Helper
trigger1 = time = 90
persistent = 0
id = 7050
name = "Face"
pos = 0,0
postype = P1
stateno = 7050
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4516, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 120
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 4516, ChangeAnim]
type = ChangeAnim
trigger1 = time = 105
value = 4511

[State 4516, VelSet]
type = VelSet
trigger1 = Anim = 4511
x = 25

[State 4516, DestroySelf]
type = DestroySelf
Trigger1 = Anim = 4511
Trigger1 = FrontEdgeBodyDist <= -120

[StateDef 4517]
type = S
movetype = I
physics = S
juggle = 0
anim = 4512
ctrl = 0
sprpriority = 1

[State 4517, Turn]
type = Turn
trigger1 = time = 0

[State 4517, VelSet]
type = VelSet
trigger1 = time
x = 2.5

[State 4517, ChangeAnim]
type = ChangeAnim
trigger1 = time = 120
value = 4513

[State 4517, Pause]
type = Pause
trigger1 = time = 110
time = 60

[State 4517]
type = Helper
trigger1 = time = 110
persistent = 0
id = 7100
name = "Face"
pos = 0,0
postype = P1
stateno = 7100
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State 4517, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 120
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
TimeGap = 2
FrameGap = 4
Trans = Add1
length = 9

[State 4517, PlaySnd]
type = PlaySnd
trigger1 = time = 110
value = S0,22

[State 4517, VelSet]
type = VelSet
trigger1 = Anim = 4513
x = 25

[State 4517, DestroySelf]
type = DestroySelf
Trigger1 = Anim = 4513
Trigger1 = FrontEdgeBodyDist <= -120

[Statedef 4518]
type    = S
movetype= H
physics = N
velset = 0,0
poweradd = 0
SprPriority = 1

[State 4518, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4525

[State 4518, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 199
value = 4519

[State 4518, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 355
value = 4518

[State 4518, ChangeState]
type = ChangeState
trigger1 = time = 390
value = 4519

[Statedef 4519]
type    = S
movetype= H
physics = N
velset = 0,0
poweradd = 0
SprPriority = 1

[State 4519, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4518

[State 4519, AngleDraw]
type = AngleDraw
trigger1 = Anim = 4518

[State 4519, AngleAdd]
type = AngleAdd
trigger1 = Anim = 4518
value = 25

[State 4519, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = -5

[State 4519, VelSet]
type = VelSet
trigger1 = time = 10
x = 0
y = 0
;ignorehitpause =
;persistent =

[State 4519, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 180
value = 4520

[State 4519, VelSet]
type = VelSet
trigger1 = Anim = 4520 && time = [200,220]
x = 0
y = -30

[State 4519, VelAdd]
type = VelAdd
trigger1 = time >= 220
x = 0
y = 1.2

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

[State 4519, SelfState]
type = SelfState
trigger1 = time >= 220
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
value = 5100

[StateDef 4520]
type = S
movetype = I
physics = S
velset = 0,0
anim = 4522
sprpriority = 1

[State 4520, PlaySnd]
type = PlaySnd
trigger1 = time = 60
value = S0,21

[State 4520, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,180]
flag = roundnotover

[State 4520]
type = ScreenBound
trigger1 = 1
value = 1

[State 4520]
type = nothitby
trigger1 = 1
value = SCA

[Statedef 4900]
type    = S
movetype= I
physics = N
juggle  = 1
poweradd= 0
ctrl = 0
velset = 0,0
anim = 4900
sprpriority = 3

[State 4900, 0]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

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

[State 4900, 2]
type = PosSet
trigger1 = time = 0
y = (239-ScreenPos Y)-150

[State 4900, 2]
type = PalFx
trigger1 = Time <= 25
time = 1
add = -250+(Time)*10,-250+(Time)*10,-250+(Time)*10

[State 4900, 3]
type = PalFx
trigger1 = Time >= 40
time = 1
add = -(Time-40)*6,-(Time-40)*6,-(Time-40)*6

[State 4900, 4]
type = Explod
trigger1 = time = 1
anim = 4901
ID = 4900
removetime = 80
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999

[State 4900, 4]
type = ModifyExplod
trigger1 = time < 25
ID = 4900
scale = .565+time/500.0,.565+time/500.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time = [25,40]
ID = 4900
scale = .615+(time-25)/750.0,.615+(time-25)/750.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time > 40
ID = 4900
scale = .635+(time-40)/400.0,.635+(time-40)/400.0

[State 4900, 4]
type = Explod
trigger1 = time = 1
anim = 4901
ID = 4901
removetime = 80
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999

[State 4900, 4]
type = ModifyExplod
trigger1 = time < 25
ID = 4901
scale = .505+time/250.0,.505+time/250.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time = [25,40]
ID = 4901
scale = .605+(time-25)/375.0,.605+(time-25)/375.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time > 40
ID = 4901
scale = .645+(time-40)/200.0,.645+(time-40)/200.0

[State 4900, 4]
type = Explod
trigger1 = time = 1
anim = 4901
ID = 4902
removetime = 80
ignorehitpause = 1
persistent = 0
supermovetime = 9999
pausemovetime = 9999

[State 4900, 4]
type = ModifyExplod
trigger1 = time < 25
ID = 4902
scale = .395+time/125.0,.395+time/125.0

[State 4900, 4]
type = ModifyExplod
trigger1 = time = [25,40]
ID = 4902
scale = .595+(time-25)/187.5,.595+(time-25)/187.5

[State 4900, 4]
type = ModifyExplod
trigger1 = time > 40
ID = 4902
scale = .655+(time-40)/100.0,.655+(time-40)/100.0

[State 4900, 9]
type = DestroySelf
trigger1 = time = 80

[StateDef 6010]
Type = A
Physics = N
Anim = 99999
SprPriority = 4
VelSet = 0,0

[State -1]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State -1]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 255,255

[State -1]
Type = VarSet
Trigger1 = Time = 30
V = 6
Value = 0

[State -1]
Type = VarAdd
Trigger1 = Time = [0,10]
Trigger2 = Time >= 30
V = 6
Value = 26

[State -1]
Type = VarAdd
Trigger1 = Time = [1,3]
Trigger2 = Time = [10,15]
FV  = 3
Value = 0.05

[State -1]
Type = VarAdd
Trigger1 = Time = [4,9]
Trigger2 = Time = [16,32]
FV  = 3
Value = -0.05

[State -1]
Type = Explod
Trigger1 = Time = 0
ID = 10000
Anim = 10000
Ownpal = 1
Scale = 0.725+FVar(3),0.725+FVar(3)
SprPriority = 5
RemoveTime = 32
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,32]
ID = 10000
Scale = 0.725+FVar(3),0.725+FVar(3)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = VarAdd
Trigger1 = Time >= 23
FV  = 4
Value = 0.0175

[State -1]
Type = Explod
Trigger1 = IsHelper(10001)
Trigger1 = Time = 0
ID = 10001
Anim = IfElse(((Root,Life*100)/LifeMax) <= 30,10003,10001)
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = Explod
Trigger1 = IsHelper(10002)
Trigger1 = Time = 0
ID = 10002
Anim = 10002
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,50]
ID = 10001
Scale = 0.50+FVar(4),0.50+FVar(4)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = BGPalFX
Trigger1 = Time = [1,29]
Add = 0-Var(6),0-Var(6),0-Var(6)
Time = 1

[State -1]
Type = BGPalFX
Trigger1 = Time = [30,35]
Trigger1 = Parent,StateNo != 2000
Add = Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5)
Time = 1

[State -1]
Type = AssertSpecial
Trigger1 = Time <= 26
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = AssertSpecial
Trigger1 = Time >= 27
Flag = Noshadow
Flag2 = Invisible
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = DestroySelf
Trigger1 = Time = 50

[StateDef 6020]
Type = A
Physics = N
Anim = 99999
SprPriority = 4
VelSet = 0,0

[State -1]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State -1]
Type = Trans
Trigger1 = 1
Trans = AddAlpha
Alpha = 255,255

[State -1]
Type = VarSet
Trigger1 = Time = 30
V = 6
Value = 0

[State -1]
Type = VarAdd
Trigger1 = Time = [0,10]
Trigger2 = Time >= 30
V = 6
Value = 26

[State -1]
Type = VarAdd
Trigger1 = Time = [1,3]
Trigger2 = Time = [10,15]
FV  = 3
Value = 0.05

[State -1]
Type = VarAdd
Trigger1 = Time = [4,9]
Trigger2 = Time = [16,32]
FV  = 3
Value = -0.05

[State -1]
Type = Explod
Trigger1 = Time = 0
ID = 10000
Anim = 10000
Ownpal = 1
Scale = 0.725+FVar(3),0.725+FVar(3)
SprPriority = 5
RemoveTime = 32
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,32]
ID = 10000
Scale = 0.725+FVar(3),0.725+FVar(3)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = VarAdd
Trigger1 = Time >= 23
FV  = 4
Value = 0.0175

[State -1]
Type = Explod
Trigger1 = IsHelper(10001)
Trigger1 = Time = 0
ID = 10002
Anim = 10002
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = Explod
Trigger1 = IsHelper(10002)
Trigger1 = Time = 0
ID = 10002
Anim = 10002
Pos = 0,240
PosType = Back
Ownpal = 1
Scale = 0.50+FVar(4),0.50+FVar(4)
SprPriority = -5
RemoveTime = 50
RemoveOnGetHit = 1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = ModifyExplod
Trigger1 = Time = [1,50]
ID = 10002
Scale = 0.50+FVar(4),0.50+FVar(4)
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = BGPalFX
Trigger1 = Time = [1,29]
Add = 0-Var(6),0-Var(6),0-Var(6)
Time = 1

[State -1]
Type = BGPalFX
Trigger1 = Time = [30,35]
Trigger1 = Parent,StateNo != 2000
Add = Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5),Ceil(-255+Var(6)*1.5)
Time = 1

[State -1]
Type = AssertSpecial
Trigger1 = Time <= 26
Flag = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = AssertSpecial
Trigger1 = Time >= 27
Flag = Noshadow
Flag2 = Invisible
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999

[State -1]
Type = DestroySelf
Trigger1 = Time = 50

[Statedef 7000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 99999
velset = 0,0
ownpal = 1
sprpriority = 7

[State 7000]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7000]
type = Explod
trigger1 = !NumExplod(10700)
anim = 10700
id = 10700
postype = back
pos = 0, 0
bindtime = -1
removetime = 99999
scale = 1,1
sprpriority = -5
ownpal = 1
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 7000]
type = PlaySnd
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4506) && (Parent,time = 109)
;trigger3 = (Parent,Anim = 4510)
value = S0,12
persistent = 0
volume = 255

[State 7000]
type = Explod
triggerall = !NumExplod(10800)
type = PlaySnd
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4506) && (Parent,time = 109)
;trigger3 = (Parent,Anim = 4510)
anim = 10800
id = 10800
postype = back
pos = 0, 0
bindtime = -1
scale = 1,1
sprpriority = -5
ownpal = 1
persistent = 0
supermovetime = 99999
pausemovetime = 99999

[State 7000]
type = RemoveExplod
type = PlaySnd
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4506) && (Parent,time = 109)
;trigger3 = (Parent,Anim = 4510)
ID = 10700

[State 7000]
type = DestroySelf
type = PlaySnd
trigger1 = (Parent,Stateno != [4500, 4599])
trigger2 = (Parent,Stateno = 4506) && (Parent,time = 109)
;trigger3 = (Parent,Anim = 4510)

[Statedef 7050]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 99999
ownpal = 1

[State 7050]
Type = VarSet
Trigger1 = Time = 0 || Time = 11
var(5) = 0

[State 7050]
Type = VarAdd
Trigger1 = time <= 10
Trigger2 = time >= 70
var(5) = 1

[State 7050]
Type = ModifyExplod
Trigger1 = Time < 10
Scale = .5,0+(Var(5)*.05)

[State 7050]
Type = ModifyExplod
Trigger1 = Time = [10,69]
Scale = .5,.5

[State 7050]
Type = ModifyExplod
Trigger1 = Time >= 70
Scale = .5,.5-(Var(5)*.05)

[State 7050]
type = Explod
trigger1 = Time = 0
anim = 10600
pos = 0,IfElse(Parent,Stateno = 4516, 30,90)
postype = back
sprpriority = -4
ownpal = 0
supermove = 1
persistent = 0
Removetime = 80
bindtime = -1
pausemovetime = 9999999
supermovetime = 9999999

[State 7050]
type = Explod
trigger1 = Time = 0
anim = 10500
pos = 0,IfElse(Parent,Stateno = 4516, 30,90)
postype = back
sprpriority = -3
ownpal = 0
bindtime = -1
persistent = 0
Removetime = 80
supermove = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7050]
type = DestroySelf
trigger1 = Time = 85

[Statedef 7100]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 99999
ownpal = 1

[State 7100]
Type = VarSet
Trigger1 = Time = 0 || Time = 11
var(5) = 0

[State 7100]
Type = VarAdd
Trigger1 = time <= 10
Trigger2 = time >= 70
var(5) = 1

[State 7100]
Type = ModifyExplod
Trigger1 = Time < 10
Scale = .5,0+(Var(5)*.05)

[State 7100]
Type = ModifyExplod
Trigger1 = Time = [10,69]
Scale = .5,.5

[State 7100]
Type = ModifyExplod
Trigger1 = Time >= 70
Scale = .5,.5-(Var(5)*.05)

[State 7100]
type = Explod
trigger1 = Time = 0
anim = 10600
pos = 0,210
postype = back
sprpriority = -4
ownpal = 0
supermove = 1
persistent = 0
Removetime = 80
bindtime = -1
pausemovetime = 9999999
supermovetime = 9999999

[State 7100]
type = Explod
trigger1 = Time = 0
anim = 10550
pos = 0,210
postype = back
sprpriority = -3
ownpal = 0
bindtime = -1
persistent = 0
Removetime = 80
supermove = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 7100]
type = DestroySelf
trigger1 = Time = 85

[StateDef 10400]
Type = A
MoveType = I
Physics = N
Anim = 10400
SprPriority = 999

[State 10400]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.3

[State 10400]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.16

[State 10400]
Type = VarAdd
Trigger1 = Time = [5,8]
FV = 1
Value = 0.1

[State 10400]
Type = VarAdd
Trigger1 = Time > 8
FV = 1
Value = 0.02

[State 10400]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10400]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10400]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10400]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10400]
Type = AngleDraw
Trigger1 = 1
Scale = FVar(1), FVar(1)

[State 10400]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10401]
Type = A
MoveType = I
Physics = N
Anim = 10401
SprPriority = 999

[State 10401]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10401]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10401]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10401]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10401]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10401]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10401]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10401]
Type = AngleDraw
Trigger1 = 1
Scale = FVar(1), FVar(1)

[State 10401]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10402]
Type = A
MoveType = I
Physics = N
Anim = 10402
SprPriority = 999

[State 10402]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10402]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10402]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10402]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10402]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10402]
Type = AngleDraw
Trigger1 = 1
Scale = FVar(1), FVar(1)

[State 10402]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10450]
Type = A
MoveType = I
Physics = N
Anim = 10451
SprPriority = 999

[State 10450]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10450]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10450]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10450]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10450]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10450]
Type = AngleSet
Trigger1 = Time = 0
Value = 20

[State 10450]
Type = AngleAdd
Trigger1 = Time > 0
Value = 10

[State 10450]
Type = AngleDraw
Trigger1 = 1
Scale = FVar(1), FVar(1)

[State 10450]
Type = DestroySelf
Trigger1 = Time = 32

[StateDef 10451]
Type = A
MoveType = I
Physics = N
Anim = 10450
SprPriority = 999

[State 10451]
Type = Trans
Trigger1 = 1
Trans = Add

[State 10451]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 10451]
Type = VarSet
Trigger1 = Time = 0
FV = 1
Value = 0.5

[State 10451]
Type = VarAdd
Trigger1 = Time = [1,4]
FV = 1
Value = 0.1

[State 10451]
Type = VarAdd
Trigger1 = Time > 4
FV = 1
Value = 0.01

[State 10451]
Type = AngleDraw
Trigger1 = 1
Scale = FVar(1), FVar(1)

[State 10451]
Type = DestroySelf
Trigger1 = Time = 32

[statedef 16000]
anim=99999
ctrl=0

[state asserts]
type=assertspecial
flag=invisible
flag2=noshadow
trigger1=1

[state pos y]
type=null
trigger1=numexplod((var(59)-numexplod)%8)
trigger1=var((var(59)-numexplod)%8+8)%1000>60
trigger1=0&&var((var(59)-numexplod)%8+8):=var((var(59)-numexplod)%8+8)-5
trigger2=numexplod((var(59)-numexplod+1)%8)
trigger2=var((var(59)-numexplod+1)%8+8)%1000>70
trigger2=0&&var((var(59)-numexplod+1)%8+8):=var((var(59)-numexplod+1)%8+8)-5
trigger3=numexplod((var(59)-numexplod+2)%8)
trigger3=var((var(59)-numexplod+2)%8+8)%1000>80
trigger3=0&&var((var(59)-numexplod+2)%8+8):=var((var(59)-numexplod+2)%8+8)-5
trigger4=numexplod((var(59)-numexplod+3)%8)
trigger4=var((var(59)-numexplod+3)%8+8)%1000>90
trigger4=0&&var((var(59)-numexplod+3)%8+8):=var((var(59)-numexplod+3)%8+8)-5
trigger5=numexplod((var(59)-numexplod+4)%8)
trigger5=var((var(59)-numexplod+4)%8+8)%1000>100
trigger5=0&&var((var(59)-numexplod+4)%8+8):=var((var(59)-numexplod+4)%8+8)-5
trigger6=numexplod((var(59)-numexplod+5)%8)
trigger6=var((var(59)-numexplod+5)%8+8)%1000>110
trigger6=0&&var((var(59)-numexplod+5)%8+8):=var((var(59)-numexplod+5)%8+8)-5
trigger7=numexplod((var(59)-numexplod+6)%8)
trigger7=var((var(59)-numexplod+6)%8+8)%1000>120
trigger7=0&&var((var(59)-numexplod+6)%8+8):=var((var(59)-numexplod+6)%8+8)-5
trigger8=numexplod((var(59)-numexplod+7)%8)
trigger8=var((var(59)-numexplod+7)%8+8)%1000>130
trigger8=0&&var((var(59)-numexplod+7)%8+8):=var((var(59)-numexplod+7)%8+8)-5

[state striker msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16000
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=root,var(33)=-2
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+199*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state striker reset]
type=parentvarset
var(33)=-1
trigger1=root,var(33)=-2

[state counter msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16001
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/10)%10=4
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+192*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state counter reset]
type=parentvarset
var(34)=root,var(34)-20
trigger1=(root,var(34)/10)%10=4

[state recovery msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16003
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/100)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+210*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state recovery reset]
type=parentvarset
var(34)=root,var(34)-100
trigger1=(root,var(34)/100)%10=1

[state ex-shield msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16004
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/1000)%10=2
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+209*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state ex-shield reset]
type=parentvarset
var(34)=root,var(34)-2000
trigger1=(root,var(34)/1000)%10=2

[state shield msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16005
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/1000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+235*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state shield reset]
type=parentvarset
var(34)=root,var(34)-1000
trigger1=(root,var(34)/1000)%10=1

[state parry msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16006
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/10000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+235*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state parry reset]
type=parentvarset
var(34)=root,var(34)-10000
trigger1=(root,var(34)/10000)%10=1

[state jd msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16007
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/1000000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+168*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state jd reset]
type=parentvarset
var(34)=root,var(34)-1000000
trigger1=(root,var(34)/1000000)%10=1

[state gc msg]
type=explod
postype=left
pos=var(7+var(59)%8)/1000,var(7+var(59)%8)%1000
anim=16002
id=(var(59)-1)%8
removetime=100
scale=.5,.5
ontop=1
supermovetime=99999999
pausemovetime=99999999
triggerall=numexplod<8
trigger1=(root,var(34)/100000)%10=1
trigger1=1||var(var(59)%8):=time
trigger1=1||var(8+var(59)%8):=(20+176*(teamside=2))*1000+220+20*numexplod
trigger1=var(59):=var(59)+1

[state gc reset]
type=parentvarset
var(34)=root,var(34)-100000
trigger1=(root,var(34)/100000)%10=1

[state explod1 fadein]
type=modifyexplod
postype=left
pos=var(8)/1000,var(8)%1000
trans=addalpha
alpha=ifelse(time-var(0)<=14,8*(time-var(0)+1),256),ifelse(time-var(0)<=16,256,(32-time+var(0))*8)
id=0
triggerall=numexplod(0)
trigger1=time-var(0)<=32

[state explod1 stop]
type=modifyexplod
postype=left
pos=var(8)/1000,var(8)%1000
trans=none
id=0
triggerall=numexplod(0)
trigger1=time-var(0)=[33,84]

[state explod1 fadeout]
type=modifyexplod
postype=left
pos=var(8)/1000-5*(time-var(0)-85)*ifelse(teamside=2,-1,1),var(8)%1000
trans=addalpha
alpha=ifelse(time-var(0)>=92,32*(99-time+var(0)),256),ifelse(time-var(0)<=90,32*(time-var(0)-84),256)
id=0
triggerall=numexplod(0)
trigger1=time-var(0)>=85

[state explod2 fadein]
type=modifyexplod
postype=left
pos=var(9)/1000,var(9)%1000
trans=addalpha
alpha=ifelse(time-var(1)<=14,8*(time-var(1)+1),256),ifelse(time-var(1)<=16,256,(32-time+var(1))*8)
id=1
triggerall=numexplod(1)
trigger1=time-var(1)<=32

[state explod2 stop]
type=modifyexplod
postype=left
pos=var(9)/1000,var(9)%1000
trans=none
id=1
triggerall=numexplod(1)
trigger1=time-var(1)=[33,84]

[state explod2 fadeout]
type=modifyexplod
postype=left
pos=var(9)/1000-5*(time-var(1)-85)*ifelse(teamside=2,-1,1),var(9)%1000
trans=addalpha
alpha=ifelse(time-var(1)>=92,32*(99-time+var(1)),256),ifelse(time-var(1)<=90,32*(time-var(1)-84),256)
id=1
triggerall=numexplod(1)
trigger1=time-var(1)>=85

[state explod3 fadein]
type=modifyexplod
postype=left
pos=var(10)/1000,var(10)%1000
trans=addalpha
alpha=ifelse(time-var(2)<=14,8*(time-var(2)+1),256),ifelse(time-var(2)<=16,256,(32-time+var(2))*8)
id=2
triggerall=numexplod(2)
trigger1=time-var(2)<=32

[state explod3 stop]
type=modifyexplod
postype=left
pos=var(10)/1000,var(10)%1000
trans=none
id=2
triggerall=numexplod(2)
trigger1=time-var(2)=[33,84]

[state explod3 fadeout]
type=modifyexplod
postype=left
pos=var(10)/1000-5*(time-var(2)-85)*ifelse(teamside=2,-1,1),var(10)%1000
trans=addalpha
alpha=ifelse(time-var(2)>=92,32*(99-time+var(2)),256),ifelse(time-var(2)<=90,32*(time-var(2)-84),256)
id=2
triggerall=numexplod(2)
trigger1=time-var(2)>=85

[state explod4 fadein]
type=modifyexplod
postype=left
pos=var(11)/1000,var(11)%1000
trans=addalpha
alpha=ifelse(time-var(3)<=14,8*(time-var(3)+1),256),ifelse(time-var(3)<=16,256,(32-time+var(3))*8)
id=3
triggerall=numexplod(3)
trigger1=time-var(3)<=32

[state explod4 stop]
type=modifyexplod
postype=left
pos=var(11)/1000,var(11)%1000
trans=none
id=3
triggerall=numexplod(3)
trigger1=time-var(3)=[33,84]

[state explod4 fadeout]
type=modifyexplod
postype=left
pos=var(11)/1000-5*(time-var(3)-85)*ifelse(teamside=2,-1,1),var(11)%1000
trans=addalpha
alpha=ifelse(time-var(3)>=92,32*(99-time+var(3)),256),ifelse(time-var(3)<=90,32*(time-var(3)-84),256)
id=3
triggerall=numexplod(3)
trigger1=time-var(3)>=85

[state explod5 fadein]
type=modifyexplod
postype=left
pos=var(12)/1000,var(12)%1000
trans=addalpha
alpha=ifelse(time-var(4)<=14,8*(time-var(4)+1),256),ifelse(time-var(4)<=16,256,(32-time+var(4))*8)
id=4
triggerall=numexplod(4)
trigger1=time-var(4)<=32

[state explod5 stop]
type=modifyexplod
postype=left
pos=var(12)/1000,var(12)%1000
trans=none
id=4
triggerall=numexplod(4)
trigger1=time-var(4)=[33,84]

[state explod5 fadeout]
type=modifyexplod
postype=left
pos=var(12)/1000-5*(time-var(4)-85)*ifelse(teamside=2,-1,1),var(12)%1000
trans=addalpha
alpha=ifelse(time-var(4)>=92,32*(99-time+var(4)),256),ifelse(time-var(4)<=90,32*(time-var(4)-84),256)
id=4
triggerall=numexplod(4)
trigger1=time-var(4)>=85

[state explod6 fadein]
type=modifyexplod
postype=left
pos=var(13)/1000,var(13)%1000
trans=addalpha
alpha=ifelse(time-var(5)<=14,8*(time-var(5)+1),256),ifelse(time-var(5)<=16,256,(32-time+var(5))*8)
id=5
triggerall=numexplod(5)
trigger1=time-var(5)<=32

[state explod6 stop]
type=modifyexplod
postype=left
pos=var(13)/1000,var(13)%1000
trans=none
id=5
triggerall=numexplod(5)
trigger1=time-var(5)=[33,84]

[state explod6 fadeout]
type=modifyexplod
postype=left
pos=var(13)/1000-5*(time-var(5)-85)*ifelse(teamside=2,-1,1),var(13)%1000
trans=addalpha
alpha=ifelse(time-var(5)>=92,32*(99-time+var(5)),256),ifelse(time-var(5)<=90,32*(time-var(5)-84),256)
id=5
triggerall=numexplod(5)
trigger1=time-var(5)>=85

[state explod7 fadein]
type=modifyexplod
postype=left
pos=var(14)/1000,var(14)%1000
trans=addalpha
alpha=ifelse(time-var(6)<=14,8*(time-var(6)+1),256),ifelse(time-var(6)<=16,256,(32-time+var(6))*8)
id=6
triggerall=numexplod(6)
trigger1=time-var(6)<=32

[state explod7 stop]
type=modifyexplod
postype=left
pos=var(14)/1000,var(14)%1000
trans=none
id=6
triggerall=numexplod(6)
trigger1=time-var(6)=[33,84]

[state explod7 fadeout]
type=modifyexplod
postype=left
pos=var(14)/1000-5*(time-var(6)-85)*ifelse(teamside=2,-1,1),var(14)%1000
trans=addalpha
alpha=ifelse(time-var(6)>=92,32*(99-time+var(6)),256),ifelse(time-var(6)<=90,32*(time-var(6)-84),256)
id=6
triggerall=numexplod(6)
trigger1=time-var(6)>=85

[state explod8 fadein]
type=modifyexplod
postype=left
pos=var(15)/1000,var(15)%1000
trans=addalpha
alpha=ifelse(time-var(7)<=14,8*(time-var(7)+1),256),ifelse(time-var(7)<=16,256,(32-time+var(7))*8)
id=7
triggerall=numexplod(7)
trigger1=time-var(7)<=32

[state explod8 stop]
type=modifyexplod
postype=left
pos=var(15)/1000,var(15)%1000
trans=none
id=7
triggerall=numexplod(7)
trigger1=time-var(7)=[33,84]

[state explod8 fadeout]
type=modifyexplod
postype=left
pos=var(15)/1000-5*(time-var(7)-85)*ifelse(teamside=2,-1,1),var(15)%1000
trans=addalpha
alpha=ifelse(time-var(7)>=92,32*(99-time+var(7)),256),ifelse(time-var(7)<=90,32*(time-var(7)-84),256)
id=7
triggerall=numexplod(7)
trigger1=time-var(7)>=85

[state destroy]
type=destroyself
trigger1=!numexplod

[statedef 850]
type=u
movetype=i
physics=u
anim=ifelse(statetype=a,852,850+(statetype=c))
facep2=1
ctrl=0
sprpriority=2

[state type]
type=statetypeset
physics=s
trigger1=!time
trigger1=statetype=s

[state type]
type=statetypeset
physics=c
trigger1=!time
trigger1=statetype=c

[state type]
type=statetypeset
physics=a
trigger1=!time
trigger1=statetype=a

[state shield_helper]
type=helper
name="shield"
id=855
stateno=855
ownpal=1
trigger1=!time

[state shield_helper]
type=helper
name="shield_proj"
id=856
stateno=856
ownpal=1
trigger1=!time

[state shield sound]
type=playsnd
value=s820,0
trigger1=!time

[state ghost]
type=explod
anim=anim
id=850
removetime=16
sprpriority=3
ownpal=1
trigger1=!time

[state ghost alpha]
type=modifyexplod
id=850
postype=p1
pos=random%9-4,random%9-4
trans=addalpha
alpha=floor(256*cos(.1*time)),256
trigger1=time<=16
trigger1=numexplod(850)

[state shield_explod]
type=explod
id=855
anim=860*10**(random%4)
pos=24-4*(anim=851),ifelse(anim=850,-52,ifelse(anim=851,-32,-60))
sprpriority=3
ownpal=1
bindtime=-1
removetime=-1
scale=.5,.5
trigger1=!time

[state shield remove]
type=removeexplod
id=855
triggerall=numexplod(855)
trigger1=numhelper(855)
trigger1=helper(855),stateno!=855
trigger2=numhelper(856)
trigger2=helper(856),stateno!=856
trigger3=time>=8
trigger3=command!="hold_a"||power<=0

[state power]
type=poweradd
value=-8-(time%3=0)
trigger1=time>=8
trigger1=numhelper(855)
trigger1=numhelper(856)
trigger1=helper(855),stateno=855
trigger1=helper(856),stateno=856

[state end]
type=changestate
value=854
trigger1=time>=128||(time>=8&&(command!="hold_a"||power<=0))

[state success]
type=changestate
value=851
triggerall=numhelper(855)
triggerall=numhelper(856)
trigger1=helper(855),stateno!=855
trigger2=helper(856),stateno!=856

[statedef 851]
type=u
movetype=i
physics=n
anim=anim+3
ctrl=0

[state ex explod]
type=explod
id=858
anim=99999
removetime=24
triggerall=!time
trigger1=numhelper(855)
trigger1=!helper(855),var(1)
trigger2=numhelper(856)
trigger2=!helper(856),var(1)

[state shield spark]
type=explod
id=856
anim=(861+numexplod(858))*10**(random%4)
pos=24-4*(anim=854),ifelse(anim=853,-52,ifelse(anim=854,-32,-60))
sprpriority=3
ownpal=1
bindtime=-1
pausemovetime=88888888
supermovetime=88888888
triggerall=!time
trigger1=numhelper(855)
trigger1=helper(855),stateno!=855
trigger2=numhelper(856)
trigger2=helper(856),stateno!=856

[state pause]
type=pause
time=12
movetime=12
trigger1=!time

[state invul]
type=hitby
value=
trigger1=time<=12

[state freeze]
type=posfreeze
value=1
trigger1=time<=12

[state type]
type=statetypeset
statetype=a
movetype=i
physics=a
trigger1=time=12
trigger1=statetype=a

[state end]
type=changestate
value=50*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>=24

[statedef 852]
type=u
movetype=i
physics=n
ctrl=0

[state type]
type=statetypeset
statetype=c
movetype=i
physics=n
triggerall=!time
triggerall=statetype=s
trigger1=numhelper(855)
trigger1=helper(855),var(1)=1
trigger2=numhelper(856)
trigger2=helper(856),var(1)=1

[state anim]
type=changeanim
value=ifelse(statetype=a,855,853+(statetype=c))
trigger1=!time

[state parry spark]
type=explod
id=856
anim=862*10**(random%4)
pos=12-4*(statetype=c),ifelse(statetype=s,-52,ifelse(statetype=c,-32,-60))
sprpriority=3
ownpal=1
bindtime=-1
pausemovetime=88888888
supermovetime=88888888
trigger1=!time

[state pause]
type=pause
time=20
movetime=20
trigger1=!time

[state vel_air]
type=velset
x=vel x/2
y=-4
trigger1=time=20
trigger1=statetype=a

[state invul]
type=hitby
value=
trigger1=1

[state push]
type=playerpush
value=0
trigger1=1

[state freeze]
type=posfreeze
value=1
trigger1=1

[state end]
type=changestate
value=50*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>=24

[statedef 854]
type=u
movetype=u
physics=u
anim=anim+3
ctrl=0

[state change]
type=changestate
value=50*(statetype=a)+11*(statetype=c)
ctrl=1
trigger1=time>=24

[statedef 855]
type=a
movetype=h
ctrl=0

[state id/low parry/shield]
type=null
trigger1=!time
trigger1=0&&var(0):=855
trigger2=!time
trigger2=root,var(30)%10=1
trigger2=0&&var(1):=root,command="down"
trigger3=time=8
trigger3=root,var(30)%10=0
trigger3=0&&var(1):=1

[state anim]
type=changeanim
value=ifelse(root,statetype=a,858,856+root,statetype=c)
trigger1=!time
trigger1=root,var(30)%10=0

[state anim]
type=changeanim
value=ifelse(root,command="down",857,856+2*root,statetype=a)
trigger1=!time
trigger1=root,var(30)%10=1

[state anim]
type=changeanim
value=856
trigger1=root,var(30)%10=1
trigger1=anim=858
trigger1=root,statetype!=a

[state invul]
type=hitby
value=
trigger1=1

[state bind]
type=bindtoroot
facing=1
trigger1=1

[state attack reversal]
type=reversaldef
reversal.attr=SCA,AA
hitflag=mafdp
sparkno=-1
numhits=0
pausetime=0,0;12+8*(root,var(30)%10=1)
p1stateno=858
trigger1=!time
trigger1=anim=856

[state attack reversal]
type=reversaldef
reversal.attr=SC,AA
hitflag=mafdp
sparkno=-1
numhits=0
pausetime=0,0;12+8*(root,var(30)%10=1)
p1stateno=858
trigger1=!time
trigger1=anim=857

[state attack reversal]
type=reversaldef
reversal.attr=SA,AA
hitflag=mafdp
sparkno=-1
numhits=0
pausetime=0,0;12+8*(root,var(30)%10=1)
p1stateno=858
trigger1=!time
trigger1=anim=858

[state disable]
type=changeanim
value=99999
triggerall=root,var(30)%10=1
trigger1=time=4
trigger1=ifelse(anim!=857,root,command="holdfwd",root,command="holddown")
trigger2=time=8
trigger3=!root,ctrl
trigger4=root,command="holdback"
trigger5=root,command="holdup"
trigger6=ifelse(anim!=857,root,command="holddown",root,command="holdfwd")
trigger7=time
trigger7=root,command="downfwd"||ifelse(anim!=857,root,command="fwd",root,command="down")

[state destroy]
type=destroyself
triggerall=!(root,var(30)%10)
trigger1=root,command!="hold_a"
trigger1=time>7
trigger2=time>=127
trigger3=root,stateno!=850

[state destroy]
type=destroyself
triggerall=root,var(30)%10=1
trigger1=time>=27
trigger2=root,stateno=852

[statedef 856]
type=a
movetype=h
ctrl=0

[state id/low parry/shield]
type=null
trigger1=!time
trigger1=0&&var(0):=856
trigger2=!time
trigger2=root,var(30)%10=1
trigger2=0&&var(1):=root,command="down"
trigger3=time=8
trigger3=root,var(30)%10=0
trigger3=0&&var(1):=1

[state anim]
type=changeanim
value=ifelse(root,statetype=a,858,856+root,statetype=c)
trigger1=!time
trigger1=root,var(30)%10=0

[state anim]
type=changeanim
value=ifelse(root,command="down",857,856+2*root,statetype=a)
trigger1=!time
trigger1=root,var(30)%10=1

[state anim]
type=changeanim
value=856
trigger1=root,var(30)%10=1
trigger1=anim=858
trigger1=root,statetype!=a

[state bind]
type=bindtoroot
facing=1
trigger1=1

[state invul]
type=hitby
value=
trigger1=1

[state proj reversal]
type=reversaldef
reversal.attr=SCA,AP
hitflag=mafdp
sparkno=-1
id=856
numhits=0
pausetime=0,2;12+8*(root,var(30)%10=1)
p1stateno=858
priority=7,hit
trigger1=!time
trigger1=anim=856

[state proj reversal]
type=reversaldef
reversal.attr=SC,AP
hitflag=mafdp
sparkno=-1
id=856
numhits=0
pausetime=0,2;12+8*(root,var(30)%10=1)
p1stateno=858
priority=7,hit
trigger1=!time
trigger1=anim=857

[state proj reversal]
type=reversaldef
reversal.attr=SA,AP
hitflag=mafdp
sparkno=-1
id=856
numhits=0
pausetime=0,2;12+8*(root,var(30)%10=1)
p1stateno=858
priority=7,hit
trigger1=!time
trigger1=anim=858

[state disable]
type=changeanim
value=99999
triggerall=root,var(30)%10=1
trigger1=time=4
trigger1=ifelse(anim!=857,root,command="holdfwd",root,command="holddown")
trigger2=time=8
trigger3=!root,ctrl
trigger4=root,command="holdback"
trigger5=root,command="holdup"
trigger6=ifelse(anim!=857,root,command="holddown",root,command="holdfwd")
trigger7=time
trigger7=root,command="downfwd"||ifelse(anim!=857,root,command="fwd",root,command="down")

[state destroy]
type=destroyself
triggerall=!(root,var(30)%10)
trigger1=root,command!="hold_a"
trigger1=time>7
trigger2=time>=127
trigger3=root,stateno!=850

[state destroy]
type=destroyself
triggerall=root,var(30)%10=1
trigger1=time>=27
trigger2=root,stateno=852

[statedef 858]
type=a
movetype=a
poweradd=50*(root,var(30)%10=1||!var(1))
anim=859
ctrl=0

[state snd]
type=playsnd
value=s820,ifelse(root,var(30)%10=1,3,2-var(1))
trigger1=!time

[state invul]
type=hitby
value=
trigger1=1

[state negate]
type=hitdef
attr=s,hp
hitflag=mafdp
guard.dist=0
sparkno=-1
numhits=0
chainid=856
priority=7,hit
trigger1=!time
trigger1=var(0)=856
trigger1=target(856),ishelper

[state destroy]
type=destroyself
trigger1=time

[statedef 19000]
type=a
movetype=i
physics=n
anim=99999
sprpriority=4000

[state config]
type=null
triggerall=!time
trigger1=0&&var(59):=156        ; pause time (also specifies when the portrait and winquote appear)
trigger2=0&&var(58):=4          ; number of winquotes (anims 18062+)
trigger3=0&&var(57):=-16        ; portrait x offset
trigger4=0&&var(56):=16         ; portrait y offset
trigger5=0&&fvar(39):=.5        ; portrait scale
trigger6=0&&var(56):=5          ; D rank (Technique)
trigger7=0&&var(55):=10         ; C rank (Technique)
trigger8=0&&var(54):=20         ; B rank (Technique)
trigger9=0&&var(53):=30         ; A rank (Technique)

[state vars]
type=null
triggerall=!time
trigger1=0&&var(0):=floor((root,var(32)%1000)*1./roundno/20)
trigger2=var(0)=5
trigger2=0&&var(0):=4
trigger3=0&&var(1):=floor((root,var(32)%1000000)*1./1000/roundno/20)
trigger4=var(1)=5
trigger4=0&&var(1):=4
trigger5=0&&var(2):=floor((root,var(32)%1000000000)*1./1000000)
trigger6=var(2)<6
trigger6=0&&var(2):=0
trigger7=var(2)=[var(56),var(55))
trigger7=var(2):=1
trigger8=var(2)=[var(55),var(54))
trigger8=var(2):=2
trigger9=var(2)=[var(54),var(53))
trigger9=var(2):=3
trigger10=var(2)>=var(53)
trigger10=var(2):=4

[state dtc]
type=displaytoclipboard
text="%d %d %d"
params=var(0),var(1),var(2)
trigger1=1

[state pos]
type=posadd
x=260-screenpos x
y=90-screenpos y
trigger1=1

[state assert]
type=assertspecial
flag=noshadow
flag2=roundnotover
flag3=nomusic
trigger1=1

[state assert]
type=assertspecial
flag=nobardisplay
flag2=nofg
trigger1=1

[state bgm1]
type=playsnd
value=18000,0
abspan=0
trigger1=!time

[state bgm2]
type=playsnd
value=18000,1
abspan=0
loop=1
trigger1=time=146

[state anim]
type=changeanim
value=19024
trigger1=time=28

[state rotate]
type=angledraw
value=(time%5760)/16.
scale=.5+(44-time)*.1,.5+(44-time)*.1
trigger1=time=[28,43]

[state rotate]
type=angledraw
value=(time%5760)/16.
scale=.5,.5
trigger1=time>43

[state pal]
type=palfx
time=-1
add=-80,-80,-80
sinadd=60,60,60,60
trigger1=time=28

[state trans]
type=trans
trans=sub
trigger1=time>27

[state title alpha]
type=explod
id=19011
anim=19011
supermovetime=44444444
pausemovetime=44444444
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=0,256
trigger1=time=20

[state title alpha ctrl]
type=modifyexplod
id=19011
postype=left
pos=ceil((time-56)/2.),16
trans=addalpha
alpha=16*(time-23),256
trigger1=time=[24,39]

[state title alpha ctrl]
type=modifyexplod
id=19011
postype=left
pos=ceil((time-56)/2.),16
trans=add
trigger1=time=[40,55]

[state title alpha ctrl]
type=modifyexplod
postype=left
pos=0,16
id=19011
trans=add
trigger1=time>55

[state title]
type=explod
id=19010
anim=19010
supermovetime=44444444
pausemovetime=44444444
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=0,256
trigger1=time=20

[state title ctrl]
type=modifyexplod
postype=left
pos=ceil((time-56)/2.),16
id=19010
trans=sub
trigger1=time=[24,39]

[state title ctrl]
type=modifyexplod
postype=left
pos=ceil((time-56)/2.),16
id=19010
trans=sub
trigger1=time=[40,55]

[state title ctrl]
type=modifyexplod
postype=left
pos=0,16
id=19010
trans=sub
trigger1=time>55

[state flames]
type=explod
postype=left
pos=-144,-8
anim=19000
id=19000
supermovetime=44444444
pausemovetime=44444444
scale=.5,.5
ontop=1
ownpal=1
trans=add
trigger1=time=20

[state flames ctrl]
type=modifyexplod
id=19000
postype=left
pos=-144,-8
trigger1=time>20

[state flames snd]
type=playsnd
value=18000,2
abspan=-160
trigger1=time=20

[state bars alpha]
type=explod
postype=left
pos=316,20
scale=.0625,.5
anim=19026
id=19026
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state bars alpha ctrl]
type=modifyexplod
id=19026
postype=left
pos=316,20
scale=.0625*(time-43),.5
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state bars alpha ctrl]
type=modifyexplod
id=19026
postype=left
pos=316,20
scale=.5,.5
trans=add
trigger1=time>51

[state bars]
type=explod
postype=left
pos=316,20
scale=.0625,.5
anim=19020
id=19020
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state bars ctrl]
type=modifyexplod
id=19020
postype=left
pos=316,20
scale=.0625*(time-43),.5
trans=sub
trigger1=time=[45,51]

[state bars ctrl]
type=modifyexplod
id=19020
postype=left
pos=316,20
scale=.5,.5
trans=sub
trigger1=time>51

[state bars snd]
type=playsnd
value=18000,3
abspan=120
trigger1=time=54

[state win alpha]
type=explod
postype=left
pos=188,29
anim=19031
id=19031
scale=.0625,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state win alpha ctrl]
type=modifyexplod
id=19031
postype=left
pos=188,29
scale=.0625*(time-43),.5
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state win alpha ctrl]
type=modifyexplod
id=19031
postype=left
pos=188,29
scale=.5,.5
trans=add
trigger1=time>51

[state win]
type=explod
postype=left
pos=188,29
anim=19030
id=19030
scale=.0625,.5
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state win ctrl]
type=modifyexplod
id=19030
postype=left
pos=188,29
scale=.0625*(time-43),.5
trans=sub
trigger1=time=[45,51]

[state win ctrl]
type=modifyexplod
id=19030
postype=left
pos=188,29
scale=.5,.5
trans=sub
trigger1=time>51

[state stats alpha]
type=explod
postype=left
pos=184,72
anim=19025
id=19025
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state stats alpha ctrl]
type=modifyexplod
id=19025
postype=left
pos=184,72
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state stats alpha ctrl]
type=modifyexplod
id=19025
postype=left
pos=184,72
trans=add
trigger1=time>51

[state stats]
type=explod
postype=left
pos=184,72
anim=19021
id=19021
scale=.5,.5
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state stats ctrl]
type=modifyexplod
id=19021
postype=left
pos=184,72
trans=sub
trigger1=time=[45,51]

[state stats ctrl]
type=modifyexplod
id=19021
postype=left
pos=184,72
trans=sub
trigger1=time>51

[state spot1]
type=explod
id=19023
anim=19023
postype=left
pos=204,31
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state spot1 ctrl]
type=modifyexplod
id=19023
postype=left
pos=204,31
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state spot1 ctrl]
type=modifyexplod
id=19023
postype=left
pos=204,31
trans=add
trigger1=time>51

[state spot2]
type=explod
id=19024
anim=19023
postype=left
pos=188,64
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state spot2 ctrl]
type=modifyexplod
id=19024
postype=left
pos=188,64
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state spot2 ctrl]
type=modifyexplod
id=19024
postype=left
pos=188,64
trans=add
trigger1=time>51

[state caption alpha]
type=explod
id=19027
anim=19027
postype=left
pos=193,28
scale=.5,.5
ontop=1
ownpal=1
trans=addalpha
alpha=32,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state caption alpha ctrl]
type=modifyexplod
id=19027
postype=left
pos=193,28
trans=addalpha
alpha=32*(time-43),256
trigger1=time=[45,51]

[state caption alpha ctrl]
type=modifyexplod
id=19027
postype=left
pos=193,28
trans=add
trigger1=time>51

[state caption]
type=explod
id=19022
anim=19022
postype=left
pos=193,28
scale=.5,.5
ontop=1
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state caption ctrl]
type=modifyexplod
id=19022
postype=left
pos=193,28
trans=sub
trigger1=time=[45,51]

[state caption ctrl]
type=modifyexplod
id=19022
postype=left
pos=193,28
trans=sub
trigger1=time>51

[state Ograde alpha]
type=explod
id=19051
anim=19059-var(0)
postype=left
pos=240,86
ontop=1
scale=.0455,.5
ownpal=1
trans=addalpha
alpha=23,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Ograde alpha ctrl]
type=modifyexplod
id=19051
postype=left
pos=240,86
scale=.0455*(time-43),.5
trans=addalpha
alpha=ceil(23.27*(time-43)),256
trigger1=time=[45,53]

[state Ograde alpha ctrl]
type=modifyexplod
id=19051
postype=left
pos=240,86
scale=.5,.5
trans=add
trigger1=time>53

[state Ograde]
type=explod
id=19050
anim=19054-var(0)
postype=left
pos=240,86
ontop=1
scale=.0455,.5
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Ograde ctrl]
type=modifyexplod
id=19050
postype=left
pos=240,86
scale=.0455*(time-43),.5
trans=sub
trigger1=time=[45,53]

[state Ograde ctrl]
type=modifyexplod
id=19050
postype=left
pos=240,86
scale=.5,.5
trans=sub
trigger1=time>53

[state Dgrade alpha]
type=explod
id=19053
anim=19059-var(1)
postype=left
pos=233,102
ontop=1
scale=.0455,.5
ownpal=1
trans=addalpha
alpha=23,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Dgrade alpha ctrl]
type=modifyexplod
id=19053
postype=left
pos=233,102
scale=.0455*(time-43),.5
trans=addalpha
alpha=ceil(23.27*(time-43)),256
trigger1=time=[45,53]

[state Dgrade alpha ctrl]
type=modifyexplod
id=19053
postype=left
pos=233,102
scale=.5,.5
trans=add
trigger1=time>53

[state Dgrade]
type=explod
id=19052
anim=19054-var(1)
postype=left
pos=233,102
ontop=1
scale=.0455,.5
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Dgrade ctrl]
type=modifyexplod
id=19052
postype=left
pos=233,102
scale=.0455*(time-43),.5
trans=sub
trigger1=time=[45,53]

[state Dgrade ctrl]
type=modifyexplod
id=19052
postype=left
pos=233,102
scale=.5,.5
trans=sub
trigger1=time>53

[state Tgrade alpha]
type=explod
id=19055
anim=19059-var(2)
postype=left
pos=226,118
ontop=1
scale=.0455,.5
ownpal=1
trans=addalpha
alpha=23,256
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Tgrade alpha ctrl]
type=modifyexplod
id=19055
postype=left
pos=226,118
scale=.0455*(time-43),.5
trans=addalpha
alpha=ceil(23.27*(time-43)),256
trigger1=time=[45,53]

[state Tgrade alpha ctrl]
type=modifyexplod
id=19055
postype=left
pos=226,118
scale=.5,.5
trans=add
trigger1=time>53

[state Tgrade]
type=explod
id=19054
anim=19054-var(2)
postype=left
pos=226,118
ontop=1
scale=.0455,.5
ownpal=1
trans=sub
supermovetime=44444444
pausemovetime=44444444
trigger1=time=44

[state Tgrade ctrl]
type=modifyexplod
id=19054
postype=left
pos=226,118
scale=.0455*(time-43),.5
trans=sub
trigger1=time=[45,53]

[state Tgrade ctrl]
type=modifyexplod
id=19054
postype=left
pos=226,118
scale=.5,.5
trans=sub
trigger1=time>53

[state window alpha]
type=explod
id=19061
anim=19061
postype=right
pos=-6,192
ontop=1
ownpal=1
supermovetime=44444444
pausemovetime=44444444
scale=.03125,.5
trans=addalpha
alpha=16,256
trigger1=time=var(59)-16

[state window alpha ctrl]
type=modifyexplod
id=19061
postype=right
pos=-6,192
scale=.03125*(time-var(59)+17),.5
trans=addalpha
alpha=16*(time-var(59)+17),256
trigger1=time=[var(59)-15,var(59)-1]

[state window alpha ctrl]
type=modifyexplod
id=19061
postype=right
pos=-6,192
scale=.5,.5
trans=add
trigger1=time>var(59)-1

[state window]
type=explod
id=19060
anim=19060
postype=right
pos=-6,192
ontop=1
ownpal=1
supermovetime=44444444
pausemovetime=44444444
scale=.03125,.5
trans=sub
trigger1=time=var(59)-16

[state window ctrl]
type=modifyexplod
id=19060
postype=right
pos=-6,192
scale=.03125*(time-var(59)+17),.5
trans=sub
trigger1=time=[var(59)-15,var(59)-1]

[state window ctrl]
type=modifyexplod
id=19060
postype=right
pos=-6,192
scale=.5,.5
trans=sub
trigger1=time>var(59)-1

[state msg]
type=explod
id=19062
anim=19062+random%var(58)
postype=left
pos=4,192
ontop=1
supermovetime=44444444
pausemovetime=44444444
ownpal=1
scale=.03125,.5
trans=addalpha
alpha=16,240
trigger1=time=var(59)-16

[state msg ctrl]
type=modifyexplod
id=19062
postype=left
pos=4,192
scale=.03125*(time-var(59)+17),.5
trans=addalpha
alpha=16*(time-var(59)+17),256-(time-var(59)+17)*16
trigger1=time=[var(59)-15,var(59)-1]

[state msg ctrl]
type=modifyexplod
id=19062
postype=left
pos=4,192
scale=.5,.5
trans=none
trigger1=time>var(59)-1

[state portrait]
type=explod
id=19040
anim=19040
postype=left
pos=var(57),var(56)
ownpal=1
sprpriority=3999
supermovetime=44444444
pausemovetime=44444444
scale=fvar(39),fvar(39)
trans=addalpha
alpha=16,240
trigger1=time=var(59)-16

[state portrait ctrl]
type=modifyexplod
id=19040
postype=left
pos=var(57),var(56)
trans=addalpha
alpha=16*(time-var(59)+17),256-(time-var(59)+17)*16
trigger1=time=[var(59)-16,var(59)-1]

[state portrait ctrl]
type=modifyexplod
id=19040
postype=left
pos=var(57),var(56)
trans=none
trigger1=time>var(59)-1

[state darken]
type=explod
id=19041
anim=19041
postype=left
pos=0,0
sprpriority=3998
supermovetime=44444444
pausemovetime=44444444
scale=320,240
trans=addalpha
alpha=0,248
trigger1=time=var(59)-16

[state darken ctrl]
type=modifyexplod
id=19041
postype=left
pos=0,0
trans=addalpha
alpha=0,256-(time-var(59)+17)*8
trigger1=time=[var(59)-15,var(59)-1]

[state darken ctrl]
type=modifyexplod
id=19041
postype=left
pos=0,0
trans=add1
trigger1=time>var(59)-1

[state msg snd]
type=playsnd
value=18000,5
abspan=0
trigger1=time=var(59)

[state pause]
type=pause
time=44444444
movetime=44444444
pausebg=1
trigger1=time=var(59)

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

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

[State -2, Striker Bars]
type = Helper
trigger1 = roundstate=2
trigger1 = numhelper(10900)=0
trigger1 = var(33)!=4444
id = 10900
name = "strikerbars"
stateno = 10900
ownpal = 1
postype = left
pos = 160
ignorehitpause = 1

[state @_@]
type=helper
id=17000
stateno=17000
name="defense select"
ownpal=1
pausemovetime=99999999
supermovetime=99999999
trigger1=!numhelper(17000)
trigger1=!roundsexisted
trigger1=roundstate<1

[state shield remove]
type=removeexplod
id=855
triggerall=numexplod(855)
trigger1=stateno!=850

[state shield remove]
type=removeexplod
id=850
triggerall=numexplod(850)
trigger1=stateno!=850

[state shield remove]
type=removeexplod
id=858
triggerall=numexplod(858)
trigger1=stateno!=[851,852]

[state parry]
type=helper
name="parry1"
id=855
stateno=855
ownpal=1
triggerall=roundstate=[2,3]
triggerall=var(30)%10=1
triggerall=statetype!=l
triggerall=!numhelper(855)
trigger1=ifelse(statetype=a,command="fwd",command="fwd"^^command="down")
trigger1=command!="rls_dir"
ignorehitpause=1

[state parry]
type=helper
name="parry2"
id=856
stateno=856
ownpal=1
triggerall=roundstate=[2,3]
triggerall=var(30)%10=1
triggerall=statetype!=l
triggerall=!numhelper(856)
trigger1=ifelse(statetype=a,command="fwd",command="fwd"^^command="down")
trigger1=command!="rls_dir"
ignorehitpause=1

[State striker var]
type=null
triggerall=var(33)!=4444
trigger1=var(33)>=1
trigger1=0&&var(33):=var(33)-1
trigger2=var(33)<-1
trigger2=0&&var(33):=-1

[state jd]
type=null
triggerall=var(30)%10=2
triggerall=roundstate=[2,3]
trigger1=stateno=[150,154]
trigger1=stateno%2=0
trigger1=!time
trigger1=(var(31)/10)%10=0
trigger1=var(31)%10>1
trigger1=0&&var(31):=10
trigger2=var(31)%10>0
trigger2=0&&var(31):=var(31)-1
trigger3=var(31)%10=[0,1]
trigger3=ctrl||stateno=[150,155]
trigger3=ifelse(statetype=a,command="back",command="downback"||command="back")
trigger3=0&&var(31):=(var(31)/10)*10+4
trigger4=var(31)%10<0
trigger4=0&&var(31):=var(31)+1
trigger5=var(31)%10>1
trigger5=command!="holdback"
trigger5=0&&var(31):=1-var(31)%10
trigger6=(var(31)/10)%10
trigger6=!(stateno=150||stateno=152||stateno=154)
trigger6=0&&var(31):=var(31)-((var(31)/10)%10)*10
ignorehitpause=1

[state jd reset]
type=defencemulset
value=1
triggerall=var(30)%10=2
triggerall=var(31)%10<=1
trigger1=!(stateno=120||stateno=[150,155])
trigger1=(var(31)/10)%10!=1
trigger2=stateno=150||stateno=152||stateno=154
trigger2=(var(31)/10)%10=2
trigger3=var(31)<0

[state message var]
type=null
trigger1=0&&var(34):=var(34)-(var(34)/10-var(34)%10)*10
trigger2=0&&var(34):=(var(34)/10)*10+ifelse(p2movetype=a,1,ifelse(p2movetype=h,2,3))
ignorehitpause=1

[state messages]
type=helper
postype=left
name="messages"
stateno=16000
id=16000
ownpal=1
supermovetime=99999999
pausemovetime=99999999
triggerall=roundstate>=2
trigger1=!(var(33)||numhelper(3501)||numhelper(3601))
trigger1=0&&var(33):=-2
trigger2=(var(34)%100)/10=1
trigger2=var(34)%10=2
trigger2=0&&var(34):=var(34)-((var(34)/10)%10-4)*10
trigger3=(stateno=5201||stateno=5210)
trigger3=time=1
trigger3=0&&var(34):=var(34)-((var(34)/100)%10-1)*100
trigger4=stateno=851
trigger4=time=1
trigger4=0&&var(34):=var(34)-((var(34)/1000)%10-(1+numexplod(858)))*1000
trigger5=stateno=852
trigger5=time=1
trigger5=0&&var(34):=var(34)-((var(34)/10000)%10-1)*10000
trigger6=prevstateno=[150,154]
trigger6=prevstateno%2=0
trigger6=movetype=a
trigger6=time=1
trigger6=0&&var(34):=var(34)-((var(34)/100000)%10-1)*100000
trigger7=var(31)=10
trigger7=0&&var(34):=var(34)-((var(34)/1000000)%10-1)*1000000
trigger8=!numhelper(16000)
trigger8=var(33)=-2||(var(34)/10)%10=4||(var(34)/100)%10=1||(var(34)/1000)%10||(var(34)/10000)%10||(var(34)/100000)%10||(var(34)/1000000)%10
ignorehitpause=1

[state dtc]
type=displaytoclipboard
text="%d %d"
params=var(31),life
trigger1=1
ignorehitpause=1

[State -2]
type=varset
trigger1= numenemy
fvar(12)= enemynear,gethitvar(hitcount)
ignorehitpause=1

[State -2]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
trigger2= !numenemy
fvar(12)=1

[State -2]
type=varset
trigger1=1
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, .9, .8**fvar(12)))
ignorehitpause=1

[State -2]
type=varset
trigger1=1
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, 1, .9**fvar(12)))
ignorehitpause=1
 
[State -2, VarSet]
Type = VarSet
Trigger1 = Time = 0
Trigger1 = StateType != A
V = 10
Value = 3

[State -2]
type = RemoveExplod
trigger1= numexplod(216)
trigger1 = Stateno != 215
ID = 216

[State -2]
type = RemoveExplod
trigger1 = numexplod(211)
trigger1 = Stateno != 210
ID = 211

[State -2]
type = RemoveExplod
trigger1 = numexplod(221)
trigger1 = Stateno != 220
ID = 221

[State -2]
type = RemoveExplod
trigger1 = numexplod(226)
trigger1 = Stateno != 225
ID = 226

[State -2]
type = RemoveExplod
trigger1= numexplod(621)
trigger1 = Stateno != 620
ID = 621

[State -2, VarSet]
type = VarSet
trigger1 = StateType != A || StateNo = 5210
var(18) = 0

[state stats]
type=null
trigger1=roundstate>2
trigger1=!numexplod(4321)
trigger1=0&&var(32):=var(32)+floor(life*100./lifemax)*1000+floor((1-enemy,life*1./enemy,lifemax)*100.)
trigger2=enemy,gethitvar(hitcount)>var(32)/1000000
trigger2=var(32):=var(32)%1000000+enemy,gethitvar(hitcount)*1000000
ignorehitpause=1

[state stats]
type=explod
id=4321
anim=99999
trigger1=roundstate>2
trigger1=!numexplod(4321)
ignorehitpause=1


[state airjump]
type=null
trigger1=statetype=a
trigger1=var(18)>=0
trigger1=command!="holdup"
trigger1=var(18):=-var(18)-1
;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

;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 = 0, 0
