;===========================================================================
; Intelligence Artificiel
;===========================================================================

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

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

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

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

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

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

[Command]
name = "CPU7"
command = a,b,c,x,y,z
time = 1

[Command]
name = "CPU8"
command = b,c,x,y,z,a
time = 1

[Command]
name = "CPU9"
command = c,x,y,z,a,b
time = 1

[Command]
name = "CPU10"
command = x,y,z,a,b,c
time = 1

[Command]
name = "CPU11"
command = y,z,a,b,c,x
time = 1

[Command]
name = "CPU12"
command = z,a,b,c,x,y
time = 1

[Command]
name = "CPU13"
command = z,y,x,c,b,a
time = 1

[Command]
name = "CPU14"
command = y,x,c,b,a,z
time = 1

[Command]
name = "CPU15"
command = x,c,b,a,z,y
time = 1

[Command]
name = "CPU16"
command = c,b,a,z,y,x
time = 1

[Command]
name = "CPU17"
command = b,a,z,y,x,c
time = 1

[Command]
name = "CPU18"
command = a,z,y,x,c,b
time = 1

[Command]
name = "CPU19"
command = a,b,a,b
time = 1

[Command]
name = "CPU20"
command = a,c,a,c
time = 1

[Command]
name = "CPU21"
command = a,x,a,x
time = 1

[Command]
name = "CPU22"
command = a,y,a,y
time = 1

[Command]
name = "CPU23"
command = a,z,a,z
time = 1

[Command]
name = "CPU24"
command = b,a,b,a
time = 1

[Command]
name = "CPU25"
command = b,c,b,c
time = 1

[Command]
name = "CPU26"
command = b,x,b,x
time = 1

[Command]
name = "CPU27"
command = b,y,b,y
time = 1

[Command]
name = "CPU28"
command = b,z,b,z
time = 1

[Command]
name = "CPU29"
command = c,a,c,a
time = 1

[Command]
name = "CPU30"
command = c,b,c,b
time = 1

[Command]
name = "CPU31"
command = c,x,c,x
time = 1

[Command]
name = "CPU32"
command = c,y,c,y
time = 1

[Command]
name = "CPU33"
command = c,z,c,z
time = 1

[Command]
name = "CPU34"
command = x,a,x,a
time = 1

[Command]
name = "CPU35"
command = x,b,x,b
time = 1

[Command]
name = "CPU36"
command = x,c,x,c
time = 1

[Command]
name = "CPU37"
command = x,y,x,y
time = 1

[Command]
name = "CPU38"
command = x,z,x,z
time = 1

[Command]
name = "CPU39"
command = y,a,y,a
time = 1

[Command]
name = "CPU40"
command = y,b,y,b
time = 1

[Command]
name = "CPU41"
command = y,c,y,c
time = 1

[Command]
name = "CPU42"
command = y,x,y,x
time = 1

[Command]
name = "CPU43"
command = y,z,y,z
time = 1

[Command]
name = "CPU44"
command = z,a,z,a
time = 1

[Command]
name = "CPU45"
command = z,b,z,b
time = 1

[Command]
name = "CPU46"
command = z,c,z,c
time = 1

[Command]
name = "CPU47"
command = z,x,z,x
time = 1

[Command]
name = "CPU48"
command = z,y,z,y
time = 1

;===========================================================================
; Button Remapping
;===========================================================================

[Remap]
a = a
b = b
c = c
x = x
y = y
z = z
s = s

;===========================================================================
; Default Values
;===========================================================================

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

;===========================================================================
; AI DETECTE
;===========================================================================

;===========================================================================
; Hyper Motions
;===========================================================================

;Souvenir d'Esméralda (Memoria di Esmeralda)
[Command]
name = "Esmeralda"
command = F, DF, D, DB, B, a
time = 35

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

;Ultime Phoenix (Ultima Risorsa della Fenice)
[Command]
name = "Ultime Phoenix"
command = F, DF, D, DB, B, b
time = 35

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

;Phoenix no Ken (Pugno d'Acciaio della Fenice)
[Command]
name = "Ken"
command = F, DF, D, DB, B, c
time = 35

;===========================================================================
; Super Motions
;===========================================================================

;Ailes du Phoenix (Ali della Fenice Lv1)
[Command]
name = "Light Hô yoku ten shô"
command = B, DB, D, DF, F, a
time = 35

;Ailes du Phoenix Air (Ali della Fenice in Volo Lv1)
[Command]
name = "Light air Hô yoku ten shô"
command = B, DB, D, DF, F, a
time = 35

;Ailes du Phoenix (Ali della Fenice Lv2)
[Command]
name = "Strong Hô yoku ten shô"
command = B, DB, D, DF, F, b
time = 35

;Ailes du Phoenix Air (Ali della Fenice in Volo Lv2)
[Command]
name = " Strong air Hô yoku ten shô"
command = B, DB, D, DF, F, b
time = 35

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

;Illusion du phoenix - Oedème Cérébral (Fantasma Diabolico - Edema Celebrale)
[Command]
name = "illusion1"
command = B, DB, D, DF, F, c
time = 35

;Illusion du phoenix - Coup de Poing Géant (Fantama Diabolico - Pugno Gigante)
[Command]
name = "illusion4"
command = B, DB, D, DF, F, x
time = 35

;Illusion du phoenix - Vision de l'Enfer (Fantasma Diabolico - Visione dell'Inferno)
[Command]
name = "illusion2"
command = B, DB, D, DF, F, y
time = 35

;Illusion du phoenix - Brule Chien (Fantasma Diabolico - Carbonizzazione del Nemico)
[Command]
name = "illusion3"
command = B, DB, D, DF, F, z
time = 35

;===========================================================================
; Special Motions
;===========================================================================

;Light Super Kick Jump
[Command]
name = "Light Super_kick"
command = ~D, DB, B, x
time = 35

;Light Super Kick Jump
[Command]
name = "médium Super_kick"
command = ~D, DB, B, y
time = 35

;Light Super Kick Jump
[Command]
name = "Strong Super_kick"
command = ~D, DB, B, z
time = 35

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

;Light Plongeon du phénix
[Command]
name = "Light Plongeon"
command = ~D, DB, B, a
time = 35

;médium Plongeon du phénix
[Command]
name = "médium Plongeon"
command = ~D, DB, B, b
time = 35
 
;Strong Plongeon du phénix
[Command]
name = "Strong Plongeon"
command = ~D, DB, B, c
time = 35

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

[Command]
name = "Light fly away phoenix"
command = ~D, DF, F, x
time = 35

[Command]
name = "médium fly away phoenix"
command = ~D, DF, F, y
time = 35

[Command]
name = "Strong fly away phoenix"
command = ~D, DF, F, z
time = 35

;===========================================================================
; Launch Projectile
;===========================================================================

;Light Wings
[Command]
name ="Light Wings"
command = ~D, DF, F, a
time = 35

;médium Wings
[Command]
name ="médium Wings"
command = ~D, DF, F, b
time = 35

;Strong Wings
[Command]
name ="Strong Wings"
command = ~D, DF, F, c
time = 35

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

;Light Air Wings
[Command]
name = "Light Air_Wings"
command = ~D, DF, F, a
time = 35

;LightAir Wings
[Command]
name = "médium Air_Wings"
command = ~D, DF, F, b
time = 35

;Air Wings
[Command]
name = "Strong Air_Wings"
command = ~D, DF, F, c
time = 35

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

;FIREBALL
[Command]
name = "Light FIREBALL_x"
command = ~D, DB, B, a
time = 35

[Command]
name = "médium Fireball_y"
command = ~D, DB, B, b
time = 35

[Command]
name = "Strong Fireball_z"
command = ~D, DB, B, c
time = 35

;===========================================================================
; HELPER
;===========================================================================

;SHUN
[Command]
name = "super kik shun"
command = x+z
time = 10

