; _________________________________________
;| Kojou Akatsuki              |
; ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
;---------------------------------------------------------------------
[Data]
life = 1000
power = 10000
attack = 200
defence = 120
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 0.322           ;Horizontal scaling factor.
yscale = 0.322           ;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). Recommended 0,0

[Velocity]
walk.fwd  = 7.5      ;Walk forward
walk.back = -7.5     ;Walk backward
run.fwd  = 7.5, 0    ;Run forward (x, y)
run.back = -6.5,0 ;Hop backward (x, y)
jump.neu = 0,-8.4    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 5,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 2.5         ;.
air.gethit.groundrecover = -.15,-3.5  ;Velocity for ground recovery state (x, y) **MUGEN 1.0**
air.gethit.airrecover.mul = .5,.2     ;Multiplier for air recovery velocity (x, y) **MUGEN 1.0**
air.gethit.airrecover.add = 0,-4.5    ;Velocity offset for air recovery (x, y) **MUGEN 1.0**
air.gethit.airrecover.back = -1       ;Extra x-velocity for holding back during air recovery **MUGEN 1.0**
air.gethit.airrecover.fwd = 0         ;Extra x-velocity for holding forward during air recovery **MUGEN 1.0**
air.gethit.airrecover.up = -2         ;Extra y-velocity for holding up during air recovery **MUGEN 1.0**
air.gethit.airrecover.down = 1.5      ;Extra y-velocity for holding down during air recovery **MUGEN 1.0**

[Movement]
airjump.num = 0       ;Number of air jumps allowed (opt)
airjump.height = 35   ;Minimum distance from ground before you can air jump (opt)
yaccel = .44          ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching
stand.friction.threshold = 2          ;If player's speed drops below this threshold while standing, stop his movement **MUGEN 1.0**
crouch.friction.threshold = .05       ;If player's speed drops below this threshold while crouching, stop his movement **MUGEN 1.0**
air.gethit.groundlevel = 25           ;Y-position at which a falling player is considered to hit the ground **MUGEN 1.0**
air.gethit.groundrecover.ground.threshold = -20 ;Y-position below which falling player can use the recovery command **MUGEN 1.0**
air.gethit.groundrecover.groundlevel = 10   ;Y-position at which player in the ground recovery state touches the ground **MUGEN 1.0**
air.gethit.airrecover.threshold = -1  ;Y-velocity above which player may use the air recovery command **MUGEN 1.0**
air.gethit.airrecover.yaccel = .35    ;Vertical acceleration for player in the air recovery state **MUGEN 1.0**
air.gethit.trip.groundlevel = 15      ;Y-position at which player in the tripped state touches the ground **MUGEN 1.0**
down.bounce.offset = 0, 20            ;Offset for player bouncing off the ground (x, y) **MUGEN 1.0**
down.bounce.yaccel = .4               ;Vertical acceleration for player bouncing off the ground **MUGEN 1.0**
down.bounce.groundlevel = 12          ;Y-position at which player bouncing off the ground touches the ground again **MUGEN 1.0**
down.friction.threshold = .05         ;If the player's speed drops below this threshold while lying down, stop his movement **MUGEN 1.0**

;Default language victory quotes (optional).  **MUGEN 1.0**
;If this section is included, the default language victory quotes must be in English.
[Quotes]
victory0 = "Give me a break..."
victory1 = "This is my fight!"
victory2 = "I don't need the abilities of a vampire. I don't even want to have anything to do with that shit. Besides, I am not suitable to serve as an ambassador of justice."
victory3 = "This power, which is inexplicably handed over to me, is far beyond my ability to maneuver. I have no confidence in controlling it."

;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = s170, 0
channel = 0

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

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

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

[State 180, 1]
type = ChangeState
trigger1 = !Time && !Matchover
value = 182

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

[State 181,CAMERA]
type = null;helper
trigger1 = pos x != 0
trigger1 = !time
name = "helper1"
id = 6001
pos = 0,0
postype = p1
stateno = 6001
helpertype = normal
ownpal = 1
keyctrl = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S180,0
channel = 0

[State 181]
type = AssertSpecial
trigger1 = time <= 300
flag = RoundNotOver

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

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

[State 181,CAMERA]
type = null;helper
trigger1 = pos x != 0
trigger1 = !time
name = "helper1"
id = 6001
pos = 0,0
postype = p1
stateno = 6001
helpertype = normal
ownpal = 1
keyctrl = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S180,1
channel = 0

[State 181]
type = AssertSpecial
trigger1 = time <= 300
flag = RoundNotOver

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


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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S190,(random%2)
channel = 0

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Introduction 2
; CNS difficulty: basic
[Statedef 192]
type = S
ctrl = 0
anim = 191
velset = 0,0
sprpriority = -1

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

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

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

[State 181, Yukina]
type = helper
trigger1 = Time = 0
name = "Yukina Intro"
pos = -10,0
postype = p1
stateno = 193
helpertype = normal
ownpal = 1

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------
; Yukina Intro
[Statedef 193]
type = S
movetype= I
physics = N
ctrl = 0
anim = 192
velset = 0,0
sprpriority = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
x = -10
y = -4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 200
value = S193,0
channel = 5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime
;---------------------------------------------------------------------------
; Intro VS Yukina
; CNS difficulty: basic
[Statedef 194]
type = S
ctrl = 0
anim = 193
velset = 0,0

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

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

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

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3410,0
channel = 0

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

;---------------------------------------------------------------------------
; Standing Light Punch
[Statedef 200]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 200
poweradd = 30
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Regulus Aurum Helper 1"
ID =205
stateno =205
pos = 30,-40
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = .5
size.yscale = .5

