;-| 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

;-| Special Motions |------------------------------------------------------
[Command]
name	=	"berserk"
command	=	~D, DB, B, D, F, y
time	=	40

[Command]
name	=	"berserk"
command	=	~D, DB, B, D, F, x
time	=	40

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

[Command]
name	=	"manodoro"
command =	~D, DF, F, D, DF, F, x
time	=	35

[Command]
name	=	"trottola"
command	=	~D, DB, B, D, DB, B, y
time	=	35

[Command]
name	=	"trottola"
command	=	~D, DB, B, D, DB, B, x
time	=	35

[Command]
name	=	"calotta"
command	=	~D, DF, F, D, DF, F, b
time	=	35

[Command]
name	=	"calotta"
command	=	~D, DF, F, D, DF, F, a
time	=	35

[Command]
name	=	"mano"
command	=	~D, DB, B, D, DB, B, b
time	=	35

[Command]
name	=	"mano"
command	=	~D, DB, B, D, DB, B, a
time	=	35

[Command]
name	=	"hsalto_d"
command	=	~B, D, DB, a

[Command]
name	=	"hsalto_f"
command	=	~B, D, DB, b

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

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

[Command]
name	=	"100calci_f"
command	=	~D, DB, B, b

[Command]
name	=	"100calci_f"
command	=	~D, DB, B, a

[Command]
name	=	"100pugni_f"
command	=	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]

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

