; cns for Zarbom
; Player's constants.
; Format (case insensitive):
;  [groupname]        
;  constname = "value"

[Data]
life = 1200          ;Amount of life to start with
attack = 110         ;100% attack power (more is stronger)
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 50 ;Def goes up by 50% everytime player is hit on ground
liedown.time = 60    ;Time player takes before getting up from HIT_LIEDOWN
airjuggle = 15       ;Can do 15 points of juggling
sparkno = 2        ;Default spark number
guard.sparkno = 40 ;Default guard spark number
KO.echo = 0          ;1 to enable echo on KO
volume = 0           ;Volume offset (negative for softer)

[Size]
xscale = 0.9           ;Horizontal scaling factor.
yscale = 0.9           ;Vertical scaling factor.
ground.back = 15     ;Player width (back, ground)
ground.front = 15    ;Player width (front, ground)
air.back = 12        ;Player width (back, air)
air.front = 12       ;Player width (front, air)
z.width = 3          ;Player width (into and out)
height = 60	     ;Height of player (for opponent to jump over)
attack.width = 4,4   ;Default attack width: back, front
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   

[Velocity]
walk.fwd  = 2.3      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 4.6, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back = -4.5,-3.8 ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-8.1    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55,-8.1 ;Air jump speeds (opt)
airjump.fwd = 2.5,-8.1    ;.

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

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

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0,0

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

;---------------------------------------------------------------------------
; WIN
[Statedef 180]
type = S

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

[State 180]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 5

;---------------------------------------------------------------------------
; WIN1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0,0

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

[State 181]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 5

;---------------------------------------------------------------------------
; INTRO
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0,0

[State 190, begin]
type = AssertSpecial
trigger1 = time = [0,205]
flag = intro

[State 190, 3]
type = changestate
trigger1 = animtime = 100
value = 0
ctrl = 0

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

; INTRO versus Others
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0,0

[State 190, begin]
type = AssertSpecial
trigger1 = time = [0,205]
flag = intro

[State 190, 3]
type = changestate
trigger1 = animtime = 60
value = 0
ctrl = 0

;--------------------------------------------------------
; INTRO versus Vegita
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0,0

[State 190, begin]
type = AssertSpecial
trigger1 = time = [0,205]
flag = intro