[State 200, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = ceil(30), 1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = S3402,0
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = -4
air.velocity = -2,-3
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S0,3
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S200,(random%4)
channel = 0
volumescale = 500

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

;---------------------------------------------------------------------------
; Standing Light Punch 2
[Statedef 201]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 201
poweradd = 30
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Thunder 1"
ID =206
stateno =206
pos = 120,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = 1
size.yscale = 1

[State 200, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = ceil(30), 1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = S3402,0
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = -4
air.velocity = -2,-3
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S0,3
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S200,(random%4)
channel = 0
volumescale = 500

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

;---------------------------------------------------------------------------
; Standing Light Punch 3
[Statedef 202]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 202
poweradd = 30
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =animelem=8
helpertype = normal ;player
name ="Red Line 1"
ID =207
stateno =207
pos = -500,-90
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = 20
size.yscale = 1

[State 200, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = ceil(30), 1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = s12, 0
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = -4
air.velocity = -2,-3
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S0,3
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S200,(random%4)
channel = 0
volumescale = 500

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

;---------------------------------------------------------------------------
; Standing Light Punch 4
[Statedef 203]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 203
poweradd = 30
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Red Line 2"
ID =208
stateno =208
pos = 50,60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 200, Hitdef]
type = HitDef
trigger1 = animelem = 5 || animelem = 6 || animelem = 7
attr = S, NA
damage = ceil(30), 1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = s12, 0
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = -4
air.velocity = -2,-8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S0,3
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S200,(random%4)
channel = 0
volumescale = 500

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

;---------------------------------------------------------------------------
; Regulus Aurum Helper 1
[Statedef 205]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 205
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,0
volumescale = 100
channel = -3

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 11

[State 200, DestroySelf]
type = DestroySelf
trigger1 = time = 8

;---------------------------------------------------------------------------
; Thunder 1
[Statedef 206]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 206
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,6
volumescale = 100
channel = -2

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

;---------------------------------------------------------------------------
; Red Line 1
[Statedef 207]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 207
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,7
volumescale = 100
channel = -2

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

;---------------------------------------------------------------------------
; Red Line 2
[Statedef 208]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 207
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,7
volumescale = 100
channel = -2

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2.5,2.8

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 45

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

;---------------------------------------------------------------------------
; Standing Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 210
poweradd = 50
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =animelem=8
helpertype = normal ;player
name ="Red Line 1"
ID =207
stateno =207
pos = -500,-150
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = 20
size.yscale = 1

[State 210, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = ceil(45), 2
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9, 10
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-150
hitsound = s12, 1
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -6
air.velocity = -2,-3
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S0,4
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S210,(random%5)
channel = 0
volumescale = 500

[State 210, Helper]
type = null;Helper
trigger1 = animelem = 3
name = "effect"
ID = 7000
stateno = 7000
pos = 90,-160
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Standing Medium Punch 2
[Statedef 211]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 211
poweradd = 50
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =animelem=4
helpertype = normal ;player
name ="Thunder 2"
ID =215
stateno =215
pos = -500,-150
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = 1
size.yscale = 1

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

;---------------------------------------------------------------------------
; Thunder 2
[Statedef 215]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 215
poweradd = 50
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = enemy,pos x + 0
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,6
volumescale = 100
channel = -3

[State 210, Hitdef]
type = HitDef
trigger1 = animelem = 1|| animelem = 2|| animelem = 3|| animelem = 4|| animelem = 5
attr = A, NA
damage = ceil(10), 2
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 10
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-55
hitsound = S3402,0
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -6
air.velocity = -2,8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
; Crouch Light Punch
[Statedef 400]
type    = C
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 400
poweradd = 30
sprpriority = 2

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

[State 1100, Helper]
type = Helper
trigger1 =animelem=8
helpertype = normal ;player
name ="Hitbox"
ID =401
stateno =401
pos = 0,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0

[State 1100, Helper]
type = Helper
trigger1 =animelem=8
helpertype = normal ;player
name ="Horizontal Thunder"
ID =405
stateno =405
pos = 400,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = 1
size.yscale = .5

[State 1100, Helper]
type = Helper
trigger1 =animelem=8
helpertype = normal ;player
name ="Regulus Aurum Helper 2"
ID =406
stateno =406
pos = -250,50
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
size.xscale = .5
size.yscale = .5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,3
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S200,(random%4)
channel = 0
volumescale = 500

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

;---------------------------------------------------------------------------
; Hitbox
[Statedef 401]
type    = C
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 401
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 400, Hitdef]
type = HitDef
trigger1 = time = 3 ||time = 6 ||time = 9 ||time = 12 ||time = 15 ||time = 18 ||time = 21 ||time = 24 ||time = 27 ||time = 30
attr = C, NA
damage = ceil(10), 1
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 8
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=200, var(14):=0
hitsound = S3402,0
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = -4
air.velocity = -1.4,-4
down.velocity = -3,0
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0
;getpower = 0,0

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

;---------------------------------------------------------------------------
; Horizontal Thunder
[Statedef 405]
type    = C
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 405
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,6
volumescale = 100
channel = -2

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2.5,2.5

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

;---------------------------------------------------------------------------
; Regulus Aurum Helper 2
[Statedef 406]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 205
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,0
volumescale = 100
channel = -3

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 25

[State 200, DestroySelf]
type = DestroySelf
trigger1 = Time = 30

;---------------------------------------------------------------------------
;Throw - Attempt
[Statedef 800]
type   =S
movetype= A
physics=S
juggle =0
velset=0,0
ctrl=0
anim=800
facep2=1

[State 800, Throw Escape Reset]
type=VarSet
trigger1=1
var(19)=0
[State 800, Escape]
type=VarSet
trigger1=NumEnemy
trigger1=(EnemyNear, StateNo=[0,899]) && (EnemyNear, StateNo != [100,104]) && (EnemyNear, StateNo != [600,799])
var(19)=7

[State 800, AttackDist]
type=AttackDist
trigger1=1
value=0

[State 800, Throw 1]
type=Hitdef
trigger1=AnimElem=1
trigger1=!var(38)
attr=S, NT
priority=1,Miss
getpower=35 * !var(20)
givepower=0
hitflag=M-
numhits=0
sparkno=-1
p1stateno=ifelse (command="holdback", 805,810)
hitsound=s800, 0
fall=1
fall.recover=1

[State 800, Throw 2]
type=Hitdef
trigger1=AnimElem=1 && var(10)=1
trigger1=!var(38)
attr=S, NT
priority=1,Miss
getpower=35 * !var(20)
givepower=0
hitflag=M-
numhits=0
sparkno=-1
p1stateno=ifelse (command="holdback", 805,820)
hitsound=s800, 0
fall=1
fall.recover=1

[State 800, Miss Voice]
type =PlaySnd
trigger1=AnimElem=2
value=801,0+random%2
channel=0
[State 800, Swing Snd]
type=PlaySnd
trigger1=AnimElem=2
value=0,3
channel=1

[State 800, StateTypeSet: Idle]
type=StateTypeSet
trigger1=AnimElemTime(2) >= 0
moveType=I

[State 800, End]
type=ChangeState
trigger1=!AnimTime
value=0
ctrl=1
;===========<THROW SWITCHING SIDES>==========
;Throw - Switching Sides
[Statedef 805]
type=S
movetype=A
physics=S
anim=805
ctrl=0
sprpriority=-1

[State 805, Throw]
type=targetstate
trigger1= !time && numtarget
value=806
[State 805, Throw]
type=targetfacing
trigger1= !time && numtarget
value=-1

[State 805, Width]
type=width
trigger1= 1
edge=24,24

[State 805, Turn]
type=turn
trigger1= animelem=3
[State 805, facing]
type=targetfacing
trigger1= 1
value=-1

[State 805, Escape]
type=changestate
trigger1= numtarget && var(19)
trigger1= (target,command="holdfwd" || target,command="holdback")
trigger1= (target,command="b" || target,command="c" || target,command="y" || target,command="z")
value=890
[State 805, Escape]
type=varadd
trigger1= var(19)>0
var(19)=-1

[State 805, Bind 1]
type=targetbind
trigger1= animelemtime(2)<0 || animelemtime(4)>=0
pos=ceil(104*const(size.xscale)),0
[State 805, Bind 2]
type=targetbind
trigger1= animelemtime(2)>=0 && animelemtime(4)<0
pos=ceil(40*const(size.xscale)),0

[State 805, spr]
type=sprpriority
trigger1= animelem=2
value=-1

[State 805, End]
type=changestate
trigger1= !numtarget
value=0
ctrl=1
[State 805, End]
type=changestate
trigger1= animelemtime(4)>=0
value=810
;===========<THROW SWITCHING SIDES (TARGET)>==========
;Throw - Target Switching Sides
[StateDef 806]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

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

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

[State 806, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
moveCamera = 1,1

[State 806, SelfState]
type = SelfState
trigger1 = Time >= 60
value = ifElse(pos y < 0, 5040, 0)
ctrl = 1

;---------------------------------------------------------------------------
;Throw - Throwing the opponent
[Statedef 810]
type = S
movetype = A
physics = S
anim = 810
velset = 0, 0
poweradd = 0
sprpriority = 2

[State 810, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 810, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 810, Throw Escape]
type = ChangeState
trigger1 = NumTarget && var(19)
trigger1 = (Target, command = "holdfwd" || Target, command = "holdback")
trigger1 = (Target, command = "b" || Target, command = "c" || Target, command = "y" || Target, command = "z")
value = 890

[State 810, Throw Escape]
type = VarAdd
trigger1 = var(19) > 0
var(19) = -1

[State 810, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 806

[State 810, TargetState]
type = TargetState
trigger1 = animelem = 2&& NumTarget
value = 815

[State 810, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 810, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1200,0
volumescale = 100
channel = 1

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) = 0
trigger1 = NumTarget
pos = ceil(150 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 181, Explod]
type = Explod
trigger1 = animelem = 9
pos = 50,0
postype = p1
anim = 811
ownpal = 1
scale = 1,1
[State 181, Explod]
type = Explod
trigger1 = animelem = 9
pos = 50,0
postype = p1
anim = 1005
ownpal = 1
scale = 1,1
removetime = 12

[State 810, Width 1-5]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(9) < 0
edge = 72,0

[State 810, Damage 11]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 9
value = -120

[State 810, Throw 11]
type = TargetState
trigger1 = NumTarget && AnimElem = 9
value = 816

[State 810, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 9
value = 35

[State 830, EnvShake]
type = EnvShake
triggerall=NumTarget
trigger1=animelem=9
time = 8
ampl = 30

[State 810, HitSpark]
type=null;Helper
trigger1 =animelem=9&& numtarget
helperType=Normal
stateNo=8050
ID=8050
name="HitSpark"
posType=P1
pos=ceil(239 * const(size.xScale)), ceil(-170 * const(size.yScale))
facing=-1
ownPal=1
size.xScale=1
size.yScale=1
pauseMoveTime=65535
superMoveTime=65535
ignoreHitPause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S0,6
volumescale = 100
channel = -2

[State 810, Hit Snd]
type = PlaySnd
trigger1=animelem=9
value = S3402,0
channel=-5

[State 810, PowerAdd]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 9 && !var(20)
value = 70

[State 810, HitAdd]
type = HitAdd
trigger1 = NumTarget && animelem=9
value = 1

[State 810, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 9
var(13) = 1

[State 810, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 9
var(15) = 1
ignoreHitPause = 1

[State 810, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 9
var(16) = 1
ignoreHitPause = 1

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

;---------------------------------------------------------------------------
;Throw - Target
[Statedef 815]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 815, On Ground]
type = PosSet
trigger1 = !Time
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = -3

[State 815, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 815, ChangeAnim2]
type = null;ChangeAnim2
Trigger1 = !Time
value = 815

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = !time
value = ifelse(selfanimexist(5051),5051,5030)

[State 815, ChangeAnim2]
type = Null;ChangeAnim2
trigger1 = !Time
trigger1 = PrevStateNo = 806
value = 815
elem = 2

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 0, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
;Throw - Target 2
[Statedef 816]
type    = A
movetype= H
physics = N
velset = -5,8

[State 817, Gravity] 
type = VelAdd
Trigger1 = 1
y = .45

[State 817, ChangeAnim2]
type = ChangeAnim2
Trigger1 = !Time
value = 816

[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 40
;add = -200,-200,-200
mul = 200,200,0
;sinadd = 50,50,50,50

[State 817, recover]
type = Null;SelfState
triggerall = (Pos Y = [-20,5])&& alive && CanRecover
trigger1 = Command = "recovery"
value = Ifelse(pos y>=0,5200,5210)

[State 817, End] 
type = SelfState
trigger1=pos y > -vel y
value = 5100 

;===========<THROW ESC'D>==========
;Throw - Escaped
[StateDef 890]
type = S
physics = N
movetype = I
anim = 5945
ctrl = 0
velset = 0,0
sprPriority = 1

[State 890, TargetBind]
type = TargetBind
trigger1 = !Time && NumTarget
pos = 0,0

[State 890, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 895

[State 890, TargetFacing]
type = TargetFacing
trigger1 = !Time && NumTarget
value = -1

[State 890, PosAdd]
type = PosAdd
trigger1 = !Time
x = 24

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

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

[State 890, SprPriority 1]
type = SprPriority
trigger1 = AnimElemTime(6) >= 0
value = 1

[State 890, SprPriority -1]
type = SprPriority
trigger1 = AnimElemTime(2) <= 0
value = -1

[State 890, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 890, VelSet]
type = VelSet
trigger1 = 1
x = -1.425
y = 0

[State 890, Voice]
type = Null;PlaySnd
trigger1 = AnimElem = 2
value = 801,0+random%2
channel = 0

[State 890, Escape Sound]
type = PlaySnd
trigger1= !Time
value = 130,0

[State 890, End]
type = ChangeState
trigger1 = Time >= 27
value = 0
ctrl = 1
;-------------------------------------------------------------------------
;Target - Escape
[StateDef 895]
type = S
physics = N
moveType = I
ctrl = 0
velSet = 0,0
sprPriority = 1

[State 895, ChangeAnim]
type = ChangeAnim
trigger1= !Time
value = ifElse(SelfAnimExist(5940), 5940, 130)

[State 895, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && !SelfAnimExist(5945) && SelfAnimExist(5940)
value = 5940

[State 895, ChangeAnim]
type = ChangeAnim
trigger1= !Time && !SelfAnimExist(5945) && !SelfAnimExist(5940) && SelfAnimExist(5910)
value = 5910

[State 895, ChangeAnim]
type = ChangeAnim
trigger1 = Time >= 20 && Anim = 130
value = 140

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

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

[State 895, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 895, VelSet]
type = VelSet
trigger1 = 1
x = -1.425
y = 0

[State 895, End]
type = SelfState
trigger1 = Time >= 27
value = 0
ctrl = 1

;---------------------------------------------------------------------
; Regulus Aurum 1
[Statedef 1000]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1000
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time && random < 250
value = S1000,0
channel = 0

[State 181, Helper]
type = helper
trigger1 = animelem = 5
name = "Regulus Aurum Special 1"
pos = 0,-100
postype = p1
stateno = 1010
helpertype = normal
ownpal = 1

[State 895, End]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------
; Regulus Aurum 2
[Statedef 1001]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1000
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time && random < 250
value = S1000,0
channel = 0

[State 181, Helper]
type = helper
trigger1 = animelem = 5
name = "Regulus Aurum Special 1"
pos = 50,-100
postype = p1
stateno = 1010
helpertype = normal
ownpal = 1

[State 895, End]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------
; Regulus Aurum 3
[Statedef 1002]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1000
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time && random < 250
value = S1000,0
channel = 0

[State 181, Helper]
type = helper
trigger1 = animelem = 5
name = "Regulus Aurum Special 1"
pos = 100,-100
postype = p1
stateno = 1010
helpertype = normal
ownpal = 1

[State 895, End]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Regulus Aurum Special 1
[Statedef 1010]
type    = A
movetype= A
physics = N
velset = 15,15
ctrl = 0
anim = 205
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,0
volumescale = 100
channel = -3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -45

[State 210, ChangeState]
type = ChangeState
trigger1=Pos y>-Vel y
value=1011

;---------------------------------------------------------------------------
; Regulus Aurum Special 1 B
[Statedef 1011]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1006
sprpriority = 2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,2
ignorehitpause = 1

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

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

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1005
ID = 1011
pos = 50,0
postype = p1
removetime = 5
scale = 1,2
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,6
volumescale = 100
channel = -2

[State 210, Hitdef]
type = HitDef
trigger1 = animelem = 1|| animelem = 2|| animelem = 3|| animelem = 4|| animelem = 5
attr = A, SA
damage = ceil(25), 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 10
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-55
hitsound = S3402,0
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -6
air.velocity = -2,-8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;---------------------------------------------------------------------
; EX Regulus Aurum
[Statedef 1050]
type = S
movetype= I
physics = N
ctrl = 0
anim = 1050
velset = 0,0
poweradd = -1000

[State 3400, SuperPause]
type=SuperPause
trigger1=!time
time=90
moveTime=90
p2DefMul=1
unHittable=1
anim=-1
darken=1

[state 0]
type = Helper
trigger1 = !time
name = "Zoom"
id = 20002
pos = 0,0
postype = p1
stateno = 20002
helpertype = normal
sprpriority = -5
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 1000,Helper]
type = Helper
trigger1 = AnimElem = 1
Stateno = 2005
name = "Counter Shine"
postype = p1
pos = -20,-70
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S10,1
channel = -5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1000,1
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S1000,2
channel = 0

[State 181, Helper]
type = helper
trigger1 = animelem = 5
name = "Regulus Aurum EX Special 1"
pos = 0,0
postype = p1
stateno = 1060
helpertype = normal
ownpal = 1

[State 895, End]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Regulus Aurum EX Special 1
[Statedef 1060]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 205
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = ifelse(facing=1,enemy, pos x - 200, enemy, pos x + 200)
y = -150
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 15
y = 15
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,0
volumescale = 100
channel = -3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -45

[State 210, ChangeState]
type = ChangeState
trigger1=Pos y>-Vel y
value=1061

;---------------------------------------------------------------------------
; Regulus Aurum Special 1 B
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1006
sprpriority = 2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,2
ignorehitpause = 1

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

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

[State 3410, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
freq = 120
ampl = Ifelse(random<500,5,-5)

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1005
ID = 1011
pos = 50,0
postype = p1
removetime = 5
scale = 1,2
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,6
volumescale = 100
channel = -2

[State 210, Hitdef]
type = HitDef
trigger1 = time = 1||time = 2||time = 3||time = 4||time = 5||time = 6||time = 7||time = 8||time = 9||time = 10||time = 11
attr = A, SA
damage = ceil(15), 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 15
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-55
hitsound = S3402,0
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -6
air.velocity = -2,-8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;-----------------------------------------------------
; Counter
[Statedef 1100]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1100

[State 1100, ReversalDef]
type = ReversalDef
trigger1 = !time
reversal.attr = SCA,AA,AP
pausetime = 10,10
sparkno =-1
persistent = 1
numhits = 0
persistent = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =! time
value = S1110,0
channel = 0
volumescale = 500

[State 1100]
type = NotHitBy
trigger1 = movecontact
value = SCA
ignorehitpause = 1

[State 1100]
type = changestate
trigger1 = movecontact
value = 1110
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movecontact
value = S6300,1
volumescale = 500
persistent = 0
ignorehitpause = 1
channel = -5

[State 1100]
type = changestate
trigger1 = !animtime
value = 1101

;-----------------------------------------------------
; Counter - End
[Statedef 1101]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1101

[State 1111]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;-----------------------------------------------------
; Counter Success
[Statedef 1110]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1110
facep2 = 1

[State 1110]
type = nothitby
trigger1 = time <= 10
value = ,AA
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S0,5
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1000,0
volumescale = 100
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,6
volumescale = 100
channel = -2

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 811
ID = 1110
pos = 0,0
postype = p1
removetime = 5
scale = 1,2
sprpriority = 1
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1005
ID = 1110
pos = 0,0
postype = p1
removetime = 5
scale = 1,2
sprpriority = 2

[State 1110, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = S, SA
damage = 70, 3
animtype = Heavy
guardflag = M
hitflag = MAFD
priority = 3, Hit
pausetime = 12, 12
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=1)
sparkxy = var(13):=220, var(14):=-65
hitsound = S3402,0
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -9,-8
air.velocity = -9,-8
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0
envshake.time=15
envshake.ampl=8
envShake.freq=120

[State 1110]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Al-Nasl-Minium 1
[Statedef 1200]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1200
poweradd = 70
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =Time = 42
helpertype = normal ;player
name ="Red Line 3"
ID =1205
stateno =1205
pos = 60,60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 1100, Helper]
type = Helper
trigger1 =animelem = 7
helpertype = normal ;player
name ="Red Line 4"
ID =1206
stateno =1206
pos = 30,-60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 8
helpertype = normal ;player
name ="Red Line 5"
ID =1207
stateno =1207
pos = 7,-85
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 9
helpertype = normal ;player
name ="Red Line 6"
ID =1208
stateno =1208
pos = 40,-160
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 10
helpertype = normal ;player
name ="Red Line 7"
ID =1209
stateno =1209
pos = 170,150
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 11
helpertype = normal ;player
name ="Al-Nasl-Minium Helper"
ID =1210
stateno =1210
pos = 100,50
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = animelem = 6, >=0
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Al-Nasl-Minium Hitbox"
ID =1204
stateno =1204
pos = 100,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0

[State 220, Hitdef]
type = null;HitDef
trigger1 = Time = 42 || Time = 43 || Time = 44 || Time = 45
attr = C, NA
damage = ceil(50), 3
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 12
sparkno = -1+(0*(var(11) := 8052))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=280, var(14):=-50
hitsound = s12, 2
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -8
air.velocity = -1,-6
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1200,(random%2)
volumescale = 100
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S1200,2
channel = 1
volumescale = 500

[State 300, Helper]
type = null;Helper
trigger1 = animelem = 5
name = "effect"
ID = 7000
stateno = 7001
pos = 140,-300
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Al-Nasl-Minium 2
[Statedef 1201]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1200
poweradd = 70
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =Time = 42
helpertype = normal ;player
name ="Red Line 3"
ID =1205
stateno =1205
pos = 120,60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 1100, Helper]
type = Helper
trigger1 =animelem = 7
helpertype = normal ;player
name ="Red Line 4"
ID =1206
stateno =1206
pos = 30,-60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 8
helpertype = normal ;player
name ="Red Line 5"
ID =1207
stateno =1207
pos = 7,-85
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 9
helpertype = normal ;player
name ="Red Line 6"
ID =1208
stateno =1208
pos = 40,-160
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 10
helpertype = normal ;player
name ="Red Line 7"
ID =1209
stateno =1209
pos = 170,150
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 11
helpertype = normal ;player
name ="Al-Nasl-Minium Helper"
ID =1210
stateno =1210
pos = 100,50
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = animelem = 6, >=0
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Al-Nasl-Minium Hitbox"
ID =1204
stateno =1204
pos = 150,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0

[State 220, Hitdef]
type = null;HitDef
trigger1 = Time = 42 || Time = 43 || Time = 44 || Time = 45
attr = C, NA
damage = ceil(50), 3
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 12
sparkno = -1+(0*(var(11) := 8052))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=280, var(14):=-50
hitsound = s12, 2
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -8
air.velocity = -1,-6
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1200,(random%2)
volumescale = 100
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S1200,2
channel = 1
volumescale = 500

[State 300, Helper]
type = null;Helper
trigger1 = animelem = 5
name = "effect"
ID = 7000
stateno = 7001
pos = 140,-300
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Al-Nasl-Minium 3
[Statedef 1202]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1200
poweradd = 70
sprpriority = 2

[State 1100, Helper]
type = Helper
trigger1 =Time = 42
helpertype = normal ;player
name ="Red Line 3"
ID =1205
stateno =1205
pos = 180,60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 1100, Helper]
type = Helper
trigger1 =animelem = 7
helpertype = normal ;player
name ="Red Line 4"
ID =1206
stateno =1206
pos = 30,-60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 8
helpertype = normal ;player
name ="Red Line 5"
ID =1207
stateno =1207
pos = 7,-85
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 9
helpertype = normal ;player
name ="Red Line 6"
ID =1208
stateno =1208
pos = 40,-160
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 10
helpertype = normal ;player
name ="Red Line 7"
ID =1209
stateno =1209
pos = 170,150
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 11
helpertype = normal ;player
name ="Al-Nasl-Minium Helper"
ID =1210
stateno =1210
pos = 100,50
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = animelem = 6, >=0
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Al-Nasl-Minium Hitbox"
ID =1204
stateno =1204
pos = 200,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0

[State 220, Hitdef]
type = null;HitDef
trigger1 = Time = 42 || Time = 43 || Time = 44 || Time = 45
attr = C, NA
damage = ceil(50), 3
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 12
sparkno = -1+(0*(var(11) := 8052))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=280, var(14):=-50
hitsound = s12, 2
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -8
air.velocity = -1,-6
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1200,(random%2)
volumescale = 100
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S1200,2
channel = 1
volumescale = 500

[State 300, Helper]
type = null;Helper
trigger1 = animelem = 5
name = "effect"
ID = 7000
stateno = 7001
pos = 140,-300
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Al-Nasl-Minium Hitbox
[Statedef 1204]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1204
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 220, Hitdef]
type = HitDef
trigger1 = Time = 1 || Time = 2 || Time = 3 || Time = 4
attr = C, NA
damage = ceil(10), 3
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 12
sparkno = -1+(0*(var(11) := 8052))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=280, var(14):=-50
hitsound = s12, 2
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -8
air.velocity = -1,-6
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 1100, Helper]
type = Helper
trigger1 = time<= 6 && movehit && hitshakeover
helpertype = normal ;player
name ="Invisible Hits"
ID =1211
stateno =1211
pos = 0,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

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

;---------------------------------------------------------------------------
; Red Line 3
[Statedef 1205]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 207
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,7
volumescale = 100
channel = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2.5,2.8

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 60

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

;---------------------------------------------------------------------------
; Red Line 4
[Statedef 1206]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1206
sprpriority = -5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = .3,.5

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 30

[State 200, DestroySelf]
type = DestroySelf
trigger1 =Root,StateNo!=1200&&Root,StateNo!=1201&&Root,StateNo!=1202&&Root,StateNo!=1250
trigger2 = time = 100
;---------------------------------------------------------------------------
; Red Line 5
[Statedef 1207]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1206
sprpriority = -4

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = .7,1

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = -50

[State 200, DestroySelf]
type = DestroySelf
trigger1 =Root,StateNo!=1200&&Root,StateNo!=1201&&Root,StateNo!=1202&&Root,StateNo!=1250
trigger2 = time = 100
;---------------------------------------------------------------------------
; Red Line 6
[Statedef 1208]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1206
sprpriority = -3

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2,5

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = -130

[State 200, DestroySelf]
type = DestroySelf
trigger1 =Root,StateNo!=1200&&Root,StateNo!=1201&&Root,StateNo!=1202&&Root,StateNo!=1250
trigger2 = time = 100
;---------------------------------------------------------------------------
; Red Line 7
[Statedef 1209]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1206
sprpriority = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 8,10

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 30

[State 200, DestroySelf]
type = DestroySelf
trigger1 =Root,StateNo!=1200&&Root,StateNo!=1201&&Root,StateNo!=1202&&Root,StateNo!=1250
trigger2 = time = 100
;---------------------------------------------------------------------------
; Al-Nasl-Minium Helper
[Statedef 1210]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1210
sprpriority = -1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,1
volumescale = 100
channel = -3

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -2.5
y = -3
[State 0, VelSet]
type = VelSet
trigger1 = time = 15
x = -1.25
y = -1.5
[State 0, VelSet]
type = VelSet
trigger1 = time = 25
x = -.05
y = -.1

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2,2

[State 200, DestroySelf]
type = DestroySelf
trigger1 =Root,StateNo!=1200&&Root,StateNo!=1201&&Root,StateNo!=1202&&Root,StateNo!=1250
trigger2 = time = 100

;---------------------------------------------------------------------------
; Invisible Hits
[Statedef 1211]
type    = S
movetype= A
juggle  = 2
velset = 0,0
ctrl = 0
anim = 1211
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = enemy,pos x + 0
y = enemy,pos y - 50

[State 1251, Hitdef]
type = HitDef
trigger1 = animelem=1||animelem=2||animelem=3||animelem=4||animelem=5||animelem=6||animelem=7||animelem=8||animelem=9
attr = S, NA
damage = 8, 4
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 20
;sparkno = -1 + 0*(var(45):=1)
;guard.sparkno = -1 + 0*(var(15):=3)
;sparkxy = var(40):=220, var(41):=-85
hitsound = s1, 7
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = 0
air.velocity = 0,-1
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 1251, Hitdef]
type = HitDef
trigger1 = animelem=10
attr = S, NA
damage = 8, 4
animtype = Heavy
air.animtype = up
fall.animtype = up
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 15
;sparkno = -1 + 0*(var(45):=1)
;guard.sparkno = -1 + 0*(var(15):=3)
;sparkxy = var(40):=220, var(41):=-85
hitsound = s1, 7
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = 0
air.velocity = -1,-8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 1251, DestroySelf]
type = DestroySelf
trigger1 = !animtime

;---------------------------------------------------------------------
; EX Al-Nasl-Minium
[Statedef 1250]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1200
velset = 0,0
poweradd = -1000

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1250,0
channel = 0

[State 3400, SuperPause]
type=SuperPause
trigger1=!time
time=40
moveTime=40
p2DefMul=1
unHittable=1
anim=-1
darken=1

[state 0]
type = Helper
trigger1 = !time
name = "Zoom"
id = 20000
pos = 0,0
postype = p1
stateno = 20000
helpertype = normal
sprpriority = -5
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 1000,Helper]
type = Helper
trigger1 = AnimElem = 1
Stateno = 2005
name = "Counter Shine"
postype = p1
pos = -20,-70
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S10,1
channel = -5

[State 1100, Helper]
type = Helper
trigger1 =Time = 42
helpertype = normal ;player
name ="EX Red Line 3"
ID =1253
stateno =1253
pos = 0,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 1100, Helper]
type = Helper
trigger1 =animelem = 7
helpertype = normal ;player
name ="Red Line 4"
ID =1206
stateno =1206
pos = 30,-60
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 8
helpertype = normal ;player
name ="Red Line 5"
ID =1207
stateno =1207
pos = 7,-85
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 9
helpertype = normal ;player
name ="Red Line 6"
ID =1208
stateno =1208
pos = 40,-160
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 10
helpertype = normal ;player
name ="Red Line 7"
ID =1209
stateno =1209
pos = 170,150
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1
[State 1100, Helper]
type = Helper
trigger1 =animelem = 11
helpertype = normal ;player
name ="Al-Nasl-Minium Helper"
ID =1210
stateno =1210
pos = 100,50
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = animelem = 6, >=0
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 1100, Helper]
type = Helper
trigger1 =animelem=5
helpertype = normal ;player
name ="Al-Nasl-Minium Hitbox"
ID =1251
stateno =1251
pos = 0,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0

