; Inteligencia Artificial - Inicio

[Statedef 9999]
anim = 9999
ctrl = 0

[State 9999, 0]
type = Turn
trigger1 = facing != parent, facing

[State 9999, 1]
type = Varset
trigger1 = 1
var(9) = parent, var(9)

[State 9999, 2]
type = ParentVarSet
triggerall = parent, RoundState = 2
trigger1 = parent, command = "x"
trigger2 = parent, command = "y"
trigger3 = parent, command = "z"
trigger4 = parent, command = "a"
trigger5 = parent, command = "holdfwd"
trigger6 = parent, command = "holdback"
trigger7 = parent, command = "holdup"
trigger8 = parent, command = "holddown"
var(9) = 1

[State 9999, 3]
type = ParentVarSet
triggerall = parent, RoundState = 2
trigger1 = (command = "x" && parent, command = "x")
trigger2 = (command = "y" && parent, command = "y")
trigger3 = (command = "z" && parent, command = "z")
trigger4 = (command = "a" && parent, command = "a")
trigger5 = (command = "holdfwd" && parent, command = "holdfwd")
trigger6 = (command = "holdback" && parent, command = "holdback")
trigger7 = (command = "holdup" && parent, command = "holdup")
trigger8 = (command = "holddown" && parent, command = "holddown")
var(9) = -1

[State 9999, 4]
type = varset
trigger1 = var(9) != parent, var(9)
V = 47
value = 0

[State 9999, 5]
type = VarAdd
trigger1 = var(9) = parent, var(9)
V = 47
value = 1

[State 9999, 6]
type = Destroyself
trigger1 = parent, var(9) = -1
trigger1 = var(47) >= 23
trigger2 = parent, var(9) = 2
trigger2 = var(47) >= 23
trigger3 = RoundState = 3

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

[State -2, Landing Explod]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52
trigger2 = stateno = 106
anim = 6003
ID = 6003
pos = 1,10
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1.2,1.2
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State -2, Running Explod]
type = Explod
triggerall = Time = 4
trigger1 = StateNo = 100
anim = 6002
ID = 6002
pos = -35,-25
postype = p1  ;p2,front,back,left,right
removetime = -2
facing = 1
vfacing = 1
bindtime = -1
vel = 2,0
accel = 0,0
random = 0,0
scale = 0.4,0.4
sprpriority = 0
ontop = 1
removeongethit = 1

[State -2,VarSet]
type = VarSet
trigger1 = life = 0
v = 2
value = 1



;===================================================================================
;---------------- Inteligencia Artificial  -----------------------------------------
;===================================================================================
[State -2, AI_Check] ; El ayudante siempre presente
type = Helper ; Ayudante
trigger1 = NumHelper(9999) = 0 ; No se repitira si esta presente ya
trigger1 = var(9) = 0 ; Variable que actúa como interruptor
trigger1 = RoundState = 2 ; Solo activado en combate
name = "AI activada" ; Nombre de la AI
id = 9999 ; Su identificador
pos = 1000, 1000 ; posición en su nivel muy alta
stateno = 9999 ; Te manda al stateno 9999
helpertype = normal ; Helper tipo normal
keyctrl = 1

; Con esto le digo cuando está activada
; en este caso, cuando la variable 9 es 1
;[State -2, AI prueba]
;type = VarSet ; Tipo variable
;trigger1 = command ="AI Prueba" ; Nombre del cmd
;var(9) = 1 ; Pone la variable a 9 a 1

;Con esto veo si la IA esta activada en el Debug mode
[State -2,3]
type = DisplayToClipboard ; Pone el nombre en el debug
trigger1 = var(9)=1 ; Condición para que ponga el texto
text = "La Inteligencia Artificial funca" ; Nombre del texto


; Con esto le digo cuando está desactivada
; en este caso, cuando la variable 9 es 0
;[State -2, AI desactivarlo]
;type = VarSet ; Tipo variable
;trigger1 = command ="AI desactivado" ; Nombre del cmd
;var(9) = 0

