; ______________________________
;| Kagura from Azumanga Daioh   |
;|         by Wickydoo          |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;===================<COMMANDS>================
;-| Button Remapping |-----------------------------------------------------
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
command.time = 15
command.buffer.time = 5

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

;-| Hold Button |----------------------------------------------------------
[Command]
name = "holda"
command = /a
time = 1

[Command]
name = "holdb"
command = /b
time = 1

[Command]
name = "holdc"
command = /c
time = 1

[Command]
name = "holdx"
command = /x
time = 1

[Command]
name = "holdy"
command = /y
time = 1

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

[Command]
name = "holdstart"
command = /s
time = 1

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

;-| 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 = "superjump"     ;Required (do not remove)
command = $D, U
time = 15

[Command]
name = "superjumpforward"     ;Required (do not remove)
command = $D, UF
time = 15

[Command]
name = "superjumpbackward"     ;Required (do not remove)
command = $D, UB
time = 15

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

[Command]
name = "Sassy Basher"
command = ~D, DB, B, D, DB, B, x
time = 30

[Command]
name = "Crimson Rage"
command = ~D, DB, B, D, DB, B, z
time = 30

[Command]
name = "Counter Cut"
command = ~D, D, x+y
time = 20

[Command]
name = "Ash Kagura"
command = z
time = 1

[Command]
name = "Aerial Athlete"
command = ~D, DF, F, x+y
time = 30

[Command]
name = "182 shiki"
command = ~D, DF, F, D, DF, F, z
time = 25

;-| Special Motions |------------------------------------------------------
[Command]
name = "Uppercut"
command = /DB, y
time = 15

[Command]
name = "Flame Uppercut"
command = ~D, D, z
time = 15

[Command]
name = "Shisaatatsuku"
command = ~D, DB, B, x
time = 30

[Command]
name = "Sunburst"
command = ~D, DF, F, x
time = 30

[Command]
name = "Crimson Hook"
command = ~D, DF, F, y
time = 30

[Command]
name = "Fire Slide"
command = ~D, DF, F, z
time = 30

[Command]
name = "Sea Air Kick"
command = y+z
time = 10

;-----------------------AI Activation---------------------------
 [Command]
