; ***************************************************************************
 ; DOCTOR DOOM MARVEL SUPERHEROES - DEDICADO A LAS BUENAS PERSONAS DEL MUNDO
; ***************************************************************************

;-| Super Motions |--------------------------------------------------------

[Command]
name = "finalvictory"
command = ~D, DF, F, a+b
time = 15

[Command]
name = "super_explosion"
command = D, DF, F, x+y
time = 15

[Command]
name = "super_explosion"
command = D, DF, F, y+z
time = 15

[Command]
name = "super_explosion"
command = D, DF, F, x+z
time = 15

[Command]
name = "supermisil_4"
command = D, DF, F, c+x
time = 15

[Command]
name = "photon_array"
command = F, DF, D, DB, B, x+y
time = 30

[Command]
name = "photon_array"
command = F, DF, D, DB, B, y+z
time = 30

[Command]
name = "photon_array"
command = F, DF, D, DB, B, x+z
time = 30

;-| Special Motions |------------------------------------------------------

[Command]
name = "hikou"
command = D, DB, B, a+b

[Command]
name = "hikou"
command = D, DB, B, b+c

[Command]
name = "hikou"
command = D, DB, B, a+c


[Command]
name = "molecular_shield"
command =  F, DF, D, DB, B, a
time = 20

[Command]
name = "molecular_shield"
command =  F, DF, D, DB, B, b
time = 20

[Command]
name = "molecular_shield"
command =  F, DF, D, DB, B, c
time = 20

[Command]
name = "photon_shot"
command = F, DF, D, DB, B, x
time = 20

[Command]
name = "photon_shot"
command = F, DF, D, DB, B, y
time = 20

[Command]
name = "photon_shot"
command = F, DF, D, DB, B, z
time = 20

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

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

[Command]
name = "missil"
command =  D, DB, B, c

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

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

[Command]
name = "plasma_beam"
command =  D, DF, F, z

[Command]
name = "combo2"
command = ~D, DF,F,b
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

[Command]
name = "DU"
command = D, U
time = 10

[Command]
name = "DU"
command = D, UF
time = 10

[Command]
name = "DU"
command = D, UB
time = 10



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

[Command]
name = "combo_aereo"
command = a+b
time = 1

[Command]
name = "Counter"
command = a+b
time = 1

[Command]
name = "ac";Required (do not remove)
command = a+c
time = 1

[Command]
name = "teleport"
command = D, D
time = 10


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

;-| 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_a"
command = /$a
time = 1

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

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

;-| Dir |--------------------------------------------------------------
[Command]
Name= "fwd"
command = $F
time = 1

[Command]
Name= "back"
command = $B
time = 1

[Command]
Name= "up"
command = $U
time = 1

[Command]
Name= "down"
command = $D
time = 1


[Statedef -1]

;===========================================================================
;---------------------------------------------------------------------------
; Super Explosion
[State -1]
type = ChangeState
value = 2000
triggerall = power >= 1000
triggerall = command = "super_explosion"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = StateNo = 1100 || StateNo = 1150


; Photon Array
[State -1]
type = ChangeState
value = 2050
triggerall = power >= 1000
triggerall = numproj = 0
triggerall = command = "photon_array"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = StateNo = 1100 || StateNo = 1150

; Photon Array (Air)
[State -1]
type = ChangeState
value = 2060;7690
triggerall = numproj = 0
triggerall = power >= 1000
triggerall = command = "photon_array"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = StateNo = 1110 || StateNo = 1160 || StateNo = 656

; Missil 4
[State -1]
type = ChangeState
value = 2100
triggerall = power >= 1000
triggerall = command = "supermisil_4"
trigger1 = statetype = S
trigger1 = ctrl

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

; Hikou (Fly)
[State -1]
type = ChangeState
value = 8000
triggerall = command = "hikou" && stateno != 8001
trigger1 = power >= 1000
trigger1 = ctrl = 1

