;-| Button Remapping |-----------------------------------------------------
;[Remap]
;x = x
;y = y
;z = z
;a = a
;b = b
;c = c
;s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
command.time = 15
command.buffer.time = 1

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command =a
time = 1

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

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

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

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

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

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

;-| Hold Dir |--------------------------------------------------------------
[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

;-| Hold Button |-----------------------------------------------------------
[Command]
name = "hold_x"
command =/x
time = 1

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

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

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

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

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

[Command]
name = "hold_s"
command =/s
time = 1

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "fwd_a"
command = /F,a
time = 1
[Command]
name = "fwd_b"
command = /F,b
time = 1
[Command]
name = "fwd_c"
command = /F,c
time = 1
[Command]
name = "fwd_x"
command = /F,x
time = 1
[Command]
name = "fwd_y"
command = /F,y
time = 1
[Command]
name = "fwd_z"
command = /F,z
time = 1

;-| CPU |--------------------------------------------------------------
[Command]
name = "a2"
command = a
time = 1

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

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

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

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

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

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

[Command]
name = "holdfwd2"
command = /$F
time = 1

[Command]
name = "holdback2"
command = /$B
time = 1

[Command]
name = "holdup2"
command = /$U
time = 1

[Command]
name = "holddown2"
command = /$D
time = 1

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

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

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

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

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

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

[Command]
name = "hold_s2"
command = /s
time = 1

[Command]
name = "recovery2"
command = x+y
time = 1

;-| Other |---------------------------------------------------------


[Command]
name = "back_a"
command = /B,a
time = 1
[Command]
name = "back_b"
command = /B,b
time = 1
[Command]
name = "back_c"
command = /B,c
time = 1
[Command]
name = "back_x"
command =/B,x
time = 1
[Command]
name = "back_y"
command =/B,y
time = 1
[Command]
name = "back_z"
command =/B,z
time = 1

[Command]
name = "down_a"
command =/D,a
time = 1
[Command]
name = "down_b"
command =/D,b
time = 1
[Command]
name = "down_c"
command =/D,c
time = 1
[Command]
name = "down_x"
command =/D,x
time = 1
[Command]
name = "down_y"
command =/D,y
time = 1
[Command]
name = "down_z"
command =/D,z
time = 1

[Command]
name = "fwd_ab"
command =/F, a+b
time = 1
[Command]
name = "fwd_bc"
command =/F, b+c
time = 1

[Command]
name = "fwd_xy"
command =/F, x+y
time = 1
[Command]
name = "fwd_yz"
command =/F, y+z
time = 1

[Command]
name = "back_xy"
command =/B, x+y
time = 1
[Command]
name = "back_yz"
command =/B, y+z
time = 1

[Command]
name = "back_ab"
command =/B, a+b
time = 1
[Command]
name = "back_bc"
command =/B, b+c
time = 1

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

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

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery" ;Required (do not remove)
command =a+b
time = 1

[Command]
name = "xy"
command = x+y
time = 1

;-| Special Motions |------------------------------------------------------
[Command]
name	=	"pugniaterra"
command =	~D, DB, B, D, DB, B, y
time	=	35

[Command]
name 	=	"centopugni"
command =	~D, DF, F, D, DF, F, y
time	=	35

[Command]
name	=	"shotgunD"
command	=	~F ,D, DF, x

[Command]
name	=	"shotgunF"
command	=	~F ,D, DF, y

[Command]
name 	=	"pugnobassoD"
command	=	~D, DB, B, x

[Command]
name	=	"pugnobassoF"
command	=	~D, DB, B, y

;-| Dir + Button |---------------------------------------------------------
[Command];parry
name = "parryS"
command = F;
time = 1

[Command];parry
name = "parryC"
command = D
time = 1

[Command];parry
name = "parryA"
command = F;
time = 1

[Command];knockback
name = "knockbackS"
command = /B
time = 3

;---------------------------------------------------------------------------
; Commands
[Statedef -1]

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


;---------------------------------------------------------------------------
;RunFwd
[State -1]
type = ChangeState
value = 100
triggerall = var(0) = 0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;RunBack
[State -1]
type = ChangeState
value = 105
triggerall = var(0) = 0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Dodge
[State -1]
type = ChangeState
value = 700
triggerall = var(0) = 0
trigger1 = command = "xy"
trigger1 = statetype = S
trigger1 = command != "holddown"
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
; Respinta
[State -1]
type = ChangeState
value = 750
triggerall = var(0) = 0
triggerall = (stateno = 5030) || (stateno = 5035) || (Stateno = 5020); || (stateno = 5000) || (stateno = 5001) || (stateno = 5002) || (stateno = 5010) || (stateno = 5011) || (stateno = 5012)
triggerall = power >= 1000
trigger1 = command = "recovery"

;===========================================================================
; [PARRYS]
; Stand parry
[State -1, stp]
type = hitoverride
triggerall = var(31) < 5
triggerall = statetype = S && movetype != A
trigger1 = p2statetype != C
trigger1 = ctrl || stateno = 850 || stateno = 852 || stateno=[150,153]
attr = SA, AA, AP
stateno = 830
time = ifelse((stateno=[150,153]), 6, 8)

; Crouch parry 
[State -1, crp] 
type = hitoverride 
triggerall = var(32) < 5
triggerall = movetype != A && statetype != A
trigger1 = p2statetype = C
trigger1 = ctrl || stateno = 850 || stateno = 851 || stateno = [150,153] 
attr = CS, AA, AP 
stateno = 832
time = ifelse((stateno = [150,153]), 6, 8) 

; Air parry 
[State -1, aip] 
type = hitoverride 
triggerall = var(33) < 5
triggerall = movetype != A && statetype = A
trigger1 = ctrl || stateno = 822 || stateno = [154,155] 
attr = SA, AA, AP 
stateno = 831
time = ifelse((stateno = [150,153]), 6, 8)

;---------------------------------------------------------------------------
; Scivolata

[State -1]
type = VarSet
triggerall = var(0) = 0
trigger1 = stateno != 790
trigger1 = stateno != 100
v = 22
value = 0

;[State -1]
;type = VarSet
;trigger1 = stateno = 100
;trigger1 = command = "xa"
;trigger1 = command = "holdfwd"
;v = 22
;value = 22

;Forward_X+Y 
[State -1]
type = ChangeState
value = 790
triggerall = var(0) = 0
triggerall = stateno != 790
trigger1 = Var(22) = 22

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

;Cento Pugni
[State -1]
type = ChangeState
value = 3000
triggerall = var(0) = 0
triggerall = command = "centopugni"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = movecontact = 1
trigger3 = stateno = 205
trigger3 = movecontact = 1
trigger4 = stateno = 210
trigger4 = movecontact = 1
trigger5 = stateno = 215
trigger5 = movecontact = 1
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 410
trigger7 = movecontact = 1

;Pugniaterra
[State -1]
type = ChangeState
value = 2200
triggerall = var(0) = 0
triggerall = command = "pugniaterra"
triggerall = power >= 2000
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 200
trigger2 = movecontact = 1
trigger3 = stateno = 205
trigger3 = movecontact = 1
trigger4 = stateno = 210
trigger4 = movecontact = 1
trigger5 = stateno = 215
trigger5 = movecontact = 1
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 410
trigger7 = movecontact = 1

;Shotgun Debole
[State -1]
type = ChangeState
value = 3100
triggerall = var(0) = 0
triggerall = command = "shotgunD"
triggerall = numproj = 0
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 200
trigger2 = movecontact = 1
trigger3 = stateno = 205
trigger3 = movecontact = 1
trigger4 = stateno = 210
trigger4 = movecontact = 1
trigger5 = stateno = 215
trigger5 = movecontact = 1
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 410
trigger7 = movecontact = 1

;Shotgun Forte
[State -1]
type = ChangeState
value = 3101
triggerall = var(0) = 0
triggerall = command = "shotgunF"
triggerall = numproj = 0
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 200
trigger2 = movecontact = 1
trigger3 = stateno = 205
trigger3 = movecontact = 1
trigger4 = stateno = 210
trigger4 = movecontact = 1
trigger5 = stateno = 215
trigger5 = movecontact = 1
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 410
trigger7 = movecontact = 1

;Pugnobasso Debole
[State -1]
type = ChangeState
value = 1400
triggerall = var(0) = 0
triggerall = command = "pugnobassoD"
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 200
trigger2 = movecontact = 1
trigger3 = stateno = 205
trigger3 = movecontact = 1
trigger4 = stateno = 210
trigger4 = movecontact = 1
trigger5 = stateno = 215
trigger5 = movecontact = 1
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 410
trigger7 = movecontact = 1

;Pugnobasso Forte
[State -1]
type = ChangeState
value = 1401
triggerall = var(0) = 0
triggerall = command = "pugnobassoF"
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 200
trigger2 = movecontact = 1
trigger3 = stateno = 205
trigger3 = movecontact = 1
trigger4 = stateno = 210
trigger4 = movecontact = 1
trigger5 = stateno = 215
trigger5 = movecontact = 1
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 410
trigger7 = movecontact = 1

;---------------------------------------------------------------------------
;air_Throw_x
[State -1]
type = ChangeState
value = 850
triggerall = statetype = A
triggerall = ctrl 
triggerall = var(0) = 0
trigger1 = command = "fwd_z"   ;Near, p2 stand
trigger1 = stateno != 100    ;Not running
trigger1 = p2bodydist X < 8
trigger1 = p2statetype = A
trigger1 = p2movetype != H
trigger2 = command = "fwd_y"  ;Near, p2 stand
trigger2 = stateno != 100    ;Not running
trigger2 = p2bodydist X < 8
trigger2 = p2statetype = A
trigger2 = p2movetype != H

;---------------------------------------------------------------------------
;Stand_Throw_Z
[State -1]
type = ChangeState
value = 800
triggerall = var(0) = 0
triggerall = statetype = S
triggerall = ctrl 
trigger1 = command = "fwd_z"   ;Near, p2 stand
trigger1 = stateno != 100    ;Not running
trigger1 = p2bodydist X < 8
trigger1 = p2statetype = S
trigger1 = p2movetype != H
trigger2 = command = "fwd_y"   ;Near, p2 stand
trigger2 = stateno != 100    ;Not running
trigger2 = p2bodydist X < 8
trigger2 = p2statetype = S
trigger2 = p2movetype != H

;---------------------------------------------------------------------------
;Stand Light Punch(close)
[State -1]
type = ChangeState
value = 205
triggerall = var(0) = 0
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 205
trigger2 = time > 4

;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(0) = 0
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 200
trigger2 = time > 12
trigger3 = stateno = 205
trigger3 = time > 4

;---------------------------------------------------------------------------
;Stand Strong Punch(close)
[State -1]
type = ChangeState
value = 215
triggerall = var(0) = 0
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1 = 1
trigger2 = stateno = 210
trigger2 = time > 12

;Stand Strong Punch
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = var(0) = 0
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 210
trigger2 = time > 12
trigger3 = stateno = 215
trigger3 = time > 3

;---------------------------------------------------------------------------
;Stand Light Kick(close)
[State -1]
type = ChangeState
value = 235
triggerall = var(0) = 0
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1 = 1
trigger2 = stateno = 235
trigger2 = time > 6

;Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(0) = 0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 230
trigger2 = time > 9
trigger3 = stateno = 235
trigger3 = time > 6

;---------------------------------------------------------------------------
;Standing Strong Kick (close)
[State -1, Standing Strong Kick]
type = ChangeState
value = 245
triggerall = var(0) = 0
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 240
trigger2 = time > 14

;Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(0) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 240
trigger2 = time > 14
trigger3 = stateno = 245
trigger3 = time > 6

;---------------------------------------------------------------------------
;Taunt Carica
[State -1, Taunt]
type = ChangeState
value = 196
triggerall = var(0) = 0
triggerall = command = "s"
triggerall = power < 3000
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = var(0) = 0
triggerall = command = "s"
triggerall = power >= 3000
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Taunt Carica Life

[State -1, Taunt Carica Life]
type = ChangeState
value = 197
triggerall = var(0) = 0
triggerall = command = "z"
triggerall = life < 250
triggerall = power >= 2000
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(0) = 0
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 400
trigger2 = time > 6

;---------------------------------------------------------------------------
;Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(0) = 0
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 410
trigger2 = time > 7


;---------------------------------------------------------------------------
;Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(0) = 0
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 430
trigger2 = time > 7

;---------------------------------------------------------------------------
;Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = var(0) = 0
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 440
trigger2 = time > 8

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Jump_x
[State -1]
type = ChangeState
value = 605
triggerall = command = "x"
triggerall = Vel X = 0
triggerall = stateno != 41
trigger1 = statetype = A
trigger1 = ctrl = 1 = 1

;Jump_y
[State -1]
type = ChangeState
value = 615
triggerall = command = "y"
triggerall = Vel X = 0
triggerall = stateno != 41
trigger1 = statetype = A
trigger1 = ctrl = 1 = 1

;Jump_X
[State -1]
type = ChangeState
value = 635
triggerall = command = "a"
triggerall = Vel X = 0
triggerall = stateno != 41
trigger1 = statetype = A
trigger1 = ctrl = 1 = 1

;Jump_X
[State -1]
type = ChangeState
value = 645
triggerall = command = "b"
triggerall = Vel X = 0
triggerall = stateno != 41
trigger1 = statetype = A
trigger1 = ctrl = 1 = 1

;---------------------------------------------------------------------------
;Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(0) = 0
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = var(8) = -1 && ctrl = 1 && stateno = 41
trigger3 = var(8) =  1 && ctrl = 1 && stateno = 41

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = var(0) = 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = var(8) = -1 && ctrl = 1 && stateno = 41
trigger3 = var(8) =  1 && ctrl = 1 && stateno = 41

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = var(0) = 0
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = var(8) = -1 && ctrl = 1 && stateno = 41
trigger3 = var(8) =  1 && ctrl = 1 && stateno = 41

;---------------------------------------------------------------------------
;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = var(0) = 0
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = var(8) = -1 && ctrl = 1 && stateno = 41
trigger3 = var(8) =  1 && ctrl = 1 && stateno = 41



;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;AI Only

;---------------------------------------------------------------------------
;RunFwd AI
[State -1]
type = ChangeState
value = 100
triggerall = var(0) = 1
trigger1 = command = "FF"
trigger1 = Var(0) = 1
trigger1 = Stateno != 100
trigger1 = P2BodyDist X > 100
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw AI

[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = command = "y"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = Var(0) = 1
triggerall = Random <= 800
triggerall = statetype = S
triggerall = ctrl = 1
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 5
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H
trigger6 = stateno = 400
trigger6 = movecontact = 1
trigger7 = stateno = 405
trigger7 = movecontact = 1
trigger8 = stateno = 410
trigger8 = movecontact = 1
trigger9 = stateno = 415
trigger9 = movecontact = 1

;---------------------------------------------------------------------------
; Dodge AI
[State -1]
type = ChangeState
value = 700
triggerall = Var(0) = 1
triggerall = Random <= 25
triggerall = P2BodyDist X <= 80
triggerall = P2StateType != A
triggerall = P2MoveType = A
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
; Respinta AI
[State -1]
type = ChangeState
value = 750
triggerall = var(0) = 1
triggerall = P2BodyDist X <= 100
triggerall = (stateno = 5030) || (stateno = 5035) || (Stateno = 5020); || (stateno = 5000) || (stateno = 5001) || (stateno = 5002) || (stateno = 5010) || (stateno = 5011) || (stateno = 5012)
triggerall = power >= 1000
triggerall = random <= 300
trigger1 = command = "recovery"

;---------------------------------------------------------------------------
;Taunt life AI
[State -1, Taunt]
type = ChangeState
value = 197
triggerall = var(0) = 1
triggerall = random <= 300
triggerall = P2MoveType = H
triggerall = life < 250
triggerall = power >= 2000
trigger1 = statetype != A
trigger1 = ctrl = 1
;---------------------------------------------------------------------------

;Taunt AI
[State -1, Taunt]
type = ChangeState
value = 196
triggerall = var(0) = 1
triggerall = random <= 300
triggerall = P2MoveType = H
triggerall = power < 3000
trigger1 = statetype != A
trigger1 = ctrl = 1
;---------------------------------------------------------------------------

;=========================================================================
;Pugniaterra AI
[State -1]
type = ChangeState
value = 2200
triggerall = var(0) = 1
triggerall = random <= 300
triggerall = P2MoveType = H
triggerall = power >= 2000
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = StateNo = 200 && MoveContact && (random <= 500) 
trigger3 = StateNo = 205 && MoveContact && (random <= 500) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 500)
trigger8 = StateNo = 240 && MoveContact && (random <= 500) 
trigger9 = StateNo = 245 && MoveContact && (random <= 500)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)