;===========================================================================
; Combo Motions
;===========================================================================

;MULTI Punch
[Command]
name = "Light MULTI-Punch"
command = a+b
time = 10

;MULTI Punch
[Command]
name = "Strong MULTI-Punch"
command = b+c
time = 10

;===========================================================================
; DEFANCE Motions
;===========================================================================

[Command]
name = "expolsion"
command = ~B, c
time = 15

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

;dimention trensendantall
[Command]
name = "trensdimention1"
command = x+y
time = 10

[Command]
name = "trensdimention2"
command = y+z
time = 10

;===========================================================================
; Throw Motions
;===========================================================================

;throw
[Command]
name = "throw" 
command = /F, c
time = 10

;===========================================================================
; Button combination
;===========================================================================

[Command]
name = "holdpowercosmos z" ;Required (do not remove)
command = /z
time = 1

[Command]
name = "holdpowercosmos c" ;Required (do not remove)
command = /c
time = 1

[Command]
name = "hold_a" ;Required (do not remove)
command = $a
time = 1

[Command]
name = "hold_b" ;Required (do not remove)
command = $b
time = 1

[Command]
name = "hold_c" ;Required (do not remove)
command = $c
time = 1

[Command]
name = "hold_x" ;Required (do not remove)
command = $x
time = 1

[Command]
name = "hold_y" ;Required (do not remove)
command = $y
time = 1

[Command]
name = "hold_z" ;Required (do not remove)
command = $z
time = 1

;Recover
[Command]
name = "recovery"
command = a+x
time = 10

;===========================================================================
; Dir + button
;===========================================================================

;Coup de Coude
[Command]
name = "fwd_a"
command = /F, a
time = 1

;Fast Punch
[Command]
name = "fwd_b"
command = /F, b
time = 1

;Coup de Genou
[Command]
name = "fwd_x"
command = /F, x
time = 1

;Double Coup de Genou
[Command]
name = "fwd_y"
command = /F, y
time = 1

;Fast Kick
[Command]
name = "fwd_z"
command = /F, z
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 = "start"
command = s
time = 1

;===========================================================================
;Double Tap
;===========================================================================

[Command]
name = "FF"
command = F, F
time = 10

[Command]
name = "BB"
command = B, B
time = 10

;===========================================================================
;Hold Dir
;===========================================================================

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

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

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

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

[Command]
name = "holdfwd"
command = /F
time = 1

[Command]
name = "holdback"
command = /B
time = 1

[Command]
name = "holdup"
command = /U
time = 1

[Command]
name = "holddown"
command = /D
time = 1

;--------------------------------------------------------------------------
;-| Player Variable |------------------------------------------------------
;--------------------------------------------------------------------------
[Statedef -1]
;===========================================================================
;===========================================================================
;============================SAINT FINISH===================================
;===========================================================================
;===========================================================================
;[Souvenir d'Esméralda "contre]
[State -1,Souvenir d'Esmérald]
type = ChangeState
value = 4400
triggerall = var(59) = 0
trigger1 = command = "Esmeralda" && power >= 3000 && statetype != A && ctrl
trigger1 = life <= 250
;===============================
;[Ultime Phoenix]
[State -1,Ultime Phoenix]
type = ChangeState
value = 4050
triggerall = var(59) = 0
trigger1 = command = "Ultime Phoenix" && power >= 3000 && statetype != A && ctrl
trigger1 = life <= 250
;===============================
;[Phoenix no Ken]
[State -1,Phoenix no Ken]
type = ChangeState
value = 3100
triggerall = var(59) = 0
triggerall = (P2Name = "hyoga") || (P2Name = "Hyoga de Cisne") || (P2Name = "guilty")
triggerall = power >= 3000 && statetype = S && ctrl
trigger1 = command = "Ken"
trigger1 = P2life <= 250 && P2BodyDist X >= 125
;===========================================================================
;===========================================================================
; ============================FURY==========================================
;===========================================================================
;===========================================================================


;==========================================================================
;=====================Hô yoku==============================================
;==========================================================================
                 ;========================
                 ;===========SATAND;=====
                 ;========================
;[Stand Hô yoku ten shô niveux1]
[State -1,Light Hô yoku ten shô]
Type = ChangeState
triggerall = var(59) = 0
triggerall =statetype = S
triggerall = command = "Light Hô yoku ten shô"
triggerall = power >= 1000
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 210) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 230) &&  movecontact
trigger6 = (stateno = 240) &&  movecontact
value = 3000
;=========================================
;[Stand Hô yoku ten shô niveaux2]
[State -1,Strong Hô yoku ten shô]
Type = ChangeState
triggerall = var(59) = 0
triggerall =  statetype = S
triggerall = command = "Strong Hô yoku ten shô"
triggerall = power >= 2000
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 210) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 230) &&  movecontact
trigger6 = (stateno = 240) &&  movecontact
value = 3002
;===========================================================================
                 ;========================
                 ;=========AIRE;==========
                 ;========================
;[air Hô yoku ten shô niveaux1]
[State -1,Light air Hô yoku ten shô]
type = ChangeState
triggerall = var(59) = 0
triggerall = statetype = A
triggerall = command = "Light air Hô yoku ten shô"
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
triggerall = power >= 2000
trigger1 = ctrl = 1
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 210) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 230) &&  movecontact
trigger6 = (stateno = 240) &&  movecontact
value =  3007
;=========================================

; [air Hô yoku ten shô niveaux2]
[State -1,Strong air Hô yoku ten shô]
type = ChangeState
value =  3008
triggerall = var(59) = 0
triggerall = statetype = A
triggerall = command = " Strong air Hô yoku ten shô"
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
triggerall = power >= 3000
trigger1 = ctrl = 1
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 210) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 230) &&  movecontact
trigger6 = (stateno = 240) &&  movecontact
;==========================================================================
;=====================GEN MA KEN===========================================
;==========================================================================
;[Hôvo gen ma ken 1]
[State -1,Hôvo gen ma ken]
type = ChangeState
value = 3030
triggerall = var(59) = 0
triggerall = command = "illusion1"
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = hitdefattr = SC, NA, SA, HA
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 210) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 230) &&  movecontact
trigger7 = (stateno = 240) &&  movecontact
;=====================================
;[Hôvo gen ma ken Tux]
[State -1,Hôvo gen ma ken Tux]
type = ChangeState
value = 3046
triggerall = var(59) = 0
triggerall = Var(48) >= 1
triggerall = command = "illusion4"
triggerall = NumExplod(8109)
triggerall = power >= 1000
triggerall = p2life <= 100
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = hitdefattr = SC, NA, SA, HA
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 210) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 230) &&  movecontact
trigger7 = (stateno = 240) &&  movecontact
;=====================================
;[Hôvo gen ma ken 2]
[State -1,Hôvo gen ma ken2]
type = ChangeState
value = 3034
triggerall = var(59) = 0
triggerall = Var(48) >= 2
triggerall = command = "illusion2"
triggerall = NumExplod(8119)
triggerall = power >= 1000
triggerall = p2life <= 250
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = hitdefattr = SC, NA, SA, HA
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 210) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 230) &&  movecontact
trigger7 = (stateno = 240) &&  movecontact
;=====================================
;[Hôvo gen ma ken 3]
[State -1,Hôvo gen ma ken3]
type = ChangeState
value = 3038
triggerall = var(59) = 0
triggerall = Var(48) >= 3
triggerall = command = "illusion3"
triggerall = power >= 1000
triggerall = NumExplod(8129)
triggerall = p2life <= 400
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = hitdefattr = SC, NA, SA, HA
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 210) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 230) &&  movecontact
trigger7 = (stateno = 240) &&  movecontact
;===========================================================================
;===========================================================================
;============================ATTAQUES=======================================
;===========================================================================
;===========================================================================