;Run
[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

; Attacco Berserk
[State -1]
type = ChangeState
value = 6000
triggerall = var(0) = 0
triggerall = command = "berserk"
triggerall = power >= 3000
triggerall = var(16) = 0
triggerall = life <= 800
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

;===========================================================================
; [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)

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

;Mano D'Oro
[State -1]
type = ChangeState
value = 1000
triggerall = var(0) = 0
triggerall = command = "manodoro"
triggerall = power >= 3000
trigger1 = statetype != A
trigger1 = p2statetype = S
;trigger1 = p2movetype != H
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

;Trottola Circolare Di Falco
[State -1]
type = ChangeState
value = 1100
triggerall = var(0) = 0
triggerall = command = "trottola"
triggerall = numproj = 0
triggerall = power >= 3000
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

;Calotta Di Ghiaccio
[State -1]
type = ChangeState
value = 1200
triggerall = var(0) = 0
triggerall = command = "calotta"
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

;Hyper Salto debole
[State -1]
type = ChangeState
value = 1700
triggerall = var(0) = 0
triggerall = command = "hsalto_d"
trigger1 = statetype = S
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

;Hyper Salto forte
[State -1]
type = ChangeState
value = 1750
triggerall = var(0) = 0
triggerall = command = "hsalto_f"
trigger1 = statetype = S
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

;Fireball debole
[State -1]
type = ChangeState
value = 1300
triggerall = var(0) = 0
triggerall = command = "fireball_d"
triggerall = numproj = 0
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

;Fireball forte
[State -1]
type = ChangeState
value = 1350
triggerall = var(0) = 0
triggerall = command = "fireball_f"
triggerall = numproj = 0
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

;Mano infuocata
[State -1]
type = ChangeState
value = 1500
triggerall = var(0) = 0
triggerall = command = "mano"
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

;100 pugni forti
[State -1]
type = ChangeState
value = 1650
triggerall = var(0) = 0
triggerall = command = "100pugni_f"
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

;100 calci forti
[State -1]
type = ChangeState
value = 1450
triggerall = var(0) = 0
triggerall = command = "100calci_f"
trigger1 = statetype != A
trigger1 = ctrl 
trigger2 = stateno = 230
trigger2 = movecontact = 1
trigger3 = stateno = 235
trigger3 = movecontact = 1
trigger4 = stateno = 240
trigger4 = movecontact = 1
trigger5 = stateno = 245
trigger5 = movecontact = 1
trigger6 = stateno = 430
trigger6 = movecontact = 1
trigger7 = stateno = 440
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 && movecontact = 1
trigger3 = stateno = 235 && movecontact = 1; light kick
;trigger4 = stateno = 405 && movecontact = 1; cr. light punch
trigger5 = stateno = 400 && movecontact = 1; cr. light punch
trigger6 = stateno = 430 && movecontact = 1; cr. light kick
;trigger7 = stateno = 435 && movecontact = 1; cr. light kick
trigger8 = stateno = 600 && movecontact = 1; jump light punch
trigger9 = stateno = 640 && movecontact = 1; jump light kick

;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 = 205 && movecontact = 1
trigger3 = stateno = 200 && movecontact = 1 && var(26) <3
trigger4 = stateno = 235 && movecontact = 1; light kick
trigger5 = stateno = 230 && movecontact = 1; light kick
;trigger6 = stateno = 405 && movecontact = 1; cr. light punch
trigger7 = stateno = 400 && movecontact = 1; cr. light punch
trigger8 = stateno = 430 && movecontact = 1; cr. light kick
;trigger9 = stateno = 435 && movecontact = 1; cr. light kick
trigger10 = stateno = 600 && movecontact = 1; jump light punch
trigger11 = stateno = 640 && movecontact = 1; jump light kick


;---------------------------------------------------------------------------
;Stand Strong Punch(close)
[State -1]
type = ChangeState
value = 215
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 205 && movecontact = 1 
trigger3 = stateno = 235 && movecontact = 1 
trigger4 = stateno = 245 && movecontact = 1; light kick
;trigger5 = stateno = 405 && movecontact = 1; cr. light punch
trigger6 = stateno = 400 && movecontact = 1; cr. light punch
trigger7 = stateno = 410 && movecontact = 1; cr. strong punch
;trigger8 = stateno = 415 && movecontact = 1; cr. strong punch
trigger9 = stateno = 430 && movecontact = 1; cr. light kick
;trigger10 = stateno = 435 && movecontact = 1; cr. light kick
trigger11 = stateno = 440 && movecontact = 1; cr. strong kick
;trigger12 = stateno = 445 && movecontact = 1; cr. strong kick
trigger13 = stateno = 600 && movecontact = 1; jump light punch
trigger14 = stateno = 640 && movecontact = 1; jump light kick


;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 = 215 && movecontact = 1
trigger3 = (stateno = 200) && time > 5
trigger4 = stateno = 205 && movecontact = 1 
trigger5 = stateno = 230 && movecontact = 1 
trigger6 = stateno = 235 && movecontact = 1
trigger7 = stateno = 240 && movecontact = 1 
trigger8 = stateno = 245 && movecontact = 1; light kick
;trigger9 = stateno = 405 && movecontact = 1; cr. light punch
trigger10 = stateno = 400 && movecontact = 1; cr. light punch
trigger11 = stateno = 410 && movecontact = 1; cr. strong punch
;trigger12 = stateno = 415 && movecontact = 1; cr. strong punch
trigger13 = stateno = 430 && movecontact = 1; cr. light kick
;trigger14 = stateno = 435 && movecontact = 1; cr. light kick
trigger15 = stateno = 440 && movecontact = 1; cr. strong kick
;trigger16 = stateno = 445 && movecontact = 1; cr. strong kick
trigger17 = stateno = 600 && movecontact = 1; jump light punch
trigger18 = stateno = 640 && movecontact = 1; jump light kick

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

;Stand Light Kick(close)
[State -1]
type = ChangeState
value = 235
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 205 && movecontact = 1
trigger3 = stateno = 235 && movecontact = 1; light kick
;trigger4 = stateno = 405 && movecontact = 1; cr. light punch
trigger5 = stateno = 400 && movecontact = 1; cr. light punch
trigger6 = stateno = 430 && movecontact = 1; cr. light kick
;trigger7 = stateno = 435 && movecontact = 1; cr. light kick
trigger8 = stateno = 600 && movecontact = 1; jump light punch
trigger9 = stateno = 640 && movecontact = 1; jump light kick

;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 = 205 && movecontact = 1
trigger3 = stateno = 200 && movecontact = 1
trigger4 = stateno = 235 && movecontact = 1; light kick
;trigger5 = stateno = 405 && movecontact = 1; cr. light punch
trigger6 = stateno = 400 && movecontact = 1; cr. light punch
trigger7 = stateno = 430 && movecontact = 1; cr. light kick
;trigger8 = stateno = 435 && movecontact = 1; cr. light kick
trigger9 = stateno = 600 && movecontact = 1; jump light punch
trigger10 = stateno = 640 && movecontact = 1; jump light kick

;---------------------------------------------------------------------------
;Standing Strong Kick (close)
[State -1, Standing Strong Kick]
type = ChangeState
value = 245
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = p2bodydist x < 15
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 205 && movecontact = 1 
trigger3 = stateno = 235 && movecontact = 1 
trigger4 = stateno = 215 && movecontact = 1; strong punch
;trigger5 = stateno = 405 && movecontact = 1; cr. light punch
trigger6 = stateno = 400 && movecontact = 1; cr. light punch
trigger7 = stateno = 410 && movecontact = 1; cr. strong punch
;trigger8 = stateno = 415 && movecontact = 1; cr. strong punch
trigger9 = stateno = 430 && movecontact = 1; cr. light kick
;trigger10 = stateno = 435 && movecontact = 1; cr. light kick
trigger11 = stateno = 440 && movecontact = 1; cr. strong kick
;trigger12 = stateno = 445 && movecontact = 1; cr. strong kick
trigger13 = stateno = 600 && movecontact = 1; jump light punch
trigger14 = stateno = 640 && movecontact = 1; jump light kick

;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 = 215 && movecontact = 1
trigger3 = (stateno = 200) && time > 5
trigger4 = stateno = 205 && movecontact = 1 
trigger5 = stateno = 230 && movecontact = 1 
trigger6 = stateno = 235 && movecontact = 1
trigger7 = stateno = 210 && movecontact = 1 
trigger8 = stateno = 245 && movecontact = 1; light kick
;trigger9 = stateno = 405 && movecontact = 1; cr. light punch
trigger10 = stateno = 400 && movecontact = 1; cr. light punch
trigger11 = stateno = 410 && movecontact = 1; cr. strong punch
;trigger12 = stateno = 415 && movecontact = 1; cr. strong punch
trigger13 = stateno = 430 && movecontact = 1; cr. light kick
;trigger14 = stateno = 435 && movecontact = 1; cr. light kick
trigger15 = stateno = 440 && movecontact = 1; cr. strong kick
;trigger16 = stateno = 445 && movecontact = 1; cr. strong kick
trigger17 = stateno = 600 && movecontact = 1; jump light punch
trigger18 = stateno = 640 && movecontact = 1; jump light kick

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

;---------------------------------------------------------------------------
;Taunt
[State -1, Taunt]
type = ChangeState
value = 195
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 = command = "z"
triggerall = life < 400
triggerall = power >= 3000
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 = 205 && movecontact = 1
trigger3 = stateno = 235 && movecontact = 1; light kick
trigger4 = stateno = 405 && movecontact = 1; cr. light punch
trigger5 = stateno = 400 && movecontact = 1; cr. light punch
trigger6 = stateno = 430 && movecontact = 1; cr. light kick
;trigger7 = stateno = 435 && movecontact = 1; cr. light kick
trigger8 = stateno = 600 && movecontact = 1; jump light punch
trigger9 = stateno = 640 && movecontact = 1; jump light kick

;---------------------------------------------------------------------------
;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 = 215 && movecontact = 1
trigger3 = (stateno = 200) && time > 5
trigger4 = stateno = 205 && movecontact = 1 
trigger5 = stateno = 230 && movecontact = 1 
trigger6 = stateno = 235 && movecontact = 1
trigger7 = stateno = 240 && movecontact = 1 
trigger8 = stateno = 245 && movecontact = 1; light kick
trigger9 = stateno = 405 && movecontact = 1; cr. light punch
trigger10 = stateno = 400 && movecontact = 1; cr. light punch
;trigger11 = stateno = 410 && movecontact = 1; cr. strong punch
;trigger12 = stateno = 415 && movecontact = 1; cr. strong punch
trigger13 = stateno = 430 && movecontact = 1; cr. light kick
;trigger14 = stateno = 435 && movecontact = 1; cr. light kick
trigger15 = stateno = 440 && movecontact = 1; cr. strong kick
;trigger16 = stateno = 445 && movecontact = 1; cr. strong kick
trigger17 = stateno = 600 && movecontact = 1; jump light punch
trigger18 = stateno = 640 && movecontact = 1; jump light kick

;---------------------------------------------------------------------------
;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 = 205 && movecontact = 1
trigger3 = stateno = 235 && movecontact = 1; light kick
trigger4 = stateno = 405 && movecontact = 1; cr. light punch
trigger5 = stateno = 400 && movecontact = 1; cr. light punch
trigger6 = stateno = 430 && movecontact = 1; cr. light kick
;trigger7 = stateno = 435 && movecontact = 1; cr. light kick
trigger8 = stateno = 600 && movecontact = 1; jump light punch
trigger9 = stateno = 640 && movecontact = 1; jump light kick

;---------------------------------------------------------------------------
;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 = 215 && movecontact = 1
trigger3 = (stateno = 200) && time > 5
trigger4 = stateno = 205 && movecontact = 1 
trigger5 = stateno = 230 && movecontact = 1 
trigger6 = stateno = 235 && movecontact = 1
trigger7 = stateno = 240 && movecontact = 1 
trigger8 = stateno = 245 && movecontact = 1; light kick
trigger9 = stateno = 405 && movecontact = 1; cr. light punch
trigger10 = stateno = 400 && movecontact = 1; cr. light punch
trigger11 = stateno = 410 && movecontact = 1; cr. strong punch
;trigger12 = stateno = 415 && movecontact = 1; cr. strong punch
trigger13 = stateno = 430 && movecontact = 1; cr. light kick
;trigger14 = stateno = 435 && movecontact = 1; cr. light kick
;trigger15 = stateno = 440 && movecontact = 1; cr. strong kick
;trigger16 = stateno = 445 && movecontact = 1; cr. strong kick
trigger17 = stateno = 600 && movecontact = 1; jump light punch
trigger18 = stateno = 640 && movecontact = 1; jump light kick


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

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

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

;Jump_X
[State -1]
type = ChangeState
value = 645
triggerall = var(0) = 0
triggerall = command = "b"
triggerall = Vel X = 0
triggerall = stateno != 41
trigger1 = statetype = A
trigger1 = ctrl = 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

[State -2, potenza]
type = AttackMulSet
trigger1 = life < 500
value = 2
ignorehitpause = 0
persistent = 1

;---------------------------------------------------------------------------
; Super && Hiper
;---------------------------------------------------------------------------


;Hyper Salto debole AI
[State -1]
type = ChangeState
value = 1700
triggerall = var(0) = 1
triggerall = random <= 100
triggerall = p2stateno != 5051;player is not in getup state
trigger1 = p2statetype = 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

;Hyper Salto forte AI
[State -1]
type = ChangeState
value = 1750
triggerall = var(0) = 1
triggerall = random <= 100
triggerall = p2stateno != 5051;player is not in getup state
trigger1 = p2statetype = 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

;Fireball debole AI
[State -1]
type = ChangeState
value = 1300
triggerall = var(0) = 1
triggerall = random <= 10
triggerall = P2BodyDist X > 70
triggerall = P2BodyDist X < 150
;triggerall = P2MoveType = H
;triggerall = numproj = 0
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
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 = 200 && MoveContact && (random <= 500)   

;Fireball forte AI
[State -1]
type = ChangeState
value = 1350
triggerall = var(0) = 1
triggerall = random <= 5
triggerall = P2BodyDist X > 70
triggerall = P2BodyDist X < 150
;triggerall = P2MoveType = H
;triggerall = numproj = 0
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
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 = 200 && MoveContact && (random <= 500)  

;Mano infuocata AI
[State -1]
type = ChangeState
value = 1500
triggerall = var(0) = 1
triggerall = P2BodyDist X > 50
triggerall = P2BodyDist X < 120
triggerall = power >= 1000
;triggerall = P2MoveType = H
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
trigger1 = ctrl && (random <= 500) 
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)

