[Remap]
x = x
y = a
a = y
z = c
c = z
;=======================================
[Command]
name = "Ankoku-AsurA-TaG"
command = s
time = 1
[Command]
name =  "AsuAtras"
command = B
time = 1
[Command]
name =  "AsuAdelante"
command = F
time = 1
[Command]
name =  "AsuAbajo"
command = D
time = 1
[Command]
name =  "AsuArriba"
command = U
time = 1
;=======================================
;=======================================

[Command]
name = "hyp1x"
command = ~D, DF, F, DF, D, B,x;D,F,D,B,x
time= 50
[command]
name = "hyp1a"
command = ~D, DF, F, DF, D, B,a;D,F,D,B,a
time = 50
[Command]
name = "hyp1x"
command = ~D,F,D,B,x
time= 50
[command]
name = "hyp1a"
command = ~D,F,D,B,a
time = 50
[command]
name = "hyp2b"
command = D,F,D,F,b
time = 50
[Command]
name = "hyp2y"
command = D,F,D,F,y
time = 50


[Command]
name = "hyp3x"
command = ~D,F,a+x  ;~D,F,D,F,x
time= 50
[command]
name = "hyp3a"
command = ~D,F,a+x  ;~D,F,D,F,a
time = 50

[Command]
name = "hyp4"
command = ~D,B,x+a
time= 50

[Command]
name = "hyp5"
command = ~D,B,D,B,b
time= 50
[Command]
name = "hyp5"
command = ~D,B,D,B,y
time= 50


;-| Super Motions - fatales |--------------------------------------------------------
[Command]; chameleon ON
name = "code"
command = ~D,U
time = 60
;[Command]; chameleon OFF
;name = "code2"
;command = ~B,F
;time = 60

[Command]; chameleon ON
name = "code"
command = ~F,U,B,D,F,U,B,D,F
time = 120
[Command]; chameleon ON
name = "code"
command = ~B,U,F,D,B,U,F,D,B
time = 120
[Command]; chameleon OFF
name = "code2"
command = ~B,B,F,F,D,U
time = 120

[Command] ;arrancacabeza o congela - subzero
name = "kill"
command = ~F,D,F,x
time = 25

[Command] ;arrancacabeza o congela - subzero
name = "kill"
command = F,D,F,x
time = 25

[Command] ;se quita la mascara y quema en cualquier lugar - scorpion
name = "fat2any"
command = D,D,U,U,x
time = 40

[Command] ;se quita la mascara y quema a cierta distancia - scorpion
name = "fat2"
command = U,U,x
time = 45

[Command] ;se quita la mascara y quema a cierta distancia - scorpion
name = "fat2"
command = D,D,x
time = 45

[Command] ;se quita la mascara come - reptil
name = "fat3"
command = B,B,D,a
time = 45

[Command] ;INVISIBLE corta mitad - reptil
name = "fat4"
command = F,F,D,y
time = 45

[Command] ;gancho y corta cabeza - smoke
name = "fat5"
command = F,F,D,U
time = 45

[Command] ;gancho y corta cabeza - smoke
name = "fat5"
command = c,z,c,c,y
time = 40

[Command] ;cuchillo y corta a la mitad - scorpion
name = "fat6"
command = D,F,F,F,~x
time = 50

[Command] ;transporta y decapita - smoke
name = "fat7"
command = F,F,B,c
time = 45

[Command] ;ice bomb - subzero
name = "fat8"
command = B,B,D,F,~a
time = 50

[Command] ;ARMRIP(Jax fatal) - ermac
name = "fat9"
command = z,c,z,z,U
time = 45

[Command] ;ARMRIP(Jax fatal) - ermac
name = "fat9"
command = z,z,z,b
time = 45

[Command] ;tekinetikslam - ermac
name = "fat10"
command = D,z,D,D,c
time = 45

[Command] ;body-in - noob
name = "fat11"
command = ~80y
time = 45

[Command] ;icedestro - subzero
name = "fat12"
command = ~F,D,F,F,x
time = 45

[Command] ;vomito - reptile
name = "fat13"
command = F,F,U,U,y
time = 45

[Command] ;harpon cut - scorpion
name = "fat14"
command = F,F,D,U,c
time = 56

[Command] ;hell hand - scorpion
name = "fat15"
command = F,F,F,B,a
time = 60

[Command] ;friendship - todos
name = "friend"
command = B,B,D,y
time = 45

[Command] ;pit fatality opcional - mk2
name = "pit"
command = D,F,F,z
time = 45

[Command] ;pit fatality opcional - smoke
name = "pit"
command = F,U,U,a
time = 45

[Command] ;pit fatality opcional - ermac
name = "pit"
command = c,c,c,b
time = 45

[Command] ;pit fatality opcional - rain
name = "pit"
command = F,D,F,z
time = 45

[Command] ;babality - todos
name = "baby"
command = D,B,B,y
time = 45

;-| Special Motions |------------------------------------------------------
[Command]
name = "fb"
command = ~D, F, a
time = 15

[Command]
name = "groundice"
command = ~D, B, b
time = 15

[Command]
name = "sli"
command = B,B,F,x ;~D, F, x
time = 30

[Command]
name = "acido"
command = F,F,x
time = 15

[Command]
name = "harpon"
command = B,B,a
time = 15

[Command]
name = "teleport"
command = ~D,B,x
time = 15

[Command]
name = "invicible"
command = ~D,U,a;D,D,U
time = 15

[Command]
name = "Orb"
command = a+x
time = 20

[Command]
name = "grableg"
command = ~F, D, B, y
time = 20

[Command]
name = "telegrab"
command = ~D,U
time = 5

[Command]
name = "nube"
command = ~D, F, b;a
time = 15

[Command]
name = "ERgreen"
command = ~D, F, x
time = 15

[Command]
name = "ERslam"
command = ~D, F, B, y
time = 20

[command]
name = "nuts"
command = a+z
time = 5

[Command]
name = "shadow"
command = F,F,a
time = 15

[command]
name = "telepunch2"
command = ~F,F,b
time = 10

[command]
name = "telekick"
command = ~F,F,y
time = 10

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

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
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

[Command]
name = "down";Required (do not remove)
command = ~D
time = 1

[Command]
name = "up";Required (do not remove)
command = ~U
time = 1

[Command]
name = "back";Required (do not remove)
command = ~B
time = 1

[Command]
name = "fwd";Required (do not remove)
command = ~F
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

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

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

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

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

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

[command]
name = "hold_x"
command = /$x
time = 1
;-------------------------------------------
[Statedef -1]
[State -1, Shao khan in Lose]
type = Helper
trigger1 = !alive && lose
trigger1 = stateno = 5150
trigger1 =  Vel X = 0 && pos Y = 0
triggerall = !numhelper(7040)
helpertype = normal
name = "Shao Kahn"
ID = 7040
stateno = 7040
pos = ifelse(BackEdgebodyDist >= 160,-70,100),-400
postype = p1
facing = ifelse(BackEdgebodyDist >= 160,1,-1)
ownpal = 1
size.xscale = 1
size.yscale = 1
[State -1, noobnegro]
type = PalFX
trigger1 = palno = 4 && (time%5) = 1 && stateno != 196
time = 9999
mul = 0,0,0
ignorehitpause = 1
;================== FINISHERS ==============================
[State -1,===== FINISHERS ====]
type = null
trigger1 = name = "solopararellenear"
;===========================================================
;------------------------ SUBZERO ---------------------------
[State -1 FAT12, SUBZERO - Part 1]
type = ChangeState
value = 60820
triggerall = var(20) = 1 || var(21) = 1
triggerall = p2bodydist X = [80,145]
trigger1 = command = "fat4"
trigger2 = random < 200 && var(55) = 1 && !numhelper(70441)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = pos Y = 0
triggerall = ctrl || (stateno = [120,140])