; Hikou End(Fly)
[State -1]
type = ChangeState
value = 50
triggerall = command = "hikou" && stateno = 8001
trigger1 = ctrl = 1

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

; Molecular Shield
[State -1]
type = ChangeState
value = 1000
triggerall = statetype !=A
triggerall = command = "molecular_shield"
trigger1 = statetype = S
trigger1 = ctrl

; Missil
[State -1]
type = ChangeState
value = 1050
triggerall = command = "missil"
trigger1 = statetype = S
trigger1 = ctrl

; Plasma Beam
[State -1]
type = ChangeState
value = 1100
triggerall = command = "plasma_beam"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact
trigger6 = stateno = 220 && MoveContact
trigger7 = stateno = 250 && MoveContact


; Plasma Beam (Air)
[State -1]
type = ChangeState
value = 1110
triggerall = NumHelper(1110)=0
triggerall = command = "plasma_beam"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = StateNo = 656

; Photon Shot
[State -1]
type = ChangeState
value = 1150
triggerall = command = "photon_shot"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact
trigger6 = stateno = 220 && MoveContact
trigger7 = stateno = 250 && MoveContact

; Photon Shot (Air)
[State -1]
type = ChangeState
value = 1160
triggerall = command = "photon_shot"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = StateNo = 656

; Teleport
[State -1]
type = ChangeState
value = 1200
triggerall = statetype = S
triggerall = command = "teleport"
trigger1 = ctrl = 1
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact
trigger6 = stateno = 220 && MoveContact
trigger7 = stateno = 250 && MoveContact

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

[State -1]
type = ChangeState
value = 1300
triggerall = statetype!=A
triggerall = statetype= S
triggerall = command = "Counter"
triggerall = ctrl = 1
trigger1 = stateno = 150
trigger2 = stateno = 151
trigger3 = stateno = 130

[State -1, Levantarse rapido adelante]
type = ChangeState
value = 6770
trigger1 = command = "holdfwd"
trigger1 = stateno = 5120
trigger1 = Time = 1

[State -1, levantarse rapido hacia atras]
type = ChangeState
value = 6771
trigger1 = command = "holdback"
trigger1 = stateno = 5120
trigger1 = Time = 1

; Charge Power
[State -1]
type = ChangeState
value = 1900
triggerall = power < 3000
trigger1 = command = "hold_a"
trigger1 = command = "hold_b"
trigger1 = command = "hold_c"
trigger1 = statetype = S
trigger1 = ctrl = 1


;---------------------------------------------------------------------------
; Kuuchuu Dash
[State -1, Dash Fwd]
type = ChangeState
value = 110
triggerall = StateNo != [100, 120]
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = command = "x" && command = "y" && command = "z"
; Dash cancel
trigger2 = StateNo = [200, 700]
trigger2 = command = "x" && command = "y" && command = "z"

;---------------------------------------------------------------------------
[State -1, Dash Fwd]
type = ChangeState
value = 100
triggerall = StateNo != 100 && StateNo != 8001
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "FF" || (command = "x" && command = "y" && command = "z" && command != "holdback")
; Dash cancel
trigger2 = StateNo = [200, 700]
trigger2 = command = "x" && command = "y" && command = "z" && command != "holdback"

;---------------------------------------------------------------------------
[State -1, Dash Back]
type = ChangeState
value = 105
triggerall = StateNo != 105 && StateNo != 8001
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "BB" || (command = "x" && command = "y" && command = "z" && command = "holdback") 
; Dash cancel
trigger2 = StateNo = [200, 700]
trigger2 = command = "x" && command = "y" && command = "z" && command = "holdback"

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

;Super Jump
[State -1, Super Jump]
type = ChangeState
value = 40
trigger1 = command = "DU"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = command = "holdup" && Var(3) = 0
trigger2 = stateno = 240
trigger2 = p2stateno = [500, 501]
trigger3 = command = "holdup" && Var(3) = 0
trigger3 = stateno = 420
trigger3 = p2stateno = [500, 501]