;Con esto veo si la IA esta desactivada en el Debug mode
[State -2,3]
type = DisplayToClipboard ; Pone el nombre en el debug
trigger1 = var(9)=0 ; Condición para que ponga el texto
text = "La Inteligencia Artificial desactivada" ; Nombre del texto

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


; IA de Defensa
[State -2, IA de Defensa]
type = ChangeState
value = 132
triggerall = p2movetype = A || (enemy, NumProj >= 1) ;
triggerall = P2bodydist X <= 40 || (enemy, NumProj >= 1)
triggerall = statetype = A ; Activo unicamente si estas en el Aire
triggerall = random <= 600 ; Aquí le ponemos un poco de aleteoriedad
triggerall = var(9) = 1 ; La variable que activa la AI
triggerall = ctrl
triggerall = stateno != 132
trigger1 = p2statetype = A
trigger2 = (enemy, NumProj >= 1)

[State -2, IA de Defensa]
type = ChangeState
value = 130
triggerall = p2movetype = A || (enemy, NumProj >= 1)
triggerall = P2bodydist X <= 40 || (enemy, NumProj >= 1)
triggerall = random <= 400
triggerall = statetype != A
triggerall = var(9) = 1
triggerall = ctrl
triggerall = stateno != 120
trigger1 = p2statetype = S
trigger2 = (enemy, NumProj >= 1)

;----------------------------------
;combos normales
[State -2, IA puño devil 1]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = P2bodydist X <= 20
triggerall = random = [600,700]
triggerall = statetype != A
triggerall = var(9) = 1
triggerall = ctrl
trigger1 = p2statetype = S
value = 200

[State -2, patada devil\puño fuerte]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype = S ;&& roundstate = 2
trigger1 = ctrl && statetype = S && p2dist X< 60 && random = [100,300]
trigger2 = stateno = 210 && movecontact && random = [100,300]
value = ifelse(random > 250, 230,200)

[State -2, puño fuerte/Patada fuerte]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype = S ;&& roundstate = 2
trigger1 = ctrl && statetype = S && p2dist X< 60 && random = [100,300]
trigger2 = stateno = 210 && movecontact && random = [100,300]
trigger3 = stateno = 230 && movecontact && random = [100,300]
value = ifelse(random > 250, 200,240)

[State -2, Patada fuerte]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype = S ;&& roundstate = 2
trigger1 = ctrl && statetype = S && p2dist X< 60 && random = [100,300]
trigger2 = stateno = 210 && movecontact && random = [100,300]
trigger3 = stateno = 230 && movecontact && random = [100,300]
trigger4 = stateno = 200 && movecontact && random = [100,300]
trigger5 = stateno = 201 && movecontact && random = [100,300]
value = 240

[State -2, puño abajo\patada abajo]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype = S
trigger1 = ctrl && statetype = S && p2dist X< 60 && random = [100,200]
trigger2 = stateno = 210 && movecontact && random = [100,300]
trigger3 = stateno = 230 && movecontact && random = [100,300]
trigger4 = stateno = 200 && movecontact && random = [100,300]
trigger5 = stateno = 201 && movecontact && random = [100,300]
value = ifelse(random < 150, 410,440)

[State -2, Whip Comand]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype = S
trigger1 = ctrl && statetype = S && p2dist X< 60 && random = [100,300]
trigger2 = stateno = 210 && movecontact && random = [100,300]
trigger3 = stateno = 230 && movecontact && random = [100,300]
trigger4 = stateno = 200 && movecontact && random = [100,300]
trigger5 = stateno = 201 && movecontact && random = [100,300]
trigger6 = stateno = 240 && movecontact && random = [100,300]
trigger7 = stateno = 241 && movecontact && random = [100,300]
trigger8 = stateno = 410 && movecontact && random = [100,300]
trigger9 = stateno = 440 && movecontact && random = [100,300]
value = 300

[State -2, combos Agachado - basicos]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype != A
trigger1 = ctrl && p2dist X< 60 && random = [100,300]
trigger2 = stateno = 400 && movecontact && random = [100,300]
trigger3 = stateno = 430 && movecontact && random = [100,300]
value =  ifelse(random < 150, 410,440)