[State -1 FAT12, SUBZERO - Part 2]
type = ChangeState
value = 6082
triggerall = var(20) = 1 || var(21) = 1
triggerall = p2bodydist X < 20
trigger1 = command = "fat12" || command = "kill"
trigger2 = random < 200 && var(55) = 1
triggerall = p2stateno = 7022 && numhelper(7021) && numhelper(70441)
triggerall = statetype != A
triggerall = pos Y = 0
triggerall = ctrl || (stateno = [120,140])

[State -1 FAT 8, SUBZERO - ICE BOMB]
type = ChangeState
value = 6073
triggerall = var(20) = 1 || var(21) = 1
triggerall = p2bodydist X > 100
triggerall = p2stateno = 7022 && numhelper(7021)
trigger1 = statetype != A && command = "fat8"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
triggerall = pos Y = 0
triggerall = ctrl || (stateno = [120,140])

[State -1 FAT 1, SUBZERO - DESTROY from pneophen]
type = ChangeState
value = 6050
triggerall = var(20) = 1 || var(21) = 1
triggerall = p2bodydist X < 20
trigger1 = command = "kill"
trigger2 = (enemynear,time > 20 && var(55) = 1) && random < 200
triggerall = p2stateno = 7022 && numhelper(7021) && !numhelper(70441)
triggerall = statetype != A
triggerall = pos Y = 0
triggerall = (ctrl || (stateno = [120,140]))
;----------------------- SCORPION --------------------------
[State -1 FAT 2, SCORPION - TOASTY]
type = ChangeState
value = 6056
triggerall = var(20) = 2 || var(21) = 1
trigger1 = command = "fat2any" || (command = "fat2" && p2bodydist X = [90,120])
trigger1 = var(55) = 0
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1) && p2bodydist X = [90,120]
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])

[State -1 FAT 6, SCORPION - MID CUT]
type = ChangeState
value = 6068
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = var(20) = 2 || var(21) = 1
triggerall = p2name = "Juano`s Sub guy" || enemynear,selfAnimExist(9108091)
triggerall = p2bodydist X < 20
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0
trigger1 = command = "fat6" && var(55) = 0
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)

[State -1 FAT14, SCORPION - HARPON CUT]
type = ChangeState
value = 6085
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = var(20) = 2 || var(21) = 1
triggerall = statetype != A
triggerall = p2bodydist X > 100
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0
trigger1 = command = "fat14" && var(55) = 0
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)

[State -1 FAT14, SCORPION - HELLHAND]
type = ChangeState
value = 6086
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = var(20) = 2 || var(21) = 1
triggerall = statetype != A
triggerall = p2bodydist X > 100
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0
trigger1 = command = "fat15" && var(55) = 0
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
;------------------------ REPTILE ---------------------------
[State -1 FAT 3, REPTILE - EAT HEAD]
type = ChangeState
value = 6059
triggerall = var(20) = 3 || var(21) = 1
triggerall = p2bodydist X = [80,140]
trigger1 = command = "fat3"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])

[State -1 FAT 4, REPTILE - MIDCUT 2]
type = ChangeState
value = 6063
triggerall = var(20) = 3 || var(21) = 1
triggerall = p2name = "Juano`s Sub guy" || enemynear,selfAnimExist(9108091)
triggerall = var(17) = 1
triggerall = p2bodydist X < 20
trigger1 = command = "fat4"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = pos Y = 0
triggerall = ctrl || (stateno = [120,140])

[State -1 FAT13, REPTILE - ACIDMK3]
type = ChangeState
value = 6083
triggerall = var(20) = 3 || var(21) = 1
;triggerall = p2name = "Juano`s Sub guy"
triggerall = p2bodydist X = [30,40]
trigger1 = command = "fat4" || command = "fat13"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = pos Y = 0
triggerall = ctrl || (stateno = [120,140])
;---------------------- NOOB SAIBOT -------------------------
[State -1 FAT11, NOOB - BODY-IN]
type = ChangeState
value = 6081
triggerall = var(20) = 4 || var(21) = 1
triggerall = p2bodydist X = [-5,35];[15,35]
trigger1 = command = "fat11"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1) && !numhelper(70441)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0

;------------------------- SMOKE ----------------------------
[State -1 FAT 5, SMOKE - HEAD RIP]
type = ChangeState
value = 6066
triggerall = var(20) = 5 || var(21) = 1
triggerall = p2bodydist X < 20
trigger1 = command = "fat5"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1) && !numhelper(70441)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0

[State -1 FAT 7, SMOKE - TELE RIP]
type = ChangeState
value = 6070
triggerall = var(20) = 5 || var(21) = 1
trigger1 = command = "fat7"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1) && !numhelper(70441)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0
;------------------------- ERMAC ----------------------------
[State -1 FAT 9, ERMAC - ARM RIP]
type = ChangeState
value = 6078
triggerall = var(20) = 6 || var(21) = 1
triggerall = p2name = "Juano`s Sub guy" || enemynear,selfAnimExist(9108095)
triggerall = p2bodydist X = [-5,55];[40,55]
trigger1 = command = "fat9"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0

[State -1 FAT10, ERMAC - TELEKINETIC]
type = ChangeState
value = 6079
triggerall = var(20) = 6 || var(21) = 1
triggerall = p2bodydist X = [100,150]
trigger1 = command = "fat10"
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1)
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
triggerall = ctrl || (stateno = [120,140])
triggerall = pos Y = 0

;------------------------- TODOS ----------------------------
[State -1 ALL, FRIENDSHIP]
type = ChangeState
value = 6075
triggerall = p2bodydist X > 120
triggerall = ctrl || (stateno = [120,140])
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
trigger1 = command = "friend" && var(55) = 0
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1) && !numhelper(70441) && enemynear,statetype = S

[State -1 ALL, BABALITY]
type = ChangeState
value = 6084
triggerall = p2bodydist X > 120
triggerall = ctrl || (stateno = [120,140])
triggerall = p2stateno = 7022 && numhelper(7021)
triggerall = statetype != A
trigger1 = command = "baby" && var(55) = 0
trigger2 = random < 200 && (enemynear,time > 20 && var(55) = 1) && !numhelper(70441) && enemynear,statetype = S

[State -1 ALL, BRUTALITY]
type = ChangeState
value = 6080
triggerall = pos Y = 0
triggerall = ctrl && (p2stateno = 7022 && numhelper(7021))
trigger1 = command = "x" && statetype = S
trigger2 = (random < 350 && var(22) != 5008 && var(22) != 5005 && var(22) != 5010) || (random < 150 && (var(22) = 5008 || var(22) = 5005 || var(22) = 5010))
trigger2 = (enemynear,time > 20 && var(55) = 1) && !numhelper(70441) && statetype != A && enemynear,statetype = S
triggerall = p2bodydist X < 20

[State -1 ALL, STAGE FATALITY]
type = ChangeState
value = 6077
triggerall = p2stateno = 7022 && numhelper(7021)
trigger1 = command = "pit" || (command = "holddown" && command = "x" && statetype = C)
trigger1 = var(55) = 0
trigger2 = (random < 150 && var(22) != 5008 && var(22) != 5005 && var(22) != 5010) || (random < 350 && (var(22) = 5008 || var(22) = 5005 || var(22) = 5010))
trigger2 = (enemynear,time > 20 && var(55) = 1) && !numhelper(70441) && enemynear,statetype = S
triggerall = p2bodydist X < 20 && statetype != A
triggerall = ctrl || (stateno = [120,140])
;===========================================================
;-------- FATALITYS EN MODO SIMULTANEO ---------
[State -1, ==== FAT SIMUL ==== ]
type = null
value = 6099
triggerall = name != "Juano`s Sub guy"
trigger1 = 1

