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

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 15

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
command.buffer.time = 1


;-| Super Motions |--------------------------------------------------------
;The following two have the same name, but different motion.
;Either one will be detected by a "command = TripleKFPalm" trigger.
;Time is set to 20 (instead of default of 15) to make the move
;easier to do.
;


;-| Special Motions |------------------------------------------------------
[Command]
name= "CrossingSkill"
command = ~D, DF, F, x+y+z
time=32
[Command]
name= "KiffaAter"
command = x+y+z
time=32
[Command]
name = "RegulusAurum1"
command = ~D, DF, F, x
time=16
[Command]
name = "RegulusAurum2"
command = ~D, DF, F, y
time=16
[Command]
name = "RegulusAurum3"
command = ~D, DF, F, z
time=16
[Command]
name = "AlNaslMinium1"
command = ~D, DB, B, x
time=16
[Command]
name = "AlNaslMinium2"
command = ~D, DB, B, y
time=16
[Command]
name = "AlNaslMinium3"
command = ~D, DB, B, z
time=16
[Command]
name = "Yukina"
command = /F, y+z
time=16
[Command]
name = "YukinaCounter"
command = y+z
time=16
[Command]
name = "Counter"
command = ~D, D, a
time=16
[Command]
name = "RegulusAurumEX"
command =~D,DF,F,D,DF,F,x+y
time=32
[Command]
name = "RegulusAurumEX"
command =~D,DF,F,D,DF,F,y+z
time=32
[Command]
name = "RegulusAurumEX"
command =~D,DF,F,D,DF,F,x+z
time=32
[Command]
name = "AlNaslMiniumEX"
command =~D,DB,B,D,DB,B,x+y
time=32
[Command]
name = "AlNaslMiniumEX"
command =~D,DB,B,D,DB,B,y+z
time=32
[Command]
name = "AlNaslMiniumEX"
command =~D,DB,B,D,DB,B,x+z
time=32

;-| 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 = "Blast"
command = a,a
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+y
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 = "Throw"
command = a
time = 1
;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

;-| Hold Button |--------------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1
[Command]
name = "hold_y"
command = /y
time = 1
[Command]
name = "hold_z"
command = /z
time = 1
[Command]
name = "hold_a"
command = /a
time = 1
[Command]
name = "hold_b"
command = /b
time = 1
[Command]
name = "hold_c"
command = /c
time = 1
[Command]
name = "hold_s"
command = /s
time = 1
;---------------------------------------------------------------------------
; 2. State entry
; --------------
; This is where you define what commands bring you to what states.
;
; Each state entry block looks like:
;   [State -1, Label]           ;Change Label to any name you want to use to
;                               ;identify the state with.
;   type = ChangeState          ;Don't change this
;   value = new_state_number
;   trigger1 = command = command_name
;   . . .  (any additional triggers)
;
; - new_state_number is the number of the state to change to
; - command_name is the name of the command (from the section above)
; - Useful triggers to know:
;   - statetype
;       S, C or A : current state-type of player (stand, crouch, air)
;   - ctrl
;       0 or 1 : 1 if player has control. Unless "interrupting" another
;                move, you'll want ctrl = 1
;   - stateno
;       number of state player is in - useful for "move interrupts"
;   - movecontact
;       0 or 1 : 1 if player's last attack touched the opponent
;                useful for "move interrupts"
;
; Note: The order of state entry is important.
;   State entry with a certain command must come before another state
;   entry with a command that is the subset of the first.
;   For example, command "fwd_a" must be listed before "a", and
;   "fwd_ab" should come before both of the others.
;
; For reference on triggers, see CNS documentation.
;
; Just for your information (skip if you're not interested):
; This part is an extension of the CNS. "State -1" is a special state
; that is executed once every game-tick, regardless of what other state
; you are in.


; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]

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

[State -1, Tick Fix]
type = CtrlSet
triggerAll = !ctrl
trigger1 = (StateNo = 52 || StateNo = 101 || StateNo = 5120) && !AnimTime
trigger2 = (StateNo = [200,499]) && !AnimTime && Anim != 251 
trigger3 = ((StateNo = [760,762]) || (StateNo = [700,715]) || (StateNo = [900,905])) && !AnimTime
trigger4 = (StateNo = 5001 || StateNo = 5011 || StateNo = 151 || StateNo = 153) && HitOver
value = 1