;---------------------------------------------------------------------------
[State -1, Throw 1]
type = ChangeState
value = 800
triggerall = command = "z"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 10
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 15
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

[State -1, Air Throw 1]
type = ChangeState
value = 850
triggerall = (command = "z")
triggerall = statetype = A
triggerall = ctrl
triggerall = (P2StateType = A) && (P2MoveType != H)
trigger1 = Command = "holdfwd"
trigger1 = (P2BodyDist X < 20) && (P2BodyDist Y = [-40,30])
trigger2 = Command = "holdback"
trigger2 = (P2BodyDist X < 25) && (P2BodyDist Y = [-40,30])

[State -1, Throw 2]
type = ChangeState
value = 900
triggerall = command = "c"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 10
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 15
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

[State -1, Air Throw 1]
type = ChangeState
value = 860
triggerall = (command = "c")
triggerall = statetype = A
triggerall = ctrl
triggerall = (P2StateType = A) && (P2MoveType != H)
trigger1 = Command = "holdfwd"
trigger1 = (P2BodyDist X < 20) && (P2BodyDist Y = [-40,30])
trigger2 = Command = "holdback"
trigger2 = (P2BodyDist X < 25) && (P2BodyDist Y = [-40,30])

;===========================================================================
;---------------------------------------------------------------------------
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand Light Punch
[State -1]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;Stand Medium Punch
[State -1]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact

;Stand Strong Punch
[State -1]
type = ChangeState
value = 220
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact

;---------------------------------------------------------------------------
;Stand Light Kick
[State -1]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;Stand Medium Kick
[State -1]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact

;Stand Strong Kick
[State -1]
type = ChangeState
value = 250
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact

;---------------------------------------------------------------------------
;Crouch Light Punch
[State -1]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;Crouch Medium Punch
[State -1]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 400 && MoveContact
trigger5 = stateno = 430 && MoveContact

;Crouch Strong Punch
[State -1]
type = ChangeState
value = 420
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact
trigger6 = stateno = 400 && MoveContact
trigger7 = stateno = 430 && MoveContact
trigger8 = stateno = 410 && MoveContact
trigger9 = stateno = 440 && MoveContact

;---------------------------------------------------------------------------
;Crouch Light Kick
[State -1]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;Crouch Medium Kick
[State -1]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 400 && MoveContact
trigger5 = stateno = 430 && MoveContact

;Crouch Strong Kick
[State -1]
type = ChangeState
value = 450
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 230 && MoveContact
trigger4 = stateno = 210 && MoveContact
trigger5 = stateno = 240 && MoveContact
trigger6 = stateno = 400 && MoveContact
trigger7 = stateno = 430 && MoveContact
trigger8 = stateno = 410 && MoveContact
trigger9 = stateno = 440 && MoveContact

;---------------------------------------------------------------------------
;Jump Light Punch
[State -1]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;Jump Medium Punch
[State -1]
type = ChangeState
value = 610
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && MoveContact
trigger3 = stateno = 630 && MoveContact

;Jump Strong Punch
[State -1]
type = ChangeState
value = 620
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && MoveContact
trigger3 = stateno = 630 && MoveContact
trigger4 = stateno = 610 && MoveContact
trigger5 = stateno = 640 && MoveContact

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && MoveContact

;Jump Medium Kick
[State -1]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && MoveContact
trigger3 = stateno = 630 && MoveContact
trigger4 = stateno = 610 && MoveContact

;Jump Strong Kick
[State -1]
type = ChangeState
value = ifelse(var(38)=1, 652, 650)
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && MoveContact
trigger3 = stateno = 630 && MoveContact
trigger4 = stateno = 610 && MoveContact
trigger5 = stateno = 640 && MoveContact

;===========================================================================
;---------------------------------------------------------------------------
; AI commands 