[State -1 SUB, SFAT1 - DESTROY from pneophen]
type = ChangeState
value = 9000
triggerall = numpartner = 1 || enemynear,numpartner = 1
triggerall = power >= 3000
triggerall = life <= 200
triggerall = var(20) = 1 || var(21) = 1
triggerall = statetype != A
triggerall = pos Y = 0
triggerall = ctrl || (stateno = [120,140])
trigger1 = command = "fat12" || command = "kill"
trigger2 = random < 200 && var(55) = 1 ;AI

;------------------------- EFECTOS DEL CHAR ------
[State -1,efecto]
type = PalFX
triggerall = numpartner = 1 || enemynear,numpartner = 1
triggerall = power >= 3000
trigger1 = life <= 200 && !(time%15) && alive = 1 && win != 1
time = 10
add = 150,150,150
mul = 256,256,256
sinadd = 85,55,110,10
invertall = 0
color = 0
ignorehitpause = 1
persistent = 5

;===========================================================
;===================== HYPERS ==============================
[State -1,=== HYPERS ===]
type = null
trigger1 = name = "solopararellenear"
;--------------------------------------
[State -1 hyper1, ALL]
type = ChangeState
value = 3000
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0
triggerall = command = "hyp1a" || command = "hyp1x"
triggerall = power >= 1000
triggerall = var(6) < 3 && !var(12)
trigger1 = statetype != A && ctrl
;trigger1 = statetype = S  || statetype = C
trigger2 = stateno = 3012 || stateno = 3005 || stateno = 3013 || stateno = 3014 || stateno = [8000,8003]
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
ignorehitpause = 1

[State -1 hyper2, ALL]
type = ChangeState
value = 3004
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0
triggerall = command = "hyp2y" || command = "hyp2b"
triggerall = power >= 1000
triggerall = var(6) < 3 && !var(12)
trigger1 = statetype != A && ctrl
trigger2 = stateno = 3001 || stateno = 3012 || stateno = 3013 || stateno = 3014 || stateno = [8000,8003]
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
ignorehitpause = 1

[State -1 hyper3, SCORPION]
type = ChangeState
value = 3012
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0
triggerall = var(20) = 2 || var(21) = 1
triggerall = command = "hyp3a" || command = "hyp3x"
triggerall = power >= 1000
triggerall = var(6) < 3 && !var(12)
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3001 || stateno = 3005 || stateno = 3013 || stateno = 3014 || stateno = [8000,8003]
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
ignorehitpause = 1

[State -1 hyper4, REPTILE]
type = ChangeState
value = 3013
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0
triggerall = var(20) = 3 || var(21) = 1
triggerall = command = "hyp4"
triggerall = power >= 1000
triggerall = var(6) < 3 && !var(12)
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3001 || stateno = 3005 || stateno = 3012 || stateno = 3014 || stateno = [8000,8003]
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
ignorehitpause = 1

[State -1 hyper5, ERMAC]
type = ChangeState
value = 3014
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = !var(55)
triggerall = var(20) = 6 || var(21) = 1
triggerall = command = "hyp5"
triggerall = power >= 1000
triggerall = var(6) < 3 && !var(12)
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 3001 || stateno = 3005 || stateno = 3013  || stateno = 3012 || stateno = [8000,8003]
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
ignorehitpause = 1

;==========================================
;============ speciales ===================
[State -1,=== ESPECIALES ===]
type = null
trigger1 = name = "solopararellenear"
;==========================================
;-------------- SUBZERO -------------------
[State -1,subzero - groundice]
type = ChangeState
value = 6006
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 1 || var(21) = 1
triggerall = !var(55)
triggerall = command = "groundice" && !numhelper(6007); && !var(2)
triggerall = enemynear,stateno != 6008 && enemynear,stateno != 7022 && var(12) <= 3
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

;freeze guy
[State -1 , subzero - hielo aire]
type = ChangeState
value = 6004
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 1 || var(21) = 1
triggerall = var(55) = 0
triggerall = command = "fb" && !var(2) && !numhelper(7013)
trigger1 = statetype = A && ctrl
trigger2 = (stateno = [600,620]) || stateno = 60400 || stateno = 6043

;freeze guy
[State -1,subzero - hielo]
type = ChangeState
value = 6000
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 1 || var(21) = 1
triggerall = var(55) = 0
triggerall = command = "fb" && (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(7013)
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

;slidepunch
[State -1,subzero - slidepunch]
type = ChangeState
value = 6003
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 1 || var(21) = 1
triggerall = var(55) = 0
triggerall = command = "sli"
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
trigger3 = stateno = 105

;----------------- ERMAC 1
[State -1,ermac, telkinetic slam]
type = ChangeState
value = 6042
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 6 || var(21) = 1
triggerall = command = "ERslam" && var(2) <= 1 && (p2stateno != [7010,7011]) && (enemynear,stateno != 70004 && p2stateno != 70004 && target,stateno != 70004)
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && anim != 6013 && movecontact) || ((stateno = [208,209]) && movecontact)
trigger3 = var(57) = 2 && (stateno = [700,713]) && movecontact || (var(57) = 3 && (stateno = [730,745]))

;---------------- SCORPION
[State -1 smoke,scorpion - harpon]
type = ChangeState
value = 6014
triggerall = var(20) = 2 || var(20) = 5 || var(21) = 1
triggerall = var(55) = 0
triggerall = command = "harpon" && !numhelper(6015) && !numhelper(6031)
triggerall = p2stateno != 6016 && p2stateno != 6017&& p2stateno != 6021
triggerall = p2stateno != 7022 && !numhelper(7021)
trigger1 = (ctrl || (stateno = [120,140])) && statetype != A
trigger2 = stateno = 105

[State -1 er-smk,scorpion - teleporpunch]
type = ChangeState
value = 6023
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 2 || var(20) = 6 || var(20) = 5 || var(21) = 1
triggerall = var(55) = 0 && stateno != 6038
triggerall = command = "teleport"
trigger1 = (ctrl || ((stateno = [120,140]) && enemynear,stateno != 7022))
trigger2 = (stateno = [600,620]) || stateno = 60400 || stateno = 6043
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1 ,scorpion - grab leg]
type = ChangeState
value = 6037
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 2 || var(21) = 1
triggerall = var(55) = 0
triggerall = command = "grableg"
trigger1 = statetype != A && (ctrl || (stateno = [120,140]))
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1 er-smk,scorpion - air trow]
type = ChangeState
value = 6036
triggerall = var(20) = 2 || var(20) = 6 || var(20) = 5 || var(21) = 1
triggerall = command = "z" && (enemynear,statetype = A) && stateno != 100 && enemynear,stateno != 5050
trigger1 = statetype = A && ctrl && p2bodydist x <= 20

;-------------- REPTILE --------------------
[State -1,reptile - acido]
type = ChangeState
value = 6013
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 0
triggerall = command = "acido"
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1 smoke,reptile - invicible]
type = ChangeState
value = 6028
triggerall = var(20) = 3 || var(20) = 5 || var(21) = 1
triggerall = var(55) = 0
triggerall = var(17) = 0
triggerall = command = "invicible"
trigger1 = statetype != A
triggerall = ctrl || (stateno = [120,140])

[State -1 smoke,reptile - vicible]
type = ChangeState
value = 6029
triggerall = var(20) = 3 || var(20) = 5 || var(21) = 1
triggerall = var(55) = 0
triggerall = var(17) = 1
triggerall = command = "invicible"
trigger1 = statetype != A
triggerall = ctrl || (stateno = [120,140])

[State -1,reptile - Orbslow]
type = Changestate
value = 6030
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 0
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = !numhelper(6035) && !numhelper(6031)
triggerall = command = "Orb" && command = "holdback"
trigger1 = (ctrl || (stateno = [120,140]))
trigger1 = statetype = S
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,reptile - Orbslow air]
type = Changestate
value = 6044
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 0
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = !numhelper(6035) && !numhelper(6031)
triggerall = command = "Orb" && command = "holdback"
trigger1 = ctrl || (stateno = [600,620])
trigger1 = statetype = A