[State -1, CtrlSet For Helpers]
type = CtrlSet
trigger1 = IsHelper
value = 0

[State -1, Hit Count For Helpers]
type = ParentVarAdd
trigger1 = IsHelper
trigger1 = MoveHit = 1
trigger1 = !HitPauseTime
trigger1 = !(HitDefAttr = SCA, AT)
var(13) = 1

[State -1, Juggle Count For Helpers]
type = ParentVarAdd
trigger1 = IsHelper
trigger1 = MoveHit = 1
trigger1 = !HitPauseTime
trigger1 = !(HitDefAttr = SCA, AT)
var(15) = 1

;===========================================================================
;---------------------------------------------------------------------
[State -1, The 4th Primogenitor & Sword Shaman]
type=ChangeState
value=3300
triggerall=!AILevel && RoundState=2 && StateType != A &&var(20)<=0&& power >= 3000&&command ="CrossingSkill"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)

[State -1, Kiffa Ater]
type=ChangeState
value=3400
triggerall=!AILevel && RoundState=2 && StateType != A &&var(20)<=0&& power >= 3000&&command ="KiffaAter"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)

;===================================================;
;                   SUPER MOVES                     ;
;===================================================;

[State -1, EX Al-Nasl-Minium]
type=ChangeState
value=1250
triggerall=!AILevel && power >= 1000 && RoundState=2 && StateType != A &&numhelper = 0  &&command ="AlNaslMiniumEX"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6) || var(7)

[State -1, EX Regulus Aurum]
type=ChangeState
value=1050
triggerall=!AILevel && power >= 1000 && RoundState=2 && StateType != A &&numhelper = 0 &&command ="RegulusAurumEX"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6) || var(7)

[State -1, Regulus Aurum 3]
type=ChangeState
value=1002
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0 &&command ="RegulusAurum3"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Regulus Aurum 2]
type=ChangeState
value=1001
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0 &&command ="RegulusAurum2"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Regulus Aurum 1]
type=ChangeState
value=1000
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0 &&command ="RegulusAurum1"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Counter]
type=ChangeState
value=1100
triggerall=!AILevel && RoundState=2 && StateType != A &&command ="Counter"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Al-Nasl-Minium 3]
type=ChangeState
value=1202
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0  &&command ="AlNaslMinium3"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Al-Nasl-Minium 2]
type=ChangeState
value=1201
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0  &&command ="AlNaslMinium2"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Al-Nasl-Minium 1]
type=ChangeState
value=1200
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0  &&command ="AlNaslMinium1"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Yukina Counter Support]
type=ChangeState
value=1520
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0 && power>=1000 &&command ="YukinaCounter" && command != "holdfwd"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

[State -1, Yukina Support]
type=ChangeState
value=1500
triggerall=!AILevel && RoundState=2 && StateType != A &&numhelper = 0 && power>=1000 &&command ="Yukina"
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(5)

;===================================================;
;                  NORMAL MOVES                     ;
;===================================================;

[State -1, Standing Low Punch]
type=ChangeState
value=200
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command != "holddown"&& command="x"
trigger1=ctrl||stateno=[100,101]

[State -1, Standing Low Punch 2]
type=ChangeState
value=201
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command != "holddown"&& command="x"
trigger1=ctrl||stateno=[100,101]
trigger2=stateno=200&&movecontact

[State -1, Standing Low Punch 3]
type=ChangeState
value=202
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command != "holddown"&& command="x"
trigger1=ctrl||stateno=[100,101]
trigger2=stateno=201&&movecontact

[State -1, Standing Low Punch 4]
type=ChangeState
value=203
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command != "holddown"&& command="x"
trigger1=ctrl||stateno=[100,101]
trigger2=stateno=202&&movecontact

[State -1, Standing Medium Punch]
type=ChangeState
value=210
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command != "holddown"&& command="y"
trigger1=ctrl||stateno=[100,101]

[State -1, Standing Medium Punch 2]
type=ChangeState
value=211
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command != "holddown"&& command="y"
trigger1=ctrl||stateno=[100,101]
trigger2=stateno=210&&movecontact