;===========================================================================
;============================ Fireballs=====================================
;===========================================================================
;[Light Fireball]
[State -1, Light Fireball]
type = ChangeState
triggerall = var(59) = 0
triggerall = StateType = S
triggerall = command = "Light FIREBALL_x"
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
trigger1 = ctrl
trigger2= time =6
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 210) &&  movecontact
trigger5= (stateno = 220) &&  movecontact
trigger6= (stateno = 230) &&  movecontact
trigger7 = (stateno = 240) &&  movecontact
value = 1000
;=========================================
;[medium Fireball]
[State -2, medium Fireball]
type = ChangeState
triggerall = var(59) = 0
triggerall = StateType = S
triggerall = command = "médium Fireball_y"
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
trigger1 = ctrl
trigger2=time =10
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 210) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 230) &&  movecontact
trigger6 = (stateno = 240) &&  movecontact
value = 1010
;=========================================
;[Strong  Fireball]
[State -3, Strong  Fireball]
type = ChangeState
triggerall = var(59) = 0
triggerall = StateType = S
triggerall = command = "Strong Fireball_z"
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
trigger1 = ctrl
trigger2=time =20
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 210) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 230) &&  movecontact
trigger7 = (stateno = 240) &&  movecontact
value = 1020
;===========================================================================
;==========================Envol du phénix==================================
;===========================================================================
;[Light fly away phoenix]
[State -1,Light fly away phoenix]
type = ChangeState
value = 1030
triggerall = var(59) = 0
trigger1 = command = "Light fly away phoenix"
trigger1 = statetype = s
trigger1 = ctrl = 1
;===============================
;  médium fly away phoenix
[State -1,médiumfly away phoenix]
type = ChangeState
value = 1032
triggerall = var(59) = 0
trigger1 = command = "médium fly away phoenix"
trigger1 = statetype = s
trigger1 = ctrl = 1
;===============================
; Strong fly away phoenix
[State -1,Strongfly away phoenix]
type = ChangeState
value = 1034
triggerall = var(59) = 0
trigger1 = command = "Strong fly away phoenix"
trigger1 = statetype = s
trigger1 = ctrl = 1
;===========================================================================
;======================Plongeon du phénix===================================
;===========================================================================
;Light Plongeon du phénix
[State -1, Plongeon du phénix]
type = ChangeState
value =1040
triggerall = var(59) = 0
trigger1 = command = "Light Plongeon"
trigger1 = statetype = A
trigger1 = ctrl = 1
;===============================
;médium  Plongeon du phénix
[State -2,Plongeon du phénix]
type = ChangeState
value =1042
triggerall = var(59) = 0
trigger1 = command = "médium Plongeon"
trigger1 = statetype = A
trigger1 = ctrl = 1
;===============================
;Stronga Plongeon du phénix
[State -3, Plongeon du phénix]
type = ChangeState
value =1043
triggerall = var(59) = 0
trigger1 = command = "Strong Plongeon"
trigger1 = statetype = A
trigger1 = ctrl = 1
;===========================================================================
;====================PSuper Kick Jump Depuis Air============================
;===========================================================================
;Super Kick Jump Depuis Air
[State -1,Light Super_kick]
type = ChangeState
value = 1050
triggerall = var(59) = 0
trigger1 = command = "Light Super_kick"
trigger1 = statetype = A
trigger1 = StateNo != 1051
trigger1 = ctrl = 1
;===============================
[State -2,médium Super_kick]
type = ChangeState
value = 1051
triggerall = var(59) = 0
trigger1 = command = "médium Super_kick"
trigger1 = statetype = A
trigger1 = ctrl = 1
;===============================
 [State -3,Strong Super_kick]
type = ChangeState
value = 1052
triggerall = var(59) = 0
trigger1 = command = "Strong Super_kick"
trigger1 = statetype = A
trigger1 = ctrl = 1
;===========================================================================
;====================stand écaille phénix===================================
;===========================================================================
;Light stand écaille  phénix
[State -1,Light stand écaille du phénix]
type = ChangeState
value = 1070
triggerall = var(59) = 0
triggerall = !NumProjID(1070)
triggerall = !NumProjID(1071)
triggerall = !NumProjID(1072)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = command = "Light Wings" && statetype != A && ctrl
;===============================
; médium stand écaille du phénix
[State -1,médium stand écaille du phénix]
type = ChangeState
triggerall = var(59) = 0
value = 1071  ;trigger1 = p2bodydist X > 50
triggerall = !NumProjID(1070)
triggerall = !NumProjID(1071)
triggerall = !NumProjID(1072)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = command = "médium Wings" && statetype != A && ctrl
;===============================
;Strong stand écaille  phénix
[State -1,Strong stand écaille du phénix]
type = ChangeState
value = 1072
triggerall = var(59) = 0
triggerall = !NumProjID(1070)
triggerall = !NumProjID(1071)
triggerall = !NumProjID(1072)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = command = "Strong Wings" && statetype != A && ctrl
;===========================================================================
;====================aire écaille phénix====================================
;===========================================================================
;Light aire écaille du phénix
[State -1,Light Air_Wings]
type = ChangeState
triggerall = var(59) = 0
triggerall =statetype =A
triggerall = !NumProjID(1050)
triggerall = !NumProjID(1051)
triggerall = !NumProjID(1052)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = command = "Light Air_Wings" &&ctrl
;trigger1 = p2bodydist X > 50
value = 1750
;===============================
;médium aire écaille du phénix
[State -1,médium Air_Wings]
type = ChangeState
triggerall = var(59) = 0
triggerall =statetype =A
triggerall = !NumProjID(1050)
triggerall = !NumProjID(1051)
triggerall = !NumProjID(1052)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = command = "médium Air_Wings" && ctrl
;trigger1 = p2bodydist X > 50
value = 1751
;===============================
;Strong aire écaille du phénix
[State -1,Strong Air_Wings]
type = ChangeState
triggerall = var(59) = 0
triggerall =statetype =A
triggerall = !NumProjID(1050)
triggerall = !NumProjID(1051)
triggerall = !NumProjID(1052)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = command = "Strong Air_Wings"&& ctrl
;trigger1 = p2bodydist X > 50
value = 1752
;===========================================================================
;===========================================================================
;=====================BONNUS ATTAQUES=======================================
;===========================================================================
;===========================================================================

;===========================================================================
;==================== MULTI-Punch===========================================
;===========================================================================
;MULTI-Punch
[State -1,LightMULTI-Punch]
type = ChangeState
value = 1060
triggerall = var(59) = 0
triggerall = p2bodydist X <= 50
triggerall = command = "Light MULTI-Punch"
trigger1 = statetype = s
trigger1 = ctrl = 1