[State -1,reptile - Orbfast]
type = Changestate
value = 6034
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 0
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = !numhelper(6015) && !numhelper(6031)
triggerall = command = "Orb" && command = "holdfwd"
trigger1 = (ctrl || (stateno = [120,140]))
trigger1 = statetype = S
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,reptile - Orbfast air]
type = Changestate
value = 60442
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 0
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = !numhelper(6015) && !numhelper(6031)
triggerall = command = "Orb" && command = "holdfwd"
trigger1 = ctrl  || (stateno = [600,620])
trigger1 = statetype = A

;------------- NOOB ------------------------
[State -1 ,noobsaibot - nube]
type = ChangeState
value = 6040
triggerall = var(20) = 4 || var(21) = 1
triggerall = enemynear,numpartner = 0
triggerall = var(55) = 0
triggerall = command = "nube" && (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(7013)
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
triggerall = Vel Y = 0
triggerall = p2stateno != 7022 && !numhelper(7021) && !numhelper(60402)

[State -1,noobsaibot - airnube]
type = ChangeState
value = 60400
triggerall = enemynear,numpartner = 0
triggerall = !var(2) && !numhelper(60402)
triggerall = var(20) = 4|| var(21) = 1
trigger1 = var(55) = 0
triggerall = command = "nube" && (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(70181)
triggerall = (statetype = A && ctrl) || (stateno = [600,620]) || stateno = 60400 || stateno = 6043
triggerall = p2stateno != 7022 && !numhelper(7021) && !numhelper(60402)

[State -1 ,noobsaibot - invnube]
type = ChangeState
value = 60403
triggerall = var(20) = 4 || var(21) = 1
triggerall = enemynear,numpartner = 0
triggerall = var(55) = 0
triggerall = command = "nube"
trigger1 = statetype != A && ctrl
triggerall = p2stateno != 7022 && !numhelper(7021) && numhelper(60402)

[State -1,noobsaibot - teleportgrab]
type = ChangeState
value = 6038
triggerall = var(20) = 4 || var(21) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0 && win = 0
triggerall = command = "telegrab"
trigger1 = statetype != A && ctrl && command != "hold_z"
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1, noobsaibot - shadow]
type = ChangeState
value = 6046
triggerall = var(20) = 4 || var(21) = 1
triggerall = var(55) = 0 && command != "hold_z"
triggerall = command = "shadow" && numhelper(60461) = 0
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,noobsaibot - teleportkick]
type = ChangeState
value = 6048
triggerall = var(20) = 4 || var(21) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0 && win = 0
triggerall = command = "telekick" && command != "hold_z"
triggerall = statetype != A
trigger1 = (ctrl || (stateno = [120,140])) && (p2stateno != 7022 && !numhelper(7021))
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,smoke - teleportpunch2]
type = ChangeState
value = 6047
triggerall = var(20) = 5 || var(21) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 0 && win = 0
triggerall = command = "telepunch2" && command != "hold_z"
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,ermac - hado]
type = ChangeState
value = 6041
triggerall = var(20) = 6 || var(21) = 1
triggerall = var(55) = 0
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = command = "ERgreen" ;&& (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(70181)
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,ermac - airHAdo]
type = ChangeState
value = 6043
triggerall = !var(2) && !numhelper(7013)
triggerall = var(20) = 6 || var(21) = 1
trigger1 = var(55) = 0
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = command = "ERgreen" && (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(70181)
triggerall = (statetype = A && ctrl) || (stateno = [600,620]) || stateno = 60400 || stateno = 6043
;===========================================================
;========= cosas para los bonus ============
[State -1,===== BONUS ====]
type = ChangeState
value = 6099
trigger1 = name = "solopararellenear"
;==================================================
[State 0, giraBonus]
type = changestate
value = 5
ctrl = 0
triggerall = ctrl && command = "start" && statetype != A
trigger1 = fvar(4) = 1
trigger2 = enemynear,numpartner != 0

[State 0, llenapodervsbonus]
type = PowerAdd
triggerall = !(time%2) && !win && movetype != H
trigger1 = fvar(4) = 1
value = 15
;========= hypers, extras e inventados ============
[State -1,===== EXTRAS ====]
type = ChangeState
value = 6099
trigger1 = name = "solopararellenear"
;==================================================
 ;Gauge Charge
[State -1, gaugecharge ]
type = ChangeState
value = 3002
triggerall = var(55) = 0
triggerall = command = "hold_z" && command = "hold_c"
triggerall = power < const(data.power)
trigger1 = StateType = S
trigger1 = ctrl || (stateno = [120,140])
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1, ball braker]
type = ChangeState
value = 6045
triggerall = var(55) = 0
triggerall = command = "nuts"
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = statetype != A
trigger1 = ctrl || (stateno = [120,140])
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

 ;Gauge Charge
[State -1, Block]
type = ChangeState
value = 120
ctrl = 0
triggerall = win != 1
triggerall = var(55) = 0
triggerall = command = "hold_z"
triggerall = ctrl && movetype != H
trigger1 = statetype = S
trigger2 = statetype = C
triggerall = stateno != [120,140]
triggerall = stateno != 10 && stateno != 12

[State -1,RollF]
type = ChangeState
value = 3007
;triggerall = var(9) != 1
triggerall = command = "c" && command = "holdfwd"
triggerall = life > 0 && statetype != A
trigger1 = ctrl
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1,rollB]
type = ChangeState
value = 3008
;triggerall = var(9) != 1
triggerall = command = "c" && command = "holdback"
triggerall = life > 0 && statetype != A
trigger1 = ctrl
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1,rollB Counter]
type = ChangeState
value = 3009
;triggerall = var(9) != 1
triggerall = command = "c" && command = "holdback"
triggerall = power >= 1000 && life > 0 && statetype != A
trigger1 = stateno = 150
trigger2 = stateno = 152

[State -1,RollF counter]
type = ChangeState
value = 3010
;triggerall = var(9) != 1
triggerall = command = "c" && command = "holdfwd"
triggerall = power >= 1000 && life > 0 && statetype != A
trigger1 = stateno = 150
trigger2 = stateno = 152

[State -1, Dodge]
type = ChangeState
value = 3006
;triggerall = var(9) != 1
triggerall = command = "c"
trigger1 = ctrl
triggerall = var(55) = 0
triggerall = life > 0 && statetype != A
triggerall = p2stateno != 7022 && numhelper(7021) = 0


;--------------------------------------------------------------
;--------------------------------------------------------
;===========================================================================
;supers y ataques hechos por phneopen
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

;[State -1, brutal]
;type = ChangeState
;value = 6040
;triggerall = command = "killbrutal" ;&& p2stateno = 7022 && numhelper(7021)
;trigger1 = statetype != A && ctrl
;triggerall = p2bodydist X < 6
;triggerall = p2bodydist X > -20
;triggerall = p2bodydist y >= -10

;===========================================================================
;specials
;---------------------------------------------------------------------------
;slide
[State -1, slide]
type = ChangeState
value = 6002
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(55) = 0
triggerall = command = "holdback" && command = "a" && command = "b"
triggerall = ctrl || (stateno = [120,140])
trigger1 = statetype != A
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

;dialset 1
[State -1,dialset1]
type = ChangeState
value = 8000
triggerall = var(55) = 0
triggerall = command = "a" && stateno = 208
trigger1 = statetype != A && ctrl
trigger2 = stateno = 208  && time <= 7 && movecontact

;dialset 2
[State -1,dialset2 ]
type = ChangeState
value = 8001
triggerall = var(55) = 0
triggerall = command = "b" && stateno = 209
trigger1 = statetype != A && ctrl
trigger2 = stateno = 209  && time <= 7 && movecontact