[State 220, Hitdef]
type = null;HitDef
trigger1 = Time = 42 || Time = 43 || Time = 44 || Time = 45
attr = C, NA
damage = ceil(50), 3
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 12
sparkno = -1+(0*(var(11) := 8052))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=280, var(14):=-50
hitsound = s12, 2
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -8
air.velocity = -1,-6
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1200,(random%2)
volumescale = 100
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S1200,2
channel = 1
volumescale = 500

[State 300, Helper]
type = null;Helper
trigger1 = animelem = 5
name = "effect"
ID = 7000
stateno = 7001
pos = 140,-300
postype = p1
ownpal = 1
supermovetime = 999
pausemovetime = 999
ignorehitpause = 1

[State 220, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------
; EX Al-Nasl-Minium Hitbox
[StateDef 1251]
Type = A
Movetype = A
Physics = N
ctrl = 0
anim = 1204
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = enemy, pos x + 0
y = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 220, Hitdef]
type = HitDef
trigger1 = Time = 1 || Time = 2 || Time = 3 || Time = 4
attr = C, SA
damage = ceil(20), 3
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 12
sparkno = -1+(0*(var(11) := 8052))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=280, var(14):=-50
hitsound = s12, 2
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -8
air.velocity = -1,-6
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 1100, Helper]
type = Helper
trigger1 = time<= 6 && movehit && hitshakeover
helpertype = normal ;player
name ="EX Invisible Hits"
ID =1252
stateno =1252
pos = 0,0
postype = p1
ownpal = 1
pausemovetime=0
supermovetime=0
persistent=0
;size.xscale = 1
;size.yscale = 1

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