;MULTI-Punch
[State -1,Strong MULTI-Punch]
type = ChangeState
value = 1061
triggerall = var(59) = 0
triggerall = p2bodydist X <= 50
triggerall = command = "Strong MULTI-Punch"
trigger1 = statetype = s
trigger1 = ctrl = 1
;===========================================================================
;=======================EXPLOSION===========================================
;===========================================================================
;Combo Punch Rapide Genou / Hupercut
[State -1,EXPLOSION]
type = ChangeState
value = 1080
triggerall = var(59) = 0
triggerall = command ="expolsion"
trigger1 = statetype = s
trigger1 = ctrl =1
;===========================================================================
;=======================TRENCDIMENTION======================================
;===========================================================================
;TRENCDIMENTION1
[State -1,TRENCDIMENTION1]
type = ChangeState
value = 1084
triggerall = var(59) = 0
triggerall = command ="trensdimention1"
trigger1 = statetype = s
trigger1 = ctrl = 1
;===============================
;TRENCDIMENTION2
[State -1,TRENCDIMENTION2]
type = ChangeState
value = 1085
triggerall = var(59) = 0
triggerall = command ="trensdimention2"
trigger1 = statetype = s
trigger1 = ctrl = 1
;===========================================================================
;===========================================================================
;=======================Throw Motions=======================================
;===========================================================================
;===========================================================================
;Throw1
[state -1, Throw iki]
type = changestate
value =  800
triggerall = var(59) = 0
triggerall = p2bodydist x < 20
triggerall = command = "throw"
triggerall = statetype = s
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = (p2statetype = s)
trigger1 = p2movetype != h
trigger2 = command = "holdback"
trigger2 = p2bodydist x < 30
;===========================================================================
;=======================Combo condition=====================================
;===========================================================================
;This is not a move, but it sets up var(1) to be 1 if conditions are right
;for a combo into a special move (used below).
;Since a lot of special moves rely on the same conditions, this reduces
;redundant logic.
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0
;===============================
[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
var(1) = 1
;===============================
[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != S
trigger1 = ctrl
trigger2 = (stateno = [600,620]) || (stateno = [630,409])
var(1) = 1
;===========================================================================
;===========================================================================
;=======================Extra mouve======================================
;===========================================================================
;===========================================================================

;==========================================================================
;=======================Cosmos Charge======================================
;==========================================================================
;power (cosmos )
[State -1, power cosmos]
type = ChangeState
value = 1960
triggerall = var(59) = 0
trigger1 = command = "holdpowercosmos z"
trigger1 = command = "holdpowercosmos c"
trigger1 = Power < 3000
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = StateNo != 2000
trigger1 = StateNo != 20
trigger1 = StateNo != 21
;===============================
;7M CENSE
[State -1, life add]
type = ChangeState
value = 2100
triggerall = var(59) = 0
triggerall = Var(48) < 3
triggerall = PrevStateNo != 1980
trigger1 = command = "hold_a"
trigger1 = command = "hold_x"
triggerall = power >= 3000
triggerall = ctrl = 1
trigger1 = StateNo != 2000
trigger1 = statetype != A
;recover (life)
;==========================================================================
;=======================helper===============================
;==========================================================================

[State -1,helper1]
type = ChangeState
value = 2000
triggerall = var(59) = 0
triggerall = p2name != "shun" && p3name != "shun" && p4name != "shun"
triggerall = p2name != "andromeda" && p3name != "andromeda" && p4name != "andromeda"
triggerall = p2name != "shun2" && p3name != "shun2" && p4name != "shun2"
triggerall = p2name != "andromeda2" && p3name != "andromeda2" && p4name != "andromeda2"
triggerall = p2name != "shun3" && p3name != "shun3" && p4name != "shun3"
triggerall = p2name != "andromeda3" && p3name != "andromeda3" && p4name != "andromeda3"
triggerall = ctrl = 1
triggerall = P2BodyDist X <= 100
triggerall = command = "super kik shun"
trigger1 = NumHelper < 1
trigger1 = statetype != A

;===========================================================================
;===========================================================================
;======================= mouve de base======================================
;===========================================================================
;===========================================================================



;==========================================================================
;=======================DEPLASEMENT RAPID==================================
;==========================================================================
;Course
[State -1,Course]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl
;===============================
;Bond Arrière
[State -1,Bond Arrière]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl
;===============================
;wall jump
[State -1, WallJump]
type = ChangeState
value = 45
triggerall = (statetype = A) && (ctrl)
trigger1 = ((command = "holdup") && (command = "holdfwd") && (backedgebodydist <= 10) && (backedgebodydist > -10))
trigger2 = ((command = "holdup") && (command = "holdback") && (frontedgebodydist <= 10) && (frontedgebodydist > -10))
;===========================================================================
;=========================PROVOCATION=======================================
;===========================================================================
;Provocation1
[State -1, Taunt]
type = ChangeState
value = 1990
triggerall = command = "start"
trigger1 = StateType = S
trigger1 = ctrl = 1
;===========================================================================
;=========================Close MOUVE=======================================
;===========================================================================
;Stand Light Punch Close
[State -1, Stand Light Punch]
type = ChangeState
value = 215
triggerall = var(59) = 0
triggerall = p2bodydist X <= 10
triggerall = command = "fwd_a"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl = 1
;===============================
;Stand Hard Punch Close
[State -1, Stand Hard Punch]
type = ChangeState
value = 211
triggerall = var(59) = 0
triggerall = p2bodydist X <= 20
triggerall = command = "fwd_b"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl = 1
;===============================
;Stand Light Kick Close
[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall = var(59) = 0
triggerall = p2bodydist X <= 10
triggerall = command = "fwd_x"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl = 1
;===============================
;Stand Medium Kick Close
[State -1, Stand Medium Kick]
type = ChangeState
value = 240
triggerall = var(59) = 0
triggerall = p2bodydist X <= 10
triggerall = command = "fwd_y"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl = 1
;===============================
;Stand Medium Kick Close
[State -1, Stand Hard Kick]
type = ChangeState
value = 245
triggerall = var(59) = 0
triggerall = p2bodydist X <= 40
triggerall = command = "fwd_z"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl = 1
;===========================================================================
;===========================================================================
;coup sinple Single Button Stand
;===========================================================================
;===========================================================================
;Stand Light Punch Far
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) = 0
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 220) && (MoveContact)
;===============================
;Stand Médium Punch Far
[State -1, Standing Medium Punch]
type = ChangeState
value = 205
triggerall = var(59) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && (MoveContact)
trigger3 = (stateno = 220) && (MoveContact)
trigger4 = (stateno = 225) && (MoveContact)
;===============================
;Stand Strong Punch Far
[State -1, Standing Strong Punch]
type = ChangeState
value = 210
triggerall = var(59) = 0
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && (MoveContact)
trigger3 = (stateno = 205) && (MoveContact)
trigger4 = (stateno = 220) && (MoveContact)
trigger5 = (stateno = 225) && (MoveContact)
;===============================
;Stand Light Kick Far
[State -1, Stand Light Kick]
type = ChangeState
value = 220
triggerall = var(59) = 0
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && (MoveContact)
;===============================-
;Stand Médium Kick Far
[State -1, Standing Medium Kick]
type = ChangeState
value = 225
triggerall = var(59) = 0
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && (MoveContact)
trigger3 = (stateno = 220) && (MoveContact)
trigger4 = (stateno = 205) && (MoveContact)

;----------------------------------------
;Stand Strong Kick Far
[State -1, Standing Strong Kick]
type = ChangeState
value = 230
triggerall = var(59) = 0
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && (MoveContact)
trigger3 = (stateno = 205) && (MoveContact)
trigger4 = (stateno = 220) && (MoveContact)
trigger5 = (stateno = 225) && (MoveContact)

;===========================================================================
;Single Button Crounch
;===========================================================================

;Crounch Light Punch
[State -1, Crounch Light Punch]
type = ChangeState
value = 400
triggerall = var(59) = 0
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;----------------------------------------
;Crounch Medium Punch
[State -1, Crounch Medium Punch]
type = ChangeState
value = 410
triggerall = var(59) = 0
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;----------------------------------------
;Crounch Strong Punch
[State -1, Crounch Strong Punch]
type = ChangeState
value = 420
triggerall = var(59) = 0
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && (MoveContact)
trigger3 = (stateno = 410) && (MoveContact)
trigger4 = (stateno = 430) && (MoveContact)

;----------------------------------------
;Crounch Light Kick
[State -1, Crounch Light Kick]
type = ChangeState
value = 430
triggerall = var(59) = 0
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && (MoveContact)
trigger3 = (stateno = 410) && (MoveContact)
trigger4 = (stateno = 420) && (MoveContact)

;----------------------------------------
;Crounch Medium Kick
[State -1, Crounch Medium Kick]
type = ChangeState
value = 440
triggerall = var(59) = 0
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && (MoveContact)
trigger3 = (stateno = 410) && (MoveContact)
trigger4 = (stateno = 420) && (MoveContact)
trigger5 = (stateno = 430) && (MoveContact)

;----------------------------------------
;Crounch Strong Kick
[State -1, Crounch Strong Kick]
type = ChangeState
value = 450
triggerall = var(59) = 0
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && (MoveContact)
trigger3 = (stateno = 410) && (MoveContact)
trigger4 = (stateno = 420) && (MoveContact)
trigger5 = (stateno = 430) && (MoveContact)

;===========================================================================
;Single Button Air
;===========================================================================

;Air Light Punch
[State -1, Air Light Punch]
type = ChangeState
value = 600
triggerall = var(59) = 0
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl

;----------------------------------------
;Air Medium Punch
[State -1, Air Medium Punch]
type = ChangeState
value = 610
triggerall = var(59) = 0
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl

;----------------------------------------
;Air Strong Punch
[State -1, Air Strong Punch]
type = ChangeState
value = 620
triggerall = var(59) = 0
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl

;----------------------------------------
;Air Light Kick
[State -1, Air Light Kick]
type = ChangeState
value = 630
triggerall = var(59) = 0
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 610) && (MoveContact)