;------------------------------
[State -1, AI Activation]
type = varset
triggerall = AILevel > 2
triggerall = (roundstate = 2) && (var(39) = 0)
trigger1 = Random <= ((AILevel-2)*100)
v = 39
value = 1

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

[State -1, SuperJump AI]
type = VarSet
triggerall = p2life > 0
triggerall = var(39) = 1
triggerall = Random <= 399
triggerall = p2life > 0
v = 3
value = 1
trigger1 = stateno = 40 && Time = 0

[State -1] ; Launchers
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, 420, 240)
triggerall = var(39) = 1
triggerall = Random <= 399
triggerall = ctrl
triggerall = StateType = S || StateType = C 
trigger1 = P2BodyDist Y >= -10
trigger1 = P2BodyDist X <= 60

[State -1] ; Super Jump
type = ChangeState
value = 40
triggerall = var(39) = 1
triggerall = Random <= 899
triggerall = StateType != A 
triggerall = P2BodyDist Y >= -10
triggerall = P2BodyDist X <= 60
trigger1 = stateno = 420
trigger1 = p2stateno = [500, 501]
trigger2 = stateno = 240
trigger2 = p2stateno = [500, 501]

[State -1] ; Defence from projectiles
type = ChangeState
triggerall = p2life > 0
triggerall = var(39) = 1
triggerall = (StateType != A) && (StateType != L)
triggerall = (P2MoveType = A) && (P2StateType != A) && (enemy, NumProj >= 1)
triggerall = StateNo != 40
triggerall = random >= 400
trigger1 = Ctrl
value = 130

[State -1, A]
type = ChangeState
triggerall = var(39)=1
triggerall = Random <= 299
triggerall = p2life > 0
trigger1 = statetype = A && pos y < -45
value = ifelse(Random <= 499, 1110, 1160)
triggerall = numproj = 0
triggerall = power >= 1000
trigger1 = P2BodyDist X >=60
trigger1 = ctrl

[State -1, B]
type = ChangeState
triggerall = var(39)=1
triggerall = Random <= 299
triggerall = p2life > 0
triggerall = statetype = A && Pos Y < -45
value = ifelse(Random >= 499, 2060, 110)
triggerall = numproj = 0
triggerall = power >= 1000
trigger1 = P2BodyDist X >=60
trigger1 = ctrl

[State -1, C]
type = ChangeState
triggerall = Random < 299
triggerall = p2statetype !=L
triggerall = p2life > 0
triggerall = var(39) = 1
value = ifelse(Random <= 499, 2050, 2000)
triggerall = var(22)=0
triggerall = statetype !=L
triggerall = statetype !=A
triggerall = power >= 1000
triggerall = StateType = S || StateType = C
trigger1 = ctrl
trigger1 = P2BodyDist X >=30


[State -1, D]
type = ChangeState
triggerall = p2life > 0
triggerall = statetype !=A
value = ifelse(Random <= 300, 1150, 40)
triggerall = var(22)=0
;triggerall = power >= 1000
triggerall = var(39) = 1
triggerall = StateType = S || StateType = C
trigger1 = ctrl
trigger1 = P2BodyDist X >=30

[State -1, E]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, 800, 900)
triggerall = var(39)=1
triggerall = !Win
triggerall = StateType = S
trigger1 = ctrl
trigger1 = P2BodyDist X < 20
trigger1 = P2StateType = S || P2StateType = C
trigger1 = Random < 20

[State -1, F]
type = ChangeState
triggerall = p2life > 0
value = 240
triggerall = random >=499
triggerall = command = "b"
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = P2BodyDist X < 20
trigger1 = P2StateType = S || P2StateType = C


[State -1, G]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, 850, 860)
triggerall = var(39)=1
triggerall = !Win
triggerall = StateType = A
trigger1 = ctrl
trigger1 = P2BodyDist X < 20
trigger1 = P2StateType = A
trigger1 = Random < 50