;dialset 3
[State -1,dialset3]
type = ChangeState
value = 8002
triggerall = var(55) = 0
triggerall = command = "y" && stateno = 208
trigger1 = statetype != A && ctrl
trigger2 = stateno = 208  && time <= 7 && movecontact
;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF" && statetype = S && ctrl && stateno != 100
triggerall = p2stateno != 7022 && numhelper(7021) = 0
;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB" && statetype = S && ctrl
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;----------------------------------------------------------------------------
;uppercut beotch
[State -1,uppercut]
type = ChangeState
value = 400
triggerall = command = "x" && command = "holddown"
triggerall = statetype = C && ctrl
trigger1 = p2stateno != 7022 && numhelper(7021) = 0
trigger2 = p2bodydist X > 20 && p2stateno = 7022 && numhelper(7021)

;backfist of doom!!!!
[State -1,backfist]
type = ChangeState
value = 208
triggerall = command = "x" && (p2statetype != A)
trigger1 = (statetype != A && ctrl && p2bodydist x <= 10 || (((stateno = 600 && time <= 16) || (anim = 621 && time <= 20)) && movecontact)) && var(55) = 0
trigger2 = (statetype != A && ctrl && p2bodydist x <= 10 || (((stateno = 600 && time <= 16) || (anim = 621 && time <= 20)) && movecontact)) && var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;throw
[State -1,trow]
type = ChangeState
value = 800
triggerall = command = "a" && (p2statetype != A) && command != "holddown" && stateno != 100
trigger1 = statetype != A && ctrl && p2bodydist x <= 10 && var(55) = 0
trigger2 = p2stateno != 7022 && numhelper(7021) = 0
trigger2 = statetype != A && ctrl && p2bodydist x <= 10 && var(55) = 1


;shp
[State -1,shp]
type = ChangeState
value = 200
triggerall = command = "x" && command != "holddown"
trigger1 = ((statetype != A && ctrl) || ((stateno = 201 || stateno = 203) && (time = [8,13]))) && var(55) = 0
trigger2 = ((statetype != A && ctrl) || ((stateno = 201 || stateno = 203) && (time = [8,13]))) && var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;shp2
[State -1,shp2]
type = ChangeState
value = 201
triggerall = command = "x" && command != "holddown"
trigger1 = ((statetype != A && ctrl) || ((stateno = 200 || stateno = 202) && (time = [8,13]))) && var(55) = 0
trigger2 = ((statetype != A && ctrl) || ((stateno = 200 || stateno = 202) && (time = [8,13]))) && var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;slp
[State -1,slp]
type = ChangeState
value = 202
triggerall = command = "a" && command != "holddown"
triggerall = (statetype != A && ctrl) || ((stateno = 201 || stateno = 203) && (time = [8,13]))
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;slp2
[State -1,slp2]
type = ChangeState
value = 203
triggerall = command = "a" && command != "holddown"
triggerall = (statetype != A && ctrl) || ((stateno = 200 || stateno = 202) && (time = [8,13]))
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;roundhouse
[State -1,roundhouse]
type = ChangeState
value = 240
triggerall = command = "y" && command = "holdback" &&  command != "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0


;knee
[State -1,knee]
type = ChangeState
value = 209
triggerall = (command = "y" || command = "b") && command != "holddown" && (p2statetype != A)
triggerall = (statetype != A && ctrl && p2bodydist x <= 10) || (((stateno = 600 && time <= 21) || (anim = 621 && time <= 18)) && command = "y" && movecontact)
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;sweep
[State -1,sweep]
type = ChangeState
value = 250
triggerall = command = "b" && command = "holdback" &&  command != "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0


;shk
[State -1,shk]
type = ChangeState
value = 220
triggerall = command = "y" && command != "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0


;slk
[State -1,slk]
type = ChangeState
value = 230
triggerall = command = "b" && command != "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;------------------------------------------------------------------------------------------------------------------------
;clp
[State -1,clp]
type = ChangeState
value = 410
triggerall = command = "a" && command = "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;clk
[State -1,clk]
type = ChangeState
value = 420
triggerall = command = "b" && command = "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0


;chk
[State -1,chk]
type = ChangeState
value = 430
triggerall = command = "y" && command = "holddown"
triggerall = statetype != A && ctrl
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2stateno != 7022 && numhelper(7021) = 0

;---------------------------------------------------------------------------------------
;jump punch
[State -1,jumpunch]
type = ChangeState
value = 600
trigger2 = p2stateno != 7022 && numhelper(7021) = 0 && var(55) = 1 ;AI
trigger1 = command = "x" || command = "a"
trigger1 = var(55) = 0
triggerall = statetype = A && ctrl

;jump kick
[State -1,jumpkick]
type = ChangeState
value = 620
trigger2 = p2stateno != 7022 && numhelper(7021) = 0 && var(55) = 1 ;AI
trigger1 = var(55) = 0
trigger1 = command = "y" || command = "b"
triggerall = statetype = A && ctrl

;=============================================
[State -1, ==== ACTIVA PAL ==== ]
type = null
value = 6099
triggerall = name != "Juano`s Sub guy"
trigger1 = 1
;--------------------- ACTIVA TODOS LOS ATAQUES
[State -1 ON, atack ON]
type = varset
Trigger1 = ((stateno = [191,199]) && (numhelper(7019) = 1 && roundno = 1) ||  ((stateno = 5900 && roundno != 1 && time < 3) || (time < 5 && stateno = [191,199])))
trigger1 = (command = "holdback" && command = "hold_z" && command = "hold_c")
;trigger2 = (var(57) >= 20 && stateno = 180 && numhelper(7021)) && (time = 470 && winperfect) || (time = 370 && !winperfect)
persistent = 0
var(21) = 1

[State -1,ON sound]
type = playsnd
triggerall = var(59) = 0
Trigger1 = (stateno = [191,199]) && (numhelper(7019) = 1 && roundno = 1)
Trigger2 = ((stateno = 5900 && roundno != 1 && time < 3) || (time = 1 && stateno = [191,199]))
triggerall = var(21) = 1 && command = "holdback" && command = "hold_z" && command = "hold_c"
channel = -1
value = 5,1
volume = -255
persistent = 0

[State -1,ON effect]
type = PalFX
triggerall = var(59) = 0
Trigger1 = (stateno = [191,199]) && (numhelper(7019) = 1 && roundno = 1)
Trigger2 = stateno = 5900 && time < 3 && roundno != 1 && animelemtime(1) = 0
triggerall = var(21) = 1;command = "holdback" && command = "hold_z" && command = "hold_c"
time = 20
add = 0,50,240
mul = 120,224,150
sinadd = 85,55,110,3
invertall = 0
color = 256
persistent = 0

[State -1 OFF,atack OFF]
type = null;varset
triggerall = numhelper(7019) = 1
Trigger2 = stateno = 5900
Trigger1 = stateno = [191,199]
triggerall = command = "code2"
persistent = 0
var(21) = 0

[State -1, OFF sound]
type = null;playsnd
triggerall = numhelper(7019) = 1
Trigger1 = stateno = [191,199]
triggerall = command = "code2"
Trigger2 = stateno = 5900
persistent = 0
abspan = 1
channel = 2
value = 1,9

[State -1,OFF effect]
type = null;PalFX
triggerall = numhelper(7019) = 1
Trigger1 = stateno = [191,199]
triggerall = command = "code2" && stateno != 196
Trigger2 = stateno = 5900
time = 20
add = 100,100,100
mul = 256,256,256
sinadd = -80,-80,-80,3
invertall = 0
color = 0
;-----------------------------------------------------------------
;--------------------------------------------------------------------------
;   AI action
;--------------------------------------------------------------------------
;------------------------------
[State -1, AI Activation]
type = varset
triggerall = AILevel > 2
triggerall = (roundstate = 2) && (var(55) = 0)
trigger1 = Random <= ((AILevel-2)*100)
v = 55
value = 1