;----------------------------------------
;Air Medium Kick
[State -1, Air Medium Kick]
type = ChangeState
value = 640
triggerall = var(59) = 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl

;----------------------------------------
;Air Strong Kick
[State -1, Air Strong Kick]
type = ChangeState
value = 650
triggerall = var(59) = 0
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 610) && (MoveContact)
trigger3 = (stateno = 630) && (MoveContact)

;======================================================================
;======================================================================
;AI
;======================================================================
;======================================================================

;===========================================================================
;-| AI Variable |---------------------------------------------------------
;===========================================================================

[State -1, AI]
type = VarSet
trigger1 = command = "CPU1"
trigger2 = command = "CPU2"
trigger3 = command = "CPU3"
trigger4 = command = "CPU4"
trigger5 = command = "CPU5"
trigger6 = command = "CPU6"
trigger7 = command = "CPU7"
trigger8 = command = "CPU8"
trigger9 = command = "CPU9"
trigger10 = command = "CPU10"
trigger11 = command = "CPU11"
trigger12 = command = "CPU12"
trigger13 = command = "CPU13"
trigger14 = command = "CPU14"
trigger15 = command = "CPU15"
trigger16 = command = "CPU16"
trigger17 = command = "CPU17"
trigger18 = command = "CPU18"
trigger19 = command = "CPU19"
trigger20 = command = "CPU20"
trigger21 = command = "CPU21"
trigger22 = command = "CPU22"
trigger23 = command = "CPU23"
trigger24 = command = "CPU24"
trigger25 = command = "CPU25"
trigger26 = command = "CPU26"
trigger27 = command = "CPU27"
trigger28 = command = "CPU28"
trigger29 = command = "CPU29"
trigger30 = command = "CPU30"
trigger31 = command = "CPU31"
trigger32 = command = "CPU32"
trigger33 = command = "CPU33"
trigger34 = command = "CPU34"
trigger35 = command = "CPU35"
trigger36 = command = "CPU36"
trigger37 = command = "CPU37"
trigger38 = command = "CPU38"
trigger39 = command = "CPU39"
trigger40 = command = "CPU40"
trigger41 = command = "CPU41"
trigger42 = command = "CPU42"
trigger43 = command = "CPU43"
trigger44 = command = "CPU44"
trigger45 = command = "CPU45"
trigger46 = command = "CPU46"
trigger47 = command = "CPU47"
trigger48 = command = "CPU48"
v = 59
value = 1

;-----------------------------------
; ------ AI Standing Guard ---------
;-----------------------------------

[State -1]
type = ChangeState
triggerall = var(59) = 1
triggerall = Statetype != A
triggerall = P2statetype != C
triggerall = Statetype = S
triggerall = P2Movetype = A
triggerall = Pos Y != [-1,-999]
triggerall = ctrl = 1
trigger1 = random <= 999
value = 130

[State -1]
type = ChangeState
triggerall = (Var(30) = 59) && (StateType = S) && (Pos Y = 0) && (P2BodyDist Y <= 0)
triggerall = (P2BodyDist Y = -120) && (P2StateType != C) && (P2MoveType = A)
trigger1 = (P2BodyDist X <= 120) && (Random <= 799) && (Ctrl)
trigger2 = (StateNo = [140, 155]) || (StateNo = [100, 105])
value = 130

;-----------------------------------
; ------ AI Standing Guard ---------
;-----------------------------------
; AI Stand to Crouch Guard Transition
[State -1]
type = ChangeState
triggerall = var(59) = 1
triggerall = StateType != A
triggerall = P2statetype = C
triggerall = P2Movetype = A
triggerall = Pos Y != [-1,-999]
trigger1 = stateno = 150
trigger1 = 1
value = 152

; AI Crouching Guard
[State -1]
type = ChangeState
triggerall = var(59) = 1
triggerall = StateType != A
triggerall = P2statetype = C
triggerall = P2Movetype = A
triggerall = Pos Y != [-1,-999]
triggerall = ctrl = 1
trigger1 = random <= 900
value = 131

[State -1]
type = ChangeState
triggerall = (Var(30) = 59) && (StateType != A) && (Pos Y = 0) && (P2BodyDist Y <= 0)
triggerall = (P2BodyDist Y = -50) && (P2StateType = C) && (P2MoveType = A)
trigger1 = (P2BodyDist X <= 120) && (Random <= 799) && (Ctrl)
trigger2 = (StateNo = [140, 155]) || (StateNo = [100, 105])
value = 131

;-----------------------------------
; ------- AI Aerial Guard ---------
;-----------------------------------

; AI Crouch to Stand Guard Transition
[State -1]
type = ChangeState
triggerall = var(59) = 1
triggerall = Statetype != A
triggerall = P2statetype != C
triggerall = P2Movetype = A
trigger1 = 1
trigger1 = stateno = 152
value = 150

;AI Aerial Guard
[State -1]
type = ChangeState
triggerall = var(59) = 1
triggerall = Statetype = A
triggerall = P2Movetype = A
triggerall = ctrl = 1
trigger1 = random <= 900
value = 132

[State -1]
type = ChangeState
triggerall = (Var(30) = 59) && (StateType = A) && (Pos Y = 0)  && (P2BodyDist Y = -120)
triggerall = (StateType = A) && (P2MoveType = A)
trigger1 = ((P2BodyDist X <= 120) && (Ctrl)) || (StateNo = [140, 155])
value = 132


;===========================================================================
;===========================================================================
;============================SAINT FINISH===================================
;===========================================================================
;===========================================================================
;[Souvenir d'Esméralda "contre]
[State -1,Souvenir d'Esmérald]
type = ChangeState
value = 4400
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0
triggerall = statetype != A && ctrl && life > 0
trigger1 = life <= 250 && random <= 250 && power >= 3000

;===============================
;[Ultime Phoenix]
[State -1,Ultime Phoenix]
type = ChangeState
value = 4050
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0
triggerall = statetype != A && ctrl && life > 0
trigger1 = life <= 250 && random <= 300 && power >= 3000

;===============================
;[Phoenix no Ken]
[State -1,Phoenix no Ken]
type = ChangeState
value = 3100
triggerall = var(59) = 1
triggerall = (P2Name = "hyoga") || (P2Name = "Hyoga de Cisne") || (P2Name = "guilty")
triggerall = P2life > 0 && statetype = S
triggerall = ctrl && life > 0 && P2BodyDist X >= 125
trigger1 = P2life <= 250 && random <= 750 && power >= 3000
;==========================================================================
;=====================Hô yoku AI==============================================
;==========================================================================
                 ;========================
                 ;===========SATAND;=====
                 ;========================
;[Stand Hô yoku ten shô niveux1]
[State -1,Light Hô yoku ten shôAI]
Type = ChangeState
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0
triggerall = statetype = S && ctrl && NumProj = 0 && life > 0
triggerall = (power >= 1000) && (power < 2000)
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
trigger1 = life > 250 && random <= 100
trigger2 = life <= 250 && random <= 200
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 205) &&  movecontact
trigger5 = (stateno = 215) &&  movecontact
trigger6 = (stateno = 220) &&  movecontact
trigger7 = (stateno = 225) &&  movecontact
value = 3000
;=========================================
;[Stand Hô yoku ten shô niveaux2]
[State -1,Strong Hô yoku ten shôAI]
Type = ChangeState
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0
triggerall = statetype = S && ctrl && NumProj = 0 && life > 0
triggerall = power >= 2000
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
trigger1 = life > 250 && random <= 100
trigger2 = life <= 250 && random <= 200
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 205) &&  movecontact
trigger5 = (stateno = 215) &&  movecontact
trigger6 = (stateno = 220) &&  movecontact
trigger7 = (stateno = 225) &&  movecontact
value = 3002
;===========================================================================
                 ;========================
                 ;=========AIRE;==========
                 ;========================