;---------------------------------------------------------------------------
; EX Invisible Hits
[Statedef 1252]
type    = S
movetype= A
juggle  = 2
velset = 0,0
ctrl = 0
anim = 1211
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = enemy,pos x + 0
y = enemy,pos y - 50

[State 1251, Hitdef]
type = HitDef
trigger1 = animelem=1||animelem=2||animelem=3||animelem=4||animelem=5||animelem=6||animelem=7||animelem=8||animelem=9
attr = S, SA
damage = 15, 4
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 20
;sparkno = -1 + 0*(var(45):=1)
;guard.sparkno = -1 + 0*(var(15):=3)
;sparkxy = var(40):=220, var(41):=-85
hitsound = s1, 7
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = 0
air.velocity = 0,-1
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 1251, Hitdef]
type = HitDef
trigger1 = animelem=10
attr = S, SA
damage = 15, 4
animtype = Heavy
air.animtype = up
fall.animtype = up
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 15
;sparkno = -1 + 0*(var(45):=1)
;guard.sparkno = -1 + 0*(var(15):=3)
;sparkxy = var(40):=220, var(41):=-85
hitsound = s1, 7
guardsound = s6, 0
ground.type = Low
air.type = Low
ground.slidetime = 5
ground.velocity = 0
air.velocity = -1,-8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall.recover = 0

[State 1251, DestroySelf]
type = DestroySelf
trigger1 = !animtime

;---------------------------------------------------------------------------
; EX Red Line 3
[Statedef 1253]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 207
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,7
volumescale = 100
channel = -2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 
flag = noshadow
ignorehitpause = 1

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = ifelse(facing = 1, enemy, pos x - 10, enemy, pos x + 10 )
y = 60

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2.5,2.8

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 60

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


;---------------------------------------------------------------------
; Yukina Support
[Statedef 1500]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1500
velset = 0,0
poweradd = -1000

[State 181, Yukina]
type = helper
trigger1 = Time = 0
name = "Yukina Helper 1"
pos = 0,0
postype = p1
ID = 1510
stateno = 1510
helpertype = normal
ownpal = 1

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

;---------------------------------------------------------------------
; Yukina Helper 1
[Statedef 1510]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1510
velset = 0,0

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 8
[State 0, VelSet]
type = VelSet
trigger1 = animelem = 5
x = 2
[State 0, VelSet]
type = VelSet
trigger1 = animelem = 7
x = 8
[State 0, VelSet]
type = VelSet
trigger1 = animelem = 10
x = 0

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

[State 200, Helper]
type = Helper
trigger1 =animelem=3
helpertype = normal ;player
name ="slash"
stateno =1512
pos = 0,0
postype = p1
ownpal = 1
persistent=0
[State 200, Helper]
type = Helper
trigger1 =animelem=10
helpertype = normal ;player
name ="slash"
stateno =1513
pos = 0,0
postype = p1
ownpal = 1
persistent=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=3
value = S1510,random%2
volumescale = 100
channel = -5
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=10
value = S1510,2+random%2
volumescale = 100
channel = -5

[State 210, Hitdef]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage = ceil(30), 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = s12, 4
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -3, -6
air.velocity = -3,-6
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 210, Hitdef]
type = HitDef
trigger1 = animelem = 10
attr = S, NA
damage = ceil(30), 5
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = s12, 5
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -6,8
air.velocity = -6,8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0
p2stateno = 1575

[State 3410, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name ="FX"
ID =8050
stateno =8050
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 3410, Helper]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal ;player
name ="Guard FX"
ID =8000
stateno =8000
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 1010, HitOverride]
type = HitOverride
trigger1 = Anim = 1510
attr = SCA,NA,SA,HA,NP,SP,HP
time = -1
StateNo = 1511

[State 0, ChangeState]
type = ChangeState
trigger1 = !win && !animtime
value = 1511

[State 0, ChangeState]
type = ChangeState
trigger1 = win && !animtime
value = 1514

;---------------------------------------------------------------------
; Yukina Helper 1 End
[Statedef 1511]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1511
velset = 0,0

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -8
y = -5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime

;---------------------------------------------------------------------------
;Slash
[Statedef 1512]
physics  = N
anim = 1512
ctrl = 0
velset=0,0
sprpriority=4

[State 300, Transparency]
type = Trans
trigger1 = 1
trans = Add

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 3.5,2

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 25

[State 300, BindToRoot]
type = BindToParent
trigger1 =1
pos = 0,-110
ignorehitpause =1
[State 300, Assert]
type = AssertSpecial
Trigger1 = 1
flag = noshadow
ignorehitpause =1
[State 300, Destroyself]
type = destroyself
trigger1 =parent,stateno!=1510
trigger2 =parent,Movetype=H
trigger3 =!animtime

;---------------------------------------------------------------------------
;Slash
[Statedef 1513]
physics  = N
anim = 1513
ctrl = 0
velset=0,0
sprpriority=4

[State 300, Transparency]
type = Trans
trigger1 = 1
trans = Add

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2.5,2

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = 0

[State 300, BindToRoot]
type = BindToParent
trigger1 =1
pos = 30,-10
ignorehitpause =1
[State 300, Assert]
type = AssertSpecial
Trigger1 = 1
flag = noshadow
ignorehitpause =1
[State 300, Destroyself]
type = destroyself
trigger1 =parent,stateno!=1510
trigger2 =parent,Movetype=H
trigger3 =!animtime

;---------------------------------------------------------------------
; Yukina Win - Waiting
[Statedef 1514]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1514
velset = 0,0

[State 1514, Win]
type = ChangeState
trigger1 = win && roundstate >= 3 && (root,stateno = [180,189])
value = 1515

;---------------------------------------------------------------------
;Yukina Win
[Statedef 1515]
type = S
movetype = I
physics = N
anim = 1515
sprpriority = -1

[State 1515, Voice]
type = playsnd
trigger1 = !Time
value = 1515,random%3
channel = -5

;---------------------------------------------------------------------
; Yukina Counter Support
[Statedef 1520]
type = S
movetype= A
physics = N
ctrl = 0
anim = 1500
velset = 0,0
poweradd = -1000

[State 181, Yukina]
type = helper
trigger1 = Time = 0
name = "Yukina Counter Helper 1"
pos = 70,0
postype = p1
ID = 1521
stateno = 1521
helpertype = normal
ownpal = 1

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

;-----------------------------------------------------
; Yukina Counter Helper 1
[Statedef 1521]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1520

[State 1100, ReversalDef]
type = ReversalDef
trigger1 = !time
reversal.attr = SCA,AA,AP
pausetime = 10,10
sparkno =-1
persistent = 1
numhits = 0
persistent = 1

[State 1100]
type = NotHitBy
trigger1 = movecontact
value = SCA
ignorehitpause = 1

[State 1100]
type = changestate
trigger1 = movecontact
value = 1525
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movecontact
value = S6300,1
volumescale = 500
persistent = 0
ignorehitpause = 1
channel = -5

[State 1010, HitOverride]
type = HitOverride
trigger1 = Anim = 1520
attr = SCA,NA,SA,HA,NP,SP,HP
time = -1
StateNo = 1511

[State 1100]
type = changestate
trigger1 = !animtime
value = 1511

;-----------------------------------------------------
; Yukina Counter Success
[Statedef 1525]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1525
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1525,0
volumescale = 100
channel = 0

[State 200, Helper]
type = Helper
trigger1 =animelem=2
helpertype = normal ;player
name ="slash"
stateno =1526
pos = 0,0
postype = p1
ownpal = 1
persistent=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1525,0
volumescale = 100
channel = -5

[State 1110, Hitdef]
type = HitDef
trigger1 = Time = 0
attr = S, SA
damage = 0, 0
animtype = Heavy
guardflag = M
hitflag = MAFD
priority = 3, Hit
pausetime = 1, 87
sparkno = -1+0*(var(11) := 8050)
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=220, var(14):=-85
hitsound = s12, 5
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -9,-8
air.velocity = -9,-8
ground.hittime  = 20
air.hittime = 20
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0
envshake.time=15
envshake.ampl=8
envShake.freq=120
kill = 0

[State 3410, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name ="FX"
ID =8050
stateno =8050
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 3410, Helper]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal ;player
name ="Guard FX"
ID =8000
stateno =8000
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 1100]
type = changestate
trigger1 = !animtime
value = 1511

;---------------------------------------------------------------------------
;Slash
[Statedef 1526]
physics  = N
anim = 1526
ctrl = 0
velset=0,0
sprpriority=4

[State 300, Transparency]
type = Trans
trigger1 = 1
trans = Add

[State 300, Scale]
type = AngleDraw
trigger1 = 1
scale = 2,4

[State 300, Rotate]
type = AngleSet
trigger1 = !Time
value = -90

[State 300, BindToRoot]
type = BindToParent
trigger1 =1
pos = -100,-50
ignorehitpause =1
[State 300, Assert]
type = AssertSpecial
Trigger1 = 1
flag = noshadow
ignorehitpause =1
[State 300, Destroyself]
type = destroyself
trigger1 =parent,stateno!=1525
trigger2 =parent,Movetype=H
trigger3 =!animtime

;-----------------------------------
;Falling to Ground - Start
[Statedef 1575]
type = A
movetype = H
physics = N
velset = 0,0
facep2 = 1

[State 7050]
type = changeanim
trigger1 = 1
value = 5002

[State 7050]
type = changestate
trigger1 = hitshakeover
value = 1576

;-----------------------------------
;Falling to Ground
[Statedef 1576]
type = A
movetype = H
physics = N

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -3.75
y = 10

[State 664]
type = changeanim
trigger1 = Time = 0
value = 5050

[State 664]
type = Changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value=1577

[State 664, safe]
type = SelfState
trigger1 = Time >= 600
value = 5050


;--------------------------------------
;Bounce-off Ground
[Statedef 1577]
type = A
movetype = H
physics = N

[State 665]
type = changeanim
trigger1 = !time
value = 5170

[State 665]
type = PosSet
trigger1 = !time
y = 0

[State 665]
type = velSet
trigger1 = !time
x = 0
y = 0

[State 665]
type = PosSet
trigger1 = time = 1
y = -10

[State 665]
type = velSet
trigger1 = time = 1
x = -1
y = -6

[State 665]
type = velAdd
trigger1 = time >= 1
y = 0.30

[State 665]
type = Changeanim
triggerAll = time >= 1
trigger1 = Anim =5170
trigger1 = AnimTime =0
value = 5050

[State 665]
type = Selfstate
triggerAll = time >= 4
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