;=========================================================================
;100 calci deboli AI
;[State -1]
;type = ChangeState
;value = 1400
;triggerall = var(0) = 1
;triggerall = random <= 200
;triggerall = P2BodyDist X <= 70
;triggerall = P2MoveType = H
;triggerall = p2statetype != L;player not lying down
;triggerall = p2stateno != 5120;player is not in getup state
;trigger1 = statetype = S
;trigger1 = ctrl 

;100 calci forti AI
[State -1]
type = ChangeState
value = 1450
triggerall = var(0) = 1
triggerall = P2MoveType = H
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
trigger1 = ctrl && (P2BodyDist x <= 50) && (random <= 400) 
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)



;Mano D'Oro AI
[State -1]
type = ChangeState
value = 1000
triggerall = var(0) = 1
;triggerall = P2MoveType = H
triggerall = power >= 3000
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
trigger1 = ctrl && (P2BodyDist x <= 300) && (random <= 700) 
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)


;Trottola Circolare Di Falco AI
[State -1]
type = ChangeState
value = 1100
triggerall = var(0) = 1
;triggerall = P2MoveType = H
triggerall = numproj = 0
triggerall = power >= 3000
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
trigger1 = ctrl && (random <= 600) 
trigger2 = StateNo = 200 && MoveContact && (random <= 800) 
trigger3 = StateNo = 205 && MoveContact && (random <= 800) 
trigger4 = StateNo = 210 && MoveContact && (random <= 500) 
trigger5 = StateNo = 215 && MoveContact && (random <= 500) 
trigger6 = StateNo = 230 && MoveContact && (random <= 500) 
trigger7 = StateNo = 235 && MoveContact && (random <= 800)
trigger8 = StateNo = 240 && MoveContact && (random <= 800) 
trigger9 = StateNo = 245 && MoveContact && (random <= 800)
trigger10 = StateNo = 400 && MoveContact && (random <= 500) 
trigger11 = StateNo = 410 && MoveContact && (random <= 500)
trigger12 = StateNo = 430 && MoveContact && (random <= 500) 
trigger13 = StateNo = 440 && MoveContact && (random <= 500)