;Pugnobasso Debole AI
[State -1]
type = ChangeState
value = 1400
triggerall = var(0) = 1
triggerall = random <= 250
triggerall = P2BodyDist X <= 50
triggerall = P2MoveType = H
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 200
trigger2 = StateNo = 200 && MoveContact && (random <= 500) 
trigger3 = StateNo = 205 && MoveContact && (random <= 500) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 500)
trigger8 = StateNo = 240 && MoveContact && (random <= 500) 
trigger9 = StateNo = 245 && MoveContact && (random <= 500)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)

;Pugnobasso Forte AI
[State -1]
type = ChangeState
value = 1401
triggerall = var(0) = 1
triggerall = random <= 200
triggerall = P2BodyDist X <= 50
triggerall = P2MoveType = H
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = StateNo = 200 && MoveContact && (random <= 500) 
trigger3 = StateNo = 205 && MoveContact && (random <= 500) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 500)
trigger8 = StateNo = 240 && MoveContact && (random <= 500) 
trigger9 = StateNo = 245 && MoveContact && (random <= 500)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)

;Cento Pugni
[State -1]
type = ChangeState
value = 3000
triggerall = var(0) = 1
triggerall = random <= 400
triggerall = P2BodyDist X <= 100
triggerall = P2MoveType = H
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = StateNo = 200 && MoveContact && (random <= 500) 
trigger3 = StateNo = 205 && MoveContact && (random <= 500) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 500)
trigger8 = StateNo = 240 && MoveContact && (random <= 500) 
trigger9 = StateNo = 245 && MoveContact && (random <= 500)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)