[State -1, AI Deactivation]
type = varset
triggerall = AIlevel < 7
triggerall = var(55) = 1
trigger1 = Random > ((AILevel-2)*100)
trigger2 = roundstate != 2
v = 55
value = 0

; win, stop moving
[State -1, AI win se detiene]
type = ChangeState
value = 0
triggerall = var(55) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = Win = 1 || roundstate > 2

;------------------------------------------------------
;fatality AI
;[State -1,AI fatal 1 ]
;type = ChangeState
;value = 6050
;triggerall = var(55) = 1 && p2stateno = 7022 && numhelper(7021)
;triggerall = statetype != A && ctrl
;trigger1 = p2bodydist X < 20
;triggerall = pos Y = 0

;[State -1, AI fat2toasty - scorpion]
;type = ChangeState
;value = 6056
;trigger1 = random <= 200
;triggerall = var(55) = 1
;triggerall = p2bodydist X = [90,120]
;triggerall = p2stateno = 7022 && numhelper(7021)
;triggerall = statetype != A && ctrl

;[State -1, AI fat3comecabeza - reptile]
;type = ChangeState
;value = 6059
;triggerall = var(55) = 1
;triggerall = p2bodydist X = [150,170]
;triggerall = p2stateno = 7022 && numhelper(7021)
;triggerall = statetype != A && ctrl
;trigger1 = random <= 200

;caminar AI
;[State -1, AI caminahacerfatal1 ]
;type = ChangeState
;value = 20
;trigger1 = P2Bodydist X >= 15
;triggerall = ctrl && statetype != A
;triggerall = var(55) = 1 && p2stateno = 7022 && numhelper(7021)
;trigger1 = statetype = S

;roll Back counter AI
[State -1,rollB Counter]
type = ChangeState
value = 3009
triggerall = ctrl
triggerall = var(55) = 1
triggerall = FrontEdgeBodyDist < 30
triggerall = random <= 400;150
triggerall = power >= 1000 && life > 0 && statetype != A
trigger1 = stateno = 150
trigger2 = stateno = 152
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;roll foward counter AI
[State -1,RollF counter]
type = ChangeState
value = 3010
triggerall = ctrl
triggerall = var(55) = 1
triggerall = random <= 400;150
triggerall = BackEdgeBodyDist < 30
triggerall = power >= 1000 && life > 0 && statetype != A
trigger1 = stateno = 150
trigger2 = stateno = 152
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;roll F AI
[State -1, AIrollF]
type = ChangeState
value = 3007
triggerall = ctrl
triggerall = random <= 100;200
triggerall = p2movetype != H
triggerall = var(55) = 1
triggerall = life > 0 && statetype != A
triggerall = p2bodydist X <= 10
trigger1 = ctrl
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;roll B AI
[State -1, AIrollB]
type = ChangeState
value = 3008
triggerall = ctrl
triggerall = random <= 100;200
triggerall = p2movetype != H
triggerall = var(55) = 1
triggerall = life > 0 && statetype != A
triggerall = p2bodydist X <= 10
trigger1 = ctrl
triggerall = p2stateno != 7022 && numhelper(7021) = 0

; Dodge                      제자리회피
[state -1, AIdodge]
type = ChangeState
value = 3006
triggerall = p2movetype = A || (enemy, NumProj >= 1)
triggerall = random <= 100;600
triggerall = var(55) = 1
triggerall = p2statetype != L
triggerall = statetype = S
triggerall = ctrl
triggerall = p2bodydist X > 0 && p2bodydist X <= 250
triggerall = p2bodydist Y >= -80
trigger1 = p2bodydist X <= 30
trigger1 = p2movetype = A
trigger1 = (p2statetype != A && random <= 200) || (p2statetype = A && random <= 30)
trigger2 = p2movetype = A
trigger2 = p2bodydist X > 30
trigger2 = (p2statetype != A && random <= 300) || (p2statetype = A && random <= 45)
trigger3 = p2bodydist X > 200
trigger3 = (p2statetype != A && random <= 100) || (p2statetype = A && random <= 15)
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[state -1,varset12];가드캔슬 대쉬
type = varset
triggerall = var(58) > 2 || var(58) < 1
triggerall = var(55) = 1 && time = 1
triggerall = var(16) < 1 && var(14) < 1
triggerall = stateno = 150 || stateno = 152
triggerall = power >= 212 + var(20)*100
trigger1 = p2bodydist X > 20
trigger1 = p2bodydist X <= 100
trigger1 = p2movetype = A
trigger1 = random <= 200
trigger2 = p2bodydist X > 20
trigger2 = p2bodydist X <= 100
trigger2 = gethitvar(hittime) >= 15
trigger2 = random <= 400
trigger3 = p2bodydist X > 50
trigger3 = life < 100
trigger3 = random <= 600
var(12) = 1
ignorehitpause = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0

; charge                        기모으기
[state -1, chargeAI]
type = ChangeState
value = 3002
triggerall = ctrl
triggerall = name = "panchitoraketa01" ;con esto ya no estara
trigger2 = p2bodydist X > 115
;triggerall = p2bodydist X > -115
triggerall = p2bodydist X = [100,200]
triggerall = var(55) = 1
triggerall = life > 500
triggerall = power < 2500
triggerall = power != [2990,3010]
triggerall = power != [4990,5010]
;triggerall = random < 200
;triggerall = p2statetype != L
triggerall = p2statetype != A
;trigger1 = statetype != A && ctrl
;ctrl = 1
;trigger1 = p2bodydist X > 115
;trigger1 = random = 1
trigger2 = random < 100
trigger1 = p2statetype = L
;triggerall = p2bodydist X > 115
;triggerall = var(58) > 1 || var(58) < 1
;triggerall = var(14) < 1 && prevstateno != 1309 && prevstateno != 100
;triggerall = var(55) = 1 && prevstateno != 1310 && prevstateno != 1312
;triggerall = var(16) < 1 && prevstateno != 1311
;triggerall = power < 9000 + var(20)*100
;triggerall = ctrl
;triggerall = stateno != 1309 && var(3) < 1
triggerall = statetype != A
;triggerall = p2movetype != A
;triggerall = random > 600
;trigger1 = p2stateno = 7605 || p2stateno = 7705 || p2stateno = 7805
;trigger1 = random <= 600
;trigger2 = p2statetype = L
;trigger1 = random <= 600
;trigger3 = p2stateno = 5000
;trigger3 = numhelper(8301) = 1
;trigger3 = random <= 600
;trigger4 = random <= 600
;trigger4 = p2stateno = 5020
;trigger4 = numhelper(8301) = 1
;trigger4 = p2bodydist Y > -20
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;air guard     공중 가드
[state -1, AIcubreaire]
triggerall = p2name = "panchitoraketa01" ;con esto ya no estara
type = ChangeState
value = 132
triggerall = statetype = A
triggerall = var(55) = 1
triggerall = ctrl
triggerall = p2movetype = A
trigger1 = p2statetype = A
trigger1 = p2bodydist X > 30
ctrl = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0