[State 665, safe]
type = SelfState
trigger1 = Time >= 600
value = 5050

;---------------------------------------------------------------------------------
;Power Charge
[Statedef 1700]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 1700
sprpriority = 1
facep2 = 1

[State 730, Power]
type = poweradd
triggerall = power < const(data.power) && power < powermax
trigger1 = !AIlevel && (command = "hold_a")
trigger2 = AIlevel
value = 5 + ifelse(time < 60, 0, (time -60) / 12)

[State 730, Flash]
type = palfx
trigger1 = 1
time = 1
add = 75 + ceil(sin(time / 6.0 * pi) * 75), 25 + ceil(sin(time / 6.0 * pi) * 25), 0

[State 730, FX]
type = helper
trigger1 = !numhelper(8300)
stateno = 8300
ID = 8300
name = "Power Charge FX"
postype = p1
pos = 0,0
pausemovetime = 65535
supermovetime = 65535
ownpal = 1

[State 730, End]
type = changestate
trigger1 = power >= const(data.power) || power >= powermax || roundstate != 2
trigger2 = !AIlevel && (command != "hold_a")
trigger3 = AIlevel && (inguarddist || p2bodydist x <= 120)
value = 1701
ctrl = 1

;---------------------------------------------------------------
;Power Charge End
[Statedef 1701]
type = S
physics = S
movetype = I
anim = 1701
velset = 0, 0
ctrl = 1

[State 191, 2]
type = PlaySnd
trigger1 = !Time && Power >= const(data.power)
value = s1700,1
channel = 0

[State 731, Stop Snd]
type = stopsnd
trigger1 = !time
channel = 1

[State 730, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;-----------------------------------------------
;The 4th Primogenitor & Sword Shaman
[StateDef 3300]
type = S
physics = N
moveType = A
ctrl = 0
velSet = 0,0
sprpriority = 1
powerAdd = -3000
faceP2 = 1

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

[State 3500, Anim]
type=changeanim
trigger1=!time
value=3300

[state 3500,Posset]
type=posset
trigger1=!time
y=0

[State 3500, Super Pause]
type = SuperPause
trigger1 = animelem = 1
time = 70
moveTime = 70
p2DefMul = 1
unHittable = 1
anim = -1
darken = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3300,0
volumescale = 100
channel = 1

[State 1000,Helper]
type = Helper
trigger1 = AnimElem = 1
Stateno = 2005
name = "Counter Shine"
postype = p1
pos = 0,-70
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S10,2
channel = -10
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S10,1
channel = -11

[State 0, BGPalFX]
type = BGPalFX
trigger1 = !time
time = 30
sinadd = -96,-96,-96,60
invertall = 0

[State 3400,BlackBG]
type=helper
trigger1 =animelem=1
helpertype=normal
stateno=3480
ID=3480
name="BlackBG"
postype=Back
supermovetime=99999
pausemovetime=99999
ownpal=1
ignorehitpause=1
size.xScale=5
size.yScale=5

[State 0, Explod]
type = Explod
triggerall = anim = 3300
triggerall = facing = 1
trigger1=animelem=1
anim = 3600
id = 3600
pos = 0,100
scale = .5,.5
bindtime = 1
postype = left
vel = 0.5,0
removetime = -2
sprpriority = -1
ignorehitpause = 1
removeongethit = 0
ownpal = 1
persistent = 0
pausemovetime = 9999999
supermovetime = 9999999

[State 0, Explod]
type = Explod
triggerall = anim = 3300
triggerall = facing = -1
trigger1=animelem=1
anim = 3610
id = 3610
pos = -150,100
scale = .5,.5
bindtime = 1
postype = right
vel = -0.5,0
removetime = -2
sprpriority = -1
ignorehitpause = 1
removeongethit = 0
ownpal = 1
persistent = 0
pausemovetime = 9999999
supermovetime = 9999999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S1000, 2
volumescale = 100
channel = 1

[State 3400, NotHitBy]
type=NotHitBy
trigger1=AnimElemTime(5) < 0
time=1
value=SCA

[State 181, Helper]
type = helper
trigger1 = animelem = 5
name = "Regulus Aurum Hyper 1"
pos = 0,-150
postype = p1
stateno = 3305
helpertype = normal
ownpal = 1

[State 181, Helper]
type = helper
trigger1 = animelem = 13
name = "Yukina Hyper 1"
pos = 0,0
postype = p1
stateno = 3310
helpertype = normal
ownpal = 1

[State 730, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Regulus Aurum Hyper 1
[Statedef 3305]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 205
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 15
y = 15
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -45

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,0
volumescale = 100
channel = -3

[State 210, ChangeState]
type = ChangeState
trigger1=Pos y>-Vel y
value=3306

;---------------------------------------------------------------------------
; Regulus Aurum Hyper 1 B
[Statedef 3306]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1006
sprpriority = 2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,2
ignorehitpause = 1

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

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

[State 3410, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
freq = 120
ampl = Ifelse(random<500,5,-5)

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1005
ID = 1011
pos = 50,0
postype = p1
removetime = 5
scale = 1,2
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,7
volumescale = 100
channel = -2

[State 210, Hitdef]
type = HitDef
trigger1 = time = 1||time = 2||time = 3||time = 4||time = 5||time = 6||time = 7||time = 8||time = 9||time = 10||time = 11
attr = A, HA
damage = ceil(30), 5
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 5
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-55
hitsound = S3402,0
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = -6
air.velocity = -1,-8
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
envshake.time=14
envshake.ampl=4
envShake.freq=120

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;---------------------------------------------------------------------
; Yukina Hyper 1
[Statedef 3310]
type = A
movetype= A
physics = N
ctrl = 0
anim = 3310
velset = 0,0

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = enemy, pos x + 0
y = -150
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = 18

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = s3310,random%4
volumescale = 100
channel = -5

[State 210, Hitdef]
type = HitDef
trigger1 = !time
attr = A, HA
damage = ceil(30), 5
animtype = heavy
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 0
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-55
hitsound = s12, 4
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = 0, 15
air.velocity = 0, 15
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
envshake.time=14
envshake.ampl=4
envShake.freq=120

[State 3410, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name ="FX"
ID =8050
stateno =8050
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 3410, Helper]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal ;player
name ="Guard FX"
ID =8000
stateno =8000
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 210, ChangeState]
type = ChangeState
trigger1=Pos y>-Vel y
value=3311

;---------------------------------------------------------------------
; Yukina Hyper 2
[Statedef 3311]
type = A
movetype= A
physics = N
ctrl = 0
anim = 3311
velset = 0,0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0
ignorehitpause = 1

[State 210, Hitdef]
type = HitDef
trigger1 = !time
attr = S, HA
damage = ceil(30), 5
animtype = heavy
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 0
sparkno = -1+(0*(var(11) := 8050))
guard.sparkno = -1 + 0*(var(12):=8000)
sparkxy = var(13):=250, var(14):=-55
hitsound = s12, 5
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 5
ground.velocity = 0,8
air.velocity = 0,9
ground.hittime  = 15
air.hittime = 15
airguard.velocity = -1.9,-.8
fall = 1
air.fall = 1
fall.recover = 0

[State 3410, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name ="FX"
ID =8050
stateno =8050
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 3410, Helper]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal ;player
name ="Guard FX"
ID =8000
stateno =8000
pos = Ceil(EnemyNear,Pos X - Pos X) * Facing,Ceil(EnemyNear,Pos Y - Pos Y - 60)
postype = p1
ownpal = 1
persistent=1
size.xScale=1
size.yScale=1
pausemovetime = 9999
supermovetime = 9999

[State 210, ChangeState]
type = ChangeState
trigger1=!win && !animtime
value=1511

[State 210, ChangeState]
type = ChangeState
trigger1=win && !animtime
value=3312

;---------------------------------------------------------------------
; Yukina Hyper Win - Waiting
[Statedef 3312]
type = S
movetype= A
physics = N
ctrl = 0
anim = 3312
velset = 0,0

[State 1514, Win]
type = ChangeState
trigger1 = win && roundstate >= 3 && (root,stateno = [180,189])
value = 1515

;-----------------------------------------------
;Kiffa Ater - Start
[StateDef 3400]
type = S
physics = N
moveType = A
ctrl = 0
velSet = 0,0
sprpriority = 1
powerAdd = -3000
faceP2 = 1

[State 3500, Anim]
type=changeanim
trigger1=!time
value=3400

[State 5201, Voice]
type = PlaySnd
trigger1 = !Time
value = 3300,0
channel = 1

[state 3500,Posset]
type=posset
trigger1=!time
y=0

[State 0, Explod]
type = Explod
triggerall = anim = 3400
trigger1=animelem=9
anim = 3100
id = 3100
pos = 0,30
scale = .3,.5
bindtime = 1
postype = p1
removetime = -2
sprpriority = 10
ignorehitpause = 1
removeongethit = 0
ownpal = 1
persistent = 0
pausemovetime = 9999999
supermovetime = 9999999

[State 3400, NotHitBy]
type=NotHitBy
trigger1=AnimElemTime(15) < 0
time=1
value=SCA

[State 3400, SuperPause]
type=SuperPause
trigger1=!time
time=25
moveTime=25
p2DefMul=1
unHittable=1
anim=-1
darken=1

[state 0]
type = Helper
trigger1= movehit && numtarget(3400)
trigger1= target(3400),Movetype=H
name = "Zoom 4"
id = 20003
pos = 0,0
postype = p1
stateno = 20003
helpertype = normal
sprpriority = -5
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 3400, Hit]
type=HitDef
trigger1 = !time
id=3400
attr=S, HA
damage=0,0
priority=4, hit
animtype = Up
air.animtype = Up
kill=0
guard.kill=0
numhits=0
getpower=0,0
givepower=20,20
guardflag=MA
hitflag=MAFD
hitsound=S3402,0
guardsound=S130,0
pausetime=1,1
guard.pausetime=12,12
sparkNo=-1
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=49), var(36) :=-48
air.animtype=Back
fall.animtype=Back
ground.type=Low
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=0
air.velocity=0
guard.velocity=-8
airguard.velocity=-8, -2
airguard.ctrlTime=10
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.5
air.fall=1
fall.recover=0
forcestand=1
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd=-255,-255,-255,48
p2stateno=3424
;envshake.time=8
;envshake.ampl=4
;envShake.freq=120

[State 3400, p2state]
type=null;targetstate
trigger1= movehit && numtarget(3400)
trigger1= target(3400),Movetype=H
ID=3400
value=3424
ignorehitpause=1
[State 3400, p1state]
type=changestate
trigger1= movehit && numtarget(3400)
trigger1= target(3400),Movetype=H
trigger1= animelemtime(25) = 0
value=3410
ignorehitpause=1

[State 3400, End]
type=ChangeState
trigger1=!animtime
value=0
ctrl=1

;---------------------------------------------------------------------------
;Kiffa Ater - Success
[Statedef 3410]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 3410
ctrl = 0
sprpriority = 2

[State 3410, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
flag2 = noshadow
ignorehitpause = 1

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

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 5201, Voice]
type = PlaySnd
trigger1 = !Time
value = 3410,0
channel = 1

[State 3400,WhiteBG]
type=helper
trigger1 =!time
helpertype=normal
stateno=3490
ID=3490
name="WhiteBG"
postype=Back
supermovetime=99999
pausemovetime=99999
ownpal=1
ignorehitpause=1
size.xScale=5
size.yScale=5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S10,2
channel = -10

[State 1000,Helper]
type = null;Helper
trigger1 = time = 5
Stateno = 2005
name = "Counter Shine"
postype = p1
pos = 0,-70
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1

[State 0, Explod]
type = Explod
triggerall = anim = 3410
triggerall = facing = 1
trigger1=animelem=1
anim = 3600
id = 3600
pos = 0,100
scale = .5,.5
bindtime = 1
postype = left
vel = 0.5,0
removetime = -2
sprpriority = -1
ignorehitpause = 1
removeongethit = 0
ownpal = 1
persistent = 0
pausemovetime = 9999999
supermovetime = 9999999

[State 0, Explod]
type = Explod
triggerall = anim = 3410
triggerall = facing = -1
trigger1=animelem=1
anim = 3610
id = 3610
pos = -150,100
scale = .5,.5
bindtime = 1
postype = right
vel = -0.5,0
removetime = -2
sprpriority = -1
ignorehitpause = 1
removeongethit = 0
ownpal = 1
persistent = 0
pausemovetime = 9999999
supermovetime = 9999999