;Shotgun Debole
[State -1]
type = ChangeState
value = 3100
triggerall = var(0) = 1
triggerall = random <= 400
triggerall = P2MoveType = H
triggerall = power >= 1000
triggerall = numproj = 0
triggerall = statetype != A && ctrl 
trigger1 = (enemy, numproj > 0) && (random <= 50) && (P2BodyDist x >= 220) && (ctrl)
trigger1 = (p2stateno = 100 || p2stateno = 101 || p2stateno = 20 || p2stateno = 5300)
trigger2 = (enemy, numproj = 0) && (random <= 100) && (P2BodyDist x >= 240) && (ctrl)
trigger2 = (p2stateno = 100 || p2stateno = 101 || p2stateno = 20 || p2stateno = 5300) 
trigger3 = StateNo = 205 && MoveContact && (random <= 500) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 500)
trigger8 = StateNo = 240 && MoveContact && (random <= 500) 
trigger9 = StateNo = 245 && MoveContact && (random <= 500)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)
trigger14 = StateNo = 1000 && MoveContact && (random <= 500) 
trigger15 = StateNo = 1050 && MoveContact && (random <= 500)
trigger16 = StateNo = 1100 && MoveContact && (random <= 500) 
trigger17 = StateNo = 1150 && MoveContact && (random <= 500)
trigger18 = StateNo = 1600 && MoveContact && (random <= 500) 
trigger19 = StateNo = 1650 && MoveContact && (random <= 500)
trigger20 = StateNo = 200 && MoveContact && (random <= 500) 