;[air Hô yoku ten shô niveaux1]
[State -1,Light air Hô yoku ten shôAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0
triggerall = statetype = A && ctrl && NumProj = 0 && life > 0
triggerall = power >= 2000
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
trigger1 = life > 250 && random <= 100
trigger2 = life <= 250 && random <= 200
value =  3007
;=========================================

; [air Hô yoku ten shô niveaux2]
[State -1,Strong air Hô yoku ten shôAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0
triggerall = statetype = A && ctrl && NumProj = 0 && life > 0
triggerall = power >= 3000
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
triggerall = !NumProj || ProjContactTime(1000) = [1,15]
triggerall = !NumProj || ProjContactTime(1010) = [1,15]
triggerall = !NumProj || ProjContactTime(1020) = [1,15]
triggerall = !NumProj || ProjcontactTime(3000)= [1,15]
trigger1 = life > 250 && random <= 100
trigger2 = life > 250 && random <= 200
value = 30084
;==========================================================================
;=====================GEN MA KEN===========================================
;==========================================================================
;[Hôvo gen ma ken 1]
[State -1,Hôvo gen ma ken]
type = ChangeState
value = 3030
triggerall = var(59) = 1
triggerall = p2StateType != L && P2life > 0 && life > 0
triggerall = statetype = S &&  ctrl
triggerall = (power >= 1000) && (power < 2000)
trigger1 = life > 250 && random <= 100
trigger2 = life <= 250 && random <= 200
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 205) &&  movecontact
trigger5 = (stateno = 215) &&  movecontact
trigger6 = (stateno = 220) &&  movecontact
trigger7 = (stateno = 225) &&  movecontact
;=====================================
;[Hôvo gen ma ken 4]
[State -1,Hôvo gen ma ken Tux]
type = ChangeState
value = 3038
triggerall = var(59) = 1
triggerall = Var(48) >= 1
triggerall = p2StateType != L && P2life <= 100
triggerall = statetype = S && ctrl && random <= 750 && life > 0
triggerall = power >= 1000
triggerall = NumExplod(8109)
trigger1 = (stateno = 200) &&  movecontact
trigger2 = (stateno = 205) &&  movecontact
trigger3 = (stateno = 215) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 225) &&  movecontact
;=====================================
;[Hôvo gen ma ken 2]
[State -1,Hôvo gen ma ken2]
type = ChangeState
value = 3034
triggerall = var(59) = 1
triggerall = Var(48) >= 2
triggerall = p2StateType != L && P2life <= 250
triggerall = statetype = S && ctrl && random <= 750 && life > 0
triggerall = NumExplod(8119)
triggerall = power >= 1000
trigger1 = (stateno = 200) &&  movecontact
trigger2 = (stateno = 205) &&  movecontact
trigger3 = (stateno = 215) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 225) &&  movecontact
;=====================================
;[Hôvo gen ma ken 3]
[State -1,Hôvo gen ma ken3]
type = ChangeState
value = 3038
triggerall = var(59) = 1
triggerall = Var(48) = 3
triggerall = p2StateType != L && P2life <= 400
triggerall = statetype = S && ctrl && random <= 750 && life > 0
triggerall = power >= 1000
triggerall = NumExplod(8129)
trigger1 = (stateno = 200) &&  movecontact
trigger2 = (stateno = 205) &&  movecontact
trigger3 = (stateno = 215) &&  movecontact
trigger4 = (stateno = 220) &&  movecontact
trigger5 = (stateno = 225) &&  movecontact
;==========================================================================
;=======================  Fireball AI        ==============================
;==========================================================================
;[Light Fireball]
[State -1, Light FireballAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = StateType = S &&  ctrl && life > 0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
trigger1 = life > 250 && random <= 25
trigger2 = life <= 250 && random <= 25
trigger3 = (stateno = 200) &&  movecontact
;trigger4 = (stateno = 205) &&  movecontact
;trigger5 = (stateno = 215) &&  movecontact
;trigger6 = (stateno = 220) &&  movecontact
;trigger7 = (stateno = 225) &&  movecontact
value = 1000
;=========================================
;[medium Fireball]
[State -2, medium FireballAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = StateType = S && ctrl && life > 0
triggerall= p2StateType != L && P2life > 0
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
trigger1 = life > 250 && random <= 25
trigger2 = life <= 250 && random <= 50
trigger3 = (stateno = 200) &&  movecontact
;trigger4 = (stateno = 205) &&  movecontact
;trigger5 = (stateno = 215) &&  movecontact
;trigger6 = (stateno = 220) &&  movecontact
;trigger7 = (stateno = 225) &&  movecontact
value = 1010
;=========================================
;[Strong  Fireball]
[State -3, Strong  FireballAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = StateType = S && ctrl && life > 0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1000)
triggerall = !NumProjID(1010)
triggerall = !NumProjID(1020)
trigger1 = life > 250 &&  random <= 25
trigger2 = life <= 250 && random <= 50
trigger3 = (stateno = 200) &&  movecontact
;trigger4 = (stateno = 205) &&  movecontact
;trigger5 = (stateno = 215) &&  movecontact
;trigger6 = (stateno = 220) &&  movecontact
;trigger7 = (stateno = 225) &&  movecontact
value = 1020
;===========================================================================
;====================stand écaille phénix AI===================================
;===========================================================================
;Light stand écaille  phénix
[State -1,Light stand écaille du phénixAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = statetype = S && ctrl && NumProj = 0 && life > 0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1070)
triggerall = !NumProjID(1071)
triggerall = !NumProjID(1072)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = life > 250 && random <= 25
trigger2 = life <= 250 && random <= 50
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 205) &&  movecontact
trigger5 = (stateno = 215) &&  movecontact
trigger6 = (stateno = 220) &&  movecontact
trigger7 = (stateno = 225) &&  movecontact
value = 1070
;===============================
; médium stand écaille du phénix
[State -1,médium stand écaille du phénixAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = statetype = S && ctrl && NumProj = 0  && life >0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1070)
triggerall = !NumProjID(1071)
triggerall = !NumProjID(1072)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = life > 250 && random <= 50
trigger2 = life <= 250 && random <= 100
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 205) &&  movecontact
trigger5 = (stateno = 215) &&  movecontact
trigger6 = (stateno = 220) &&  movecontact
trigger7 = (stateno = 225) &&  movecontact
value = 1071
;===============================
;Strong stand écaille  phénix
[State -1,Strong stand écaille du phénixAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = statetype = S && ctrl && NumProj = 0 && life > 0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1070)
triggerall = !NumProjID(1071)
triggerall = !NumProjID(1072)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = life > 250 && random <= 60
trigger2 = life <= 250 && random <= 125
trigger3 = (stateno = 200) &&  movecontact
trigger4 = (stateno = 205) &&  movecontact
trigger5 = (stateno = 215) &&  movecontact
trigger6 = (stateno = 220) &&  movecontact
trigger7 = (stateno = 225) &&  movecontact
value = 1072
;===========================================================================
;====================aire écaille phénix AI=================================
;===========================================================================
;Light aire écaille du phénix
[State -1,Light Air_WingsAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = statetype = A && ctrl && NumProj=0  && life >0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1050)
triggerall = !NumProjID(1051)
triggerall = !NumProjID(1052)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = life > 250 && random <= 25
trigger2 = life <= 250 && random <= 50
value = 1750