[State 3410, PosSet]
type = PosSet
trigger1 = !time
y=0
x=0*facing

[State 3410, TargetFacing]
type = TargetFacing
trigger1=!time
value =-1
ID = 3400
ignorehitpause =1

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=!time
ID=3400
value = 3427

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) = 0
trigger1 = NumTarget
pos = ceil(120 * const(size.xScale)), ceil(-200 * const(size.yScale))

[State 9501, 8]
type = ChangeState
Trigger1 = time >= 70
value = 3411

;---------------------------------------------------------------------------
;Kiffa Ater - Attack 2
[Statedef 3411]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 3411
ctrl = 0
sprpriority = 2

[State 3410, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
flag2 = noshadow
ignorehitpause = 1

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

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 3410, PosSet]
type = PosSet
trigger1 = !time
y=0
x=0*facing

[State 5201, Voice]
type = PlaySnd
trigger1 = !Time
value = 1000,0
channel = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S0,7
channel = -10

[State 1000,Helper]
type = Helper
trigger1 = animelem = 5
Stateno = 2005
name = "Counter Shine"
postype = p1
pos = 0,-70
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1
sprpriority = 10

[State 3410, TargetFacing]
type = TargetFacing
trigger1=!time
value =-1
ID = 3400
ignorehitpause =1

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=!time
ID=3400
value = 3427

[State 4005, AllPalFX]
type = AllPalFX
trigger1 = Time = 40
sinadd = 256, 256, 256, 80
time = 40
persistent = 0

[State 9501, 8]
type = ChangeState
Trigger1 = time >= 70
value = 3412

;---------------------------------------------------------------------------
;Kiffa Ater - Attack 3
[Statedef 3412]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 9999
ctrl = 0
sprpriority = 2

[State 3410, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn

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

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 5201, Voice]
type = PlaySnd
trigger1 = !Time
value = 3410,1
channel = 1