[State -2, combos saltando - basicos]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1  && statetype = A
trigger1 = ctrl && p2dist X< 60 && random = [100,200]
trigger2 = stateno = 600 && movecontact && random = [100,300]
trigger3 = stateno = 630 && movecontact && random = [100,300]
value = ifelse(random < 150, 610,640)


;----------------------------------------
;----------------------------------------
;Buu combo inicio
[State -2, Buu combo inicio]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = var(9) = 1
triggerall = pos y >= -10
triggerall = ctrl && statetype = S
trigger1 = P2bodydist X >= 100 && random = [500,600]
trigger2 = stateno = 210 && movecontact && random = [0,35]
trigger3 = stateno = 230 && movecontact && random = [0,35]
trigger4 = stateno = 200 && movecontact && random = [0,35]
trigger5 = stateno = 201 && movecontact && random = [0,35]
trigger6 = stateno = 240 && movecontact && random = [0,35]
trigger7 = stateno = 241 && movecontact && random = [0,35]
trigger8 = stateno = 410 && movecontact && random = [0,35]
trigger9 = stateno = 440 && movecontact && random = [0,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [0,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [0,35]
value = ifelse(random < 580, 1100, 1140)

;Buu combo 2do hit - Uppercut/gancho bajo
[State -2, Buu combo 2do hit - Uppercut/gancho bajo]
type = ChangeState
triggerall = var(9) = 1
trigger1 = stateno = 1100 && movecontact && random = [0,10]
value = ifelse(random < 5, 1130, 1110)

;Buu combo 2do hit - Patada arriba/parada adelante
[State -2, Buu combo 2do hit - Uppercut/gancho bajo]
type = ChangeState
triggerall = var(9) = 1
trigger1 = stateno = 1100 && movecontact && random = [0,10]
value = ifelse(random < 5, 1150, 1160)


;Buu combo Remate - Patada adelante/ masazo
[State -2, Buu combo Remate - Patada adelante/ masazo]
type = ChangeState
triggerall = var(9) = 1
trigger1 = stateno = 1150 && movecontact && random = [0,10]
trigger2 = stateno = 1110 && movecontact && random = [0,10]
value = ifelse(random < 5, 1160, 1120)

[State -2, Bola]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = var(9) = 1
triggerall = pos y >= -10
triggerall = ctrl && statetype = S
trigger1 = P2bodydist X >= 100 && random = [500,800]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
value = ifelse(P2dist y <= 30, 1200, 1250)


[State -2, Envolver alto]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = var(9) = 1
triggerall = pos y >= -10
triggerall = ctrl && statetype = S
trigger1 = P2bodydist X >= 100 && random = [500,600]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 1300

[State -2, Envolver largo]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = var(9) = 1
triggerall = pos y >= -10
triggerall = ctrl && statetype = S
trigger1 = P2bodydist X >= 100 && random = [500,600]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 1310

[State -2 P2 Envuelto, - Absoción de Ki - Golpes - Explosión]
type = ChangeState
triggerall = var(9) = 1
triggerall = stateno = 1350
trigger1 = random = [0,50]
value = ifelse(Power < 400, 1367, ifelse(random > 20, 1359, ifelse(Life > 500, 1369,1350)))

[State -2, Trampa de Goma]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = var(9) = 1
triggerall = pos y >= -10
triggerall = ctrl && statetype = S
trigger1 = P2bodydist X >= 100 && random = [500,800]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
value = ifelse(random < 700, 1400, 1405)

[State -1, Trampa de Goma - Llamado A la goma]
type = ChangeState
triggerall = var(9) = 1
triggerall = command = "Trampa de Goma - Corta" || command = "Trampa de Goma - Larga"
Triggerall = p2stateno = 1480
triggerall = Numhelper(1450) = 1 || Numhelper(1451) = 1
trigger1 = statetype != A
value = 1410

[State -2, Whip agarre]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = var(9) = 1
triggerall = pos y >= -10
triggerall = ctrl && statetype = S
trigger1 = P2bodydist X >= 100 && random = [500,800]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
value = ifelse(random < 700, 1500, 1550)

[State -2,Combo patadas en el aire]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = pos y <= -50
triggerall = var(9) = 1
triggerall = ctrl && statetype = A && pos Y <= -50
trigger1 = random = [500,600]
trigger2 = stateno = 610 && movecontact && random = [100,200]
trigger3 = stateno = 640 && movecontact && random = [100,200]
trigger4 = stateno = 500 && movecontact && random = [100,200]
trigger5 = stateno = 530 && movecontact && random = [100,200]
trigger6 = (stateno = 1201) && (Time >= 5) && random = [20,35]
value = 1600

[State -2, Combo patadas en el aire - remate]
type = ChangeState
triggerall = var(9) = 1
triggerall = stateno = 1600 && (time > 40)
trigger1 = random = [0,20]
value = 1620
;-----------------------------------------------
;Speciales de ki

[State -2, Mouth Vapor]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl && statetype != A
triggerall = power >= 1000
trigger1 = P2bodydist x <= 100 && random = [900,999]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 2100


[State -2, Grito]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl && statetype != A
triggerall = power >= 1000
trigger1 = P2bodydist x <= 100 && random = [900,999]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 2200

[State -2, Triple Ball]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = stateno < 5000
triggerall = pos y <= -50
triggerall = power >= 1000
triggerall = var(9) = 1
triggerall = ctrl && statetype = A && pos Y <= -50
trigger1 = random = [500,600]
trigger2 = stateno = 610 && movecontact && random = [100,200]
trigger3 = stateno = 640 && movecontact && random = [100,200]
trigger4 = stateno = 500 && movecontact && random = [100,200]
trigger5 = stateno = 530 && movecontact && random = [100,200]
trigger6 = (stateno = 1201) && (Time >= 5) && random = [20,35]
trigger7 = stateno = 991 && random = [999,900]
value = 2300


;fireball
[state -2]
type = changestate
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1 && power >= 100
triggerall = random = [900,999]
triggerall = ctrl
triggerall = pos y >= -2
trigger1 = P2bodydist X >= 200
value = 1000
;fireball  2
[state -2]
type = changestate
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1 && power >= 100
trigger1 = stateno = 1000 && time > 15 && random = [100,200]
value = 1001
;fireball  3
[state -2]
type = changestate
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1 && power >= 100
trigger1 = stateno = 1001 && time > 15 && random = [100,200]
value = 1002

;----------------------------------------
;Supers

[State -2, Buu Pimball]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl && statetype != A
triggerall = power >= 1000
trigger1 = P2bodydist x >= 100 && random = [300,800]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = ifelse(random < 400, 3000, 3050)

[State -2, Mouth Blast]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl && statetype != A
triggerall = power >= 1000
trigger1 = P2bodydist x >= 100 && random = [300,800]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 3100

[State -2, Genocide Ball]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl
triggerall = power > 1000
trigger1 = Statetype != A && random = [600,800]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 3300

[State -2, Convertir en Chocolate]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1130 || stateno != 1140 || stateno != 1150 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1520 || stateno != 1550 || stateno != 1570
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl && statetype = A && pos Y <= -50
triggerall = power > 2000
trigger1 = random = [500,600]
trigger2 = stateno = 610 && movecontact && random = [100,200]
trigger3 = stateno = 640 && movecontact && random = [100,200]
trigger4 = stateno = 500 && movecontact && random = [100,200]
trigger5 = stateno = 530 && movecontact && random = [100,200]
trigger6 = (stateno = 1201) && (Time >= 5) && random = [20,35]
trigger7 = stateno = 991 && random = [999,900]
value = 3400

[State -2, Buu Explosion]
type = ChangeState
triggerall = stateno != 3000 || stateno != 3001 || stateno != 3002 || stateno != 3003 || stateno != 3005 || stateno != 3050   ; esto es para que no corte los supers
triggerall = stateno != 3100 || stateno != 3105 || stateno != 3110 || stateno != 3160 || stateno != 3170
triggerall = stateno != 3300 || stateno != 3301 || stateno != 3305
triggerall = stateno != 3400
triggerall = stateno != 3500 || stateno != 3501
triggerall = stateno != 2100 || stateno != 2200 || stateno != 2300
triggerall = stateno != 2000 || stateno != 2001 || stateno != 2002
triggerall = stateno != 1000 || stateno != 1001 || stateno != 1002
triggerall = stateno != 1100 || stateno != 1110 || stateno != 1140 || stateno != 1160
triggerall = stateno != 1200 || stateno != 1250
triggerall = stateno != 1300 || stateno != 1310 || stateno != 1350 || stateno != 1359 || stateno != 1360 || stateno != 1367 || stateno != 1368 || stateno != 1369 || stateno != 1370
triggerall = stateno != 1400 || stateno != 1405 || stateno != 1410 || stateno != 1420
triggerall = stateno != 1500 || stateno != 1510 || stateno != 1550
triggerall = stateno != 1600 || stateno != 1620
triggerall = var(9) = 1
triggerall = ctrl && statetype != A
triggerall = power >= 3000
trigger1 = random = [100,600]
trigger2 = stateno = 210 && movecontact && random = [20,35]
trigger3 = stateno = 230 && movecontact && random = [20,35]
trigger4 = stateno = 200 && movecontact && random = [20,35]
trigger5 = stateno = 201 && movecontact && random = [20,35]
trigger6 = stateno = 240 && movecontact && random = [20,35]
trigger7 = stateno = 241 && movecontact && random = [20,35]
trigger8 = stateno = 410 && movecontact && random = [20,35]
trigger9 = stateno = 440 && movecontact && random = [20,35]
trigger10 = (stateno = 300) && (Time > 12) && random = [20,35]
trigger11 = (stateno = 301) && (Time > 5) && random = [20,35]
trigger12 = stateno = 1150 && movecontact && random = [0,20]
trigger13 = stateno = 1130 && movecontact && random = [0,20]
trigger14 = (stateno = 1520) && (Time >= 42) && random = [0,20]
trigger15 = (stateno = 1570) && (Time >= 13) && random = [0,20]
value = 3500

[State -2, terminación]
type = VarAdd
trigger1 =  p2life = 0
v =  9
value = 0
;ignorehitpause =
;persistent =



;-------------------------------- Inteligencia Artificial --------------------------------------------
;Run Forward
;[State -3:		ChangeState]
;type = ChangeState
;triggerall = (Var(9) = 1) && (StateType != A) && (StateNo != [100,101]) && (P2MoveType != A) && (EnemyNear, NumProj = 0) && (StateNo != [3000,3400])
;triggerall = random = [300,400]
;trigger1 = (P2BodyDist X > 75) && (EnemyNear, Pos Y = 0) && (EnemyNear, Anim = 5300) && (P2MoveType != A)
;trigger2 = ((P2Dist X > 150) || ((P2Dist X > 75) && (P2StateNo = 105)))
;value = 100

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

;===============================================================================
[Statedef -3]
;===============================================================================

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = S40, 1

[State -3, Running Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = StateNo = 100
value = S2,0

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno != 1005
channel = 5


[State -3, Null]
type = Null
;triggerall = (PalNo = [7,12])
trigger1 = (RoundState = 2) && ((Command = "AI2") || (Command = "AI3") || (Command = "AI4") || (Command = "AI5"))
trigger1 = (var(9) := 1)
trigger2 = (RoundState = 2) && ((Command = "AI6") || (Command = "AI7") || (Command = "AI8") || (Command = "AI9") || (Command = "AI10"))
trigger2 = (Var(9) := 1)
trigger3 = ((!Time) * (TicksPerSecond)) && (IsHomeTeam) && (NumEnemy = 1) && (!NumPartner) && (TeamSide = 2) && (Alive)
trigger3 = (Var(9) := 1)
trigger4 = (RoundState = 2) && ((Command = "AI11") || (Command = "AI12") || (Command = "AI13") || (Command = "AI14"))
trigger4 = (Var(9) := 1)





