============================================================================================
=                                                                                          =
=                                                                                          =
=                                                                                          =
= BBBBBBBBBBBBBBBBBBBBBBBBBBB                                 BBBBBBBBBBBBBBBBBBBBBBBBBBBB =
=   BBBBBBBBBBBBBBBBBBBBBBBBBBB                             BBBBBBBBBBBBBBBBBBBBBBBBBBBB   =
=      BBBBBBBBBBBBBBBBBBBBBBBBB           B   B           BBBBBBBBBBBBBBBBBBBBBBBBBB      =
=          BBBBBBBBBBBBBBBBBBBBBBB         BBBBB         BBBBBBBBBBBBBBBBBBBBBBBB          =
=            BBBBBBBBBBBBBBBBBBBBBBBBB     BBBBB     BBBBBBBBBBBBBBBBBBBBBBBBBB            =
=             BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB                               BBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB          ;BAT-THROW           BBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB                               BBBBBBBBBBBBBBBBB             =
=                    BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB                   =
=                           BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB                           =
=                                   BBBBBBBBBBBBBBBBBBBB                                   =
=                                        BBBBBBBBBB                                        =
=                                           BBBB                                           =
=                                            BB                                            =
=                                                                                          =

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Throw Forward - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 750
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1 + var(43), Miss
sparkno = s8820
guard.sparkno = s8840
sparkxy = 13, -68
hitsound = S16, 1
sprpriority = 1
p1facing = ifelse (command = "holdback", -1, 1)
p2facing = 1
p1stateno = 801
p2stateno = 810
guard.dist = 0
fall = 1

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

;---------------------------------------------------------------------------
; Throw Forward - Throwing the opponent
[Statedef 801]
type    = S
movetype= A
physics = N
anim = 801
poweradd = 60