;Calotta Di Ghiaccio AI
[State -1]
type = ChangeState
value = 1200
triggerall = var(0) = 1
;triggerall = P2MoveType = H
triggerall = power >= 2000
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
trigger1 = ctrl && (P2BodyDist x <= 200) && (random <= 700) 
trigger2 = StateNo = 200 && MoveContact && (random <= 700) 
trigger3 = StateNo = 205 && MoveContact && (random <= 700) 
trigger4 = StateNo = 210 && MoveContact && (random <= 700) 
trigger5 = StateNo = 215 && MoveContact && (random <= 700) 
trigger6 = StateNo = 230 && MoveContact && (random <= 700) 
trigger7 = StateNo = 235 && MoveContact && (random <= 700)
trigger8 = StateNo = 240 && MoveContact && (random <= 700) 
trigger9 = StateNo = 245 && MoveContact && (random <= 700)
trigger10 = StateNo = 400 && MoveContact && (random <= 700) 
trigger11 = StateNo = 410 && MoveContact && (random <= 700)
trigger12 = StateNo = 430 && MoveContact && (random <= 700) 
trigger13 = StateNo = 440 && MoveContact && (random <= 700)

;100 Pugni deboli AI
;[State -1]
;type = ChangeState
;value = 1600
;triggerall = var(0) = 1
;triggerall = random <= 200
;triggerall = P2BodyDist X <= 70
;triggerall = P2MoveType = H
;triggerall = p2statetype != L;player not lying down
;triggerall = p2stateno != 5120;player is not in getup state
;trigger1 = statetype = S
;trigger1 = ctrl 