[State 190, 3]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 0
;---------------------------------------------------------------------------
; STAND_A
[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
;Commonly-used controllers:
velset = 0,0                 
ctrl = 0                     
anim = 200                   
poweradd = 60                

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage    = 30                   
animtype = Light                 
guardflag = MA                   
hitflag = MAF                    
priority = 3, Hit                                           
pausetime = 7,8                  
numhits = 1                      
sparkno = 0                   
sparkxy = -10,-35             
hitsound = 5,0                  
guardsound = 6,0                
ground.type = High                 
ground.slidetime = 5             
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9         
air.velocity = -1.3,-3  

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

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
sparkxy = -10,-50

[Statedef 201]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
velset = 0,0                  
ctrl = 0                    
anim = 201                   
poweradd = 20                  

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage    = 20                   
animtype = Light                 
guardflag = MA                   
hitflag = MAF                    
priority = 3, Hit                                           
pausetime = 7,8                  
numhits = 1                      
sparkno = 0                   
sparkxy = -10,-35             
hitsound = 5,0                  
guardsound = 6,0                
ground.type = High                 
ground.slidetime = 5             
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9         
air.velocity = -1.3,-3           

[State 201, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

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

; STAND_A
[Statedef 202]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
velset = 0,0                  
ctrl = 0                    
anim = 202                   
poweradd = 20                  

[State 202, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage    = 25                   
animtype = Light                 
guardflag = MA                   
hitflag = MAF                    
priority = 3, Hit                                           
pausetime = 7,8                  
numhits = 1                      
sparkno = 0                   
sparkxy = -10,-35             
hitsound = 5,0                  
guardsound = 6,0                
ground.type = High                 
ground.slidetime = 5             
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9         
air.velocity = -1.3,-3           

[State 202, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

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

;---------------------------------------------------------------------------
; STAND_B
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0,0
anim = 210

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 50
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

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

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

; STAND_B
[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0,0
anim = 211

[State 211, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

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

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

; STAND_B
[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0,0
anim = 212

[State 212, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 45
guardflag = MA
pausetime = 11,11
sparkxy = -10,-35
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

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

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

;---------------------------------------------------------------------------
; Soco Forte
[Statedef 205]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 2             
velset = 0,0,0                   
ctrl = 0                         
anim = 205                        
poweradd = 15                    

[State 205, 0]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 2

[State 205, 5]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     
damage   = 48                    
guardflag = MA                   
priority = 3
pausetime = 8,9
sparkxy = -5,-60                
sparkno = 0
hitsound = 5,0                   
guardsound = 6,0                 
ground.type = High                 
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -2
airguard.velocity = -3     
air.velocity = -2,-3

[State 205]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 2

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

;---------------------------------------------------------------------------
; STAND_A
[Statedef 215]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0,0
anim = 215

[State 210, 1] ;Uncomment if you want to play a sound
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 215, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
attr = S, NA
animtype  = Medium
projhits = 2
damage    = 55
guardflag = MA
pausetime = 11,11
sparkxy = -8,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

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

[State 215, 5]
type = Playsnd
trigger1 = AnimElem = 2
value = 0,2

;---------------------------------------------------------------------------
;CROUCH_A
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 15
ctrl = 0
anim = 400

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = Light
getpower  = 10
givepower = 8
hitflag = MAFD
guardflag = L
pausetime = 10,12
sparkxy = -2,-41
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20

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

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

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
;CROUCH_B
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 410

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

[State 410, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 62
getpower  = 40
givepower = 40
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkxy = -5,-10
sparkno = 1
hitsound   = 5,2
guardsound = 6,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.5   
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1

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

;---------------------------------------------------------------------------
;JUMP_A
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 7,8
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 600, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

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

[State 600, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;JUMP_A
[Statedef 601]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 601

[State 601, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 7,8
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 601, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

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

[State 601, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;-------------------------------------------------
[Statedef 602]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 602

[State 602, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 12
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 7,8
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 602, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

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

[State 602, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------
;JUMP_B
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 55
ctrl = 0
anim = 610

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 70
getpower  = 50
givepower = 25
guardflag = HA
priority = 3
pausetime = 9,10
sparkxy = -10,-51
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3

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

;---------------------------------------------------------------------------
; SuperMove
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0

[State 3000, Super A]
type = SuperPause
trigger1 = Time = 2
pos = 0, -60
anim = 30

[State 3000, Super B]
type = PlaySnd
trigger1 = Time = 2
value = F20, 0 ;Play fight sound of super

[State 3000, Super C]
type = PowerAdd
trigger1 = Time = 2
value = -1000

[State 3000, Super D]
type = AfterImage
trigger1 = Time = 2
time = 2

[State 3000, Super E]
type = AfterImageTime
trigger1 = Time = [2,68]
time = 2

[State 3000, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value = , NA, SA, AT
time = 12

[State 3000, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
animtype  = Hard
damage    = 72,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6
air.velocity = -3,-3
fall.animtype = Hard
fall = 1

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

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
;---------------------------------------------------------------------
; Power up (start)
[Statedef 730]
type = S
movetype = I
physics = S
anim = 730
velset = 0
ctrl = 0

[State 730, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 735

[State 730, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 0


; Power up
[Statedef 735]
type = S
movetype = I
physics = S
anim = 735

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

[State 735, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 0

[State 735, 2]
type = PlaySnd
trigger1 = AnimElem = 6
value = 0, 0


[State 735, 1]
type = ChangeState
trigger1 = command != "charge"
trigger2 = command != "charge 1"
value = 740

[State 735, 2]
type = PowerAdd
trigger1 = Time = [0,125]
value = 3

[State 735, 2]
type = ChangeState
trigger1 = Power >= 3000
value = 741

[State 735, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 735

; Power up (end)
[Statedef 740]
type = S
movetype = I
physics = S
anim = 740

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

; Power up (maxed out)
[Statedef 741]
type = S
movetype = I
physics = S
anim = 740

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

[State 741, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;FIREBALL_A

;Energy Dan (left)
[Statedef 1000]
type    = S
movetype= A
physics = S
velset = 0,0,0
juggle = 4
ctrl = 0
anim = 1000

[State 1000, Ha!]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,3

[State 1000, dan]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1005
projhitanim = 1009
projshadow = -1
projpriority = 4
projremovetime = 100
projid = 1001
velocity = 5
accel = .2
offset = 27,-80
attr = S, SP
damage   = 30,8
animtype = hard
guardflag = MA
hitflag = MAFP
pausetime = 0,3
hitsound   = 5,3
sparkno = -1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.animtype = Low
air.velocity = -1,-1
air.juggle = 2

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------

; Special1

;Kamehame-ha
[Statedef 1700]
type    = S
movetype= A
physics = S
velset = 0,0,0
poweradd = -2000
juggle = 0
ctrl = 0
anim = 1700

[State 1700, supsnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = F20, 0

[State 1700, 2]
type = SuperPause
trigger1 = AnimElem = 1
pos = 4,-58
anim = 102

[State 1700, 6]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State 3000,MBS]
type = explod
trigger1 = AnimElem = 1
anim = 9990
facing = 1
pos = 0,0
postype = left
sprpriority = -2
bindtime = 50
ownpal = 1
supermove = 1
removetime = 65

;[State 3000, aura]
;type = Explod
;trigger1 = Time = 3
;id = 950
;anim = 951
;pos = 0,0
;bindtime = -1
;sprpriority = 6
;removetime = 30
;supermove = 1

;[State 1700, ball]
;type = Explod
;trigger1 = Time = 30
;anim = 3002
;pos = 30,-51
;bindtime = -1
;sprpriority = 4
;removetime = 30
;supermove = 1

[State 1700, raio]
type = Projectile
trigger1 = AnimElem = 5
projanim = 1705
projhits = 20
projmisstime = 3
;projshadow = -1
projpriority = 4
projremovetime = 70
projid = 1705
;velocity = 0.001,0.001
offset = 39,-90
attr = S, HP
damage   = 25,7
animtype = heavy
guardflag = MA
hitflag = MAFP
pausetime = 0,3
hitsound   = 5,2
sparkno = 0                   ;Spark image group and no (Def: set above)
sparkxy = -500,-500   
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5   
fall = 1
air.animtype = Back
air.velocity = -5,-8
air.juggle = 1
down.velocity = -10
down.hittime = 30
down.bounce = 0
;PalFX
palfx.time = 23
palfx.add = 50,30,130

[State 1700, envshake]
type = EnvShake
trigger1 = AnimElem = 5;Time = 60
time = 70

[State 1700, end]
type = ChangeState
trigger1 = Time = 120;120
value = 0
ctrl = 1

;---------------------------------------------------------------------
; SSJ Sequence
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0
anim = 1050

[State 1050, 2]
type = afterimage
trigger1 = AnimElem = 1 
time = 100
TimeGap  = 1
FrameGap = 4

[State 1050, 13]
type = EnvShake
trigger1 = AnimElem = 18
time = 25
ampl = -5
freq = 90
phase = 90

[State 1050, 1] 
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2


[State 1050, 1] 
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2


[State 1050, 1] 
type = PlaySnd
trigger1 = AnimElem = 6 
value = 0, 2


[State 1050, 1] 
type = PlaySnd
trigger1 = AnimElem = 8
value = 0, 5


[State 1050, 1] 
type = PlaySnd
trigger1 = AnimElem = 10
value = 0, 2


[State 1050, 1] 
type = PlaySnd
trigger1 = AnimElem = 11
value = 0, 2

[State 1050, 2]
type = veladd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
x = 0

[State 1050, 3]
type = veladd
trigger1 = AnimElem = 3
x = 0

[State 1050, 4]
type = veladd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 4

[State 1050, 5]
type = veladd
trigger1 = AnimElem = 5
x = -4

[State 1050, 6]
type = veladd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7
x = 4

[State 1050, 7]
type = veladd
trigger1 = AnimElem = 7
x = -4

[State 1050, 8]
type = veladd
trigger1 = AnimElem = 8
trigger2 = AnimElem = 9
x = 4

[State 1050, 9]
type = veladd
trigger1 = AnimElem = 9
x = -4

[State 1050, 10]
type = veladd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
x = 4

[State 1050, 11]
type = veladd
trigger1 = AnimElem = 11
x = -4

[State 1050, 12]
type = veladd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 13
x = 4

[State 1050, 13]
type = veladd
trigger1 = AnimElem = 13
x = -4

[State 1050, 14]
type = veladd
trigger1 = AnimElem = 14
trigger2 = AnimElem = 15
x = 4

[State 1050, 15]
type = veladd
trigger1 = AnimElem = 15
x = -4

[State 1050, 12]
type = veladd
trigger1 = AnimElem = 16
trigger2 = AnimElem = 17
x = 4

[State 1050, 13]
type = veladd
trigger1 = AnimElem = 17
x = -4

[State 1050, 14]
type = veladd
trigger1 = AnimElem = 18
x = 4

[State 1050, 15]
type = veladd
trigger1 = AnimElem = 18
x = -4


[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 4
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 5
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 6
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 9
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 10
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 12
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 13
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 14
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 0

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 17
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 1

[State 1050, 18]
type = HitDef
trigger1 = AnimElem = 18
attr = S, HP
animtype  = Hard
damage    = 30
guardflag = MA
pausetime = 16,18
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 10
ground.velocity = .1
air.type = Low
air.velocity = 0
guard.velocity = -0.1
airguard.velocity = 0   
fall = 1


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

;-------------------------------------------------------------------------------------------
;Special Kick 1
[Statedef 1070]
type    = S
movetype= A
juggle  = 4
poweradd= 140
physics = N

[State 1070, 0]
type = CtrlSet
trigger1 = Time = 0
value = 0

[State 1070, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 1070

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

[State 1070, 3]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage    = 70,2
animtype  = Med
getpower  = 25
givepower = 15
priority = 5
hitflag = MAF
guardflag = MA
pausetime = 8,14
sparkxy = -5,-50
sparkno = 1
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.2
air.velocity = -1.2

[State 1070, 3]
type = HitDef
persistant = 0
trigger1 = AnimElem = 2, >=0
trigger1 = hitcount < 1
attr = S, SA
damage    = 70,2
animtype  = Med
getpower  = 25
givepower = 15
priority = 5
hitflag = MAF
guardflag = MA
pausetime = 8,12
sparkxy = -5,-50
sparkno = 1
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.2    
air.velocity = -1.2, -2
fall = 1

[State 1070, 6]
type = NotHitBy
trigger1 = Time = 2
value = , N, S
time = 5

[State 1070, 7]
type = ChangeState
trigger1 = Time = 3
value = 1071

;---------------------------------------------------------------------------
;Knee 2 (going up)
[Statedef 1071]
type   = A
movetype = A

[State 1071, 0]
type = VelSet
trigger1 = Time = 0
x = 9.5
y = -10

[State 1071, 1]
type = PosAdd
trigger1 = Time = 0
x = -3

[State 1071, 2]
type = VelMul
trigger1 = Time >= 0
x = .93

[State 1071, 4]
type = HitDef
persistant = 0
trigger1 = AnimElem = 2, >=0
trigger1 = Hitcount < 2
attr = A, SA
priority = 5
damage    = 70,2
getpower  = 30
givepower = 15
guardflag = MA
pausetime = 8,12
sparkxy = 5,-100
sparkno = 1
hitsound   = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.2     
air.velocity = -1.8,-7.5
guard.velocity = -7
fall = 1

[State 1071, 5] ;Change to coming down animation
type = changeAnim
trigger1 = vel y > -1
value = 1041
persistent = 0

[State 1071, 3] ;Gravity
type = VelAdd
trigger1 = Time >= 0
y = .35

[State 1071, 6] ;Hit ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -1
value = 1041

;--------------------------------------------------------------------------------
;Knee (land)
[Statedef 1041 ]
type    = A
movetype = A
physics = S
anim = 1041

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

[State 1041, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1041, 3]
type = ChangeState
trigger1 = time = 4
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Air Special Kick
[Statedef 1060]
type    = A
movetype= A
physics = A
anim = 1060

[State 1060, 0]
type = VelSet
trigger1 = Time = 0
x = 10
y = 2

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

[State 1060, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
damage    = 85, 4
getpower  = 20
givepower = 10
guardflag = MA
pausetime = 12,12
sparkxy = -5,-53
sparkno = 1
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = low
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -5  
air.velocity = 0,0

[State 1060, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, SA
damage    = 85, 4
getpower  = 20
givepower = 10
guardflag = MA
pausetime = 12,12
sparkxy = -5,-53
sparkno = 1
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = low
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -5  
air.velocity = 0,0

[State 1060, 3]
type = HitDef
trigger1 = Time = 17
attr = A, SA
damage    = 85, 4
getpower  = 20
givepower = 10
guardflag = MA
pausetime = 12,12
sparkxy = -5,-53
sparkno = 1
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = low
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -5  
air.velocity = 0,0

[State 1060, 4]
type = HitDef
trigger1 = Time = 19
attr = A, SA
damage    = 85, 4
getpower  = 20
givepower = 10
guardflag = MA
pausetime = 12,12
sparkxy = -5,-53
sparkno = 1
hitsound   = 5,4
guardsound = 6,0
ground.type = High
air.type = low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -5   
air.velocity = -2.8,-2.1
air.fall = 1
fall = 1

[State 1060, 5]
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
type = ChangeState
value = 52
;---------------------------------------------------------------------------
; Elbow Dash
[Statedef 1080]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0,0
anim = 1080

[State 1080, 13]
type = EnvShake
trigger1 = AnimElem = 1
time = 25
ampl = -5
freq = 90
phase = 90

[State 1080, 2]
type = veladd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 1
x = 20

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

[State 1080, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
animtype  = Medium
damage    = 66
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

[State 1080, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------

;------------------------------------------
;Super Fireball
[Statedef 1900]
type    = S
movetype= A
physics = S
poweradd= -2000
ctrl = 0
anim = 1900
velset = 0

[State 1900, 2]
type = SuperPause
trigger1 = AnimElem = 1
pos = -31, -55
anim = 101

[State 1900, 3]
type = PlaySnd
trigger1 = Time = 1
value = F20,0

[State 3000,MBS]
type = explod
trigger1 = AnimElem = 1
anim = 9990
facing = 1
pos = 0,0
postype = left
sprpriority = -2
bindtime = 50
ownpal = 1
supermove = 1
removetime = 65

[State 1900, 4]
type = AfterImage
trigger1 = Time = 1	
Time = 45
TimeGap  = 1
FrameGap = 4

[State 1900, 3]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State 1900, 8]
type = Projectile
trigger1 = AnimElem = 4
projanim = 1905
projhitanim = 1009
;ProjRemAnim = 1009
;ProjEdgeBound = 50   
;ProjHeightBound = -240, 5
offset = 35, -90
velocity = 6.5, 0
remvelocity = .7, 0
projhits = 30
accel = 0, .00
; HitDef part of projectile info
attr = S, SP
damage    = 19,2
animtype  = Hard
getpower  = 50
givepower = 30
pausetime = 0,12
sparkno = 1
sparkxy = 0, 0
hitsound = 5,3
guardflag = MA 
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.type = Low
air.velocity = -2.5,-1.75
air.juggle = 3
fall.animtype = Hard
air.fall = 1
fall = 1
;PalFX
palfx.time = 15
palfx.add = 32,0,0
palfx.mul = 300,192,192

[State 1900, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Super Fireball Animation
[Statedef 1905]
type    = A
movetype= A
physics = N
poweradd= -2000
ctrl = 0
anim = 1905

[State 1905, 1]
type = VelSet
trigger1 = Time = 0
z = 0

[State 1905, 2]
type = VelMul
trigger1 = Time = 0
x = .025


[State 1905, 3]
type = VelAdd
trigger1 = Time >= 0
trigger1 = Pos Y < 0
y = .00

[State 1905, 4]
type = PosSet
trigger1 = Pos Y >= -1
y = 0

[State 1905, 5]
type = VelSet
trigger1 = Pos Y >= -1
y = 0

[State 1905, 8]
type = Projectile
trigger1 = Time = 80
projanim = 1905
projhitanim = 1009
;ProjRemAnim = 1009
;ProjEdgeBound = 50   
;ProjHeightBound = -240, 5
offset = 25, -66
velocity = 6.5, 0
remvelocity = .7, 0
projhits = 30
accel = 0, 0
; HitDef part of projectile info
attr = S, SP
damage    = 40,2
animtype  = Hard
getpower  = 50
givepower = 30
pausetime = 0,12
sparkno = 1
sparkxy = 0, 0
hitsound = 5,3
guardflag = MA
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.type = Low
air.velocity = -3.5,-2.75
air.juggle = 3
fall.animtype = Hard
air.fall = 1
fall = 1
;PalFX
palfx.time = 15
palfx.add = 32,0,0
palfx.mul = 300,192,192

[State 1905, 9]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1

[State 1905, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0


; Taunt
[Statedef 195]
type = S
movetype = I
physics = S
anim = 195
velset = 0
ctrl = 0

[State 195, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,13

[State 195, 2]
type = CtrlSet
trigger1 = AnimElem = 1
value = 1

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

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

[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 5050

[State 9741, UglyHack]
type = VarSet
trigger1 = !var(16)
var(2) = 2

[State 9741, PauseCheck]
type = VarSet
trigger1 = GameTime > Parent,var(57)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2
trigger4 = Parent,var(58)
trigger5 = var(3):=0
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = var(9):=(Facing != Parent,Facing)
trigger1 = !(var(4):=0)

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !(var(3) || var(9))
trigger1 = Parent,command = "holdfwd"
trigger2 = Parent,command = "holdback"
trigger3 = Parent,command = "holdup"
trigger4 = Parent,command = "holddown"
trigger5 = !(var(4):=1)
var(59) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(58)
trigger1 = command = "holdfwd"
trigger1 = Parent,command = "holdfwd"
trigger2 = command = "holdback"
trigger2 = Parent,command = "holdback"
trigger3 = command = "holdup"
trigger3 = Parent,command = "holdup"
trigger4 = command = "holddown"
trigger4 = Parent,command = "holddown"
var(59) = var(4):=0

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
var(59) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = command = "a"
trigger1 = Parent,command = "a"
trigger2 = command = "b"
trigger2 = Parent,command = "b"
trigger3 = command = "c"
trigger3 = Parent,command = "c"
trigger4 = command = "x"
trigger4 = Parent,command = "x"
trigger5 = command = "y"
trigger5 = Parent,command = "y"
trigger6 = command = "z"
trigger6 = Parent,command = "z"
trigger7 = command = "start"
trigger7 = Parent,command = "start"
var(59) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
trigger8 = var(2) = 2
trigger8 = var(2):=0
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = var(16):=1
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2


;------------------
; AI Activation Helper State - Compatibly Partnered Version
;
; var(1) - First tick dir activation prevention
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Hitpause check.
; var(5) - No button on previous tick.
; var(6) - Any dir on this tick.
; var(7) - Any button on this tick.
; var(8) - Matching partner button detected.
; var(9) - AutoTurn bug fixer.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(59) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9742, PauseCheck]
type = VarSet
trigger1 = (GameTime>Parent,var(57))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)

[State 9742, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = (var(6):=0)
var(6) = 1

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(7):=0)
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = (Parent,command = "a")
trigger1 = (Partner,command = "a")
trigger2 = (Parent,command = "b")
trigger2 = (Partner,command = "b")
trigger3 = (Parent,command = "c")
trigger3 = (Partner,command = "c")
trigger4 = (Parent,command = "x")
trigger4 = (Partner,command = "x")
trigger5 = (Parent,command = "y")
trigger5 = (Partner,command = "y")
trigger6 = (Parent,command = "z")
trigger6 = (Partner,command = "z")
trigger7 = (Parent,command = "start")
trigger7 = (Partner,command = "start")
trigger8 = (var(15):=0)
var(15) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(1)
trigger1 = var(6)
trigger1 = !var(3)
trigger1 = !var(4)
trigger1 = !var(9)
var(59) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5)
trigger1 = var(7)
trigger1 = !var(2)
trigger1 = !var(15)
var(59) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = !var(8)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = (var(2) = 2)
trigger2 = (var(2):=0)
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6)
trigger2 = var(7)
trigger3 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = (var(1):=1)
var(5) = !var(7)


;------------------
; XOR Method's HitPauseTime Helper State

[StateDef 9743]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9743, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9743, HitPauseTime]
type = VarSet
trigger1 = !(Parent,HitPauseTime)
trigger2 = (GameTime>Parent,var(57))
var(1) = Parent,HitPauseTime

[State 9742, Goodbye]
type = DestroySelf
trigger1 = (Parent,var(59) = 1)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

[Statedef -3]
; These next two controllers must be placed here, after the above CPU
; VarSet controller and before the below GameTime VarSet controller.
[State -3, Reset]
type = VarAdd
trigger1 = var(56) > 0 && !IsHelper
var(56) = -1

[State -3, Delay]
type = VarSet
trigger1 = var(57) < GameTime-1 && !IsHelper
var(56) = 31
IgnoreHitPause = 1

[Statedef -3]
[State -3, AI Helper - Compatibly Partnered Version]
type = Helper
trigger1 = !var(59) && !IsHelper
trigger1 = !NumHelper(9742)
trigger1 = Alive && RoundState = 2
trigger1 = NumPartner
trigger1 = Partner,SelfAnimExist(9741)
HelperType = normal
name = "AI Helper (Simul Version)"
ID = 9742
pos = 9999999,99999
StateNo = 9742
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647

; If you want to use the Guard mode, Dummy mode, Distance, or Button jam dummy
; control options in Training mode without activating the dummy's AI while
; working on the character, then all you need to do is temporarily disable
; this controller.  Or, if you want to permanently disable this controller in
; Training mode, then you could use the Training mode detection code available
; from my site ( http://www.mugenguild.net/~winane/ ), and then just add a
; "(var(59)&63)>30" triggerall to this controller.
; Alternatively, you can just set "Dummy control" to "Manual", press a P2 button
; to kill the AI helper, and then set dummy control back to "Cooperative".  (In
; fact, setting dummy control to manual isn't even necessary, if you press the
; P2 button prior to the first time you pause.)
[State -3, AI Helper]
type = Helper
triggerall = !var(59) && !IsHelper
triggerall = !NumHelper(9741)
triggerall = Alive && RoundState = 2
trigger1 = !NumPartner
trigger2 = !(Partner,SelfAnimExist(9741))
HelperType = normal
name = "AI Helper"
ID = 9741
pos = 9999999,99999
StateNo = 9741
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647


[State -3, TurnBackOnAI]
type = VarSet
trigger1 = var(59) = -2 && !IsHelper
trigger1 = Alive && RoundState = 2
var(59) = 1

; It is very important that this controller NOT be moved to State -2, as putting
; it there would defeat the entire purpose of the controller, allowing the
; helper method to erroneously set the AI variable.
; And within State -3, don't put any ChangeState controllers before this
; controller, lest you unnecessarily delay your character's AI activation.
[State -3, GameTimeVar]
type = VarSet
trigger1 = !IsHelper
var(57) = GameTime
IgnoreHitPause = 1