;Shotgun Forte
[State -1]
type = ChangeState
value = 3101
triggerall = var(0) = 1
triggerall = random <= 300
triggerall = P2MoveType = H
triggerall = power >= 1000
triggerall = numproj = 0
triggerall = statetype != A && ctrl 
trigger1 = (enemy, numproj > 0) && (random <= 50) && (P2BodyDist x >= 220) && (ctrl)
trigger1 = (p2stateno = 100 || p2stateno = 101 || p2stateno = 20 || p2stateno = 5300)
trigger2 = (enemy, numproj = 0) && (random <= 100) && (P2BodyDist x >= 240) && (ctrl)
trigger2 = (p2stateno = 100 || p2stateno = 101 || p2stateno = 20 || p2stateno = 5300) 
trigger3 = StateNo = 205 && MoveContact && (random <= 500) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 500)
trigger8 = StateNo = 240 && MoveContact && (random <= 500) 
trigger9 = StateNo = 245 && MoveContact && (random <= 500)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)
trigger14 = StateNo = 1000 && MoveContact && (random <= 500) 
trigger15 = StateNo = 1050 && MoveContact && (random <= 500)
trigger16 = StateNo = 1100 && MoveContact && (random <= 500) 
trigger17 = StateNo = 1150 && MoveContact && (random <= 500)
trigger18 = StateNo = 1600 && MoveContact && (random <= 500) 
trigger19 = StateNo = 1650 && MoveContact && (random <= 500)
trigger20 = StateNo = 200 && MoveContact && (random <= 500) 

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