; Throw                  발잡기
[state -1,AIlanza]
type = ChangeState
value = 800
triggerall = p2statetype != L
triggerall = var(55) = 1
triggerall = statetype != A
triggerall = p2bodydist X < 6
triggerall = p2bodydist X > -10
triggerall = p2bodydist y >= -10
triggerall = ctrl
triggerall = P2movetype != H
triggerall = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
triggerall = p2stateno != 153 && p2stateno != 140
triggerall = p2stateno != 130 && p2stateno != 131
trigger1 = random <= 8
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1, cubrirse]
type = ChangeState
value = 132
;triggerall = p2movetype = A || (enemy, NumProj >= 1) ;
triggerall = P2bodydist X <= 40 || (enemy, NumProj >= 1)
triggerall = statetype = A
;triggerall = random <= 600
triggerall = var(55) = 1
triggerall = ctrl
triggerall = stateno != 132
trigger1 = p2statetype = A
trigger2 = (enemy, NumProj >= 1)
trigger3 = p2statetype = A
trigger4 = p2statetype = C
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1,cubrirse de pie]
type = ChangeState
value = 130
triggerall = p2movetype = A || (enemy, NumProj >= 1)
triggerall = P2bodydist X <= 60 ;|| (enemy, NumProj >= 1)
triggerall = random <=800 ;<= 1000
triggerall = statetype != A
triggerall = var(55) = 1
triggerall = ctrl = 1
triggerall = stateno != 120
trigger1 = p2statetype = S
trigger2 = (enemy, NumProj >= 1)
trigger3 = p2statetype = A
trigger4 = p2statetype = C
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1,cubrirse agachado]
type = ChangeState
value = 131
triggerall = p2movetype = A || (enemy, NumProj >= 1)
triggerall = P2bodydist X <= 40 || (enemy, NumProj >= 1)
triggerall = random <= 900
triggerall = statetype != A
triggerall = statetype = C
triggerall = var(55) = 1
triggerall = ctrl
triggerall = stateno != 120
trigger1 = p2statetype = S
trigger2 = (enemy, NumProj >= 1)
trigger3 = p2statetype = A
trigger4 = p2statetype = C
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;hyper1
[State -1, AIhyper1]
type = ChangeState
value = 3000
trigger1 = random <= 40
triggerall = var(55) = 1
triggerall = power >= 1000
triggerall = var(6) != 3
triggerall = statetype != A && ctrl
trigger2 = p2stateno = 6009 || p2stateno = 6021
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact) || stateno = [8000,8003]
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = p2bodydist X <= 100

;hyper2
[State -1, AIhyper2]
type = ChangeState
value = 3004
triggerall = var(55) = 1
triggerall = power >= 1000
trigger1 = random < 40
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = statetype != A && ctrl
trigger2 = p2stateno = 6009 || p2stateno = 6021
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact) || stateno = [8000,8003]
triggerall = p2bodydist X < 20
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(6) != 3

[State -1, AIhyper3 SCORPION]
type = ChangeState
value = 3012
triggerall = var(55) = 1 && p2bodydist X < 20
triggerall = var(20) = 2 || var(21) = 1
trigger1 = random < 40
trigger2 = p2stateno = 6009 || p2stateno = 6021
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact) || stateno = [8000,8003]
triggerall = power >= 1000
triggerall = var(6) != 3
triggerall = statetype != A
triggerall = ctrl
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1, AIhyper4 REPTILE]
type = ChangeState
value = 3013
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 1
triggerall = var(20) = 3 || var(21) = 1
triggerall = statetype != A
triggerall = power >= 1000
triggerall = var(6) < 3 && !var(12)
triggerall = ctrl
triggerall = random <= 80
trigger1 = random < 40
trigger2 = p2stateno = 6009 || p2stateno = 6021
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact) || stateno = [8000,8003]
ignorehitpause = 1

 ;uppercut beotch AI
[State -1, uppercut beotch AI]
type = ChangeState
value = 400
triggerall = stateno != 400
triggerall = var(55) = 1 && ctrl
triggerall = random <= 80
triggerall = statetype != A
triggerall = p2statetype != C
trigger1 = p2bodydist X <= 20
trigger2 = p2stateno = 6009 || p2stateno = 6021
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;roundhouse
[State -1, roundhouse]
type = ChangeState
value = 240
triggerall = stateno != 240
triggerall = var(55) = 1 && ctrl
triggerall = random <= 400
triggerall = statetype = S
trigger1 = p2bodydist X < 20
trigger1 = random <= 300
;trigger2 = stateno =
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;sweep
[State -1,AIsweep ]
type = ChangeState
value = 250
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = stateno != 250
triggerall = var(55) = 1 && ctrl
triggerall = random <= 400
trigger1 = p2bodydist X < 20
trigger1 = random <= 300
;trigger2 = stateno =
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;dialset 1 AI
[State -1,AIdialset 1]
type = ChangeState
value = 8000
triggerall = statetype != A
triggerall = random < 300
triggerall = animelem = 4  && ctrl
triggerall = stateno = 208 && var(55) = 1
trigger1 = stateno = 208  && time <= 7 && movecontact
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;dialset 2  AI
[State -1,AIdialset 2]
type = ChangeState
value = 8001
triggerall = statetype != A
triggerall = random < 300 && stateno = 209 && var(55) = 1
trigger1 = statetype != A && ctrl
trigger2 = stateno = 209  && time <= 7 && movecontact
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;dialset 3  AI
[State -1,AIdialset 3]
type = ChangeState
value = 8002
triggerall = statetype != A
triggerall = random < 300 && stateno = 208 && var(55) = 1
trigger1 = ctrl
trigger1 = stateno = 208  && time <= 7 && movecontact
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;backfist of doom!!!!  AI
[State -1, AIbackfist]
type = ChangeState
value = 208
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = random <= 300 && var(55) = 1
triggerall = p2bodydist x <= 10
trigger1 = ctrl && p2bodydist x <= 10
trigger2 = ctrl && ((stateno = 600 && time <= 16) || (anim = 621 && time <= 20)) && movecontact
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;knee  AI
[State -1,AIknee]
type = ChangeState
value = 209
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = random <= 300 && var(55) = 1
triggerall = ctrl
trigger1 = p2bodydist x <= 10
trigger2 = ((stateno = 600 && time <= 21) || (anim = 621 && time <= 18)) && movecontact
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;slide AI
[State -1,AIslide]
type = ChangeState
value = 6002
triggerall = random <= 20 && var(55) = 1
triggerall = statetype != A && ctrl
trigger1 = p2bodydist x >= 40
trigger1 = random < 200
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
trigger2 = random < 200
trigger3 = p2stateno = 7003
trigger3 = random < 200
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;caminar AI en pelea
[State -1 walk,== AI SPECIALES ==]
type = ChangeState
value = 20
triggerall = ctrl
;triggerall = prevstateno != 5900
;triggerall = prevstateno != 191
;triggerall = prevstateno != 20
triggerall = stateno = 0
triggerall = var(55) = 1
triggerall = statetype != A
;triggerall = p2bodydist x > 8
trigger1 = p2bodydist x > 9
trigger1 = random <= 600
trigger2 = p2stateno = 7003
trigger2 = random <= 600
triggerall = p2stateno != 7022 && numhelper(7021) = 0
;=======================================================
;=============== AI SPECIAL ATTACKS ====================
;=======================================================
;--------------------- SUB-ZERO ------------------------
[State -1,AIsubzero - groundice]
type = ChangeState
value = 6006
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = random < 50
triggerall = var(20) = 1 || var(21) = 1
triggerall = var(55) = 1 && !var(2) && !numhelper(6007) ;&& !numhelper(7013)
triggerall = p2stateno != 6008 && p2stateno != 7003 ;&& p2stateno != 7022
trigger1 = statetype != A && ctrl
trigger1 = random < 200
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