;===============================
;médium aire écaille du phénix
[State -1,médium Air_WingsAI]
type = ChangeState
triggerall = var(59) = 1
triggerall = statetype = A && ctrl && NumProj = 0 && life > 0
triggerall = p2StateType != L && P2life > 0
triggerall = !NumProjID(1050)
triggerall = !NumProjID(1051)
triggerall = !NumProjID(1052)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = life > 250 && random <= 50
trigger2 = life <= 250 && random <= 100
value = 1751

;===============================
;Strong aire écaille du phénix
[State -1,Strong Air_WingsAO]
type = ChangeState
triggerall = var(59) = 1
triggerall = statetype = A && ctrl && NumProj = 0 && life > 0
triggerall= p2StateType != L && P2life > 0
triggerall = !NumProjID(1050)
triggerall = !NumProjID(1051)
triggerall = !NumProjID(1052)
triggerall = !NumProj || ProjContactTime(1070) = [1,15]
triggerall = !NumProj || ProjContactTime(1071) = [1,15]
triggerall = !NumProj || ProjContactTime(1072) = [1,15]
trigger1 = life > 250 && random <= 60
trigger2 = life <= 250 && random <= 125
value = 1752
;===========================================================================
;==========================Envol du phénix AI ==================================
;===========================================================================
;[Light fly away phoenix]
[State -1,Light fly away phoenixAI]
type = ChangeState
value = 1030
triggerall = var(59) = 1
triggerall = p2bodydist X <= 60
triggerall = p2StateType != L && P2life > 0
triggerall = statetype = S && ctrl
trigger1 = random <= 50
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 205) &&  movecontact
trigger4 = (stateno = 215) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 225) &&  movecontact
trigger7 = (stateno = 235) &&  movecontact

;===============================
;  médium fly away phoenix
[State -1,médiumfly away phoenixAI]
type = ChangeState
value = 1032
triggerall = var(59) = 1
triggerall = p2bodydist X <= 60
triggerall = p2StateType != L && P2life >0
triggerall = statetype = S && ctrl
trigger1 = random <= 50
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 205) &&  movecontact
trigger4 = (stateno = 215) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 225) &&  movecontact
trigger7 = (stateno = 235) &&  movecontact

;===============================
; Strong fly away phoenix
[State -1,Strongfly away phoenixAI]
type = ChangeState
value = 1034
triggerall = var(59) = 1
triggerall = p2bodydist X <= 60
triggerall = p2StateType != L && P2life > 0
triggerall = statetype = S && ctrl
trigger1 = random <= 50
trigger2 = (stateno = 200) &&  movecontact
trigger3 = (stateno = 205) &&  movecontact
trigger4 = (stateno = 215) &&  movecontact
trigger5 = (stateno = 220) &&  movecontact
trigger6 = (stateno = 225) &&  movecontact
trigger7 = (stateno = 235) &&  movecontact

;===========================================================================
;======================Plongeon du phénix AI===================================
;===========================================================================
;Light Plongeon du phénix
[State -1, Plongeon du phénixAI]
type = ChangeState
value = 1040
triggerall = var(59) = 1
triggerall = p2bodydist X <= 80 && p2bodydist Y <= 80
triggerall = p2StateType != L && P2life > 0 && life > 0
trigger1 = statetype = A && ctrl && random <= 150
;===============================
;médium  Plongeon du phénix
[State -2,Plongeon du phénixAI]
type = ChangeState
value = 1042
triggerall = var(59) = 1
triggerall = p2bodydist X <= 80 && p2bodydist Y <= 80
triggerall = p2StateType != L && P2life > 0 && life > 0
trigger1 = statetype = A && ctrl && random <= 100
;===============================
;Stronga Plongeon du phénix
[State -3, Plongeon du phénixAI]
type = ChangeState
value =1043
triggerall = var(59) = 1
triggerall = p2bodydist X <= 80 && p2bodydist Y <= 80
triggerall = p2StateType != L && P2life > 0 && life > 0
trigger1 = statetype = A && ctrl && random <= 50
;===========================================================================
;====================Super Kick Jump Depuis Air AI============================
;===========================================================================
;Super Kick Jump Depuis Air
[State -1,Light Super_kickAI]
type = ChangeState
value = 1050
triggerall = var(59) = 1
triggerall = p2bodydist X <= 80 && p2bodydist Y <= 80
triggerall = p2StateType != L && P2life > 0 && life > 0
trigger1 = statetype = A && ctrl && random <= 100
trigger1 = StateNo != 1051

;===============================
[State -2,médium Super_kickAI]
type = ChangeState
value = 1051
triggerall = var(59) = 1
triggerall = p2bodydist X <= 80 && p2bodydist Y <= 80
triggerall = p2StateType != L && P2life > 0 && life > 0
trigger1 = statetype = A && ctrl && random <= 150

;===============================
 [State -3,Strong Super_kickAI]
type = ChangeState
value = 1052
triggerall = var(59) = 1
triggerall = p2bodydist X <= 80 && p2bodydist Y <= 80
triggerall = p2StateType != L && P2life > 0 && life > 0
trigger1 = statetype = A && ctrl && random <= 200

;===========================================================================
;===========================================================================
;=====================BONNUS ATTAQUESAI=======================================
;===========================================================================
;===========================================================================

;===========================================================================
;==================== MULTI-PunchAI===========================================
;===========================================================================
;MULTI-Punch
[State -1,LightMULTI-PunchAI]
type = ChangeState
value = 1060
triggerall = var(59) = 1
triggerall = p2bodydist X <= 20
triggerall = p2StateType = S && P2life > 0 && life > 0
trigger1 = statetype = S && ctrl && random <= 200


;MULTI-Punch
[State -1,Strong MULTI-PunchAI]
type = ChangeState
value = 1061
triggerall = var(59) = 1
triggerall = p2bodydist X <= 20
triggerall = p2StateType = S && P2life > 0  && life > 0
trigger1 = statetype = S && ctrl && random <= 250

;===========================================================================
;=======================EXPLOSION AI===========================================
;===========================================================================
;Combo Punch Rapide Genou / Hupercut
[State -1,EXPLOSIONAI]
type = ChangeState
value = 1080
triggerall = var(59) = 1
triggerall = p2bodydist X <= 20 && P2Life > 0 && life > 0
trigger1 = statetype = S && ctrl && random <= 300
;===========================================================================
;=======================TRENCDIMENTIONAI======================================
;===========================================================================
;TRENCDIMENTION1
[State -1,TRENCDIMENTION1AI]
type = ChangeState
value = 1084
triggerall = var(59) = 1
triggerall = p2bodydist X <= 30
triggerall = statetype = S && ctrl && P2Life > 0
trigger1 = random <= 100
;===============================
;TRENCDIMENTION2
[State -1,TRENCDIMENTION2AI]
type = ChangeState
value = 1085
triggerall = var(59) = 1
triggerall= statetype = S && ctrl && P2Life > 0
trigger1 = random <= 100
;===============================
;===========================================================================
;===========================================================================
;=======================Extra mouve======================================
;===========================================================================
;===========================================================================