; High percent stand guard
[State -1]
type = ChangeState
value = 130
triggerall = p2movetype = A;access only when opponent attack
triggerall = P2bodydist X <= 40;access only when near
triggerall = random <= 950;Extreme high percent
triggerall = statetype != A && movecontact != 1;perform when not in air
triggerall = var(0) = 1;only AI can access
triggerall = ctrl;make sure AI had control
trigger1 = p2statetype = S
trigger2 = p2statetype = A

;---------------------------------------------------------------------------
; High percent crouch guard
[State -1]
type = ChangeState
value = 131
triggerall = p2movetype = A;access only when opponent attack
triggerall = P2bodydist X <= 40;access only when near
triggerall = statetype != A && movecontact != 1;perform when not in air
triggerall = random <= 950;Extreme high percent
triggerall = var(0) = 1;only AI can access
triggerall = ctrl;make sure AI had control
trigger1 = p2statetype = C

;---------------------------------------------------------------------------
; High percent air guard
[State -1]
type = ChangeState
value = 132
triggerall = p2movetype = A;access only when opponent attack
triggerall = P2bodydist X <= 40;access only when near
triggerall = statetype = A && movecontact != 1;perform when in air
triggerall = random <= 950;Extreme high percent
triggerall = var(0) = 1;only AI can access
triggerall = ctrl;make sure AI had control
trigger1 = p2statetype = A