;100 pugni forti AI
[State -1]
type = ChangeState
value = 1650
triggerall = var(0) = 1
triggerall = random <= 150
triggerall = P2MoveType = H
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
trigger1 = ctrl && (P2BodyDist x <= 50) && (random <= 100) 
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)


;Hyper Salto debole AI
;[State -1]
;type = ChangeState
;value = 1700
;triggerall = var(0) = 1
;triggerall = random <= 10
;triggerall = P2MoveType = H
;triggerall = p2statetype != L;player not lying down
;triggerall = p2stateno != 5120;player is not in getup state
;trigger1 = statetype = S
;trigger1 = ctrl 


;Hyper Salto forte AI
;[State -1]
;type = ChangeState
;value = 1750
;triggerall = var(0) = 1
;triggerall = random <= 10
;triggerall = P2MoveType = H
;triggerall = p2statetype != L;player not lying down
;triggerall = p2stateno != 5120;player is not in getup state
;trigger1 = statetype = S
;trigger1 = ctrl 


; Attacco Berserk AI
[State -1]
type = ChangeState
value = 6000
triggerall = var(0) = 1
triggerall = random <= 350
triggerall = power >= 3000
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno != 5120;player is not in getup state
triggerall = var(16) = 0
triggerall = life <= 800
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