[State -1, Crouching Low Punch]
type=ChangeState
value=400
triggerall=!AILevel&&Roundstate=2&&statetype != A&&command !="holddown"&& command="z"
trigger1=ctrl||stateno=[100,101]

;Air Dash
[State -1, Air Dash]
type = ChangeState
value = 60
triggerall = command = "FF"
triggerall = stateno != [60,69]
trigger1 = statetype !=S && ctrl

;Back Air Dash
[State -1, Back Air Dash]
type = ChangeState
value = 61
triggerall = command = "BB"
triggerall = stateno != [60,69]
trigger1 = statetype !=S && ctrl

; Run Forward
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

; Run Backward
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

; Jump
[State -1, Run Fwd]
type = ChangeState
value = 41
triggerall = movecontact && var(10)>0
trigger1 = command = "holdup"

;---------------------------------------------------------------------------
;Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = !ishelper
triggerall = !var(59)
triggerall = RoundState=2 && Alive
triggerall = command = "start"
trigger1 = statetype != A
trigger1 = ctrl
;------------------------------------------------------------------------
[State -1, Throw]
type=ChangeState
value =800
trigger1=(command="holdfwd"||command="holdback")&&(command="Throw")
trigger1=!AILevel&&RoundState=2 && Statetype!=A
trigger1=ctrl

[State -1, Fall Recovery (Air)]
type = ChangeState
value = 5210
trigger1 = AILevel && NumEnemy
trigger1 = RoundState = 2 && Alive
trigger1 = StateNo = 5050 && CanRecover
trigger1 = vel y > 0 && pos y < -20
trigger1 = Random < (25 * (var(59) ** 2 / 64.0))

[State -1, Fall Recovery (Ground)]
type = ChangeState
value = 5200
trigger1 = AILevel && NumEnemy
trigger1 = RoundState = 2 && Alive
trigger1 = StateNo = 5050 && GetHitVar(fall.recover)
trigger1 = vel y > 0 && pos y >= -20
trigger1 = Random < (100 * (var(59) ** 2 / 64.0))

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

[State -1, Blast]
type=ChangeState
value=2000
triggerall= Alive && power >= 1000 && command = "Blast"
trigger1=movetype = H
trigger1=stateno = 5000 && time > 0
trigger2=stateno = 5010 && time > 0
trigger3=stateno = 5020 && time > 0
trigger4=stateno = 5070 && time > 0
trigger5=stateno != 5000 && stateno != 5010 && stateno != 5020 && stateno != 5070
trigger5=stateno = [5001,5099]

[State -1, Power Charging]
type = ChangeState
value = 1700
triggerAll = !AILevel
trigger1 = command = "hold_a" && command != "holdfwd" && command != "holdback" && command != "holddown"
trigger1 = RoundState = 2 && StateType != A
trigger1 = power < const(data.power) && power < PowerMax
trigger1 = ctrl || (StateNo = [100,101])

;------------------------------------------------------
;AI
;------------------------------------------------------

[State -1, Fall Recovery (Air)]
type = ChangeState
value = 5210
trigger1 = AILevel && NumEnemy
trigger1 = RoundState = 2 && Alive
trigger1 = StateNo = 5050 && CanRecover
trigger1 = vel y > 0 && pos y < -20
trigger1 = Random < (25 * (var(59) ** 2 / 64.0))

[State -1, Fall Recovery (Ground)]
type = ChangeState
value = 5200
trigger1 = AILevel && NumEnemy
trigger1 = RoundState = 2 && Alive
trigger1 = StateNo = 5050 && GetHitVar(fall.recover)
trigger1 = vel y > 0 && pos y >= -20
trigger1 = Random < (100 * (var(59) ** 2 / 64.0))

[State -1, Guard]
type = ChangeState
value = 120
triggerall = AIlevel && numenemy
triggerall = roundstate = 2
triggerall = inguarddist
trigger1 = ctrl

[State -1, Grab]
type = ChangeState
value = 800
triggerall = AIlevel && numenemy
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2movetype != H
triggerall = p2bodydist X = [0,15]
trigger1 = ctrl