name = "cpu1"
command = U, U, U, U, F, B, B, F
time = 0
[Command]
name = "cpu2"
command = U, U, U, D, F, B, B, F
time = 0
[Command]
name = "cpu3"
command = U, U, D, D, F, B, B, F
time = 0
[Command]
name = "cpu4"
command = U, D, D, D, F, B, B, F
time = 0
[Command]
name = "cpu5"
command = D, D, D, D, F, B, B, F
time = 0
[Command]
name = "cpu6"
command = D, D, D, U, F, B, B, F
time = 0
[Command]
name = "cpu7"
command = D, D, U, U, F, B, B, F
time = 0
[Command]
name = "cpu8"
command = D, U, U, U, F, B, B, F
time = 0
[Command]
name = "cpu9"
command = U, D, U, U, F, B, B, F
time = 0
[Command]
name = "cpu10"
command = U, U, D, U, F, B, B, F
time = 0
[Command]
name = "cpu11"
command = D, U, U, D, F, B, B, F
time = 0
[Command]
name = "cpu12"
command = U, D, D, U, F, B, B, F
time = 0
[Command]
name = "cpu13"
command = D, U, D, U, F, B, B, F
time = 0
[Command]
name = "cpu14"
command = U, D, U, D, F, B, B, F
time = 0
[Command]
name = "cpu15"
command = F, F, F, F, F, B, B, F
time = 0
[Command]
name = "cpu16"
command = B, B, B, B, F, B, B, F
time = 0
[Command]
name = "cpu17"
command = F, B, F, F, F, B, B, F
time = 0
[Command]
name = "cpu18"
command = F, F, B, F, F, B, B, F
time = 0
[Command]
name = "cpu19"
command = B, F, F, F, F, B, B, F
time = 0
[Command]
name = "cpu20"
command = F, F, F, B, F, B, B, F
time = 0
[Command]
name = "cpu21"
command = F, B, B, F, F, B, B, F
time = 0
[Command]
name = "cpu22"
command = B, F, F, B, F, B, B, F
time = 0
[Command]
name = "cpu23"
command = F, B, F, B, F, B, B, F
time = 0
[Command]
name = "cpu24"
command = B, F, B, F, F, B, B, F
time = 0
[Command]
name = "cpu25"
command = D, F, D, F, F, B, B, F
time = 0
[Command]
name = "cpu26"
command = D, B, D, B, F, B, B, F
time = 0
[Command]
name = "cpu27"
command = D, B, D, F, F, B, B, F
time = 0
[Command]
name = "cpu28"
command = D, F, D, B, F, B, B, F
time = 0
[Command]
name = "cpu29"
command = U, F, D, B, F, B, B, F
time = 0
[Command]
name = "cpu30"
command = U, B, D, F, F, B, B, F
time = 0
[Command]
name = "cpu31"
command = B, D, F, U, F, B, B, F
time = 0
[Command]
name = "cpu32"
command = F, D, B, U, F, B, B, F
time = 0
[Command]
name = "cpu33"
command = U, U, U, U, F, B, B, F
time = 0
[Command]
name = "cpu34"
command = U, U, U, D, F, B, B, F
time = 0
[Command]
name = "cpu35"
command = U, U, D, D, F, B, B, F
time = 0
[Command]
name = "cpu36"
command = U, D, D, D, F, B, B, F
time = 0
[Command]
name = "cpu37"
command = D, D, D, D, F, B, B, F
time = 0
[Command]
name = "cpu38"
command = D, D, D, U, F, B, B, F
time = 0
[Command]
name = "cpu39"
command = D, D, U, U, F, B, B, F
time = 0
[Command]
name = "cpu40"
command = D, U, U, U, F, B, B, F
time = 0
[Command]
name = "cpu41"
command = U, D, U, U, F, B, B, F
time = 0
[Command]
name = "cpu42"
command = U, U, D, U, F, B, B, F
time = 0
[Command]
name = "cpu43"
command = D, U, U, D, F, B, B, F
time = 0
[Command]
name = "cpu44"
command = U, D, D, U, F, B, B, F
time = 0
[Command]
name = "cpu45"
command = D, U, D, U, F, B, B, F
time = 0
[Command]
name = "cpu46"
command = U, D, U, D, F, B, B, F
time = 0
[Command]
name = "cpu47"
command = F, F, F, F, F, B, B, F
time = 0
[Command]
name = "cpu48"
command = B, B, B, B, F, B, B, F
time = 0
[Command]
name = "cpu49"
command = F, B, F, F, F, B, B, F
time = 0
[Command]
name = "cpu50"
command = F, F, B, F, F, B, B, F
time = 0
[Command]
name = "cpu51"
command = B, F, F, F, F, B, B, F
time = 0
;---------------------------------------------------------------------------
; 2. State entry and AI entry
; --------------
; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]

;===========================================================================
;---------------------------------------------------------------------------
;AI Activation
[State -1, AI Deactivation]
type = VarSet
trigger1 = roundstate = 1
trigger2 = roundstate = 3
trigger3 = roundstate = 4
v = 7
value = 0