[State -1, H]
type = ChangeState
triggerall = p2life >=200
value = ifelse(Random <= 499, 1200, 100)
triggerall = var(39)=1
triggerall = !Win
triggerall = StateType = S
triggerall = StateNo != 100
trigger1 = ctrl
trigger1 = P2BodyDist X = [100,200]
trigger1 = Random <= (150 - ifelse(Life < 265, 90, 0))
trigger2 = ctrl
trigger2 = P2MoveType = H
trigger2 = Random <= 300


[State -1, I]
type = ChangeState
triggerall = p2life > 0
triggerall = power <=1000
value = ifelse(Random <= 499, 100, 0)
triggerall = var(39)=1
triggerall = !Win
triggerall = StateType = S
triggerall = StateNo != 1200
triggerall = StateNo != 4800
trigger1 = ctrl
trigger1 = P2BodyDist X >= 200
trigger1 = Random <= (150 - ifelse(Life < 265, 90, 0))
trigger2 = ctrl
trigger2 = P2MoveType = H
trigger2 = Random <= 300

[State -1, Stand Defence]
type = ChangeState
triggerall = p2life > 0
triggerall = Var(39) = 1 
triggerall = Random < 499
value = ifelse(Random < 300, 1200, 130)
triggerall = P2movetype = A
triggerall = statetype != A
triggerall = P2statetype != C
trigger1 = ctrl
trigger2 = stateno = 52

[State -1, Crouch Defence]
type = ChangeState
value = 131
triggerall = p2life > 0
triggerall = Var(39) = 1
triggerall = random < 899
triggerall = P2movetype = A
triggerall = statetype != A
triggerall = P2statetype = C
trigger1 = ctrl
trigger2 = stateno = 52


[State -1, Jump Defence]
type = ChangeState
value =132
triggerall = p2life > 0
triggerall = Var(39) = 1 
triggerall = random < 899
triggerall = P2movetype = A
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 5210

[State -1]
type = ChangeState
value = 152
triggerall = p2life > 0
triggerall = var(39) = 1
triggerall = Statetype != A
triggerall = P2statetype = C
triggerall = P2Movetype = A
trigger1 = stateno = 150
trigger2 = stateno = 151

[State -1]
type = ChangeState
value = 150
triggerall = p2life > 0
triggerall = var(39) = 1
triggerall = Statetype != A
triggerall = P2statetype != C
triggerall = P2Movetype = A
trigger1 = stateno = 152
trigger2 = stateno = 153

[State -1]
type = ChangeState
value = 150
triggerall = p2life > 0
triggerall = var(39) = 1
triggerall = Statetype != A
triggerall = Pos Y > -1
triggerall = P2statetype != C
triggerall = P2Movetype = A
trigger1 = stateno = 154
trigger2 = stateno = 155

[State -1]
type = ChangeState
triggerall = p2life > 0
value = 152
triggerall = var(39) = 1
triggerall = Statetype != A
triggerall = Pos Y > -1
triggerall = P2statetype = C
triggerall = P2Movetype = A
trigger1 = stateno = 154
trigger2 = stateno = 155

;---------------
; Ground Combos
;---------------

[State -1, 1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random < 499, 200, 400)
triggerall = var(39) = 1 && ctrl
triggerall = StateType = S || StateType = C
trigger1 = P2BodyDist X <= 60
trigger1 = Random <= 899

[State -1, 1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random < 499, 230, 430)
triggerall = var(39) = 1 && ctrl
triggerall = StateType = S || StateType = C
trigger1 = P2BodyDist X <= 60
trigger1 = Random <= 499

[State -1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, ifelse(Random <= 699, 210, 410), ifelse(Random <= 499, 240, 440))
triggerall = var(39) = 1
trigger1 = StateNo = 200 || StateNo = 230 || StateNo = 400 || StateNo = 430
trigger1 = MoveHit
trigger1 = Random <= 399