;---------------------------------------------------------------------------
;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(0) = 1 && statetype = S && ctrl && p2movetype != A && random <= 300 
triggerall = P2BodyDist X <= 50
trigger1 = (p2bodydist x <= 60) && (p2bodydist y >= -40) && p2statetype = A && p2movetype != H
trigger2 = (p2bodydist x <= 40) && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)


;---------------------------------------------------------------------------
;Stand Strong Punch AI
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = var(0) = 1 && statetype = S && ctrl && (p2bodydist x <= 55) && p2movetype != A && random <= 300 
trigger1 = (p2bodydist x <= 70) && (p2bodydist y >= -40) && p2statetype = A && p2movetype != H
trigger2 = (p2bodydist x <= 40) && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

;---------------------------------------------------------------------------
;Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(0) = 1 && statetype = S && p2movetype != A && random <= 300
triggerall = P2BodyDist X <= 50 
trigger1 = stateno = 200 && movehit = 1
trigger2 = stateno = 205 && movehit = 1 
trigger3 = ctrl && (p2bodydist x <= 40)

;---------------------------------------------------------------------------
;Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(0) = 1 && statetype = S && p2movetype != A && random <= 300 && ctrl
triggerall = P2BodyDist X <= 50
trigger1 = (p2bodydist x <= 70) && (p2bodydist y >= -40) && p2statetype = A && p2movetype != H
trigger2 = (p2bodydist x <= 40) && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