;AI Activation
[State -1, AI Activation]
type = VarSet
triggerall = roundstate = 2
trigger1 = command = "cpu1"
trigger2 = command = "cpu2"
trigger3 = command = "cpu3"
trigger4 = command = "cpu4"
trigger5 = command = "cpu5"
trigger6 = command = "cpu6"
trigger7 = command = "cpu7"
trigger8 = command = "cpu8"
trigger9 = command = "cpu9"
trigger10 = command = "cpu10"
trigger11 = command = "cpu11"
trigger12 = command = "cpu12"
trigger13 = command = "cpu13"
trigger14 = command = "cpu14"
trigger15 = command = "cpu15"
trigger16 = command = "cpu16"
trigger17 = command = "cpu17"
trigger18 = command = "cpu18"
trigger19 = command = "cpu19"
trigger20 = command = "cpu20"
trigger21 = command = "cpu21"
trigger22 = command = "cpu22"
trigger23 = command = "cpu23"
trigger24 = command = "cpu24"
trigger25 = command = "cpu25"
trigger26 = command = "cpu26"
trigger27 = command = "cpu27"
trigger28 = command = "cpu28"
trigger29 = command = "cpu29"
trigger30 = command = "cpu30"
trigger31 = command = "cpu31"
trigger32 = command = "cpu32"
trigger33 = command = "cpu33"
trigger34 = command = "cpu34"
trigger35 = command = "cpu35"
trigger36 = command = "cpu36"
trigger37 = command = "cpu37"
trigger38 = command = "cpu38"
trigger39 = command = "cpu39"
trigger40 = command = "cpu40"
trigger41 = command = "cpu41"
trigger42 = command = "cpu42"
trigger43 = command = "cpu43"
trigger44 = command = "cpu44"
trigger45 = command = "cpu45"
trigger46 = command = "cpu46"
trigger47 = command = "cpu47"
trigger48 = command = "cpu48"
trigger49 = command = "cpu49"
trigger50 = command = "cpu50"
trigger51 = command = "cpu51"
v = 7
value = 1
;===========================================================================
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440
trigger2 = movecontact
var(1) = 1
;===========================================================================
;Supers
;---------------------------------------------------------------------------
[State -1, Sassy Basher]
type = ChangeState
value = 1000
triggerall = command = "Sassy Basher" && var(7)=0 && statetype!=A && Power >= 1000
trigger1 = P2statetype != L && ctrl
trigger2 = stateno=220 && movecontact
trigger3 = stateno=231 && movecontact
trigger4 = stateno=250 && movecontact
trigger5 = stateno=251 && movecontact
;---------------------------------------------------------------------------
[State -1, 182 Shiki]
type = ChangeState
value = 1300
triggerall = command = "182 shiki" && var(7)=0 && statetype!=A && Power >= 1000
trigger1 = P2statetype!= L && ctrl
;---------------------------------------------------------------------------
[State -1, Crimson Rage]
type = ChangeState
value = 1500
triggerall = command = "Crimson Rage" && var(7)=0 && statetype!=A && Power >= 2000
trigger1 = P2statetype != L && ctrl
trigger2 = stateno=220 && movecontact
trigger3 = stateno=231 && movecontact
trigger4 = stateno=250 && movecontact
trigger5 = stateno=251 && movecontact
;---------------------------------------------------------------------------
[State -1, Counter Cut]
type = ChangeState
value = 1100
triggerall = command = "Counter Cut" && var(7)=0 && statetype!=A && Power >= 1000
trigger1 = P2statetype != L && ctrl
;---------------------------------------------------------------------------
[State -1, Ash Kagura]
type = ChangeState
value = 1400
triggerall = command = "Ash Kagura" && var(7)=0 && statetype!=A && Power >= 1000
trigger1 = ctrl && stateno = 1101 && time = [10,60]
;--------------------------------------------------------------------------
[State -1, Aerial Athlete]
type = ChangeState
value = 1200
triggerall = command="Aerial Athlete" && var(7)=0 && Power >= 1000 && statetype=A
trigger1 = ctrl = 1
trigger2 = (stateno = [600,649]) && movecontact
;===========================================================================
;Skills
;---------------------------------------------------------------------------
[State -1, Sunburst (lst punch)]
type = ChangeState
value = 230
triggerall = statetype!=A && var(7)=0 && command = "Sunburst"
trigger1 = ctrl = 1
trigger2 = (stateno = 200 && movecontact) || (stateno = 400 && movecontact)
;---------------------------------------------------------------------------
[State -1, Sunburst (2nd punch)]
type = ChangeState
value = 231
triggerall = statetype!=A && var(7)=0 && command = "Sunburst"
trigger1 = stateno = 230 && (time >= 11)
trigger2 = stateno = 230 && movecontact
;---------------------------------------------------------------------------
[State -1, Sunburst (3rd punch)]
type = ChangeState
value = 232
triggerall = statetype!=A && var(7)=0 && command = "Sunburst"
trigger1 = stateno = 231 && (time >= 13)
trigger2 = stateno = 231 && movecontact
;---------------------------------------------------------------------------
[State -1, Uppercut]
type = ChangeState
value = 240
triggerall = command = "Uppercut" && statetype!=A && var(7)=0
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Crimson Hook 1st swing]
type = ChangeState
value = 250
triggerall = StateType != A && var(7)=0 && command = "Crimson Hook"
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Crimson Hook 2nd swing]
type = ChangeState
value = 251
triggerall = command = "Crimson Hook" && var(7)=0 && StateType != A
trigger1 = stateno = 250 && movecontact
trigger2 = stateno = 250 && time = [16,24]
;---------------------------------------------------------------------------
[State -1, Fire Slide]
type = ChangeState
value = 800
triggerall = Numproj=0 && var(7)=0 && command="Fire Slide" && statetype!= A
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Shisaatatsuku]
type = ChangeState
value = 630
triggerall = command = "Shisaatatsuku" && var(7)=0 && StateType = S
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Sea Air Kick]
type = ChangeState
value = 640
triggerall = command = "Sea Air Kick" && var(7)=0 && StateType = A
trigger1 = ctrl
;===========================================================================
;Normal
;---------------------------------------------------------------------------
[State -1, Stand Light Attack]
type = ChangeState
value = 200
triggerall= command = "x" && var(7)=0 && command != "holddown" && statetype!=A
trigger1= ctrl
trigger2= stateno=200 && time>6 && movecontact
;---------------------------------------------------------------------------
[State -1, Stand Medium Attack]
type = ChangeState
value = 210
triggerall = command = "y" && var(7)=0 && command != "holddown" && statetype!=A
trigger1 = ctrl
trigger2=(stateno=200 && time>7 && movecontact)||(stateno=210 && time>10 && movecontact)
;---------------------------------------------------------------------------
[State -1, Stand Strong Attack]
type = ChangeState
value = 220
triggerall = command = "z" && var(7)=0 && command != "holddown" && statetype!=A
trigger1 = ctrl
trigger2=(stateno=200 && time>7 && movecontact)||(stateno=210 && time>10 && movecontact)
;---------------------------------------------------------------------------
[State -1, Crouch Light Attack]
type = ChangeState
value = 400
triggerall = command = "x" && var(7)=0 && command = "holddown" && statetype!=A
trigger1 = ctrl
trigger2 = stateno = 400 && time > 10
;---------------------------------------------------------------------------
[State -1, Crouching Medium Attack]
type = ChangeState
value = 410
triggerall = command = "y" && var(7)=0 && command = "holddown" && statetype!=A
trigger1 = ctrl
trigger2 = stateno = 400 && time > 10
;---------------------------------------------------------------------------
[State -1, Crouching Strong Attack]
type = ChangeState
value = 420
triggerall = command = "z" && var(7)=0 && command = "holddown" && statetype!=A
trigger1 = ctrl
trigger2 = stateno = 410 && time > 13
;---------------------------------------------------------------------------
[State -1, Jump Light Attack]
type = ChangeState
value = 600
triggerall = command="x" && var(7)=0 && statetype=A
trigger1 = ctrl
trigger2 = stateno = 610 && movecontact
;---------------------------------------------------------------------------
[State -1, Jump Medium Attack]
type = ChangeState
value = 610
triggerall = command="y" && var(7)=0 && statetype=A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
;---------------------------------------------------------------------------
[State -1, Jump Strong Attack]
type = ChangeState
value = 620
triggerall = command="z" && var(7)=0 && statetype=A
trigger1 = ctrl
trigger2 = (stateno=600 && movecontact) || (stateno=610 && movecontact)
;===========================================================================
;Misc
;---------------------------------------------------------------------------
;Hop Back
[State -1, Hop Back]
type = ChangeState
value = 105
triggerall = var(7)=0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1,Dodge Forward]
type = changestate
value = ifelse(command="holdfwd",3000,ifelse(command="holdback",3001,3000))
triggerall = roundstate=2 && (command="b") && statetype!= A && var(7)=0
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start" && var(7)=0 && statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, Charge]
type = changestate
value = 740
triggerall = var(7)=0
trigger1 = roundstate=2&&command="holda"&&statetype!=A&&power<powermax&&ctrl
;---------------------------------------------------------------------------
[State -1, Jump Launcher]
type = ChangeState
value = 10230
triggerall = var(7)=0
trigger1 = command = "holdup"
trigger1 = stateno = 240 && animelemtime(5) > 3 && movecontact
;---------------------------------------------------------------------------
[State -1, Super Jump Straight Up]
type = ChangeState
value = 10231
triggerall = var(7)=0
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjump"
;---------------------------------------------------------------------------
[State -1, Super Jump Forward]
type = ChangeState
value = 10232
triggerall = var(7)=0
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjumpforward"
;---------------------------------------------------------------------------
[State -1, Super Jump Backward]
type = ChangeState
value = 10233
triggerall = var(7)=0
trigger1 = statetype = S && ctrl && command = "superjumpbackward"
;---------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = var(7)=0
trigger1 = command = "FF" && StateType != A && ctrl
;===========================================================================
;Any name with AI in front is the AI move Definition
;---------------------------------------------------------------------------
;===========================================================================
;Supers
;---------------------------------------------------------------------------
[State -1, AI Sassy Basher]
type=changestate
value=1000
triggerall= var(7)=1 && roundstate=2 && statetype!=A && power>=1000
triggerall=!(enemynear,ctrl) && (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall=(p2bodydist x=[0,100]) && (enemynear,vel y>-1) && (enemynear,vel x>-2)
trigger1= ctrl && random < 50
trigger2= ((stateno=[200,220]))&& movehit && random<50
trigger3= ((stateno=[240,260]))&& movehit && random<50
persistent = 0
;---------------------------------------------------------------------------
[State -1, AI Counter Cut]
type = ChangeState
value = 1100
triggerall = random%130 = 0 && (p2dist x = [0,80]) && (p2dist y = [-50,0])
triggerall = var(7)=1 && statetype!= A && Power >= 1000
trigger1 = P2statetype != L && ctrl
;--------------------------------------------------------------------------
[State -1, AI Crimson Rage]
type = ChangeState
value = 1500
triggerall = random%150 = 0 && (p2dist x = [0,100]) && (p2dist y = [-50,0])
triggerall = (p2stateno != [120,150]) && enemy,command!="holdback" && p2movetype!=I
triggerall = var(7)=1 && statetype!= A && Power >= 2000 && StateType != A
trigger1 = P2statetype != L && ctrl && random < 50
trigger2= ((stateno=[200,220]))&& movehit && random<50
trigger3= ((stateno=[240,260]))&& movehit && random<50
;---------------------------------------------------------------------------
[State -1, AI Ash Kagura]
type = ChangeState
value = 1400
triggerall = random%14 = 0 && var(7) = 1 && Power >= 1000
trigger1 = stateno = 1101 && enemy,vel y > 1 && p2dist y < -140
;===========================================================================
;Skills
;---------------------------------------------------------------------------
[State -1, AI Sunburst (lst punch)]
type = ChangeState
value = 230
triggerall = p2movetype != H && !numhelper(230)
triggerall = random%100 < 1 && statetype!= A && var(7)=1
triggerall = (p2dist x = [0,100]) && (p2dist y = [-50,0])
trigger1 = ctrl = 1
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 400 && movecontact
;---------------------------------------------------------------------------
[State -1, AI Sunburst (2nd punch)]
type = ChangeState
value = 231
triggerall = !numhelper(231) && numhelper(230) && statetype!= A
triggerall = var(7)=1 && (p2dist x = [0,100]) && (p2dist y = [-50,0])
trigger1 = stateno = 230 && (time >= 11)
trigger2 = stateno = 230 && movecontact
;---------------------------------------------------------------------------
[State -1, AI Sunburst (3rd punch)]
type = ChangeState
value = 232
triggerall = !numhelper(232) && numhelper(231) && statetype!= A
triggerall = var(7)=1 && (p2dist x = [0,100]) && (p2dist y = [-50,0])
trigger1 = stateno = 231 && (time >= 13)
trigger2 = stateno = 231 && movecontact
;---------------------------------------------------------------------------
[State -1, AI Uppercut]
type=changestate
value=240
triggerall=var(7)=1&&statetype!=A&&roundstate=2
triggerall=(p2bodydist x=[0,60])&&p2statetype!=L
trigger1=ctrl&&random<50
trigger2=(stateno=200)||(stateno=400)&& movecontact
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Crimson Hook 1st swing]
type=changestate
value=250
triggerall=var(7)=1&&statetype!=A&&roundstate=2
triggerall=(p2bodydist x=[0,120])&&(p2bodydist y=[-50,0])&&(p2statetype!=L)
trigger1=ctrl&&random<50
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Crimson Hook 2nd swing]
type=changestate
value=251
triggerall=var(7)=1&&statetype!=A&&roundstate=2
triggerall=(p2bodydist x=[0,120])&&(p2bodydist y=[-50,0])&&(p2statetype!=L)
trigger1=stateno=250&&movecontact
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Fire Slide]
type = ChangeState
value = 800
triggerall = random%120 = 0 && Numproj = 0 && var(7)=1
triggerall = p2dist x > 160 && statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, AI Iron Elbow]
type=changestate
value=260
triggerall=var(7)=1&&statetype!=A&&roundstate=2
triggerall=(p2bodydist x=[0,40])&&(p2bodydist y=[-50,50])&&(p2statetype!=L)
trigger1=ctrl&&random<50
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Shisaatatsuku]
type=changestate
value=630
triggerall=var(7)=1&&statetype!=A&&roundstate=2
triggerall=(p2bodydist x=[0,70])&&(p2bodydist y=[-30,30])&&(p2statetype!=L)
trigger1=ctrl&&random<50
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Sea Air Kick]
type=changestate
value=640
triggerall=var(7)=1&&statetype=A&&roundstate=2
triggerall=(p2bodydist x=[0,120])&&(p2bodydist y=[-50,50])&&(p2statetype!=L)
trigger1=ctrl&&random<50
persistent=0
;===========================================================================
;Normal
;---------------------------------------------------------------------------
[State -1, AI Stand Light Attack]
type=changestate
value = 200
triggerall= var(7)=1&& statetype!=A && roundstate=2
triggerall=(p2bodydist x=[0,60])&&(p2bodydist y=[-50,50])&& p2statetype!=L
trigger1= ctrl && random<50
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Stand Medium Attack]
type=changestate
value = 210
triggerall = var(7)=1&& statetype!=A && roundstate=2
triggerall =(p2bodydist x=[0,60])&&(p2bodydist y=[-50,50])&&(p2statetype=S)
trigger1 = ctrl && random < 50
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Stand Strong Attack]
type = ChangeState
value = 220
triggerall = p2statetype != C && !numhelper(220) && numhelper(210)
triggerall = (p2dist x = [0,70]) && (p2dist y = [-50,0]) && var(7)=1 && statetype=S
trigger1 = ctrl
trigger2 = (stateno = 200) || (stateno = 210)
trigger2 = (time > 14) || (movecontact && time > 14)
;---------------------------------------------------------------------------
[State -1, AI Crouch Light Attack]
type = ChangeState
value = 400
triggerall = p2movetype != H && p2statetype != A && !numhelper(400)
triggerall = random%100 < 10 && (p2dist x = [0,70]) && (p2dist y = [-30,0])
triggerall = var(7)=1 && statetype = C
trigger1 = ctrl
trigger2 = (stateno = 410)
trigger2 = (time > 13) || (movecontact && time > 13)
;---------------------------------------------------------------------------
[State -1, AI Crouching Medium Attack]
type = ChangeState
value = ifelse(random%2 = 0,410,240)
triggerall = p2statetype != A && !numhelper(410) && numhelper(400)
triggerall = (p2dist x = [0,70]) && (p2dist y = [-30,0]) && var(7)=1 && statetype=C
trigger1 = ctrl
trigger2 = (stateno = 400)
trigger2 = (time > 21) || (movecontact && time > 21)
;---------------------------------------------------------------------------
[State -1, AI Crouching Strong Attack]
type = ChangeState
value = 420
triggerall = p2statetype != A && !numhelper(420) && numhelper(410)
triggerall = (p2dist x = [0,70]) && (p2dist y = [-30,0]) && var(7)=1 && statetype=C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 410)
;---------------------------------------------------------------------------
[State -1, AI Jump Light Attack]
type = ChangeState
value = 600
triggerall = !numhelper(600) && random%100 < 10 && statetype = A
triggerall = (p2dist x = [0,65]) && (p2dist y = [-56,60]) && var(7)=1
trigger1 = ctrl
trigger2 = stateno = 610 && movecontact
;---------------------------------------------------------------------------
[State -1, AI Jump Medium Attack]
type = ChangeState
value = 610
triggerall = !numhelper(610) && numhelper(600) && statetype = A
triggerall = (p2dist x = [0,75]) && (p2dist y = [-56,60]) && var(7)=1
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
;---------------------------------------------------------------------------
[State -1, AI Jump Strong Attack]
type = ChangeState
value = ifelse(power>1000&&random<150&&p2dist y<5=0&&(enemynear,vel y)<0,1200,620)
triggerall = !numhelper(620) && numhelper(610) && statetype = A
triggerall = (p2dist x = [0,75]) && (p2dist y = [-56,60]) && var(7)=1
trigger1 = ctrl
trigger2 = (stateno = 600 || stateno = 610) && movecontact
;===========================================================================
;Misc
;-------------------------------------------------------------------------
[State -1, AI Hop Back]
type = changestate
value = 105
trigger1= var(7)=1&& statetype=S && roundstate=2 && ctrl && random<200
trigger1=(stateno!=[100,105])&&enemynear,movetype=A&&backedgedist>120&&p2bodydist x<160
persistent=0
;-------------------------------------------------------------------------
[State -1, AI Dodge]
type = changestate
value = ifelse((backedgebodydist>40&&random<200),3001,ifelse(random<600,3000,3001))
trigger1 = var(7)=1 && roundstate=2 && statetype!= A && ctrl && random<250
trigger1 = enemynear,movetype=A && p2bodydist x<80
persistent = 0
;---------------------------------------------------------------------------
[State -1, AI Charge]
type = changestate
value = 740
triggerall = random%40=0 && statetype!=A && var(7)=1
trigger1 = roundstate=2 && p2dist x > 160 && power<powermax && ctrl
persistent = 0
;--------------------------------------------------------------------------
[State -1, AI Jump]
type = changestate
value = 40
triggerall = var(7)=1 && statetype!=A && roundstate=2 && ctrl
trigger1 = ctrl && p2bodydist x>160 && p2dist y<-100 && random<200
trigger2 = enemynear,movetype=A && p2bodydist x<160 && enemynear,hitdefattr=SC,AT
persistent=0
;--------------------------------------------------------------------------
[State -1, AI Ground Defend]
type = changestate
value = ifelse((enemynear,statetype=C),131,130)
trigger1 = var(7)=1 && statetype!=A && roundstate=2 && ctrl
trigger1 =!(enemynear,hitdefattr=SCA,AT)&& inguarddist && random<750
persistent = 0
;--------------------------------------------------------------------------
[State -1, AI Air Defend]
type = changestate
value = 132
trigger1 = var(7)=1 && statetype=A && roundstate=2 && ctrl
trigger1=!(enemynear,hitdefattr=SCA,AT)&&inguarddist&&random<750
persistent=0
;---------------------------------------------------------------------------
[State -1, AI Jump Launcher]
type = changestate
value = 10230
triggerall = var(7)=1
trigger1 = stateno = 240 && animelemtime(5) > 3 && movecontact
;----------------------------------------------------------------------------
[State -1, AI Run Fwd]
type=changestate
value=100
trigger1= var(7)=1 && statetype=S && roundstate=2 && ctrl && random<50
trigger1=(stateno!=[100,105])&& enemynear, movetype!=A && p2bodydist x>120
persistent=0