;hielo en el aire                    약 어둠
[state -1, AIsubzero - hielo aire]
type = ChangeState
value = 6004
triggerall = var(20) = 1 || var(21) = 1
triggerall =!var(2) && !numhelper(7013)
triggerall = var(55) = 1
;triggerall = (stateno = [600,620])
;triggerall = p2movetype = A
triggerall = p2statetype != L
triggerall = statetype = A
triggerall = ctrl
triggerall = p2bodydist X <= 50
trigger1 = p2statetype = A
trigger1 = random <= 200
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;lanzar hielo                     약 어둠
[state -1, AIsubzero - hielo suelo]
type = ChangeState
value = 6000
triggerall = var(20) = 1 || var(21) = 1
triggerall = numprojID(7013) = 0
triggerall = var(55) = 1
;triggerall = p2movetype != A
triggerall = random < 100
triggerall = p2statetype != L
triggerall = statetype != A
triggerall = (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(7013)
triggerall = ctrl && (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
triggerall = p2stateno != 7003
trigger1 = p2bodydist X >= 100
trigger2 = random <= 150
trigger2 = p2stateno = [150,155]
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;slide hielo AI
[State -1,AIsubzero - slideice]
type = ChangeState
value = 6003
triggerall = var(20) = 1 || var(21) = 1
triggerall = random <= 20 && var(55) = 1
triggerall = statetype != A && ctrl
trigger1 = p2bodydist x >= 40
trigger1 = random < 200
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
trigger2 = random < 200
trigger3 = random < 200
trigger3 = p2stateno = 7003
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;----------------------- SCORPION -----------------------------
[State -1 smoke,AIscorpion - harpon]
type = ChangeState
value = 6014
triggerall = var(20) = 2 || var(20) = 5  || var(21) = 1
triggerall = var(55) = 1
triggerall = random < 20 && !numhelper(6015) && !numhelper(6031)
triggerall = p2stateno != 6016 && p2stateno != 6017&& p2stateno != 6021
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = statetype != A && ctrl && p2statetype != C
trigger1 = p2bodydist X > 100 && p2movetype != H

[State -1 Er-smk,AIscorpion - teleporpunch]
type = ChangeState
value = 6023
triggerall = var(6) = 0 ;no si esta en hyper
triggerall = var(20) = 2 || var(20) = 6 || var(20) = 5 || var(21) = 1
triggerall = var(55) = 1 && stateno != 6038
trigger1 = random < 20
trigger1 = ctrl
trigger2 = (stateno = [600,620]) || stateno = 60400 || stateno = 6043
trigger2 = random < 120
triggerall = BackEdgebodyDist < 100; && p2movetype != L
triggerall = p2stateno != 7022 && numhelper(7021) = 0
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
trigger3 = random < 120

[State -1 smoke,AIscorpion - grab leg]
type = ChangeState
value = 6037
triggerall = var(20) = 2 || var(20) = 5 || var(21) = 1
triggerall = var(55) = 1
triggerall = random < 150
trigger1 = statetype != A && ctrl
trigger1 = p2bodydist X < 30
triggerall = p2stateno != 7022 && numhelper(7021) = 0

;----------------------- REPTILE ------------------------------
[State -1 smoke,AIreptile - invisible]
type = ChangeState
value = 6028
triggerall = var(20) = 3 || var(20) = 5 || var(21) = 1
triggerall = p2bodydist X > 50 && p2movetype != A
triggerall = var(55) = 1
triggerall = var(17) = 0
triggerall = random < 50
trigger1 = statetype != A && ctrl
trigger1 = random < 200

[State -1,AIreptile - acido]
type = ChangeState
value = 6013
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 1
triggerall = random < 25
triggerall = statetype != A && ctrl
trigger1 = p2statetype != L && p2statetype != C
trigger1 = p2bodydist X > 50
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1,AIreptile - Orbslow]
type = Changestate
value = 6030
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = !numhelper(6015) && !numhelper(6031)
trigger1 = random < 30 && p2bodydist X > 30
triggerall = ctrl = 1
triggerall = statetype = S

[State -1,AIreptile - Orbfast]
type = Changestate
value = 6034
triggerall = var(20) = 3 || var(21) = 1
triggerall = var(55) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = !numhelper(6015) && !numhelper(6031)
trigger1 = random < 30 && p2bodydist X > 50
triggerall = ctrl = 1
triggerall = statetype = S
;----------------------- NOOB ---------------------------------
[State -1,AInoobsaibot - teleportgrab]
type = ChangeState
value = 6038
triggerall = var(20) = 4 || var(21) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 1 && win = 0
trigger1 = random < 40 && p2bodydist X > 50
triggerall = statetype != A && ctrl
triggerall = p2statetype = S

[State -1 ,AInoobsaibot - nube]
type = ChangeState
value = 6040
triggerall = var(20) = 4 || var(21) = 1
triggerall = enemynear,numpartner = 0
triggerall = (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(7013)
triggerall = p2stateno != 7022 && !numhelper(7021) && !numhelper(60402)
triggerall = var(55) = 1
triggerall = p2statetype != L && ctrl
triggerall = statetype != A
triggerall = ctrl && (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
triggerall = p2stateno != 7003
trigger1 = p2bodydist X >= 100
trigger2 = random <= 150
trigger2 = p2stateno = [150,155]
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1 ,AInoobsaibot - airnube]
type = ChangeState
value = 60400
triggerall = var(20) = 4 || var(21) = 1
triggerall = enemynear,numpartner = 0 && enemynear,statetype = A
triggerall = (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(7013)
triggerall = p2stateno != 7022 && !numhelper(7021) && !numhelper(60402)
triggerall = var(55) = 1
triggerall = p2statetype != L && ctrl
triggerall = statetype = A
triggerall = ctrl && (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)
triggerall = p2stateno != 7003
trigger1 = p2bodydist X >= 100
trigger2 = random <= 150
trigger2 = p2stateno = [150,155]
triggerall = p2stateno != 7022 && numhelper(7021) = 0

[State -1, noobsaibot - shadow]
type = ChangeState
value = 6046
triggerall = var(20) = 4 || var(21) = 1
triggerall = var(55) = 1 && p2statetype != L
triggerall = random < 200 && numhelper(60461) = 0
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = statetype != A
trigger1 = ctrl && p2bodydist X >= 100
trigger2 = stateno = 100
trigger3 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,noobsaibot - teleportkick]
type = ChangeState
value = 6048
triggerall = var(20) = 4 || var(21) = 1
triggerall = p2stateno != 7022 && numhelper(7021) = 0
triggerall = var(55) = 1 && win = 0
triggerall = random < 200
trigger1 = statetype != A && ctrl && p2bodydist X >= 100
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)


;---------------------- ERMAC --------------------------------------
[State -1,AIermac - hado]
type = ChangeState
value = 6041
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 6 || var(21) = 1
triggerall = var(55) = 1
triggerall = random < 100 && (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(70181)
triggerall = p2bodydist X <= 30
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && movecontact) || ((stateno = [208,209]) && movecontact)

[State -1,AIermac, telkinetic slam]
type = ChangeState
value = 6042
triggerall = p2stateno != 7022 && !numhelper(7021)
triggerall = var(20) = 6 || var(21) = 1
triggerall = var(55) = 1 && var(2) <= 1 && (p2stateno != [7010,7011]) && (enemynear,stateno != 70004 && p2stateno != 70004 && target,stateno != 70004)
triggerall = random < 50
trigger1 = statetype != A && ctrl
trigger2 = (stateno = 10 || stateno = 12) || (stateno = [200,203]) || (stateno = [410,420]) || ((stateno = [8000,8003]) && anim != 6013 && movecontact) || ((stateno = [208,209]) && movecontact)
trigger3 = var(57) = 2 && (stateno = [700,713]) && movecontact || (var(57) = 3 && (stateno = [730,745]))

[State -1,AIermac - airHAdo]
type = ChangeState
value = 6043
triggerall = !var(2) && !numhelper(7013)
triggerall = var(20) = 6 || var(21) = 1
triggerall = command = "ERgreen" && (!var(2) || (var(2) && p2movetype = H && p2stateno = 7003)) && !numhelper(70181)
trigger1 = (statetype = A && ctrl) || (stateno = [600,620]) || stateno = 60400 || stateno = 6043
triggerall = var(55) = 1
triggerall = p2statetype != L
triggerall = p2bodydist X <= 50
triggerall = p2statetype = A
triggerall = random <= 200
triggerall = p2stateno != 7022 && numhelper(7021) = 0
