[Remap] ;These are all mandatory. Do not remove any of them!
x = x
y = y
z = z
a = a
b = b
c = c
s = s

[Defaults]
command.time = 15
command.buffer.time = 1

;======================================;
;         DASHING AND RECOVERY         ;
;======================================;

[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

[Command]
name = "recovery";Required (do not remove)
command = x+y
time = 1

;======================================;
;          DIRECTIONAL INPUTS          ;
;======================================;
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 60

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 60

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

;======================================;
;         BUTTON INPUTS          ;
;======================================;


[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "start"
command = s
time = 1

;======================================;

[StateDef -1]

[State -1, AI ON] ; Turn the AI on when
Type = VarSet
TriggerAll = Var(59) < 1; it is not on yet and
TriggerAll = RoundState=2 ; the fight has started and is not over yet and
Trigger1 = AILevel>0 ; the computer is playing the character
v = 59
value= 1 ; value of 1 will mean the AI is on
Ignorehitpause=1

[State -1, AI OFF] ; Turn the AI off when
Type=VarSet
Trigger1=var(59)>0 ; it is on and
Trigger1=RoundState!=2 ; the round is not started yet or is already over
Trigger2=!IsHelper ; OR if we are a player, but
Trigger2=AILevel=0 ; the computer is not in control
v= 59
value=0 ; value of 0 will mean the AI is off. values other than 0 and 1 are not used in this example, we have only one AI mode, the normal one.
Ignorehitpause=1

[State -1]
Type=VarSet
Trigger1=1
var(50)= 10 ;Change the 60 to whatever you want. Take note of this value, as I mention it below.


[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = Var(59) <= 0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Dash Back]
type = ChangeState
value = 105
triggerall = Var(59) <= 0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Tackle]
type = ChangeState
value = 210
triggerall = Var(59) <= 0
triggerall = command = "a"
triggerall = stateno = 0
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Missile]
type = ChangeState
value = 220
triggerall = Var(59) <= 0
triggerall = command = "b"
triggerall = stateno = 0
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Bullet]
type = ChangeState
value = 230
triggerall = Var(59) <= 0
triggerall = command = "c"
triggerall = stateno = 0
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Chomp]
type = ChangeState
value = 215
triggerall = Var(59) <= 0
triggerall = command = "x"
triggerall = stateno = 0
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Drop]
type = ChangeState
value = 225
triggerall = Var(59) <= 0
triggerall = command = "y"
triggerall = stateno = 0
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Fire]
type = ChangeState
value = 235
triggerall = Var(59) <= 0
triggerall = command = "z"
triggerall = stateno = 0
triggerall = numhelper(236) = 0
trigger1 = statetype = S
trigger1 = ctrl

[State -1, VBeams]
type = ChangeState
value = 240
triggerall = Var(59) <= 0
triggerall = command = "holdback"
triggerall = command = "a"
trigger1 = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Incomprensible]
type = ChangeState
value = 245
triggerall = Var(59) <= 0
triggerall = command = "holdfwd"
triggerall = command = "a"
triggerall = numhelper(246) = 0
trigger1 = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Boom]
type = ChangeState
value = 250
triggerall = Var(59) <= 0
triggerall = command = "holdback"
triggerall = command = "b"
trigger1 = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, BFG]
type = ChangeState
value = 255
triggerall = Var(59) <= 0
triggerall = command = "holdfwd"
triggerall = command = "b"
trigger1 = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, FatMan]
type = ChangeState
value = 260
triggerall = Var(59) <= 0
triggerall = command = "holdback"
triggerall = command = "c"
trigger1 = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Error]
type = ChangeState
value = 265
triggerall = Var(59) <= 0
triggerall = command = "holdfwd"
triggerall = command = "c"
triggerall = numhelper(266) = 0 
trigger1 = power >= 2000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, MichaelBay]
type = ChangeState
value = 270
triggerall = Var(59) <= 0
triggerall = command = "holdback"
triggerall = command = "x"
trigger1 = power >= 2000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, Mexibeam]
type = ChangeState
value = 280
triggerall = Var(59) <= 0
triggerall = command = "holdback"
triggerall = command = "y"
trigger1 = power >= 2000
trigger1 = statetype = S
trigger1 = ctrl

[State -1, ???]
type = ChangeState
value = 290
triggerall = Var(59) <= 0
triggerall = command = "holdback"
triggerall = command = "z"
trigger1 = power >= 3000
trigger1 = statetype = S
trigger1 = ctrl

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

[State -1, AI1] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = random<var(50) * 10
value= 210

[State -1, AI2] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
Triggerall = p2bodydist x <= 80
trigger1 = random<var(50) * 10
value= 215

[State -1, AI3] 
Type=Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = random<var(50) * 20
value= 220

[State -1, AI4] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
Triggerall = p2bodydist x >= 30 
trigger1 = random<var(50) * 80
value= 230

[State -1, AI5] 
Type=Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
triggerall = numhelper(236) = 0
trigger1 = random<var(50) * 40
value= 235

[State -1, AI6] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
Triggerall = p2bodydist x >= 30 
trigger1 = power >= 1000
trigger1 = random<var(50) * 20
value= 240

[State -1, AI7] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
trigger1 = random<var(50) * 5
trigger2 = numhelper(236) = 1 
trigger2 = p2movetype = H
trigger2= random<var(50) * 10
value= 225

[State -1, AI8] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
triggerall = numhelper(246) = 0
trigger1 = power >= 1000
trigger1 = random<var(50) * 15
value= 245

[State -1, AI9] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = power >= 1000
trigger1 = random<var(50) * 10
value= 250

[State -1, AI10] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = power >= 1000
trigger1 = random<var(50) * 12
value= 255

[State -1, AI11] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = power >= 1000
trigger1 = random<var(50) * 25
value= 260

[State -1, AI12] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = power >= 2000
trigger1 = random<var(50) * 15
value= 270

[State -1, AI13] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
triggerall = numhelper(266) = 0 
trigger1 = power >= 2000
trigger1 = random<var(50) * 30
value= 265

[State -1, AI14] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = power >= 2000
trigger1 = random<var(50) * 70
value= 280


[State -1, AI15] 
Type= Changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = stateno = 0
trigger1 = power >= 3000
trigger1 = random<var(50) * 100
value= 290