;---------------------------------------------------------------------------
;Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(0) = 1 && statetype != A && p2movetype != A
triggerall = P2BodyDist X <= 50
triggerall = random <= 300 && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)
trigger1 = stateno = 400 && movehit = 1
trigger2 = ctrl && (p2bodydist x <= 30)

;---------------------------------------------------------------------------
;Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(0) = 1 && statetype != A && ctrl && p2movetype != A
triggerall = P2BodyDist X <= 50
trigger1 = (p2bodydist x <= 40) && random <= 300 && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

;---------------------------------------------------------------------------
;Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(0) = 1 && statetype != A && p2movetype != A
triggerall = P2BodyDist X <= 50 
triggerall = random <= 300 && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)
trigger1 = stateno = 430 && movehit = 1
trigger2 = ctrl && (p2bodydist x <= 40)

;---------------------------------------------------------------------------
;Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = var(0) = 1 && statetype != A && ctrl && p2movetype != A && random <= 300
triggerall = P2BodyDist X <= 50
trigger1 = (p2bodydist x <= 60) && (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)
trigger2 = stateno = 230 && movehit = 1
trigger3 = stateno = 235 && movehit = 1

; AI Jump Weak Punch
;-------------------
[State -1, JWP]
type = ChangeState
value = 600
;ctrl = 0
triggerall = var(0) = 1 && statetype = A && (p2bodydist x >= 70)
triggerall = ctrl && (p2bodydist x >= 70) && random <= 200 
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

; AI Jump Weak Punch
;-------------------
[State -1, JWP2]
type = ChangeState
value = 605
;ctrl = 0
triggerall = var(0) = 1 && statetype = A && (p2bodydist x >= 70) && random <= 200
triggerall = ctrl && (Anim = 42 ^^ Anim = 43 ^^ Anim = 48)
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)


; AI Jump Weak Kick
;------------------
[State -1, JWK2]
type = ChangeState
value = 635
;ctrl = 0
triggerall = var(0) = 1 && statetype = A && (p2bodydist x >= 70) && random <= 200
triggerall = ctrl && (Anim = 42 ^^ Anim = 43 ^^ Anim = 48)
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

; AI Jump Hard Punch
;-------------------
[State -1, JHP]
type = ChangeState
value = 610
;ctrl = 0
triggerall = var(0) = 1 && statetype = A && (p2bodydist x >= 70) && random <= 200
triggerall = ctrl
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

; AI Jump Hard Punch
;-------------------
[State -1, JHP2]
type = ChangeState
value = 605
;ctrl = 0
triggerall = var(0) = 1 && statetype = A && (p2bodydist x >= 70) && random <= 300
triggerall = ctrl && (Anim = 42 ^^ Anim = 43 ^^ Anim = 48)
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)

; AI Jump Hard Kick
;------------------
[State -1, JHK]
type = ChangeState
value = 640
;ctrl = 0
triggerall = var(0) = 1 && statetype = A && (p2bodydist x >= 70) && random <= 200
triggerall = ctrl
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)