;==========================================================================
;=======================Cosmos Charge======================================
;==========================================================================
;power (cosmos )
[State -1, power cosmos]
type = ChangeState
value = 1960
triggerall = var(59) = 1
triggerall = p2bodydist X >= 150
triggerall = p2StateType != L && P2life > 0
trigger1 = statetype = S && ctrl && random <= 900 && life > 0
trigger1 = Power < 3000
trigger1 = StateNo != 2000
trigger1 = StateNo != 20
trigger1 = StateNo != 21
;===============================
;7M CENSE
[State -1, CRANE]
type = ChangeState
value = 2100
triggerall = var(59) = 1
triggerall = Var(48) < 3
triggerall = p2bodydist X >= 250
triggerall = p2StateType != L && P2life > 0
triggerall = power >= 3000
trigger1 = statetype = S && ctrl && random <= 950 && life > 0
trigger2 = StateNo != 2000
;recover (life)
;==========================================================================
;=======================helper===============================
;==========================================================================
[State -1,helper1]
type = ChangeState
value = 2000
triggerall = p2name != "shun" && p3name != "shun" && p4name != "shun"
triggerall = p2name != "andromeda" && p3name != "andromeda" && p4name != "andromeda"
triggerall = p2name != "shun2" && p3name != "shun2" && p4name != "shun2"
triggerall = p2name != "andromeda2" && p3name != "andromeda2" && p4name != "andromeda2"
triggerall = p2name != "shun3" && p3name != "shun3" && p4name != "shun3"
triggerall = p2name != "andromeda3" && p3name != "andromeda3" && p4name != "andromeda3"
triggerall = var(59) = 1
triggerall = p2bodydist X <= 100
triggerall = p2StateType != L && P2life > 0
trigger1 = statetype = S && ctrl && random <= 50 && life > 0

;===========================================================================
;===========================================================================
;=======================AI Close Attacks By Tux=============================
;===========================================================================
;===========================================================================

;Stand Light Punch Close
[State -1, Stand Light Punch AI]
type = ChangeState
value = 215
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1 && random <= 300
triggerall = p2bodydist X <= 10
trigger1 = statetype != A
trigger1 = ctrl = 1

;Stand Medium Punch Close
[State -1, Stand Medium Punch AI]
type = ChangeState
value = 211
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1 && random <= 300
triggerall = p2bodydist X <= 20
trigger1 = statetype != A
trigger1 = ctrl = 1

;Throw1
[state -1, Throw iki]
type = changestate
value =  800
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0
triggerall = var(59) = 1 && random <= 300
triggerall = p2bodydist x < 20
triggerall = statetype = s
triggerall = ctrl
triggerall = stateno != 100
trigger1 = p2statetype = s
trigger1 = p2movetype != h

;Stand Light Kick Close
[State -1, Stand Light Kick AI]
type = ChangeState
value = 235
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1 && random <= 300
triggerall = p2bodydist X <= 10
trigger1 = statetype != A
trigger1 = ctrl = 1

;Stand Medium Kick Close
[State -1, Stand Medium Kick AI]
type = ChangeState
value = 240
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1 && random <= 300
triggerall = p2bodydist X <= 10
trigger1 = statetype != A
trigger1 = ctrl = 1

;Stand Hard Kick Close
[State -1, Stand Hard Kick AI]
type = ChangeState
value = 245
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1 && random <= 300
triggerall = p2bodydist X <= 40
trigger1 = statetype != A
trigger1 = ctrl = 1

;===========================================================================
;===========================================================================
;==========================AI Basic Attacks by Tux==========================
;===========================================================================
;===========================================================================l

[State -1]
type = ChangeState
value = 200
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = P2BodyDist X <= 70
trigger1 = random <= 800
trigger1 = ctrl

[State -1]
type = ChangeState
value = 205
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = stateno = 200
trigger1 = movecontact = 10
trigger1 = random <= 800
trigger2 = statetype = S
trigger1 = P2BodyDist X <= 50
trigger2 = random <= 600
trigger2 = ctrl

[State -1]
type = ChangeState
value = 210
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = statetype = S && (P2statetype = S || P2statetype = A)
trigger1 = P2Dist x >= 70 && P2Dist x <= 130
trigger1 = random <= 200
trigger1 = ctrl
trigger2 = statetype = S
trigger1 = P2BodyDist X <= 170
trigger2 = random <= 600
trigger2 = ctrl

[State -1]
type = ChangeState
value = 220
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = P2BodyDist X <= 100
trigger1 = random <= 600
trigger1 = ctrl

[State -1]
type = ChangeState
value = 225
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = stateno = 220
trigger1 = movecontact = 10
trigger1 = random <= 500
trigger1 = P2BodyDist X <= 125
trigger2 = statetype = S
trigger2 = random <= 700
trigger2 = ctrl

[State -1]
type = ChangeState
value = 230
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = P2Dist x >= 80 && P2Dist x <= 160
trigger1 = statetype = S
trigger1 = random <= 600
trigger1 = ctrl
trigger2 = statetype = S
trigger1 = P2BodyDist X <= 100
trigger2 = random <= 300
trigger2 = ctrl

[State -1]
type = ChangeState
value = 400
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = statetype = C && P2statetype = C
trigger1 = P2BodyDist X <= 40
trigger1 = random <= 300
trigger1 = ctrl

[State -1]
type = ChangeState
value = 410
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = statetype = C && (P2statetype = S || P2statetype = C)
trigger1 = P2BodyDist X <= 60
trigger1 = random <= 600
trigger1 = ctrl

[State -1]
type = ChangeState
value = 420
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = stateno = 410 
trigger1 = movecontact = 10
trigger1 = random <= 700
trigger2 = statetype = C && (P2statetype = S || P2statetype = C)
trigger2 = P2BodyDist X >= 50 && P2BodyDist X <= 80
trigger2 = random <= 800
trigger2 = ctrl

[State -1]
type = ChangeState
value = 430
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = statetype = C && P2statetype = C
trigger1 = P2BodyDist X <= 50
trigger1 = random <= 400
trigger1 = ctrl

[State -1]
type = ChangeState
value = 440
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = statetype = C && (P2statetype = S || P2statetype = C)
trigger1 = P2BodyDist X <= 60
trigger1 = random <= 600
trigger1 = ctrl
trigger2 = stateno = 420
trigger2 = movecontact = 10
trigger2 = random <= 300

[State -1]
type = ChangeState
value = 450
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
trigger1 = statetype = C && (P2statetype = S || P2statetype = C)
trigger1 = P2BodyDist X >= 60 && P2BodyDist X <= 90
trigger1 = random <= 500
trigger1 = ctrl
trigger2 = stateno = 440
trigger2 = movecontact = 10
trigger2 = random <= 300

[State -1]
type = ChangeState
value = 600
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = A && P2statetype = S
trigger1 = P2BodyDist x <= 30 && P2BodyDist y <= 10 && P2BodyDist y >= -10
trigger1 = random <= 400
trigger1 = ctrl

[State -1]
type = ChangeState
value = 610
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = A && P2statetype = A
trigger1 = P2BodyDist x <= 50 && P2BodyDist y <= 5 && P2BodyDist y >= -5
trigger1 = random <= 400
trigger1 = ctrl

[State -1]
type = ChangeState
value = 620
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = P2BodyDist x <= 70
trigger1 = vel x > 0
trigger1 = random <= 500
trigger1 = ctrl

[State -1]
type = ChangeState
value = 630
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = A && P2statetype = S
trigger1 = P2BodyDist x <= 30 && P2BodyDist y <= 10 && P2BodyDist y >= -10
trigger1 = random <= 700
trigger1 = ctrl

[State -1]
type = ChangeState
value = 640
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = P2BodyDist x <= 100
trigger1 = vel x > 0
trigger1 = random <= 700
trigger1 = ctrl

[State -1]
type = ChangeState
value = 650
Triggerall = roundstate = 2 && P2Life > 0 && Life > 0 && P2StateType != L
triggerall = var(59) = 1
triggerall = statetype = A && P2statetype = A
trigger1 = P2BodyDist x <= 50 && P2BodyDist y <= 5 && P2BodyDist y >= -5
trigger1 = random <= 800
trigger1 = ctrl