[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3450
name = "Kiffa Ater Helper 1"
postype = p1
pos = 0,-70
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1

[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3453
name = "Clouds 1"
postype = p1
pos = -40,-50
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3454
name = "Clouds 2"
postype = p1
pos = 0,-100
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3455
name = "Clouds 3"
postype = p1
pos = 70,0
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3456
name = "Clouds 4"
postype = p1
pos = -100,-20
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3457
name = "Clouds 5"
postype = p1
pos = -40,-70
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3458
name = "Clouds 6"
postype = p1
pos = 0,0
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=!time
ID=3400
value = 3427

[State 9501, 8]
type = ChangeState
Trigger1 = time >= 150
value = 3413

;---------------------------------------------------------------------------
;Kiffa Ater - Attack 4
[Statedef 3413]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 9999
ctrl = 0
sprpriority = 2

[State 3410, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn

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

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 5201, Voice]
type = PlaySnd
trigger1 = !Time
value = 3410,2
channel = 1
[State 5201, Sound]
type = PlaySnd
trigger1 = !time
value = 3414,1
channel = -7

[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3451
name = "Kiffa Ater Helper 2"
postype = p1
pos = 0,-150
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1

[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3465
name = "BG Dash Lines"
postype = back
pos = 0,0
pausemovetime = 9999
supermovetime = 9999
size.xscale = 2
size.yscale = 2
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3465
name = "BG Dash Lines"
postype = back
pos = 0,-250
pausemovetime = 9999
supermovetime = 9999
size.xscale = 2
size.yscale = 2
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3465
name = "BG Dash Lines"
postype = back
pos = 250,0
pausemovetime = 9999
supermovetime = 9999
size.xscale = 2
size.yscale = 2
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3465
name = "BG Dash Lines"
postype = back
pos = 250,-250
pausemovetime = 9999
supermovetime = 9999
size.xscale = 2
size.yscale = 2
ownpal = 1

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=!time
ID=3400
value = 3427

[State 9501, 8]
type = ChangeState
Trigger1 = time >= 200
value = 3414

;---------------------------------------------------------------------------
;Kiffa Ater - Attack 5
[Statedef 3414]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 9999
ctrl = 0
sprpriority = 2

[State 3410, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn

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

[State 4100, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
pausemovetime = 9999
supermovetime = 9999

[State 1000,Helper]
type = Helper
trigger1 = !time
Stateno = 3452
name = "Kiffa Ater Helper 3"
postype = p1
pos = 0,-500
pausemovetime = 9999
supermovetime = 9999
;size.xscale = .75
;size.yscale = .75
ownpal = 1

[State 1000,Helper]
type = Helper
trigger1 = time = 20
Stateno = 3460
name = "Explosion"
postype = p1
pos = 0,0
;size.xscale = .75
;size.yscale = .75
ownpal = 1

[State 1000,Helper]
type = Helper
trigger1 = time=25
Stateno = 3461
name = "Rocks 1"
postype = p1
pos = -40,0
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = time=30
Stateno = 3462
name = "Rocks 2"
postype = p1
pos = 70,0
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = time=40
Stateno = 3463
name = "Rocks 3"
postype = p1
pos = -150,0
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1
[State 1000,Helper]
type = Helper
trigger1 = time=50
Stateno = 3464
name = "Rocks 4"
postype = p1
pos = 150,0
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=!time
ID=3400
value = 3425

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=time=20
ID=3400
value = 3426

[State 3410, HitAdd]
type = HitAdd
triggerall = NumTarget
trigger1=time=20
value = 1

[State 3410, TargetLifeAdd]
type = TargetLifeAdd
triggerall = NumTarget
trigger1=time=20
value =-ceil(350)
kill = 1

[State 3410, EnvShake]
type = EnvShake
triggerall = NumTarget
trigger1 = time = 20
time = 60
freq = 120
ampl = Ifelse(random<500,5,-5)

[State 5201, Sound]
type = PlaySnd
trigger1 = time = 20
value = 3414,0
channel = -6
[State 5201, Sound]
type = PlaySnd
trigger1 = time = 20
value = 3414,1
channel = -7

[State 9501, 8]
type = ChangeState
Trigger1 = time >= 150
value = 3415

;---------------------------------------------------------------------------
;Kiffa Ater - End
[Statedef 3415]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 3418
ctrl = 0
sprpriority = 2

[State 3410, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 3410, ScreenBound]
type = null;ScreenBound
trigger1 =1
value = 1
movecamera = 1,0
ignorehitpause =1

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = -50*facing
y = 0

[State 3410, TargetState]
type = TargetState
triggerall = NumTarget
trigger1=!time
ID=3400
value = 3428

[State 9501, 8]
type = ChangeState
Trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 3424]
type    = A
movetype= H
physics = N
juggle = 1
ctrl = 0
velset = 0,0
sprpriority = 1
facep2=1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time < 100
value = SCA
time = 1

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 0
y = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
ignorehitpause =1

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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = time >= 10
physics = A

[State 0, VelSet]
type = VelSet
trigger1 = time >= 10
y = -9

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3426

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time >= 10
value = ifelse(selfanimexist(5051),5051,5030)

[State 0, SelfState]
type = SelfState
trigger1 = Pos y>-Vel y
value = 5050
;---------------------------------------------------------------------------
[Statedef 3425]
type    = S
movetype= H
physics = S
juggle = 1
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
ignorehitpause =1
[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

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

[State 0, PosSet]
type = PosSet
trigger1 = !time
y=0
x=0*facing
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3425

;---------------------------------------------------------------------------
[Statedef 3426]
type    = S
movetype= H
physics = S
juggle = 1
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
ignorehitpause =1
[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

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

[State 0, PosSet]
type = PosSet
trigger1 = !time
y=0
x=0*facing
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3426

;---------------------------------------------------------------------------
[Statedef 3427]
type    = S
movetype= H
physics = S
juggle = 1
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
flag2 = invisible
ignorehitpause =1
[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y=0
x=0*facing
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3425

;---------------------------------------------------------------------------
[Statedef 3428]
type    = S
movetype= H
physics = S
juggle = 1
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = !time
value = SCA,AA,AT,AP
time = 70
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = noautoturn
ignorehitpause =1
[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 5110

[State 0, PosSet]
type = PosSet
trigger1 = !time
y=0
x=-50*facing
[State 0, SelfState]
type = SelfState
trigger1 = time >= 100
value = ifelse(alive, 5120, 5150)

;---------------------------------------------------------------------------
; Kiffa Ater Helper 1
[Statedef 3450]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3412
sprpriority = 5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = 1
[State 0, VelSet]
type = VelSet
trigger1 = time = 40
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = time = 100
y = 25

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;---------------------------------------------------------------------------
; Kiffa Ater Helper 2
[Statedef 3451]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3416
sprpriority = 5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = 0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3413

;---------------------------------------------------------------------------
; Kiffa Ater Helper 3
[Statedef 3452]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3417
sprpriority = 5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = 25

[State 0, VelSet]
type = VelSet
trigger1 = pos y>-vel y
y = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3414

;---------------------------------------------------------------------------
; Clouds 1
[Statedef 3453]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3413
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;---------------------------------------------------------------------------
; Clouds 2
[Statedef 3454]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3414
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;---------------------------------------------------------------------------
; Clouds 3
[Statedef 3455]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3415
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;---------------------------------------------------------------------------
; Clouds 4
[Statedef 3456]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3413
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;---------------------------------------------------------------------------
; Clouds 5
[Statedef 3457]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3414
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;---------------------------------------------------------------------------
; Clouds 6
[Statedef 3458]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3415
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -0.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=root,stateno!=3412

;-------------------------------------------------------------------------------
;Explosion
[Statedef 3460]
type = A
movetype = A
physics = N
anim = 3460
sprpriority = 6

[State 3459]
type = AngleDraw
trigger1 = 1
scale = time*1,time*1

[State Fade]
type=trans
trigger1=time>=150
trans=addalpha
alpha=256-((time-150)*4),256
ignorehitpause=1

[State Disappear]
type = DestroySelf
trigger1 = time >= 200

;---------------------------------------------------------------------------
; Rocks 1
[Statedef 3461]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3461
sprpriority = 10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = -1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;---------------------------------------------------------------------------
; Rocks 2
[Statedef 3462]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3462
sprpriority = 10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = -1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;---------------------------------------------------------------------------
; Rocks 3
[Statedef 3463]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3463
sprpriority = 10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = -1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;---------------------------------------------------------------------------
; Rocks 4
[Statedef 3464]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3464
sprpriority = 10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = !time
y = -1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 210, DestroySelf]
type = DestroySelf
trigger1=!animtime

;-------------------------------------------------------------------------------
; BG Dash Lines
[Statedef 3465]
physics=N
anim=3465
Sprpriority=-99999

[State 3480, ScreenBound]
type = ScreenBound
trigger1 =1
value = 1
[State 3480, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 3480, AssertSpecial]
type = AssertSpecial
trigger1 = 1
Flag = noFG
Flag2= nobardisplay
ignorehitpause =1

[State 3480, DestroySelf]
type = DestroySelf
trigger1 =root,stateno!=3413
;-------------------------------------------------------------------------------
[Statedef 3480]
physics=N
anim=3480
Sprpriority=-99999

[State 3480, ScreenBound]
type = ScreenBound
trigger1 =1
value = 1
[State 3480, PosSet]
type = PosSet
trigger1 =1
x =ceil(pos x-GameHeight / GameWidth)
y =ceil(pos y-GameHeight / GameWidth)
ignorehitpause=1
[State 3480, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 3480, AssertSpecial]
type = AssertSpecial
trigger1 = 1
Flag = noFG
Flag2= nobardisplay
ignorehitpause =1

[State 3480, end]
type=destroyself
trigger1 = root,MoveType = H
[State 3480, ChangeState]
type = ChangeState
trigger1 =root,stateno=3311
trigger2 =root,stateno=3415&&root,animelemtime(1)>=0
trigger3 = (Root,StateNo !=[3300,3310]) && Root,StateNo != 3400 && (Root,StateNo !=[3410,3422])
value =3481
;-------------------------------------------------------------------------------
[Statedef 3481]
physics=N

[State 3481, Assert]
type=trans
trigger1=1
trans=addalpha
alpha=256-8*time, 0+8*time
ignorehitpause=1
[State 3481, ScreenBound]
type = ScreenBound
trigger1 =1
value = 1
[State 0, PosSet]
type = PosSet
trigger1 =1
x =ceil(pos x-GameHeight / GameWidth)
y =ceil(pos y-GameHeight / GameWidth)
ignorehitpause=1
[State 3481, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 3481, end]
type=destroyself
trigger1 =time>=32

;-------------------------------------------------------------------------------
[Statedef 3490]
physics=N
anim=3490
Sprpriority=99999

[State 3490, ScreenBound]
type = ScreenBound
trigger1 =1
value = 1
[State 3490, PosSet]
type = PosSet
trigger1 =1
x =ceil(pos x-GameHeight / GameWidth)
y =ceil(pos y-GameHeight / GameWidth)
ignorehitpause=1
[State 3490, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 3490, AssertSpecial]
type = AssertSpecial
trigger1 = 1
Flag = noFG
Flag2= nobardisplay
ignorehitpause =1

[State 3490, end]
type=destroyself
trigger1 = !animtime

;------------------
; Wallbounce - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1026

;------------------
; Wallbounce - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = VelSet
trigger1 = Time = 0
x = -15
y = -7

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

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

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Wallbounce - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

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

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

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

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 0
value = 5000,11

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; Wallbounce - bounce off wall
; (a custom gethit state)
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = Time>=0&&Time<15
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

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

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------
;Guard Spark (Normal)
[StateDef 8000]
type = A
physics = N
moveType = I
anim = 8000
velset = 0,0
sprPriority = 5

[State 8000, Assert: No Shadow]
type = AssertSpecial
trigger1= 1
flag = NoShadow

[State 8000, Scale]
type = AngleDraw
trigger1 = 1
scale = 0.125 + (0.046875 * Time), 0.125 + (0.046875 * Time)

[State 8000, Transparency]
type = Trans
trigger1 = Time < 4
trans = AddAlpha
alpha = 256, 256

[State 8000, Transparency]
type = Trans
trigger1 = Time >= 4
trans = AddAlpha
alpha = 256 - 64 * (Time - 4), 256

[State 8000, End]
type = DestroySelf
trigger1 = Time >= 8

;---------------------------------------------------------------------------
; Medium Kick Effect
[Statedef 8001]
type = A
movetype= I
anim = 8001
sprpriority = 7

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 8002, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -125
scale = 1,2
ignorehitpause = 1

[State 8002, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256
ignorehitpause = 1

[State 8002, DestroySelf]
type = DestroySelf
trigger1 = !animtime

;-------------------------------------------------------------
; Platform 1
[Statedef 8010]
type = A
movetype= I
anim = 8010
sprpriority = 0
velset = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 8002, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 180
scale = .15,.5
ignorehitpause = 1

[State 0, Trans]
type = Trans
trigger1 = time<=20
trans = add

[State 8002, Trans]
type = Trans
trigger1 = time>20
trans = addalpha
alpha = 256-time*10,256
ignorehitpause = 1

[State 8002, DestroySelf]
type = DestroySelf
trigger1 = time = 25

;---------------------------------------------------
; Hit Spark
[StateDef 8050]
type = A
physics = N
movetype = I
anim = 8050
velset=0,0
sprpriority=5

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

[State 8050, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8050, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8050, AngleDraw]
type = AngleDraw
trigger1 = time < 10
scale = .3-(time*.03), .3-(time*.03)

[State 8050, AngleDraw]
type = AngleDraw
trigger1= time >= 10
scale = 0,0

[State 8050, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8050, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8050, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8051)
ID = 8051
scale = .15+(.009375*time),.15+(.009375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8050, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8050, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8052)
ID = 8052
scale = .15+(.009375*time),.15+(.009375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8050, Explod]
type = Explod
trigger1= !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8050, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8053)
ID = 8053
scale = .3-(.0375*time),.3-(.0375*time)
trans = addalpha
alpha = 128-(16*time),256

[State 8050, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

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

;---------------------------------------------------
; Hit Center
[StateDef 8051]
type = A
physics = N
movetype = I
anim = 8050
velset = 0,0
sprpriority = 5

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

[State 8051, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8051, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8051, AngleDraw]
type = AngleDraw
trigger1 = time<10
scale = .35-(time*.035), .35-(time*.035)

[State 8051, AngleDraw]
type = AngleDraw
trigger1 = time >= 10
scale = 0,0

[State 8051, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8051, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8051, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8051)
ID = 8051
scale =.175+(.0109375*time),.175+(.0109375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8051, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8051, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8052)
ID = 8052
scale = .175+(.0109375*time),.175+(.0109375*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8051, Explod]
type = Explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8051, ModifyExplod]
type = ModifyExplod
trigger1= NumExplod(8053)
ID = 8053
scale = .35-(.04375*time),.35-(.04375*time)
trans = addalpha
alpha = 128-(16*time),256

[State 8051, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

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

;---------------------------------------------------
; Hit Streaks
[StateDef 8052]
type = A
physics = N
movetype = I
anim = 8050
velset=0,0
sprpriority=5

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

[State 8052, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8052, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8052, AngleDraw]
type = AngleDraw
trigger1 = time < 10
scale = .4-(time*.04), .4-(time*.04)

[State 8052, AngleDraw]
type = AngleDraw
trigger1 = time >= 10
scale = 0,0

[State 8052, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8052, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8052, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8051)
ID = 8051
scale =.2+(.0125*time),.2+(.0125*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8052, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8052, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8052)
ID = 8052
scale = .2+(.0125*time),.2+(.0125*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8052, Explod]
type = Explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8052, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(8053)
ID = 8053
scale = .4-(.05*time),.4-(.05*time)
trans = addalpha
alpha = 128-(16*time),256

[State 8052, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

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

;---------------------------------------------------
; Hit Impact
[StateDef 8053]
type = A
physics = N
movetype = I
anim = 8050
velset = 0,0
sprpriority = 5

[State 8053, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 8053, AngleSet]
type = AngleSet
trigger1 = !time
value = 30*(random%12)

[State 8053, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 30

[State 8053, AngelDraw]
type = AngleDraw
trigger1 = time < 10
scale = .5-(time*.05), .5-(time*.05)

[State 8053, AngleDraw]
type = AngleDraw
trigger1 = time >= 10
scale = 0,0

[State 8053, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8051)
ID = 8051
scale = .25+(.015625*time),.25+(.015625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8052)
ID = 8052
scale = .25+(.015625*time),.25+(.015625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8054
ID = 8054
postype = p1
vfacing = ifelse(random < 500,-1,1)
sprpriority = -3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8054)
ID = 8054
scale = .5,.5
trans = addalpha
alpha = 256-(32*time),256

[State 8053, Explod]
type = Explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8053, ModifyExplod]
type = ModifyExplod
trigger1 = numexplod(8053)
ID = 8053
scale = .5-(.0625*time),.5-(.0625*time)
trans = addalpha
alpha = 256-(32*time),256

[State 8053, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 16

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

;---------------------------------------------------
; Hit Special
[StateDef 8054]
type = A
physics = N
movetype = I
anim = 8050
velset = 0,0
sprpriority = 5

[State 8054, AssertSpecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 8054, Angle]
type = angleset
trigger1 = !time
value = 30*(random%12)

[State 8054, AngleAdd]
type = angleadd
trigger1 = 1
value = 30

[State 8054, AngleDraw]
type = angledraw
trigger1 = time < 10
scale = .45-(time*.045), .45-(time*.045)

[State 8054, AngleDraw]
type = angledraw
trigger1 = time >= 10
scale = 0,0

[State 8054, Trans]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8051
ID = 8051
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8051)
ID = 8051
scale = .225+(.0140625*time),.225+(.0140625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8052
ID = 8052
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
sprpriority = 5
removetime = 16
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8052)
ID = 8052
scale = .225+(.0140625*time),.225+(.0140625*time)
trans = addalpha
alpha = 256-(16*time),256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8054
ID = 8054
postype = p1
vfacing = ifelse(random < 500,-1,1)
sprpriority = -3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8054)
ID = 8054
scale = .4,.4
trans = addalpha
alpha = 256-(32*time),256

[State 8054, Explod]
type = explod
trigger1 = !time
anim = 8053
ID = 8053
postype = p1
facing = ifelse(random < 500,-1,1)
vfacing = ifelse(random < 500,-1,1)
sprpriority = 3
removetime = 8
pausemovetime = -1
supermovetime = -1

[State 8054, ModifyExplod]
type = modifyexplod
trigger1 = numexplod(8053)
ID = 8053
scale = .45-(.05625*time),.45-(.05625*time)
trans = addalpha
alpha = 192-(24*time),256

[State 8054, RemoveExplod]
type = RemoveExplod
trigger1= time >= 16

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

;---------------------------------------------------------------------------
;Recover FX
[StateDef 8200]
type = A
velSet = 0,0
anim = 8200
sprPriority = 5

[State 8200, Assert: NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8200, Scale]
type = AngleDraw
trigger1 = 1
scale = 0.25 + (0.017 * Time), 0.25 + (0.017 * Time)

[State 8200, Transparency]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = ceil(256 - 17.1 * Time), 256

[State 8200, End]
type = DestroySelf
trigger1 = Time >= 15

;POWER CHARGE FX 
[Statedef 8300]
type = A
physics = N
movetype = I
anim = 1
ctrl = 0
velset = 0, 0

[State 8330, Bind]
type = bindtoroot
trigger1 = (root, stateno = 1700)
pos = 0,0

[State 8330, Snd]
type = playsnd
trigger1 = !time
value = 1710,0
channel = 0

[State 8330, Aura]
type = explod
trigger1 = !numexplod(8300)
ID = 8300
anim = 8300
sprpriority = 3
postype = p1
bindtime = -1
removetime = -1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8330, FX]
type = modifyexplod
trigger1 = numexplod(8300) && root, power < 3000
ID = 8300
scale = 0.5, 0.1 + 0.4 * (root, power / 3000.0)

[State 8330, FX]
type = modifyexplod
trigger1 = numexplod(8300) && root, power >= 3000
ID = 8300
scale = 0.5, 0.5

[State 8330, End]
type = stopsnd
trigger1 = root, stateno != 1700
channel = 0

[State 8330, End]
type = removeexplod
trigger1 = root, stateno != 1700

[State 8330, End]
type = destroyself
trigger1 = root, stateno != 1700

;SUPER FINISH
[Statedef 8600]
type = A
velset = 0, 0
anim = 9999

[State 8605, Super Finish Sound]
type = PlaySnd
trigger1 = !Time
value = 8600,0
channel = -3

[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 72
anim = 9999
sound = S8600,1
pos = 0,0
movetime = 72
darken = 0

[State 8600, MvC]
type = explod
trigger1 = !time
anim = 8600
ID = 8600
ontop = 0
pos = -100, -30
scale = .8, .8
bindtime = -1
postype = back
sprpriority = -5
removetime = 72
pausemovetime = 72
supermovetime = 72

[State 8600, Assert]
type = assertspecial
trigger1 = time <= 72
flag = noFG
flag2 = nobardisplay

[State 8600, End]
type = removeexplod
trigger1 = time >= 72
trigger2 = roundstate < 3

[State 8600, End]
type = destroyself
trigger1 = roundstate < 3

;SUPER FINISH 2
[Statedef 8605]
type = A
velset = 0, 0
anim = 9999

[State 8605, Super Finish Sound]
type = PlaySnd
trigger1 = !Time
value = 8600,0
channel = -3

[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 72
anim = 9999
sound = S8600,1
pos = 0,0
movetime = 72
darken = 0

[State 8600, MvC]
type = explod
trigger1 = !time
anim = 8600
ID = 8600
ontop = 0
pos = -100, -30
scale = .8, .8
bindtime = -1
postype = back
sprpriority = -5
removetime = 72
pausemovetime = 72
supermovetime = 72

[State 8600, Assert]
type = assertspecial
trigger1 = time <= 72
flag = noFG
flag2 = noBG
flag3 = nobardisplay

[State 8600, End]
type = removeexplod
trigger1 = time >= 72
trigger2 = roundstate < 3

[State 8600, End]
type = destroyself
trigger1 = roundstate < 3

;---------------------------------------------------------------------------
; Blast
[Statedef 2000]
type    = A
movetype= A
physics = N
velset = 0,-5
ctrl = 0
anim = 2000
sprpriority = 2
poweradd = -500

[State 0, NotHitBy]
type = NotHitBy
trigger1 = !time
value = SCA,AA,AT,AP
time = 37

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S2000,(random%3)
volumescale = 100
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
y = 0

[State 0, EnvShake]
Type = EnvShake
trigger1 = !time
Time  = 15
Ampl  = 4
Freq  = 90

[State 1000,Helper]
type = Helper
trigger1 = AnimElem = 3
Stateno = 2005
name = "Counter Shine"
postype = p1
pos = -20,-70
pausemovetime = 9999
supermovetime = 9999
size.xscale = .75
size.yscale = .75
ownpal = 1

[State 500, Hitdef]
type = HitDef
trigger1 = !time
attr = A, NA
damage = 0, 0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 9, Hit
pausetime = 0, 0
guard.pausetime = 5,5
sparkno = -1
guard.sparkno = s8050
sparkxy = -90, -260
hitsound = s5, 4
guardsound = s6, 0
ground.type = High
air.type = High
ground.slidetime = 2
ground.hittime  = 2
air.hittime = 2
ground.velocity = -30,-25
air.velocity = -30,-25
airguard.velocity = -1.9,-.8
fall = 1
fall.recover = 0
envshake.time = 2
envshake.freq = 60
envshake.ampl = -20
envshake.phase = 120
p2stateno = 1025

[State 500, PlaySnd]
type = PlaySnd
trigger1 = !time
value = s0, 2
channel = -1
volumescale = 100

[State 0, Gravity]
type = Gravity
trigger1 = time > 37

[State 500, ChangeState]
type = ChangeState
trigger1 = Pos Y > 0 && Vel Y > 0
value = 52
ctrl = 0
;----------------------------------------------------
; Blast Shine
[StateDef 2005]
Type = A
Movetype = A
Physics = N
Anim = 2005
Ctrl = 0
Sprpriority = -1

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

[State 1001, Trans]
type = Trans
trigger1 = 1
trans = Add
ignorehitpause = 1

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

;---------------------------------------------------------------------------
;Zoom
[Statedef 20000]
type    = A
movetype= A
physics = N
anim = 9999
ctrl = 0
sprpriority = 1

[State 0]
type = varadd
trigger1 = time <= 5
fvar(0) = 0.1

[State 0]
type = Zoom
trigger1 = 1
pos = root,pos x, root,pos y
scale = 1+fvar(0)
ignorehitpause = 1

[State 0]
type = destroyself
trigger1 = time = 40

[State 0]
type = varadd
trigger1 = time >= 35
fvar(0) = -0.1

;---------------------------------------------------------------------------
;Zoom 2
[Statedef 20001]
type    = A
movetype= A
physics = N
anim = 9999
ctrl = 0
sprpriority = 1

[State 0]
type = varadd
trigger1 = time <= 5
fvar(0) = 0.1

[State 0]
type = Zoom
trigger1 = 1
pos = root,pos x, root,pos y
scale = 1+fvar(0)
ignorehitpause = 1

[State 0]
type = destroyself
trigger1 = time = 200

[State 0]
type = varadd
trigger1 = time >= 198
fvar(0) = -0.1

;---------------------------------------------------------------------------
;Zoom 3
[Statedef 20002]
type    = A
movetype= A
physics = N
anim = 9999
ctrl = 0
sprpriority = 1

[State 0]
type = varadd
trigger1 = time <= 5
fvar(0) = 0.1

[State 0]
type = Zoom
trigger1 = 1
pos = root,pos x, root,pos y
scale = 1+fvar(0)
ignorehitpause = 1

[State 0]
type = destroyself
trigger1 = time = 90

[State 0]
type = varadd
trigger1 = time >= 85
fvar(0) = -0.1

;---------------------------------------------------------------------------
;Zoom 4
[Statedef 20003]
type    = A
movetype= A
physics = N
anim = 9999
ctrl = 0
sprpriority = 1

[State 0]
type = varadd
trigger1 = time <= 5
fvar(0) = 0.1

[State 0]
type = Zoom
trigger1 = 1
pos = root,pos x, root,pos y
scale = 0.8+fvar(0)
ignorehitpause = 1

[State 0]
type = destroyself
trigger1 = root,anim!=3400

[State 0]
type = varadd
trigger1 = time >= 45
fvar(0) = -0.1

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

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

[Statedef -2]

[State ,攻击]
type = attackmulset
trigger1 = 1
value = 1+palno*0.2 ;palno后的1可以改成其他数字，数字越大攻击力随P数增大越多，但不可以是负数
ignorehitpause=1

[State -2, 无限气]
type = powerset
trigger1 = palno>=9&&power<10000
value = 10000

;时常恢复血量
[State -2]
type = LifeAdd
trigger1 = palno>=5
trigger1 = life<lifemax*0.9
trigger1 = GameTime%20 = 1
value = (lifemax-life)*0.03+(palno-5)*0.02
ignorehitpause = 1


[State -2, Dream]
type = SelfState
trigger1 = sysvar(3)
trigger1 =! enemynear,name ="Rentaro Satomi"
value = 140 
ignorehitpause = 1

[State -2, Dream]
type= VarSet
trigger1 = !sysvar(3)
trigger1 =! enemynear,name ="Rentaro Satomi"
sysvar(3) = 1
ignorehitpause = 1

[State -2, Victory Quotes(non-specific)]
type=VictoryQuote
trigger1=1
value=random%4

[State -2, VarSet]
type = VarSet
trigger1 = MoveContact = 1 && var(10) < 0
var(10) = hitpausetime
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = MoveContact = 1 && var(10) = hitpausetime
trigger1 = MoveHit = 1 && NumEnemy
trigger1 = var(11) > 0
trigger1 = MoveGuarded = 1 && NumEnemy
trigger2 = var(12) > 0
helpertype = normal
name="Hit_Spark"
stateNo = Ifelse(MoveGuarded, var(12),var(11))
ID = 8050
postype = p1
pos = Ifelse(P2Dist x < 0, 0, Ifelse(P2Dist x < var(13), ceil(P2Dist x), var(13))), var(14)
ownpal = 1
keyctrl = 0
pausemovetime=65535
supermovetime=65535
ignorehitpause = 1
size.xscale = 1
size.yscale = 1

[State -2, Hit Detection]
type=varset
trigger1= 1
var(10)=-1
[State -2, Hit Detection]
type=varrangeset
trigger1= movetype=I 
trigger2= movetype=H && time
first=10
last=14
value=-1
ignorehitpause=1

[State -2, varKOsnd]
type=varset
trigger1= alive && var(46)>0
trigger2= !alive && var(46)<2
var(46)=ifelse(alive,0,var(46)+1)
ignorehitpause=1
[State -2, KOsnd]
type=playsnd
trigger1= !alive && var(46)=1
trigger1= var(46):=2
value= 11, ifelse(stateno=5950, 7,  1+random%2)
channel=31
ignorehitpause=1

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

[Statedef -3]

[State -3,Dream]
type = VarSet
trigger1 = 1
trigger1 =! enemynear,name ="Rentaro Satomi"
sysvar(3)= 0
ignorehitpause = 1

;[state -3, dampener]
;type = attackmulset
;trigger1 = numtarget >= 1
;value = 0.90 ** target, gethitvar(hitcount)

[State -3, Get Hit Sound]
type=PlaySnd
triggerAll=Alive && Time=1
triggerAll=StateNo=5000 || StateNo=5010
trigger1=GetHitVar(AnimType) >= 2 && Random < 500
trigger2=GetHitVar(AnimType)=1 && Random < 375
trigger3=GetHitVar(AnimType)=0 && Random < 250
value=5000,(Random % 3)
channel=0
ignoreHitPause=1
[State -3, Get Hit Sound]
type =PlaySnd
triggerAll=Alive && Time=1
trigger1=(StateNo=5000 || StateNo=5010) && NumEnemy
trigger1=GetHitVar(fall) || (EnemyNear, HitDefAttr=SCA,SA,HA)
trigger2=(StateNo=5020 || StateNo=5070 || StateNo=5080)
trigger3=(StateNo=5050 || StateNo=5100) && (PrevStateNo != [5000,5199])
value=5000,random%3
channel=0
ignoreHitPause=1

;----------------------------------
[State -3, Cheap KO]
type=ChangeState
trigger1=!Alive && (StateNo=[5000,5010])
trigger1=(PrevStateNo=[130,131]) || (PrevStateNo=[140,141]) || (PrevStateNo=[150,153])
value=5950
ignoreHitPause=1
[State -3, Assert: NoKOsnd (Cheap KO)]
type=AssertSpecial
trigger1=(StateNo=[5000,5010])
trigger1=(PrevStateNo=[130,131]) || (PrevStateNo=[140,141]) || (PrevStateNo=[150,153])
flag=NoKOsnd
ignoreHitPause=1

[State -3, Special Cancel Reset]
type=VarSet
trigger1=1
var(5)=0
ignoreHitPause=1
[State -3, Special Cancel Check]
type=VarSet
trigger1 = (stateno = [200,699]) && prevstateno!=700 && prevstateno!=750 && Time <= 2
trigger2 = (stateno = [200, 250]) && movecontact
trigger3 = (stateno = [400, 440]) && movecontact
trigger4 = stateno = 1000 && movecontact
trigger5 = stateno = 1100 && movecontact
trigger6 = stateno = 1200 && movecontact
trigger7 = stateno = 1300 && movecontact
trigger8 = stateno =  1400 && movecontact
trigger9 = stateno =  1500 && movecontact
trigger10 = stateno =  1600 && movecontact
trigger11 = stateno =  1700 && movecontact
trigger12 = stateno =  1800 && movecontact
trigger13= (stateno = 220) && movecontact
trigger14= (stateno = 420) && movecontact
trigger15 = (stateno = [200, 250]) && movecontact
trigger16 = ((stateno = [600, 650])&& movecontact)
var(5)=1
ignoreHitPause=1

[State -3, Super Cancel Reset]
type=VarSet
trigger1=1
var(6)=0
ignoreHitPause=1
[State -3, Super Cancel Check]
type=VarSet
trigger1 = (stateno = [200,699]) && prevstateno!=700 && prevstateno!=750 && Time <= 2
trigger2 = (stateno = [200,450]) && movecontact
trigger3 = ((stateno = [1000,1049])||(stateno = [1050,1099])) && movecontact
trigger4 = ((stateno = [1100,1149])||(stateno = [1150,1199])) && movecontact
trigger5 = ((stateno = [1200,1249])||(stateno = [1250,1259])) && movecontact
trigger6 = ((stateno = 1300)||(stateno = 1350)) && movecontact
trigger7 = ((stateno = 1400)||(stateno = 1450)) && movecontact
var(6)=1
ignoreHitPause=1

[State -3, MAX Cancel Reset]
type=VarSet
trigger1=1
var(7)=0
ignoreHitPause=1
[State -3, MAX Cancel Check]
type=VarSet
trigger1 = stateno = 3000 && movecontact
trigger2 = stateno = 3100 && movecontact
trigger3 = stateno = 3200 && movecontact
var(7)=1
ignoreHitPause=1

[State -3, Super Finish]
type = helper
triggerall = winKO && !numhelper(8600)
triggerall = roundstate = 3
trigger1 = MoveHit = 1 && (StateNo = [3000,4999])
trigger2 = StateNo = [3300,3399]
stateno = 8600
ID = 8600
name = "Super Finish"
postype = left
pos = 160, -120
ownpal = 1
pausemovetime = 255
supermovetime = 255
ignorehitpause = 1

[State -3, Super Finish 2]
type = helper
triggerall = winKO && !numhelper(8605)
triggerall = roundstate = 3
trigger1 = MoveHit = 1 && (StateNo = [3000,4999])
trigger2 = StateNo = [3400,3499]
stateno = 8605
ID = 8605
name = "Super Finish 2"
postype = left
pos = 160, -120
ownpal = 1
pausemovetime = 255
supermovetime = 255
ignorehitpause = 1

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0

[State 20, PlaySnd]
type = PlaySnd
triggerall = Anim = 20
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
value = S100,3

[State 20, PlaySnd]
type = PlaySnd
triggerall = Anim = 21
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
value = S100,3