;---------------------------------------------------------------------------
; GUARD
;---------------------------------------------------------------------------

; 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;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;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;perform when in air
triggerall = random <= 350;Extreme high percent
triggerall = var(0) = 1;only AI can access
triggerall = ctrl;make sure AI had control
trigger1 = p2statetype = A

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

;Taunt Carica AI2
[State -1, Taunt]
type = ChangeState
value = 196
triggerall = var(0) = 1
triggerall = random > 300
triggerall = power < 3000
triggerall = ctrl = 1
triggerall = statetype != A
trigger1 = P2BodyDist X > 100

;Taunt Carica Life

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

;Taunt Carica Life vs ken

[State -1, Taunt Carica Life]
type = ChangeState
value = 197
;triggerall = command = "z"
triggerall = var(0) = 1
triggerall = random <= 500 && p2name = "kenshiro"
triggerall = life < 400
triggerall = power >= 3000
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
; AI keeps distance and goes on doing fireballs if possible
;---------------------------------------------------------------------------

;keep distance
[State -1]
type = ChangeState
value = 105
triggerall = var(0) = 1
triggerall = random <= 15
triggerall = P2BodyDist X < 50
triggerall = BackEdgeBodyDist > 50
triggerall = P2MoveType != A
trigger1 = statetype = S
trigger1 = ctrl 


;move forward if I'm too far
[State -1]
type = ChangeState
value = 20
triggerall = var(0) = 1
triggerall = random <= 750
triggerall = ctrl 
trigger1 = P2BodyDist X > 250
trigger1 = P2MoveType != A
trigger1 = statetype = S
trigger2 = P2BodyDist X > 100

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

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

;push push AI
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = var(0) = 1
triggerall = var(42) = 0
triggerall = random <= 500
triggerall = P2BodyDist X <= 60
triggerall = P2BodyDist X > 20
triggerall = statetype = S
triggerall = p2statetype != L;player not lying down
triggerall = p2stateno = 210;
trigger1 = ctrl = 1


;---------------------------------------------------------------------------
;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 for pushpush
[State -1, pushpush]
type = ChangeState
value = 210
triggerall = var(0) = 1 && ctrl && (p2bodydist x <= 65) && random <= 500 
trigger1 = p2stateno = 210
 
;---------------------------------------------------------------------------
;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)


; Near Strong Kick to prevent player jumping towards
[State -1]
type = ChangeState
value = 240
triggerall = p2movetype != A;access only when opponent not attacking
triggerall = random <= 600;moderate high percent
triggerall = var(0) = 1;only AI can access
triggerall = statetype != A;perform when not in air
triggerall = P2bodydist X < 35
triggerall = ctrl;make sure AI had control
trigger1 = p2statetype = A
trigger1 = P2bodydist y > 100


;---------------------------------------------------------------------------
;Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
;ctrl = 0
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
;ctrl = 0
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 <= 10 
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 > 990
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 <= 2
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 <= 3
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 > 995
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 > 990
triggerall = ctrl
trigger1 = (p2stateno = 100 || p2stateno = 20 || p2stateno = 0)