[State -1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, ifelse(Random <= 499, 220, 420), ifelse(Random <= 399, 250, 450))
triggerall = var(39) = 1
trigger1 = StateNo = 210 || StateNo = 240 || StateNo = 410 || StateNo = 440
trigger1 = MoveHit
trigger1 = Random <= 399

[State -1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, 2000, 410)
triggerall = var(39)=1
trigger1 = StateNo = 200
trigger1 = MoveHit
trigger1 = Random <= 500
trigger2 = StateNo = 430 || StateNo = 230
trigger2 = MoveHit
trigger2 = Random <= 200

[State -1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, 240, 440)
triggerall = var(39)=1
trigger1 = StateNo = 200 || StateNo = 430
trigger1 = MoveHit
trigger1 = Random <= 400
trigger2 = StateNo = 210 || StateNo = 410
trigger2 = MoveHit
trigger2 = Random <= 300

[State -1]
type = ChangeState
value = ifelse(Random <= 499, 220, 420)
triggerall = p2life > 0
triggerall = var(39) = 1
trigger1 = StateNo = 200 || StateNo = 430
trigger1 = MoveHit
trigger1 = Random <= 100
trigger2 = StateNo = 240 || StateNo = 440
trigger2 = MoveHit
trigger2 = Random <= 499
trigger3 = StateNo = 210 || StateNo = 410
trigger3 = MoveHit
trigger3 = Random <= 125
trigger4 = StateNo = 230 || StateNo = 430
trigger4 = MoveHit
trigger4 = Random <= 125

[State -1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(P2BodyDist X >= 30, 250, 450)
triggerall = var(39) = 1
trigger1 = StateNo = 200 || StateNo = 430
trigger1 = MoveHit
trigger2 = StateNo = 240 || StateNo = 440
trigger2 = MoveHit
trigger3 = StateNo = 210 || StateNo = 410
trigger3 = MoveHit
trigger4 = StateNo = 230 || StateNo = 430
trigger4 = MoveHit


[State -1]
type = ChangeState
value = 3300
triggerall = p2life > 0
triggerall = var(22)=1
triggerall = var(39) = 1
triggerall = StateType = S || StateType = C
trigger1 = ctrl
trigger1 = P2BodyDist X <= 54
trigger1 = P2StateType = L
trigger1 = P2MoveType = H

[State -1]
type = ChangeState
triggerall = p2life > 0
value = ifelse(Random <= 499, 600, 630)
triggerall = var(39) = 1
triggerall = Random <= 899
trigger1 = StateNo = 50
trigger1 = P2BodyDist Y >= -10
trigger1 = P2BodyDist X <= 60

[State -1]
type = ChangeState
triggerall = p2life > 0
triggerall = var(39) = 1
value = ifelse(Random <= 799, 630, 650)
trigger1 = StateNo = 600
trigger1 = MoveHit

[State -1]
type = ChangeState
triggerall = p2life > 0
triggerall = var(39) = 1
value = ifelse(Random <= 499, 610, 640)
trigger1 = StateNo = 600 || StateNo = 630
trigger1 = MoveHit

[State -1]
type = ChangeState
triggerall = p2life > 0
triggerall = var(39) = 1
value = ifelse(Random <= 799, 640, 650)
trigger1 = StateNo = 610
trigger1 = MoveHit

[State -1]
type = ChangeState
triggerall = p2life > 0
triggerall = var(39) = 1
value = ifelse(Random <= 499, 620, 650)
trigger1 = StateNo = 610 || StateNo = 640
trigger1 = MoveHit

[State -1]
type = ChangeState
triggerall = p2life > 0
triggerall = power >= 1000
triggerall = var(39) = 1
value = ifelse(Random >= 499, 1110, 1160)
trigger1 = StateNo = 650
trigger1 = MoveHit

[State -1]
type = ChangeState
triggerall = p2life > 0
triggerall = Random < 100
triggerall = power >= 1000
triggerall = var(39)=1
value = ifelse(Random >= 499, 2060, 105)
trigger1 = StateNo = 650
trigger1 = MoveHit