[State 801, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 2

[State 801, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 4, 0

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
pos = 7, -20

[State 801, Width 2-11]
type = Width
trigger1 = AnimElem = 2
edge = 2,0

[State 801, Bind 2-4]
type = TargetBind
trigger1 = AnimElem = 3
pos = -30, -92;-102

[State 801, Bind 5]
type = TargetBind
trigger1 = AnimElem = 4
pos = -36, -94;-105

[State 801, Bind 6]
type = TargetBind
trigger1 = AnimElem = 5
pos = -40, -96;-106

[State 801, Bind 8]
type = TargetBind
trigger1 = AnimElem = 6
pos = 8, -95

[State 801, Bind 9]
type = TargetBind
trigger1 = AnimElem = 7
pos = 45, -58

[State 801, Bind 10]
type = TargetBind
trigger1 = AnimElem = 8
pos = 35, -30

[State 801, Bind 11]
type = TargetBind
trigger1 = AnimElem = 9
pos = 45, -20

[State 801, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 10
value = -78

[State 801, Throw 11]
type = TargetState
trigger1 = AnimElem = 10
value = 821

[State 801, 3]
type = PosAdd
trigger1 = AnimElem = 11
x = 35

[State 801, 2] ;P2 Hit Ground Spark (front)
type = Explod
trigger1 = Time = 33
persistent = 0
ID = 8400
anim = 8400
postype = p2
pos = -4, -3
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = 3

[State 801, 3] ;P2 Hit Ground Spark (back)
type = Explod
trigger1 = Time = 31
persistent = 0
ID = 8401
anim = 8401
postype = p2
pos = -4, -3
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = -3

[State 801, 4]
type = EnvShake
trigger1 = Time = 30
time = 10

[State 801, 5]
type = PlaySnd
trigger1 = Time = 0
value = 3, 1
persistent = 0

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




;---------------------------------------------------------------------------
; Headbutt Throw Trigger
[Statedef 810]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 750
sprpriority = 2



[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
priority = 1, Miss
sparkno = -1
hitsound = s3,1
guardsound = S3,0
sprpriority = 1
p1stateno = 815
p2stateno = 816
guard.dist = 0
fall = 1
ID = 800

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

;---------------------------------------------------------------------------
; Headbutt
[Statedef 815]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(4) < 0
pos = 27, -9

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = MAF
hitsound = 5, 4
priority = 1, Miss
damage = 78
sprpriority = 1
guard.dist = 0
fall = 1
chainID = 800
pausetime = 8,7
sparkxy = -10,-100
guard.sparkno = S8840
sparkno = S8820
hitsound   = s2,2
guardsound = s3,0
animtype = Back
ground.type = High
air.velocity = -5,-3
snap = 38, 0
p1stateno = 10028
p2stateno = 817

[State 2250,snda]
type = PlaySnd
trigger1 = animelem = 1
value = 9999,7

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

;;---------------------------------------------------------------------------
 /|    |\  /|    |\
(;Grappling Hook up)
 \|      \/      |/

[Statedef 10028]
type    = S
movetype= A
physics = S
poweradd= 100
velset = 0,0
anim = 10028
ctrl = 0
sprpriority = 2

[State 2250,snda]
type = PlaySnd
trigger1 = animelem = 5
value = 44,5

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

;---------------------------
[Statedef 10029]
type    = A
movetype= I
physics = A
juggle  = 4
poweradd= 110
velset = 0,0
anim = 10029
ctrl = 0
sprpriority = 2



[State 1010, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 100280
ctrl = 1
;---------------------------
; Head Stomp 2 - Going Up!
[Statedef 100280]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
velset = 0,0
anim = 100280
ctrl = 0
sprpriority = 2

[State 10045, 0]
type = ScreenBound
trigger1 = 1
movecamera = 0

[State 10045, 1]
type = VelSet
trigger1 = 1
y = -10.5

[State 10045, Stomp]
type = ChangeState
trigger1 = Screenpos Y < -25
value = 10050

[State 10045, NoPush]
type = PlayerPush
trigger1 = 1
value = 0

;--------------------------
; Head Stomp 3 - Stomp!
[Statedef 10050]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 80
velset = 0,5
anim = 4110
ctrl = 0
sprpriority = 2

[State 10050, 0]
type = PosAdd
trigger1 = Time = 0
x = P2Dist X

[State 10045, 0]
type = ScreenBound
trigger1 = 1
movecamera = 0

[State 10050, 1]
type = HitDef
trigger1 = Time = 1
attr = S, SA
animtype  = Med
damage    = 52, 4
priority  = 5
guardflag = MA
pausetime = 4,8
guard.sparkno = S8840
sparkno = S8820
sparkxy = 0,-48
hitsound   = s2,2
guardsound = s3,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 10050, Bounce]
type = ChangeState
trigger1 = MoveContact
value = 105


;---------------------------------------------------------------------------
; Thrown by Headbutt
[Statedef 816]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 816, 2]
type = NotHitBy
trigger1 = AnimElemTime(2) <= 0
value = SCA

[State 0, PosAdd]
type = PosAdd
trigger1 = frontedgebodydist < 20
x = -10
[State 0, PosAdd]
type = PosAdd
trigger1 = backedgebodydist < 20
x = 10


[State 10210, 3]
type = Selfstate
trigger1 = time = 50
value = 5070
ctrl = 1



[State 821, 4] ;Hit ground
type = SelfState
trigger1 = roundstate = 3
trigger1 = time = 100
value = 5050
ctrl = 1


;P2 Custom Statedef
[Statedef 817]
type    = S
movetype= H
physics = S
velset = 0,0
ctrl = 0

[State 10210, 1]
type = Changeanim
trigger1 = animexist(5300)
trigger1 = anim != 5300
trigger1 = Vel Y = 0
trigger1 = statetype != A
value = 5300

[State 10210, 2]
type = Changeanim2
trigger1 = !animexist(5300)
trigger1 = anim != 9010
trigger1 = Vel Y = 0
trigger1 = statetype != A
value = 9010


[State 9010, 034.1]
type = PosSet
trigger1 = p2stateno =[0,9999]
Y = 0

[State 9010, 034.12]
type = VELSet
trigger1 = p2stateno =[0,9999]
Y = 0


[State 10210, 3]
type = Selfstate
trigger1 = time = 150
value = 5070
ctrl = 1

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = roundstate = 3
trigger1 = time = 100
value = 5050
ctrl = 1

;---------------------------------------------------------------------------
;Throw K (attempt)

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

[State 800, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 850

[State 820, HitDef]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
animtype = Up
pausetime = 0,0
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 821
p2stateno = 830
guard.dist = 0
ground.velocity = 2.2,-10
air.velocity = 2.2,-10
;yaccel = .41
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
fall.damage = 80

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

;---------------------------------------------------------------------------
;Throw K (throwing opponent)

[Statedef 821]
type    = S
movetype= A
physics = N
anim = 821
poweradd = 60
sprpriority = 2

[State 821, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(6) = 0
value = 0

[State 821, TargetBind 1]
type = TargetBind
trigger1 = Time = 0
pos = 42,0

[State 821, TargetBind 2]
type = TargetBind
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
pos = 39,0

[State 821, TargetBind 3]
type = TargetBind
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
pos = 6,-2

[State 821, TargetBind 4]
type = TargetBind
trigger1 = (AnimElemTime(4) >= 0) && (AnimElemTime(5) < 0)
pos = 3,-2

[State 821, TargetBind 5]
type = TargetBind
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(6) < 0)
pos = -11,-2

[State 821, TargetState]
type = TargetState
trigger1 = AnimElemTime(6) = 0
value = ifelse(PalNo > 6, 832, 831)

[State 821, Grab Sound]
type = PlaySnd
trigger1 = Time = 0
value = 3, 1

[State 821, Yell 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 1,0
channel = 0

[State 821, Yell 2]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = 1,3
channel = 0

[State 821, PowerAdd]
type = PowerAdd
trigger1 = AnimElemTime(6) = 0
value = 60

[State 821, Hurt]
type = TargetLifeAdd
trigger1 = AnimElemTime(6) = 0
value = ifelse(PalNo > 6, -160, -80)

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

;---------------------------------------------------------------------------
;Throw K (thrown state for opponent)

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

[State 830, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(4) = 0
value = 3

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

;---------------------------------------------------------------------------
;Throw K (opponent fly away - MSH)

[Statedef 831]
type    = A
movetype= H
physics = N
velset = 2.2,-11
poweradd = 60
sprpriority = 0

[State 831, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.42

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

[State 831, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 11
y = -32

[State 831, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (SelfAnimExist(5051))
value = 5051

[State 831, ChangeAnim 2]
type = ChangeAnim
trigger1 = (Vel Y >= 0) && (SelfAnimExist(5061)) && (Anim != 5061)
value = 5061

[State 831, ChangeAnim2 1]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5051))
value = 831

[State 831, ChangeAnim2 2]
type = ChangeAnim2
trigger1 = (Vel Y >= 0) && (!SelfAnimExist(5061)) && (Anim != 832)
value = 832

[State 831, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
;Throw K (opponent fly away - MvC)

[Statedef 832]
type    = A
movetype= H
physics = N
velset = 4,-13
poweradd = 60
sprpriority = 0

[State 832, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.49

[State 832, Turn]
type = Turn
trigger1 = Time = 0

[State 832, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 11
y = -32

[State 832, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (SelfAnimExist(5051))
value = 5051

[State 832, ChangeAnim 2]
type = ChangeAnim
trigger1 = (Vel Y >= 0) && (SelfAnimExist(5061)) && (Anim != 5061)
value = 5061

[State 832, ChangeAnim2 1]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5051))
value = 831

[State 832, ChangeAnim2 2]
type = ChangeAnim2
trigger1 = (Vel Y >= 0) && (!SelfAnimExist(5061)) && (Anim != 832)
value = 832

[State 832, SelfState]
type = SelfState
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------


;---------------------------------------------------------------------------
; Kick Throw Trigger
[Statedef 850]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 850
sprpriority = 2


[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
hitsound = s3,1
guardsound = S3,0
sprpriority = 2
p1facing = ifelse(Command = "holdfwd",1,-1)
p2facing = -1
p1stateno = 851
p2stateno = 855
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = ifelse(PalNo > 6, 0, 1)
fall.recover = 0
fall.damage = 80


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

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

[Statedef 851]
type    = S
movetype= A
physics = N
anim = 851
sprpriority = 2

[State 103502, 2]
type = PlaySnd
trigger1 = Time = 0
value = 9999, 10


[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = 50,0

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 30,0

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
pos = 0,0

[State 810, TargetState]
type = TargetState
trigger1 = AnimElem = 4
value = 856




[State 810, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 4
value = 50

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

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

[Statedef 855]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

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

[State 815, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 855

[Statedef 856]
type    = A
movetype= H
physics = N
velset = -12,-7
poweradd = 50

[State 816, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = [0,10]) && (SelfAnimExist(5060));Not if hit off ground anim
value = 5060

[State 816, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5060));Not if hit off ground anim
value = 816

[State 816, PosAdd]
type = PosAdd
trigger1 = Time = 0
Y = 40

[State 816, VelAdd]
type = VelAdd
trigger1 = Time >= 1
Y = 0.5

[State 816, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0
;END

;---------------------------------------------------------------------------
; Throws
;---------------------------------------------------------------------------
[Statedef 860]
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 860
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 860, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
hitsound = S3,1                     ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 861      ;On success, KFM changes to state 810
p2stateno = 870      ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
id = 860

[State 860]
type = ChangeAnim
trigger1 = AnimTime = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
persistent = 0

[State 860]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = anim = [41,43]
trigger1 = SelfAnimExist(anim + 3)
value = Anim + 3
persistent = 0


[State 860, 2]
type = ChangeState
trigger1 = animtime= 0
value = 50
ctrl = 0
;---------------------------------------------------------------------------
; Air Slam

[Statedef 861]
type    = A
movetype= A
physics = N
anim = 861
poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 0, Turn]
type = Turn
trigger1 = !time
trigger1 = command = "holdback"

[State 812]
type = Playsnd
trigger1 = time = 0
value = 9999,6



[State 861]
type = Width
trigger1 = Time = 0
edge = 70,70


[State 861, Bind 1]
type =  TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 40,-18

[State 861, Bind 2]
type =  TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 40,-18

[State 861, Bind 3]
type =  TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 40,-33

[State 861, Bind 4]
type =  TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 40,-23


[State 861, Bind 5]
type =  TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 46,-28


[State 861, Bind 6]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 6,-31


[State 861]
type = VelSet
trigger1 = AnimElem = 6
y = 4

[State 861]
type = VelAdd
trigger1 = AnimElem = 6, >= 0
y = 0.45

[State 812]
type = Playsnd
trigger1 = time = 10
value = 44,7


[State 861]
type = TargetState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 871

[State 861, State End]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 862
ctrl = 0


[State 861, State End]
type = ChangeState
trigger1 = !NumTarget(860)
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Air Forward Slam Land

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



[State 812]
type = VarSet
trigger1 = var(41)
var(41) = 0

[State 812]
type = TargetBind
trigger1 = 1;AnimElemNo(0) = 1
pos = -1,5*sin(Time*pi/2)


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

[State 812]
type = Playsnd
trigger1 = time = 0
value = 44,12

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 30100
id = 30100
pos = 0,0
postype = p1
sprpriority = -2


[State 812]
type = TargetLifeAdd
trigger1 = time = 0
value = -120

[State 862]
type = TargetState
trigger1 = AnimTime = 0
value = 872

[State 862, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 935
ctrl = 0


[State 862, State End]
type = ChangeState
trigger1 = !NumTarget(860)
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------------
;Air Forward Slam End
[Statedef 863]
type    = S
movetype= I
physics = N
juggle  = 0
ctrl = 0
sprpriority = 2


[State 863]
type = ChangeState
trigger1 = Time = 0
value = 105

;---------------------------------------------------------------------------
;Thrown by Air Forward Slam

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

[State 0, Turn]
type = Turn
trigger1 = !time
trigger1 = enemynear, command = "holdback"


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


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

[State 940, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 940, 2]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown by Air Forward Slam Land

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

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


[State 941, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 941, 2]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown by Air Forward Slam

[Statedef 872]
type    = A
movetype= H
physics = N
velset = -15,0
poweradd = 60

[State 943, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 871
elem = 3

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


[State 943, 1]
type = SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5050

[State 943, 4] ;Hit ground
type = SelfState
trigger1 = Time = 60
value = 5050;5100 ;Hit ground

;---------------------------------------------------------------------------
; Air Throw End

[Statedef 935]
type    = A
movetype= I
physics = N
juggle  = 0
velset = -3,-9
ctrl = 0
sprpriority = 2



[State 935]
type = PlayerPush
trigger1 = Time < 10
value = 0


[State 931]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 43
persistent = 0


[State 935]
type = VelAdd
trigger1 = 1
y = 0.4


[State 935]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 50
ctrl = 0

;---------------------------------------------------------------------------
; Batman Beyond tackle1
; CNS difficulty: easy
; Description: This is a simple special attack that can hit twice. Notice
;     the use of the Width controller to keep opponents from getting too
;     close to KFM during his uppercut (press Ctrl-C, and look at the
;     yellow bar at KFM's feet during the move).
;     The second HitDef has some interesting parameters. fall.recovertime
;     is used to prevent the opponent (p2) from recovering immediately
;     after being hit (eg. press x+y with KFM to recover). This gives the
;     attacking KFM a chance to follow up with an extra attack, such as
;     a Kung Fu Knee. The yaccel parameter, set at 0.4, makes p2 fall at a
;     greater value of acceleration than the default, which is 0.35.
[Statedef 12100]
type    = S
movetype= A
physics = N
juggle  = 1
poweradd= 100
velset = 0,0
anim = 11100
ctrl = 0
sprpriority = 2

[State 12100,6]
type = helper
trigger1 = AnimElem = 4
name = "JET"
id = 14405
pos = 0,0
postype = p1
stateno = 14405
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
persistent = 0

;-------------------------------

[State 12100,1.11];var
type = VarRandom
trigger1 = Time = 3
v = 11
range = 0, 2

[State 12100, Playsnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,110

[State 12100,1.1 ]
type = velset
trigger1 = !animelemtime(4)
x = 8

[State 12100,1.6]
type = width
trigger1 = animelemtime(4) >=0
edge = 30,0

[State 12100,5]
type = HitDef
trigger1 = !movecontact
damage = 125,45
guard.pausetime = 2,2
getpower = 50,140
givepower = 0,0
attr = A, ST
guardflag = MA
priority = 6,Miss
sparkno = -1
guard.sparkno = -1
sprpriority = 2
guardsound = s3,0
p1facing = 1
p2facing = 1
p1stateno = 12101
p2stateno = 11109
numhits = 1
fall = 1

[State 12100,5]
type = changestate
trigger1 = !animtime || moveguarded
value = ifelse(!animtime,0,11106)
ctrl = ifelse(!animtime,1,0)
;--------------------------------------------------------------------
; Batman Beyond tackle2
[Statedef 111130]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 100
velset = 0,0
anim = 11100
ctrl = 0
sprpriority = 2


[State 11130,6]
type = helper
trigger1 = AnimElem = 4
name = "JET"
id = 13305
pos = 0,0
postype = p1
stateno = 13305
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
persistent = 0

[State 11130,1.11];var
type = VarRandom
trigger1 = Time = 3
v = 11
range = 0, 2

[State 11130, Playsnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,110

[State 11130,1.1 ]
type = velset
trigger1 = !animelemtime(4)
x = 8

[State 11130,1.6]
type = width
trigger1 = animelemtime(4) >=0
edge = 30,0

[State 11130,5]
type = HitDef
trigger1 = !movecontact
damage = 125,45
guard.pausetime = 2,2
getpower = 50,140
givepower = 0,0
attr = A, ST
guardflag = MA
priority = 6,Miss
sparkno = -1
guard.sparkno = -1
sprpriority = 2
guardsound = s3,0
p1facing = 1
p2facing = 1
p1stateno = 12101
p2stateno = 11109
numhits = 1
fall = 1

[State 11130]
type = changestate
trigger1 = moveguarded
value = 11106

[State 11130,5]
type = velset
trigger1 = anim = 11109 && !animtime
x = 0
[State 11130,5.1]
type = statetypeset
trigger1 = anim = 11109 && !animtime
physics = A

[State 11130,5.9 ]
type = changeanim
trigger1 = anim = 11109 && !animtime
value = 41
elem = 4

[State 11130,5.10]
type = turn
trigger1 = anim = 41 && !animelemtime(4) && p2bodydist x <= -30

[State 11130, 5.11]
type = ChangeState
trigger1 = AnimTime = 0;&&FrontEdgeDist <= 30
ctrl = 0
value = 111128
;-----------------
;-----------------
[StateDef 111128]
type    = A
movetype= I
physics = A
ctrl = 0
anim = 11127

[State 1128, 1]
type = VelAdd
trigger1 = (Time < 6) && (Vel X > 0)
x = -2

[State 1128, 1]
type = PosAdd
trigger1 = AnimElem = 3
y = 33
;--------------------------------------------------------------------
;throw
[Statedef 12101]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 7,0
anim = 12101
sprpriority = 2

[State 12101,1]
type = targetbind
trigger1 = animelemtime(1) >=0
pos = 80,0

[State 12101,2]
type = width
trigger1 = animelemtime(4) >=0
edge = 30,0

[State 12101,3]
type = changestate
trigger1 = Frontedgedist <= 51 || time = 60
value = 11106

[State 12101,4]
type = ScreenBound
trigger1 = time >= 30
value = 1
movecamera = 1,0
;--------------------------------------------------------------------
[Statedef 11106]
type    = A
movetype= I
physics = N
poweradd= 0
ctrl = 0
velset = -3,-9
anim = 11106
sprpriority = 2

[State 11106,1]
type = targetstate
trigger1 = prevstateno = 12101 && !time
value = 11013

[State 11106,3]
type = EnvShake
trigger1 = prevstateno = 12101&& !time
time = 15
ampl = -4
freq = 75
phase = 60

[State 11106,8.5]
type = PlaySnd
trigger1 = prevstateno = 12101&& !time
value = s1100, 3

[State 11106,9]
type = statetypeset
trigger1 = time = 5
physics = A
;---------------------------------------------------------------
[Statedef 11109]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State ]
type = ChangeAnim2
trigger1 = !time
value = 11109

[State away with you]
type = changestate
trigger1 = time = 61
value = 11013
;---------------------------------------------------------------
;p2stateno
[Statedef 11013]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 0,2]
type = posset
trigger1 = 1
y = 0

[State 11013,5.5]
type = SelfState
trigger1 = !animtime && !alive
value = 5150

[State 11013,5.6]
type = changestate
trigger1 = !animtime && alive
value = 11014

[Statedef 11014]
type    = L
movetype= H
physics = N
velset = 0,0

[State 11014,1 ]
type = posset
trigger1 = 1
y = 0

;[State 11014,2]
;type = ChangeAnim2
;trigger1 = !time
;value = 11015

[State 11014,66]
type = SelfState
trigger1 = time = 13
value = ifelse(alive,5120,5150)

;-------------------------------
;rayo A
[Statedef 14405]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
SprPriority = 5
anim=6023

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


;[State 1058,2]
;type = PlaySnd
;trigger1 = Time %11 = 0;17,18
;value = s5, 2

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


[State 14405,3]
type = Destroyself
trigger1 = root,StateNo != 12100

;rayo B
[Statedef 13305]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
SprPriority = 5
anim=6023

[State 13305,1]
type=bindtoroot
trigger1 = 1
pos = 0,0
ignorehitpause=1


;[State 1058,2]
;type = PlaySnd
;trigger1 = Time %11 = 0;17,18
;value = s5, 2

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


[State 13305,3]
type = Destroyself
trigger1 = root,StateNo != 11130

;-------------------------------------------------------------
;Super BG
;-------------------------------------------------------------
[Statedef 8005]
type = A
physics  = N
sprpriority = 5

[State 8018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 8018, muteki]
type = NotHitBy
trigger1 = 1
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 8018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1

[State 8005, hyperBG2]
type = Explod
trigger1 = Time = 0
anim = 99999
ID = 9999
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999995
bindtime = -1
ownpal = 1

[State 8018,1]
type = Explod
trigger1 = time= 1
anim = 11110
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = p1
pos = 0, 0
sprpriority = -999998
bindtime = -1
ownpal = 0
scale = 2,1

[State 8018,1]
type = Explod
trigger1 = time= 1
anim = 115
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999999
bindtime = -1
ownpal = 0
scale = 1.0,1.0

[State 8018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 8018, 6]
type = ChangeState
Trigger1 = Time = 20
value = 8006
ctrl = 0

[Statedef 8006]
type = A
physics  = N
sprpriority = 5

[State 80180]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noBG
flag3 = noFG

[State 80180, 3]
type = posset
trigger1 = 1
y = 0
x = -160

[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1


[State 80180, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 80180, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 80180, 6]
type = ChangeState
Trigger1 = parent,movetype != A
value = 8007
ctrl = 0

[Statedef 8007]
type = A
physics  = N
sprpriority = 5

[State 80181]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 80181, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 80181, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 80181, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 110
ignorehitpause = 1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 9999
ignorehitpause = 1

[State 80181, 7]
type = DestroySelf
Trigger1 = Time = 20

;---[Super Pause State EXP]-------
;[State 0, ]
;type = SuperPause
;trigger1 = time = 0
;time = 40
;sound = S20,0
;pos = 0,0
;darken = 1
;poweradd = -1000

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Orb"
;ID = 8000
;pos = 0,0
;postype = p1
;stateno = 8000
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Super BG"
;ID = 8005
;pos = 0,0
;postype = back
;stateno = 8005
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1
;---------------------------------

-----------------------------------

-----------------------------------

-----------------------------------




;-------------------------------------------------------------
;Super BG 2
;-------------------------------------------------------------
[Statedef 18005]
type = A
physics  = N
sprpriority = 5

[State 18018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 18018, muteki]
type = NotHitBy
trigger1 = 1
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 18018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160


[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1

[State 18005, hyperBG2]
type = Explod
trigger1 = Time = 0
anim = 99999
ID = 9999
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999995
bindtime = -1
ownpal = 1

[State 18018,1]
type = Explod
trigger1 = time= 1
anim = 11110
ID = 110
;supermovetime = 999999
;pausemovetime = 999999
removeongethit = 1
removetime = 1000
vel = 0, 0
postype = p1
pos = 0, 0
sprpriority = -999998
bindtime = -1
ownpal = 0
scale = 2,1

[State 18018,1]
type = Explod
trigger1 = time= 1
anim = 115
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999999
bindtime = -1
ownpal = 0
scale = 1.0,1.0

[State 18018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 18018, 6]
type = ChangeState
Trigger1 = Time = 20
value = 18006
ctrl = 0

[Statedef 18006]
type = A
physics  = N
sprpriority = 5

[State 180180]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noBG
flag3 = noFG

[State 180180, 3]
type = posset
trigger1 = 1
y = 0
x = -160

[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1



[State 180180, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 180180, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 180180, 6]
type = ChangeState
;Trigger1 = parent,movetype != A
trigger1 = time > 120
value = 18007
ctrl = 0

[Statedef 18007]
type = A
physics  = N
sprpriority = 5

[State 180181]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 180181, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 180181, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 180181, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 110
ignorehitpause = 1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 9999
ignorehitpause = 1

[State 180181, 7]
type = DestroySelf
Trigger1 = Time = 20





;-------------------------------------------------------------
;Super BG  3
;-------------------------------------------------------------
[Statedef 28005]
type = A
physics  = N
sprpriority = 5

[State 28018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 28018, muteki]
type = NotHitBy
trigger1 = 1
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 28018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 28018,1]
type = Explod
trigger1 = time= 1
anim = 116
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = 20
bindtime = -1
ownpal = 0
scale = 0.7,0.8

[State 28018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 28018, 6]
type = ChangeState
Trigger1 = Time = 20
value = 28006
ctrl = 0

[Statedef 28006]
type = A
physics  = N
sprpriority = 5

[State 280180]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noBG
flag3 = noFG

[State 280180, 3]
type = posset
trigger1 = 1
y = 0
x = -160



[State 280180, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 280180, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 280180, 6]
type = ChangeState
Trigger1 = parent,movetype != A
value = 28007
ctrl = 0

[Statedef 28007]
type = A
physics  = N
sprpriority = 5

[State 280181]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 280181, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 280181, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 280181, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 110
ignorehitpause = 1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 9999
ignorehitpause = 1

[State 280181, 7]
type = DestroySelf
Trigger1 = Time = 20

;---[Super Pause State EXP]-------
;[State 0, ]
;type = SuperPause
;trigger1 = time = 0
;time = 40
;sound = S20,0
;pos = 0,0
;darken = 1
;poweradd = -1000

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Orb"
;ID = 8000
;pos = 0,0
;postype = p1
;stateno = 8000
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Super BG"
;ID = 8005
;pos = 0,0
;postype = back
;stateno = 8005
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1
;---------------------------------

-----------------------------------

-----------------------------------

-----------------------------------


-----------------------------------

;-------------------------------------------------------------
;Super BG  4
;-------------------------------------------------------------
[Statedef 38005]
type = A
physics  = N
sprpriority = 5

[State 28018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 28018, muteki]
type = NotHitBy
trigger1 = 1
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 28018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 28018,1]
type = Explod
trigger1 = time= 0
anim = 7011
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -9997
bindtime = -1
ownpal = 0
scale = 0.8,1

[State 28018,1]
type = Explod
trigger1 = time= 0
anim = 7012
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -9998
bindtime = -1
ownpal = 0


[State 28018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 28018, 6]
type = ChangeState
Trigger1 = Time = 20
value = 28006
ctrl = 0

[Statedef 28006]
type = A
physics  = N
sprpriority = 5

[State 280180]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noBG
flag3 = noFG

[State 280180, 3]
type = posset
trigger1 = 1
y = 0
x = -160




[State 280180, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 280180, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 280180, 6]
type = ChangeState
Trigger1 = parent,movetype != A
value = 28007
ctrl = 0

[Statedef 28007]
type = A
physics  = N
sprpriority = 5

[State 280181]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 280181, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 280181, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 280181, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 110
ignorehitpause = 1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 9999
ignorehitpause = 1

[State 280181, 7]
type = DestroySelf
Trigger1 = Time = 20

;-------------------------------------------------------------
;Super BG  5
;-------------------------------------------------------------
[Statedef 48005]
type = A
physics  = N
sprpriority = 5

[State 28018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 28018, muteki]
type = NotHitBy
trigger1 = 1
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 28018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160



[State 28018,1]
type = Explod
trigger1 = time= 0
anim = 7013
ID = 110
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = left
pos = 0, 0
sprpriority = -1
bindtime = -1
ownpal = 0


[State 28018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 28018, 6]
type = ChangeState
Trigger1 = Time = 20
value = 28006
ctrl = 0

[Statedef 28006]
type = A
physics  = N
sprpriority = 5

[State 280180]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noBG
flag3 = noFG

[State 280180, 3]
type = posset
trigger1 = 1
y = 0
x = -160


[State 28018,1]
type = Explod
trigger1 = timemod = 4,1 && numexplod(112) <= 20
anim = 112
ID = 112
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = 60
vel = -10-ceil(random/20), 0
postype = p1
pos = 320, 0
random = 20,500
ontop = 1
bindtime = 1
ownpal = 1

[State 280180, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 280180, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 280180, 6]
type = ChangeState
Trigger1 = parent,movetype != A
value = 28007
ctrl = 0

[Statedef 28007]
type = A
physics  = N
sprpriority = 5

[State 280181]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 280181, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 280181, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 280181, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 110
ignorehitpause = 1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 9999
ignorehitpause = 1

[State 280181, 7]
type = DestroySelf
Trigger1 = Time = 20

[State 80180, 6]
type = ChangeState
Trigger1 = parent,movetype != A
value = 8007
ctrl = 0

;---[Super Pause State EXP]-------
;[State 0, ]
;type = SuperPause
;trigger1 = time = 0
;time = 40
;sound = S20,0
;pos = 0,0
;darken = 1
;poweradd = -1000

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Orb"
;ID = 8000
;pos = 0,0
;postype = p1
;stateno = 8000
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Super BG"
;ID = 8005
;pos = 0,0
;postype = back
;stateno = 8005
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1
;---------------------------------

-----------------------------------

-----------------------------------


-----------------------------------


;---[Super Pause State EXP]-------
;[State 0, ]
;type = SuperPause
;trigger1 = time = 0
;time = 40
;sound = S20,0
;pos = 0,0
;darken = 1
;poweradd = -1000

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Orb"
;ID = 8000
;pos = 0,0
;postype = p1
;stateno = 8000
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1

;[State 0, ]
;type = Helper
;trigger1 = time = 0
;name = "Super BG"
;ID = 8005
;pos = 0,0
;postype = back
;stateno = 8005
;supermovetime = 40
;pausemovetime = 1
;ownpal = 1
;---------------------------------

-----------------------------------

-----------------------------------

-----------------------------------


-----------------------------------



;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

[State -2, VelAdd] ;to fall slower during super jump
type = VelAdd
trigger1 = Var(3) = 1 && Vel Y > 0
y = -0.2

[State -2, Landing Dust]
type = Explod
triggerall =  NumExplod(920) < 1
triggerall = Time = 3
trigger1 = StateNo = 52 ;Jump land
trigger2 = StateNo = 101 ;Run-fdw land
trigger3 = StateNo = 106 ;Run-back land
trigger4 = PrevStateNo = 52 && StateNo = 11 ;Jump land/crouch
persistent = 0
ID = 920
anim = 920
postype = p1
pos = 7, 3
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = -2
ownpal = 1


;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -2, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 8, 1

;---------------------------------------------------------------------------
; States that are always executed (use statedef -3)
;---------------------------------------------------------------------------
[Statedef -3]



[State -3, superjump opponent locator]
type = Helper
triggerall = (NumHelper(700) = 0)
trigger1 = (Pos Y < -200) && (P2Dist Y > 50)
ID = 700
pos = 0,-120
postype = p2
stateno = 9910
facing = 1