[State -1, Power Charge]
type = ChangeState
value = 1700
triggerAll = AILevel && NumEnemy
trigger1 = RoundState = 2 && StateType != A
trigger1 = Power < const(data.power)
trigger1 = ctrl && Power < const(data.power) && Power < PowerMax && PrevStateNo != 5120
trigger1 = !InGuardDist && P2BodyDist x >= 160 && Random < (50 * (AILevel ** 2 / 64.0))

;------------------------------------------------------------------------
[State -1, Standing Low Punch AI]
type = ChangeState
value = 200
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A
triggerall = (p2bodydist x = [0,100])&&(p2bodydist y = [-40,5])&&P2statetype != A&&P2statetype != C&&P2statetype != L
trigger1 = ctrl
trigger2 = (stateno = [100,101]) && random < 100
;---------------------------------------------------------------------------
[State -1, Standing Low Punch 2 AI]
type = ChangeState
value = 201
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != A && P2statetype != C
triggerall = (p2bodydist x = [0, 150]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = stateno = 200 && movecontact
;---------------------------------------------------------------------------
[State -1, Standing Low Punch 3 AI]
type = ChangeState
value = 202
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 150]) && (p2bodydist y = [ -80, 80]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = stateno = 201 && movecontact
;---------------------------------------------------------------------------
[State -1, Standing Low Punch 4 AI]
type = ChangeState
value = 203
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 150]) && (p2bodydist y = [ -20, 80]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = stateno = 202 && movecontact
;---------------------------------------------------------------------------
[State -1, Standing Medium Punch AI]
type = ChangeState
value = 210
triggerall = AILevel && numenemy&&roundstate=2&&statetype != A && (p2bodydist x >=0) && (p2bodydist y = [ -150, -80]) && p2statetype != L
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Standing Medium Punch 2 AI]
type = ChangeState
value = 211
triggerall = AILevel && numenemy&&roundstate=2&&statetype != A && (p2bodydist x >=0) && (p2bodydist y = [ -150, -50]) && p2statetype != L
trigger1 = stateno = 210 && movecontact
;---------------------------------------------------------------------------
[State -1, Crouch Light Punch AI]
type = ChangeState
value = 400
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist X = [100,200]) && (p2bodydist y = [ 0, 10]) && p2statetype = S && !(enemynear, hitfall)
trigger1 = ctrl
trigger2 = (stateno = [100,101]) && random = [0,449]
;---------------------------------------------------------------------------------------
[State -1, Jump]
type = ChangeState
value = 40
triggerall = AIlevel && numenemy && roundstate = 2 && statetype != A
triggerall = ctrl
triggerall = stateno != [40,65]
trigger1 = enemynear,statetype != A
trigger1 = (enemynear,numproj)||(enemynear,hitdefattr=SCA,AP)
trigger2 = enemynear,movetype = A
trigger2 = p2bodydist X = [0,500]
;--------------------------------------------------------------------
[State -1, Kiffa Ater]
type=ChangeState
value=3400
triggerall=AILevel && numenemy && RoundState=2 && StateType != A && power >= 3000 ;&& random < (500 * (var(59) ** 2 / 64.0))
triggerall=(enemynear,statetype != L)&&(enemynear,stateno!=[5100,5220])&&(p2bodydist x = [0,50])&&(p2bodydist y=[-150,5])&&(enemynear,stateno!=[120,155])
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=movehit&&random<250
;--------------------------------------------------------------------
[State -1, The 4th Primogenitor & Sword Shaman]
type=ChangeState
value=3300
triggerall=AILevel && numenemy && RoundState=2 && StateType != A && power >= 3000 ;&& random < (350 * (var(59) ** 2 / 64.0))
triggerall=(enemynear,statetype != L)&&(enemynear,stateno!=[5100,5220])&&(p2bodydist x >=120)&&(p2bodydist y=[-150,5])&&(enemynear,stateno!=[120,155])
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=movehit&&random<250
;---------------------------------------------------------------------------
[State -1, Yukina Support]
type = ChangeState
value = 1500
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = power >= 1000 && statetype != A
triggerall = p2bodydist X = [0, 50]
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2movetype != H
triggerall = enemynear,ctrl = 0
triggerall = enemynear,stateno != 100
triggerall = enemynear,stateno != [40,59]
triggerall = enemynear,statetype != L
triggerall = p2bodydist y = [0, -10]
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]
;---------------------------------------------------------------------------
[State -1, Yukina Counter Support]
type = ChangeState
value = 1520
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = power >= 1000 && statetype != A && random < (250 * (var(59) ** 2 / 64.0))
triggerall = facing != enemynear,facing
trigger1 = ctrl && random = [0,449]
trigger1 = p2movetype = A
trigger1 = p2bodydist X = [30,150]
trigger1 = p2bodydist Y = [-50,0]
trigger1 = enemynear, Vel X >= 0
trigger1 = enemynear, Vel Y >= 0
trigger2 = p2movetype = A
trigger2 = stateno = 100
trigger3 = (enemynear,numproj)||(enemynear,hitdefattr=SCA,AP)
;------------------------------------------------------------
[State -1, Counter]
type = ChangeState
value = 1100
triggerall = AIlevel && numenemy && roundstate = 2 && statetype != A
triggerall = facing != enemynear,facing
trigger1 = ctrl && random = [0,449]
trigger1 = p2movetype = A
trigger1 = p2bodydist X = [0,110]
trigger1 = p2bodydist Y = [-70,0]
trigger1 = enemynear, Vel X >= 0
trigger1 = enemynear, Vel Y >= 0
trigger2 = p2movetype = A
trigger2 = stateno = 100
trigger3 = (enemynear,numproj)||(enemynear,hitdefattr=SCA,AP)
;----------------------------------------------------------------------
[State -1, EX Regulus Aurum]
type=ChangeState
value= 1050
triggerall=AILevel && numenemy && RoundState=2 && StateType != A && power >= 1000
triggerall=(enemynear,statetype != L)&&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155]) && !(enemynear, hitfall)
triggerall=(p2bodydist x =[0,150])&&(p2bodydist y=[-10,5])&&(enemynear,statetype!=C)&&(enemynear,Movetype!=A)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=movehit&&random = [0,449]
;----------------------------------------------------------------------
[State -1, EX Al-Nasl-Minium]
type=ChangeState
value= 1250
triggerall=AILevel && numenemy && RoundState=2 && StateType != A && power >= 1000
triggerall=(enemynear,statetype = L)&&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155]) && !(enemynear, hitfall)
triggerall=(p2bodydist x =[0,150])&&(p2bodydist y=[-10,5])&&(enemynear,statetype!=C)&&(enemynear,Movetype!=A)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=movehit&&random = [0,449]
;---------------------------------------------------------------------------
[State -1, Regulus Aurum 1]
type = ChangeState
value = 1000
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = statetype != A
triggerall = p2bodydist X = [0, 100]
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2movetype != H
triggerall = p2bodydist y >= -10
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]
;---------------------------------------------------------------------------
[State -1, Regulus Aurum 2]
type = ChangeState
value = 1001
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = statetype != A
triggerall = p2bodydist X = [110, 170]
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2movetype != H
triggerall = p2bodydist y >= -10
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]
;---------------------------------------------------------------------------
[State -1, Regulus Aurum 3]
type = ChangeState
value = 1002
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = statetype != A
triggerall = p2bodydist X = [180, 220]
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2movetype != H
triggerall = p2bodydist y >= -10
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]
;---------------------------------------------------------------------------
[State -1, Al-Nasl-Minium 1]
type = ChangeState
value = 1200
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = statetype != A
triggerall = p2bodydist X = [0, 100]
triggerall = p2statetype != A
triggerall = p2statetype = L
triggerall = p2movetype != H
triggerall = p2bodydist y >= -10
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]
;---------------------------------------------------------------------------
[State -1, Al-Nasl-Minium 2]
type = ChangeState
value = 1201
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = statetype != A
triggerall = p2bodydist X = [110, 170]
triggerall = p2statetype != A
triggerall = p2statetype = L
triggerall = p2movetype != H
triggerall = p2bodydist y >= -10
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]
;---------------------------------------------------------------------------
[State -1, Al-Nasl-Minium 3]
type = ChangeState
value = 1202
triggerall = !numhelper
triggerall = AIlevel && numenemy
triggerall = statetype != A
triggerall = p2bodydist X = [180, 220]
triggerall = p2statetype != A
triggerall = p2statetype = L
triggerall = p2movetype != H
triggerall = p2bodydist y >= -10
trigger1 = ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101]) && random = [0,449]