[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 = 1

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

[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 = "FinalMemeory"
command = D, DB, D, DB,  a+b
time = 30

[Command]
name = "FinalMemeory"
command = D, DB, D, DB,  a+c
time = 30

[Command]
name = "FinalMemeory"
command = D, DB, D, DB,  b+c
time = 30

[Command]
name = "WingSmash"
command = D, DF, F, a+b
time = 30

[Command]
name = "ShoopLaser"
command = D, DF, F, a+c
time = 30

[Command]
name = "PoiSquad"
command = D, DF, F, b+c
time = 30

[Command]
name = "HolyHandGrenade"
command = D, DB, D, DB,  a
time = 30

[Command]
name = "GenericAutocombo"
command = D, DF, D, DF, c
time = 30

[Command]
name = "YouSpinMe"
command = D, DB, D, DB, b
time = 30

[Command]
name = "AnIdea"
command = D, DF, D, DF, a
time = 30

[Command]
name = "Below"
command = D, DB, B, c
time = 30

[Command]
name = "Speen"
command = D, DB, B, b
time = 30

[Command]
name = "Astolofo"
command = D, DB, B, a
time = 30

[Command]
name = "Bow"
command = D, DF, F, a
time = 30

[Command]
name = "Punch"
command = D, DF, F, b
time = 30

[Command]
name = "LightningHighGround"
command = D, DF, F, c
time = 30

[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 = "s"
command = /s
time = 1

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

;---------------------------------------------------------------------------
;===========================================================================


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

[StateDef -1] ;How the character reads button inputs, or is controlled by the AI.
;A better explanation would be how a character is allowed to change from state to state.

[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)= 60 ;Change the 60 to whatever you want. Take note of this value, as I mention it below.

[State -1]
Type=Changestate
Triggerall=Inguarddist; Guard when in guard distance
Triggerall=var(59)>0; and the AI is on
Triggerall=ctrl; and we have control
Trigger1 = random< (var(50)* 20) ; Feel free to change the * 99 to whatever you want, 
value=120

[State -1]; The engine will still guard by through pressing the back button, we need to disable that.
Type=Assertspecial
Triggerall=StateNo!=[120,160]
Trigger1=var(59)>0
flag=noairguard
flag2=nocrouchguard
flag3=nostandguard

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

[State -1, WingSmashAir]
type = ChangeState
value = 3250
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = power >= 2000
Triggerall = p2bodydist x  = [50,180]
trigger1 = ctrl = 1
trigger1 = random<var(50) * 0.3

[State -1, ShoopLaserAir]
type = ChangeState
value = 3150
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = power >= 2000
triggerall = p2bodydist y = [-75,75]
trigger1 = ctrl = 1
trigger1 = random<var(50) * 0.2
trigger2 = stateno = 224 && (movecontact)
trigger2 = random<var(50) * 0.4

[State -1, YouSpinMeAir]
type = ChangeState
value = 2150
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = power >= 1000
Triggerall = p2bodydist x <= 80
triggerall = p2bodydist y = [-75,75]
trigger1 = ctrl = 1
trigger1 = random<var(50) * 0.2
trigger2 = stateno = 224 && (movecontact)
trigger2 = random<var(50) * 5

[State -1, SpeenAir]
type = ChangeState
value = 1200
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
Triggerall = p2bodydist x <= 80
trigger1 = ctrl = 1
trigger1 = random<var(50) * 6
trigger2 = stateno = 224 && (movecontact)
trigger2 = random<var(50) * 15

[State -1, BowAir]
type = ChangeState
value = 1100
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
trigger1 = ctrl 
Trigger1 = p2bodydist x  >= 80
trigger1 = p2bodydist y = [-50,50]
trigger1 = random<var(50) * 1

[State -1, HighGround]
type = ChangeState
value = 1000
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = ctrl 
trigger1 = p2bodydist y > 30
trigger1 = random<var(50) * 1
trigger2 = p2statetype = S
trigger2 = random<var(50) * 3

[State -1. HAAttack]
type = ChangeState
value = 224
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
Triggerall = p2bodydist x <= 60
trigger1 = ctrl = 1
trigger1 = random<var(50) * 5
trigger2 = stateno = 224 && (movecontact)
trigger2 = random<var(50) * 25

[State -1, MAAttack]
type = ChangeState
value = 221
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = A
Triggerall = p2bodydist x  <= 70
trigger1 = ctrl = 1
trigger1 = random<var(50) * 5

[State -1,Jump]
type=changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = stateno = 100
triggerall = statetype = S
triggerall = RoundState = 2
triggerall = P2statetype = A
Triggerall = P2Movetype != H
trigger1 = random<var(50) * 5
value = 40

[State -1,Jump]
type=changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = statetype = S
triggerall = RoundState = 2
triggerall = P2statetype = A
Triggerall = P2Movetype != H
trigger1 = random<var(50) * 5
value = 40

[State -1,Run_Fwd]
type=changestate
Triggerall = var(59)>0
Triggerall = alive = 1
Triggerall = ctrl
triggerall = RoundState = 2
triggerall = statetype = S
Triggerall = p2bodydist x  >= 20
trigger1 = random<var(50) * 100
value = 100

[State -1, FinalMemeory]
type = ChangeState
value = 4000
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 3000
Triggerall = p2bodydist x  <= 60
triggerall = p2stateno!= 5120
trigger1 = stateno = 100
trigger1 = random<var(50) * 10

[State -1, WingSmash]
type = ChangeState
value = 3200
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 2000
Triggerall = p2bodydist x  = [50,180]
trigger1 = stateno = 100
trigger1 = random<var(50) * 0.3
trigger2 = stateno = 500 && animtime = 0
trigger2 = p2movetype = A
trigger2 = ctrl = 1
trigger2 = random<var(50) * 4

[State -1, ShoopLaser]
type = ChangeState
value = 3100
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 2000
Triggerall = p2bodydist x  <=  70
trigger1 = stateno = 100
trigger1 = random<var(50) * 0.1
trigger2 = stateno = 200 && (movecontact)
trigger2 = random<var(50) * 0.3
trigger3 = stateno = 201 && (movecontact)
trigger3 = random<var(50) * 0.3
trigger4 = stateno = 203 && (movecontact)
trigger4 = random<var(50) * 0.3
trigger5 = stateno = 205 && (movecontact)
trigger5 = random<var(50) * 0.3
trigger6 = stateno = 500 && animtime = 0
trigger6 = p2movetype = A
trigger6 = ctrl = 1
trigger6 = random<var(50) * 4


[State -1, PoiSquad]
type = ChangeState
value = 3000
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 2000
trigger1 = stateno = 100
Trigger1 = p2bodydist x  >= 100
trigger1 = random<var(50) * 0.6


[State -1, Below]
type = ChangeState
value = 600
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
trigger1 = stateno = 100
Trigger1 = p2bodydist x  <= 150
trigger1 = random<var(50) * 5
trigger2 = stateno = 100
Trigger2 = p2bodydist x  <= 150
trigger2 = p2statetype = A
trigger2 = random<var(50) * 6
trigger3 = stateno = 100
Trigger3 = p2bodydist x  <= 150
trigger3 = p2movetype = A
trigger3 = random<var(50) * 7
trigger4 = p2bodydist x  <= 130
trigger4 = stateno = [5110,5130]
trigger4 = stateno = 100
trigger4 = random<var(50) * 10


[State -1, Lightning]
type = ChangeState
value = 500
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = numhelper(502) = 0
triggerall = stateno = 100
triggerall = p2stateno!= 5120
Trigger1 = p2bodydist x  =[160,250]
trigger1 = random<var(50) * 4
trigger2 = p2movetype = A
Trigger2 = p2bodydist x = [180,250]
trigger2 = random<var(50) * 5

[State -1, HolyHandGrenade]
type = ChangeState
value = 2300
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = power >= 1000
triggerall = statetype = S
triggerall = NumHelper(2350) = 0
Trigger1 = p2bodydist x  >= 150
trigger1 = stateno = 100
trigger1 = random<var(50) * 0.1

[State -1, GenericAutocombo]
type = ChangeState
value = 2200
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 1000
triggerall = p2stateno!= 5120
trigger1 = ctrl
trigger1 = random<var(50) * 0.3

[State -1, GenericAutocombo]
type = ChangeState
value = 2200
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 1000
Triggerall = p2bodydist x  <= 90
triggerall = p2stateno!= 5120
trigger1 = stateno = 100
trigger1 = random<var(50) * 0.2
trigger2 = stateno = 200 && (movecontact)
trigger2 = random<var(50) * 0.6
trigger3 = stateno = 201 && (movecontact)
trigger3 = random<var(50) * 0.6
trigger4 = stateno = 203 && (movecontact)
trigger4 = random<var(50) * 0.6
trigger5 = stateno = 205 && (movecontact)
trigger5 = random<var(50) * 0.6

[State -1, YouSpinMe]
type = ChangeState
value = 2100
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 1000
Triggerall = p2bodydist x  <= 85
triggerall = p2stateno!= 5120
trigger1 = ctrl
trigger1 = random<var(50) * 0.2

[State -1, YouSpinMe]
type = ChangeState
value = 2100
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 1000
Triggerall = p2bodydist x  <= 85
triggerall = p2stateno!= 5120
trigger1 = stateno = 100
trigger1 = random<var(50) * 0.2
trigger2 = stateno = 200 && (movecontact)
trigger2 = random<var(50) * 0.6
trigger3 = stateno = 201 && (movecontact)
trigger3 = random<var(50) * 0.6
trigger4 = stateno = 203 && (movecontact)
trigger4 = random<var(50) * 0.6
trigger5 = stateno = 205 && (movecontact)
trigger5 = random<var(50) * 0.3

[State -1, AnIdea]
type = ChangeState
value = 2000
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = stateno = 100
Trigger1 = p2bodydist x  <= 100
trigger1 = random<var(50) * 0.3
trigger2 = stateno = 500 && animtime = 0
trigger2 = p2movetype = H
trigger2 = random<var(50) * 4.5

[State -1, Speen]
type = ChangeState
value = 800
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = p2stateno != [5080,5120]
Triggerall = p2bodydist x  <= 85
triggerall = !(enemynear,hitfall)
trigger1 = ctrl = 1
trigger1 = random<var(50) * 2
Trigger2 = p2bodydist x  <= 70
trigger2 = p2movetype = A
trigger2 = ctrl = 1
trigger2 = random<var(50) * 5

[State -1, Speen]
type = ChangeState
value = 800
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = p2stateno != [5080,5120]
Triggerall = p2bodydist x  <= 85
triggerall = !(enemynear,hitfall)
trigger1 = stateno = 100
trigger1 = random<var(50) * 2
trigger2 = p2movetype = A
trigger2 = stateno = 100
trigger2 = random<var(50) * 5
trigger3 = stateno = 200 && (movecontact)
trigger3 = random<var(50) * 5
trigger4 = stateno = 201 && (movecontact)
trigger4 = random<var(50) * 5
trigger5 = stateno = 203 && (movecontact)
trigger5 = random<var(50) * 5
trigger6= stateno = 205 && (movecontact)
trigger6= random<var(50) * 5

[State -1, Punch]
type = ChangeState
value = 400
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = p2stateno!= 5120
trigger1 = p2statetype = S
Trigger1 = p2bodydist x  <= 160
trigger1 = ctrl = 1
trigger1 = random<var(50) * 3
trigger2 = p2statetype = S
Trigger2 = p2bodydist x  <= 130
trigger2 = stateno = 100
trigger2 = p2movetype = A
trigger2 = random<var(50) * 5


[State -1, Punch]
type = ChangeState
value = 400
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = p2stateno!= 5120
trigger1 = p2statetype = S
Trigger1 = p2bodydist x  <= 130
trigger1 = stateno = 100
trigger1 = random<var(50) * 5
trigger2 = p2statetype = S
Trigger2 = p2bodydist x  <= 130
trigger2 = stateno = 100
trigger2 = p2movetype = A
trigger2 = random<var(50) * 10
trigger3 = stateno = 200 && (movecontact)
trigger3 = random<var(50) * 3
trigger4 = stateno = 201 && (movecontact)
trigger4 = random<var(50) * 3
trigger5 = stateno = 203 && (movecontact)
trigger5 = random<var(50) * 3
trigger6 = stateno = 205 && (movecontact)
trigger6 = random<var(50) * 5

[State -1, Astolofo]
type = ChangeState
value = 900
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = NumHelper(910) <= 1
triggerall = p2movetype != A
trigger1 = stateno = 100
Trigger1 = p2bodydist x  >= 150
trigger1 = random<var(50) * 1
trigger2 = stateno = 500 && animtime = 0
trigger2 = p2movetype = H
trigger2 = random<var(50) * 5
trigger3 = stateno = 100

[State -1, Bow]
type = ChangeState
value = 300
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = numhelper(502) = 0
triggerall = p2stateno!= 5120
trigger1 = stateno = 100
Trigger1 = p2bodydist x  >= 80
trigger1 = random<var(50) * 1

[State -1, LAttack] 
type = ChangeState
value = 200
Triggerall = var(59)>0
triggerall = statetype = S
Triggerall = p2bodydist x  <= 60
triggerall = ctrl = 1
triggerall = p2stateno!= 5120
trigger1 = random<var(50) * 10
trigger2 = p2movetype = A
trigger2 = random<var(50) * 12

[State -1, LAttack] 
type = ChangeState
value = 200
Triggerall = var(59)>0
triggerall = statetype = S
Triggerall = p2bodydist x  <= 60
triggerall = p2stateno!= 5120
trigger1 = stateno = 100
trigger1 = random<var(50) * 10
trigger2 = stateno = 200 && (movecontact)
trigger2 = random<var(50) * 5
trigger3 = stateno = 100
trigger3 = p2movetype = A
trigger3 = random<var(50) * 12

[State -1, MAttack1] 
type = ChangeState
value = 201
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype  = S
Triggerall = p2bodydist x  <= 90
triggerall = p2stateno!= 5120
trigger1 = (ctrl = 1)*(p2bodydist x<90)
trigger1 = random<var(50) * 5

[State -1, MAttack1] 
type = ChangeState
value = 201
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype  = S
Triggerall = p2bodydist x  <= 60
triggerall = p2stateno!= 5120
trigger1 = (stateno = 100)*(p2bodydist x<90)
trigger1 = random<var(50) * 5
trigger2 = stateno = 200 *(p2bodydist x<90) && (movecontact)
trigger2 = random<var(50) * 10

[State -1, Mattack2] 
type = ChangeState
value = 203
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = (p2bodydist x<100)
Triggerall = (ctrl = 1)*(p2bodydist x>=90)
triggerall = p2stateno!= 5120
trigger1 = random<var(50) * 5

[State -1, Mattack2] 
type = ChangeState
value = 203
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
Triggerall = p2bodydist x  <= 60
triggerall = (p2bodydist x<100)
triggerall = p2stateno!= 5120
trigger1 = (stateno = 100)*(p2bodydist x>=90)
trigger1 = random<var(50) * 4
trigger2 = stateno = 201 && (movecontact) 
trigger2 = random<var(50) * 15

[State -1, Mattack2] 
type = ChangeState
value = 205
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
Triggerall = p2bodydist x  <= 70
triggerall = p2stateno!= 5120
trigger1 = ctrl = 1
trigger1 = random<var(50) * 5

[State -1, Mattack2] 
type = ChangeState
value = 205
Triggerall = var(59)>0
triggerall = RoundState = 2
triggerall = statetype = S
Triggerall = p2bodydist x  <= 70
triggerall = p2stateno!= 5120
trigger1 = stateno = 100
trigger1 = random<var(50) * 3
trigger2 = stateno = 200 && (movecontact)
trigger2= random<var(50) * 2
trigger3 = stateno = 201 && (movecontact)
trigger3 = random<var(50) * 3
trigger4 = stateno = 203 && (movecontact)
trigger4 = random<var(50) * 20


;[State -1,HopB]
;type=changestate
;Triggerall = var(59)>0
;Triggerall = alive = 1
;Triggerall = stateno = 100
;Triggerall = p2bodydist x  <= 60
;triggerall = RoundState = 2
;triggerall = statetype = S
;trigger1 = random<var(50) * 1
;value=105


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


[State -1, FinalMemory]
type = ChangeState
value = 4000
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "FinalMemeory"
triggerall = statetype = S
triggerall = power >= 3000
trigger1 = ctrl = 1

[State -1, WingSmashAir]
type = ChangeState
value = 3250
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "WingSmash"
triggerall = statetype = A
triggerall = power >= 2000
trigger1 = ctrl = 1

[State -1, ShoopLaserAir]
type = ChangeState
value = 3150
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "ShoopLaser"
triggerall = statetype = A
triggerall = power >= 2000
trigger1 = ctrl = 1
trigger2 = stateno = 220 && (movecontact)
trigger3 = stateno = 224 && (movecontact)

[State -1, WingSmash]
type = ChangeState
value = 3200
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "WingSmash"
triggerall = statetype = S
triggerall = power >= 2000
trigger1 = ctrl = 1

[State -1, ShoopLaser]
type = ChangeState
value = 3100
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "ShoopLaser"
triggerall = statetype = S
triggerall = power >= 2000
trigger1 = ctrl = 1
trigger2 = stateno = 200 && (movecontact)
trigger3 = stateno = 201 && (movecontact)
trigger4 = stateno = 203 && (movecontact)
trigger5 = stateno = 205 && (movecontact)

[State -1, PoiSquad]
type = ChangeState
value = 3000
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "PoiSquad"
triggerall = statetype = S
triggerall = power >= 2000
trigger1 = ctrl = 1

[State -1, YouSpinMeAir]
type = ChangeState
value = 2150
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "YouSpinMe"
triggerall = statetype = A
triggerall = power >= 1000
trigger1 = ctrl 
trigger2 = stateno = 220 && (movecontact)
trigger3 = stateno = 224 && (movecontact)

[State -1, HolyHandGrenade]
type = ChangeState
value = 2300
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "HolyHandGrenade"
triggerall = power >= 1000
triggerall = statetype = S
triggerall = NumHelper(2350) = 0
trigger1 = ctrl = 1

[State -1, GenericAutocombo]
type = ChangeState
value = 2200
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "GenericAutocombo"
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = ctrl 
trigger2 = stateno = 200 && (movecontact)
trigger3 = stateno = 201 && (movecontact)
trigger4 = stateno = 203 && (movecontact)
trigger5 = stateno = 205 && (movecontact)
trigger6 = stateno = 2100 && (movecontact)

[State -1, YouSpinMe]
type = ChangeState
value = 2100
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "YouSpinMe"
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = ctrl 
trigger2 = stateno = 200 && (movecontact)
trigger3 = stateno = 201 && (movecontact)
trigger4 = stateno = 203 && (movecontact)
trigger5 = stateno = 205 && (movecontact)
trigger6 = stateno = 2200 && (movecontact)

[State -1, AnIdea]
type = ChangeState
value = 2000
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "AnIdea"
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = ctrl 

[State -1, SpeenAir]
type = ChangeState
value = 1200
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Speen"
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 220 && (movecontact)
trigger3 = stateno = 224 && (movecontact)

[State -1, BowAir]
type = ChangeState
value = 1100
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Bow"
triggerall = statetype = A
trigger1 = ctrl 

[State -1, LightningAndHighGround]
type = ChangeState
value = 1000
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "LightningHighGround"
triggerall = statetype = A
trigger1 = ctrl 

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

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

[State -1, Bow]
type = ChangeState
value = 300
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Bow"
triggerall = statetype = S
trigger1 = ctrl = 1

[State -1, Punch]
type = ChangeState
value = 400
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Punch"
triggerall = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200 && (movecontact)
trigger3 = stateno = 201 && (movecontact)
trigger4 = stateno = 203 && (movecontact)
trigger5 = stateno = 205 && (movecontact)

[State -1, Lightning]
type = ChangeState
value = 500
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "LightningHighGround"
triggerall = statetype = S
triggerall = numhelper(502) = 0
trigger1 = ctrl = 1

[State -1, Below]
type = ChangeState
value = 600
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Below"
triggerall = statetype = S
trigger1 = ctrl = 1

[State -1, Speen]
type = ChangeState
value = 800
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Speen"
triggerall = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200 && (movecontact)
trigger3 = stateno = 201 && (movecontact)
trigger4 = stateno = 203 && (movecontact)
trigger5 = stateno = 205 && (movecontact)

[State -1, Astolofo]
type = ChangeState
value = 900
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "Astolofo"
triggerall = statetype = S
triggerall = NumHelper(910) <= 1
trigger1 = ctrl = 1

[State -1, LAAttack]
type = ChangeState
value = 220
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 220 && (movecontact)

[State -1, MAAttack]
type = ChangeState
value = 221
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 220 && (movecontact)

[State -1. HAAttack]
type = ChangeState
value = 224
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "c"
triggerall = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 220 && (movecontact)
trigger3 = stateno = 224 && (movecontact)

[State -1, CAttack] 
type = ChangeState
value = 210
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 && (movecontact)

[State -1, HAttack] ;You need a state controller in -1 for a character to load. I used Run Forward as an example.
type = ChangeState
value = 211
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "holddown"
triggerall = command = "b"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 && (movecontact)

[State -1, HAttack] ;You need a state controller in -1 for a character to load. I used Run Forward as an example.
type = ChangeState
value = 212
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "holddown"
triggerall = command = "c"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 && (movecontact)

[State -1, LAttack] 
type = ChangeState
value = 200
triggerall = Var(59) <= 0
triggerall = command = "a"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (movecontact)

[State -1, MAttack1] 
type = ChangeState
value = 201
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "b"
triggerall = statetype  = S
triggerall = ctrl
trigger1 = (ctrl = 1)*(p2bodydist x<90)

[State -1, Mattack2] 
type = ChangeState
value = 203
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "b"
triggerall = statetype = S
trigger1 = ctrl
trigger1 = (ctrl = 1)*(p2bodydist x>=90)
trigger2 = stateno = 201 && (movecontact) 

[State -1, Mattack2] 
type = ChangeState
value = 205
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "c"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && (movecontact)
trigger3 = stateno = 201 && (movecontact)
trigger4 = stateno = 203 && (movecontact)

[State -1, Distraction] 
type = ChangeState
value = 195
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command != "holdfwd"
triggerall = command = "s"
triggerall = statetype = S
trigger1 = ctrl

[State -1, Distraction] 
type = ChangeState
value = 1950
triggerall = Var(59) <= 0
triggerall = RoundState = 2
triggerall = command = "holdfwd"
triggerall = command = "s"
triggerall = statetype = S
trigger1 = ctrl




