; 관우(Guan Yu)
; http://ks100.ivyro.net
;-----------------------

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

;-| 인공지능 |------------------------------------------------------

[Command]
name = "AI0"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI1"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI2"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI3"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI4"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI5"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI6"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI7"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI8"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
time = 1

[Command]
name = "AI9"
command = U,D,F,F,B,B,F,D,B,D,F,U,U,U,U,F,D,B,D
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

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

[Command]
name = "recovery";Required (do not remove)
command = z
time = 1

[Command]
name = "Dodge";Required (do not remove)
command = x+y
time = 1

[Command]
name = "Dodge";Required (do not remove)
command = z
time = 1

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

[Command]
name = "down_b"
command = /$D,b
time = 1

[Command] ; 기모으기
name = "holdc"
command = /c
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 = "SuperMegaWind"
command = ~D, DB, B, D, DF, F, x+y
time = 30

[Command] ; 용제출해 약
name = "SuperMegaWind"
command = ~D, B, D, F, x+y
time = 30

[Command] ; 오룡출해 약
name = "MegaWindL"
command = ~D, DB, B, D, DF, F, x
time = 30

[Command] ; 오룡출해 약
name = "MegaWindL"
command = ~D, B, D, F, x
time = 30

[Command] ; 오룡출해 강
name = "MegaWindS"
command = ~D, DB, B, D, DF, F, y
time = 30

[Command] ; 오룡출해 강
name = "MegaWindS"
command = ~D, B, D, F, y
time = 30

[Command] ; 대유성관월
name = "SuperMegaAssult"
command = ~D, DB, B, D, DF, F, a+b
time = 30

[Command] ; 대유성관월
name = "SuperMegaAssult"
command = ~D, B, D, F, a+b
time = 30

[Command] ; 유성관월
name = "MegaAssult"
command = ~D, DB, B, D, DF, F, a
time = 30

[Command] ; 유성관월
name = "MegaAssult"
command = ~D, B, D, F, a
time = 30

[Command] ; 유성관월
name = "MegaAssult"
command = ~D, DB, B, D, DF, F, b
time = 30

[Command] ; 유성관월
name = "MegaAssult"
command = ~D, B, D, F, b
time = 30

[Command] ; 청룡뢰열참
name = "MegaUpper"
command = ~D, DF, F, D, DF, F, x
time = 30

[Command] ; 청룡뢰열참
name = "MegaUpper"
command = ~D, F, D, F, x
time = 30

[Command] ; 청룡뢰열참
name = "MegaUpper"
command = ~D, DF, F, D, DF, F, y
time = 30

[Command] ; 청룡뢰열참
name = "MegaUpper"
command = ~D, F, D, F, y
time = 30

;-| 기술 |------------------------------------------------------

[Command] ;청룡패미 약
name = "AssultL"
command = ~D, DF, F, a

[Command] ;청룡패미 강
name = "AssultS"
command = ~D, DF, F, b

[Command] ;청룡뢰참 약
name = "UpperL"
command = ~F, D, DF, x

[Command] ;청룡뢰참 강
name = "UpperS"
command = ~F, D, DF, y

[Command] ;청룡출해 약
name = "WindL"
command = ~D, DF, F, x

[Command] ;청룡출해 강
name = "WindS"
command = ~D, DF, F, y

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

;===========================================================================
; 기술조건
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Enable]
type = VarSet
triggerall = var(10) != 1
triggerall = movetype != H
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210
trigger2 = AnimElemtime(4) >=1
trigger2 = movecontact
trigger3 = stateno = 240
trigger3 = AnimElemtime(2) >=1
trigger3 = movecontact
trigger4 = stateno = 410
trigger4 = AnimElemtime(3) >=1
trigger4 = movecontact
trigger5 = stateno = 440
trigger5 = AnimElemtime(2) >=1
trigger5 = movecontact

trigger6 = stateno = 301
trigger6 = AnimElemtime(3) >=1
trigger6 = movecontact
var(1) = 1

[State -1, AI_Combo condition Enable]
type = VarSet
triggerall = var(10) = 1
triggerall = movetype != H
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210
trigger2 = AnimElemtime(4) >=1
trigger2 = movehit
trigger3 = stateno = 240
trigger3 = AnimElemtime(2) >=1
trigger3 = movehit
trigger4 = stateno = 410
trigger4 = AnimElemtime(3) >=1
trigger4 = movehit
trigger5 = stateno = 440
trigger5 = AnimElemtime(2) >=1
trigger5 = movehit

trigger6 = stateno = 301
trigger6 = AnimElemtime(3) >=1
trigger6 = movehit
var(1) = 1

[State -1, Combo condition Disable]
type = VarSet
triggerall = movetype = H
triggerall = statetype = A
trigger1 = !ctrl
trigger2 = stateno = 210
trigger2 = AnimElemtime(6) >= 0
trigger2 = movecontact
trigger3 = stateno = 240
trigger3 = AnimElemtime(4) >= 0
trigger3 = movecontact
trigger4 = stateno = 410
trigger4 = AnimElemtime(5) >= 0
trigger4 = movecontact
trigger5 = stateno = 440
trigger5 = AnimElemtime(2) >= 0
trigger5 = movecontact

trigger6 = stateno = 301
trigger6 = AnimElemtime(6) >= 0
trigger6 = movecontact
var(1) = 0

;===========================================================================
;---------------------------------------------------------------------------
;대유성관월 (초필살기)
[State -1, Super Mega Assult]
type = ChangeState
value = 1210
triggerall = command = "SuperMegaAssult"
triggerall = power >= 2000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;용제출해 (초필살기)
[State -1, Super Mega Wind]
type = ChangeState
value = 1300
triggerall = numproj = 0
triggerall = command = "SuperMegaWind"
triggerall = power >= 2000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;유성관월 (필살기)
[State -1, Mega Assult]
type = ChangeState
value = 1200
triggerall = command = "MegaAssult"
triggerall = power >= 1000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;오룡출해 약 (필살기)
[State -1, Mega Wind Light]
type = ChangeState
value = 1040
triggerall = numproj = 0
triggerall = command = "MegaWindL"
triggerall = power >= 1000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;오룡출해 강 (필살기)
[State -1, Mega Wind Strong]
type = ChangeState
value = 1050
triggerall = numproj = 0
triggerall = command = "MegaWindS"
triggerall = power >= 1000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;청룡뢰열참 (필살기)
[State -1, Mega Upper]
type = ChangeState
value = 1400
triggerall = command = "MegaUpper"
triggerall = power >= 1000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X <= 100
trigger2 = p2bodydist X > -20

;---------------------------------------------------------------------------
; 기모으기
[State -1, Charge] 
type = ChangeState
value = 1100
triggerall = command = "c"
triggerall = power < 3000
triggerall = var(10) != 1
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; 앞피하기
[State -1, Dodge Forward]
type = ChangeState 
value = 750
triggerall = command = "Dodge"
triggerall = command = "holdfwd"
trigger1 = statetype = S && ctrl
trigger2 = (stateno = 150 || stateno = 152) && power >= 500

;---------------------------------------------------------------------------
; 뒤피하기
[State -1, Dodge Backward]
type = ChangeState 
value = 751
triggerall = command = "Dodge"
triggerall = command = "holdback"
trigger1 = statetype = S && ctrl
trigger2 = (stateno = 150 || stateno = 152) && power >= 500

;---------------------------------------------------------------------------
; 제자리피하기
[State -1, Dodge Backward]
type = ChangeState
value = 752
triggerall = command = "Dodge"
triggerall = command != "holdfwd"
triggerall = command != "holdback"
trigger1 = statetype = S && ctrl
trigger2 = (stateno = 150 || stateno = 152) && power >= 500

;---------------------------------------------------------------------------
; 회피공격
[State -1, Dodge Attack]
type = ChangeState
value = 300
triggerall = command = "c"
triggerall = stateno = 752
triggerall = Animelemtime(2) >=0 && Animelemtime(3) < 0
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
; 가드캔슬
[State -1, Guard Cancel]
type = ChangeState
value = 301
triggerall = command = "c"
triggerall = (stateno = 150 || stateno = 152) && power >= 1000
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
; 청룡뢰참 약
[State -1, Light Upper]
type = ChangeState
value = 1000
triggerall = command = "UpperL"
triggerall = var(1)
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X <= 100
trigger2 = p2bodydist X > -20

;---------------------------------------------------------------------------
; 청룡뢰참 강
[State -1, Strong Upper]
type = ChangeState
value = 1001
triggerall = command = "UpperS"
triggerall = var(1)
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2bodydist X <= 100
trigger2 = p2bodydist X > -20

;---------------------------------------------------------------------------
;청룡패미 약
[State -1, Light Assult]
type = ChangeState
value = 1010
triggerall = command = "AssultL"
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;청룡패미 강
[State -1, Strong Assult]
type = ChangeState
value = 1011
triggerall = command = "AssultS"
triggerall = var(1) = 1
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;청룡출해 약
[State -1, Light Wind]
type = ChangeState
value = 1020
triggerall = numproj = 0
triggerall = command = "WindL"
triggerall = var(1)
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;---------------------------------------------------------------------------
;청룡출해 강
[State -1, Strong Wind]
type = ChangeState
value = 1030
triggerall = numproj = 0
triggerall = command = "WindS"
triggerall = var(1)
trigger1 = var(10) != 1
trigger2 = var(10) = 1
trigger2 = p2statetype != l
trigger2 = p2bodydist X > 0

;===========================================================================
;---------------------------------------------------------------------------
; 인공지능 발동
[state -1, AI_Enable]
type = varset
triggerall = var(10) != 1
trigger1 = command = "AI0"
trigger2 = command = "AI1"
trigger3 = command = "AI2"
trigger4 = command = "AI3"
trigger5 = command = "AI4"
trigger6 = command = "AI5"
trigger7 = command = "AI6"
trigger8 = command = "AI7"
trigger9 = command = "AI8"
trigger10 = command = "AI9"
var(10) = 1

;---------------------------------------------------------------------------
;인공지능 달리기
[State -1, AI_Run Fwd]
type = ChangeState
value = 100
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = var(10) = 1
triggerall = statetype != A
triggerall = random <= 50
trigger1 = p2bodydist X >= 100
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;인공지능 도망
[State -1, AI_Run Back]
type = ChangeState
value = 105
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = var(10) = 1
triggerall = statetype != A
triggerall = statetype = S
triggerall = BackEdgeBodyDist > 50
triggerall = ctrl
trigger1 = random <= 50
trigger1 = p2bodydist X < 100
trigger2 = random <= 250
trigger2 = FrontEdgeBodyDist < 50

;---------------------------------------------------------------------------
; 인공지능 피하기
[state -1, AI_DodgeF]
type = ChangeState
value = 750
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = var(10) = 1
triggerall = random <= 300
trigger1 = statetype != A
trigger1 = movetype != A
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 30
trigger1 = enemyNear, p2bodydist X > 0
trigger2 = (stateno = 150 || stateno = 152) && power >= 500
trigger2 = Life < 500
trigger2 = p2bodydist X <= 50
trigger3 = stateno = 100
trigger3 = p2movetype = A
trigger3 = p2bodydist X <= 100
trigger3 = enemyNear, p2bodydist X > 0

[state -1, AI_DodgeB]
type = ChangeState
value = 751
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = var(10) = 1
trigger1 = statetype != A
trigger1 = movetype != A
trigger1 = BackEdgeBodyDist > 50
trigger1 = ctrl
trigger1 = p2movetype != A
trigger1 = p2bodydist X > 100
trigger1 = p2bodydist X <= 200
trigger1 = random <= 250
trigger2 = (stateno = 150 || stateno = 152) && power >= 500
trigger2 = Life < 500
trigger2 = random <= 50

[state -1, AI_Dodge]
type = ChangeState
value = 752
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = var(10) = 1
triggerall = p2bodydist X <= 50
triggerall = random <= 300
trigger1 = statetype != A
trigger1 = movetype != A
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = enemyNear, p2bodydist X > 0
trigger2 = (stateno = 150 || stateno = 152) && power >= 500
trigger2 = Life < 500

;---------------------------------------------------------------------------
; 인공지능 회피공격
[State -1, AI_Dodge Attack]
type = ChangeState
value = 300
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = var(10) = 1
triggerall = stateno = 752
triggerall = Animelemtime(2) >=0 && Animelemtime(3) < 0
triggerall = p2bodydist X > 0
triggerall = p2bodydist X <= 50
triggerall = p2bodydist Y >= -60
trigger1 = p2movetype = A
trigger1 = random <= 500
trigger2 = p2movetype != A
trigger2 = random <= 200

;---------------------------------------------------------------------------
; 인공지능 가드캔슬
[State -1, AI_Guard Cancel]
type = ChangeState
value = 301
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = Life < 400
triggerall = var(10) = 1
trigger1 = (stateno = 150 || stateno = 152) && power >= 1000
trigger1 = p2bodydist X > 0
trigger1 = p2bodydist X <= 50
trigger1 = p2bodydist Y >= -50
trigger1 = random <= 250

;---------------------------------------------------------------------------
;인공지능 던지기
[State -1, AI_Throw]
type = ChangeState
value = 800
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = random <= 200
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = P2movetype != A
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2statetype != A
trigger1 = p2movetype != H

;---------------------------------------------------------------------------
;인공지능 서서 약손
[State -1, AI_Stand Light Punch]
type = ChangeState
value = 200
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = command != "holddown"
triggerall = random <= 400
triggerall = P2Life > 0
triggerall = p2bodydist X <= 25
triggerall = p2bodydist Y > -30
triggerall = p2bodydist X > 0
triggerall = p2statetype != L
triggerall = P2movetype != A
triggerall = statetype != a
triggerall = statetype = s
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 4
trigger3 = (stateno = 230) && time > 4

;---------------------------------------------------------------------------
;인공지능 서서 강손
[State -1, AI_Stand Strong Punch]
type = ChangeState
value = 210
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = command != "holddown"
triggerall = random <= 400
triggerall = P2Life > 0
triggerall = statetype != a
triggerall = statetype = s
triggerall = P2movetype != A
trigger1 = stateno = 200
trigger1 = AnimElem = 3, >=1
trigger1 = movehit
trigger2 = stateno = 230
trigger2 = movehit
trigger3 = ctrl
trigger3 = P2statetype = C
trigger3 = p2bodydist X <= 100
trigger3 = p2bodydist Y > -30
trigger3 = p2bodydist X > 0

;---------------------------------------------------------------------------
;인공지능 앉기
[State -1, AI_Crouching]
type = ChangeState
value = 10
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = P2Life > 0
triggerall = p2bodydist X <= 100
triggerall = p2bodydist Y > -15
triggerall = p2bodydist X > 0
triggerall = statetype = S
triggerall = statetype != a
triggerall = P2statetype != C
triggerall = P2movetype != A
trigger1 = ctrl
trigger1 = random <= 300
trigger2 = ctrl
trigger2 = p2statetype = L
trigger2 = p2bodydist X <= 100
trigger2 = random <= 400

;---------------------------------------------------------------------------
;인공지능 앉아서 약손
[State -1, AI_Crouching Light Punch]
type = ChangeState
value = 400
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = random <= 250
triggerall = P2Life > 0
triggerall = p2bodydist X <= 30
triggerall = p2bodydist Y > -15
triggerall = p2bodydist X > 0
triggerall = p2statetype != L
triggerall = statetype = C
triggerall = statetype != a
triggerall = P2movetype != A
trigger1 = ctrl
trigger2 = (stateno = 400) && time > 4
trigger3 = (stateno = 430) && time > 4

;---------------------------------------------------------------------------
;인공지능 앉아서 약발
[State -1, AI_Crouching Light Kick]
type = ChangeState
value = 430
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = random <= 300
triggerall = P2Life > 0
triggerall = p2bodydist X <= 15
triggerall = p2bodydist Y > -5
triggerall = p2bodydist X > 0
triggerall = statetype = C
triggerall = statetype != a
triggerall = P2movetype != A
trigger1 = ctrl
trigger2 = (stateno = 400) && time > 4
trigger3 = (stateno = 430) && time > 4

;---------------------------------------------------------------------------
;인공지능 앉아서 강손
[State -1, AI_Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = random <= 300
triggerall = P2Life > 0
triggerall = statetype = C
triggerall = statetype != a
triggerall = P2movetype != A
trigger1 = stateno = 400
trigger1 = movehit
trigger2 = stateno = 430
trigger2 = movehit

;---------------------------------------------------------------------------
;인공지능 앉아서 강발
[State -1, AI_Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = movetype != H
triggerall = var(10) = 1
triggerall = P2Life > 0
triggerall = statetype = C
triggerall = statetype != a
triggerall = P2movetype != A
trigger1 = random <= 250
trigger1 = stateno = 400
trigger1 = movehit
trigger2 = random <= 250
trigger2 = stateno = 430
trigger2 = movehit
trigger3 = ctrl
trigger3 = random <= 500
trigger3 = P2statetype != C
trigger3 = p2bodydist X <= 100
trigger3 = p2bodydist Y > -10
trigger3 = p2bodydist X > 0

;---------------------------------------------------------------------------
; 인공지능 대유성관월 (초필살기)
[State -1, AI_Super Mega Assult]
type = ChangeState
value = 1210
triggerall = power >= 2000
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = P2Life > 0
triggerall = random <= 500
triggerall = p2statetype != L
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 60
trigger1 = p2bodydist Y > -60

;---------------------------------------------------------------------------
; 인공지능 유성관월 (필살기)
[State -1, AI_Mega Assult]
type = ChangeState
value = 1200
triggerall = power >= 1000
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = P2Life > 0
triggerall = random <= 500
triggerall = p2statetype != L
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 150
trigger1 = p2bodydist Y > -60

;---------------------------------------------------------------------------
;인공지능 청룡뢰열참 (필살기)
[State -1, AI_Mega Upper]
type = ChangeState
value = 1400
triggerall = power >= 1000
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = P2Life > 0
triggerall = p2statetype != L
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
trigger1 = random <= 500
trigger1 = p2statetype = A
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 100
trigger1 = p2bodydist y >= -150
trigger2 = random <= 250
trigger2 = p2statetype != A
trigger2 = p2movetype = A
trigger2 = p2bodydist X <= 100
trigger2 = p2bodydist y >= -150

;---------------------------------------------------------------------------
; 인공지능 용제출해 (초필살기)
[State -1, AI_Super Mega Wind]
type = ChangeState
value = 1300
triggerall = numproj = 0
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = power >= 2000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = stateno != 100
triggerall = P2Life > 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X > 130
trigger1 = p2bodydist Y > -50
trigger1 = random <= 200

;---------------------------------------------------------------------------
; 인공지능 오룡출해 (필살기)
[State -1, AI_Mega Wind Light] ; 약
type = ChangeState
value = 1040
triggerall = numproj = 0
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = power >= 1000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = stateno != 100
triggerall = P2Life > 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X > 80
trigger1 = p2bodydist Y > -30
trigger1 = random <= 150

[State -1, AI_Mega Wind Strong] ; 강
type = ChangeState
value = 1050
triggerall = numproj = 0
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = power >= 1000
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = stateno != 100
triggerall = P2Life > 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X > 130
trigger1 = p2bodydist Y > -30
trigger1 = random <= 200

;---------------------------------------------------------------------------
; 인공지능 청룡뢰참
[state -1, AI_UpperL] ; 약
type = ChangeState
value = 1000
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = P2Life > 0
trigger1 = p2statetype = A
trigger1 = p2bodydist X <= 100
trigger1 = p2bodydist Y >= -170
trigger1 = random <= 500

[state -1, AI_UpperS] ; 강
type = ChangeState
value = 1001
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = P2Life > 0
trigger1 = p2movetype != H
trigger1 = p2statetype = A
trigger1 = p2bodydist X <= 100
trigger1 = p2bodydist y >= -170
trigger1 = random <= 100

;---------------------------------------------------------------------------
; 인공지능 청룡패미

[state -1, AI_AssultL] ; 약
type = ChangeState
value = 1010
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = p2statetype != L
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = P2Life > 0
trigger1 = ctrl = 0
trigger1 = p2statetype != L
trigger1 = p2bodydist X <= 100
trigger1 = p2bodydist Y > -60
trigger1 = random <= 100
trigger2 = p2statetype = C
trigger2 = p2bodydist X <= 100
trigger2 = p2bodydist Y > -60
trigger2 = random <= 100

[state -1, AI_AssultS] ; 강
type = ChangeState
value = 1011
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = P2Life > 0
triggerall = p2statetype != L
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
trigger1 = ctrl = 0
trigger1 = p2statetype != L
trigger1 = p2bodydist X <= 180
trigger1 = p2bodydist Y > -60
trigger1 = random <= 500
trigger2 = p2statetype = C
trigger2 = random <= 100
trigger2 = p2statetype != L
trigger2 = p2bodydist X <= 180
trigger2 = p2bodydist Y > -60

;---------------------------------------------------------------------------
; 인공지능 청룡출해
[state -1, AI_WindL] ; 약
type = ChangeState
value = 1020
triggerall = numproj = 0
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = stateno != 100
triggerall = P2Life > 0
trigger1 = p2bodydist X > 80
trigger1 = p2bodydist Y > -30
trigger1 = random <= 50

[state -1, AI_WindL] ; 강
type = ChangeState
value = 1030
triggerall = numproj = 0
triggerall = var(10) = 1
triggerall = var(1) = 1
triggerall = (stateno != [1040,1401])
triggerall = (stateno != [800,810])
triggerall = stateno != 100
triggerall = P2Life > 0
trigger1 = p2bodydist X > 130
trigger1 = p2bodydist Y > -30
trigger1 = random <= 100

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

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

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


;===========================================================================
;---------------------------------------------------------------------------
;서서 약손
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 4
trigger3 = (stateno = 230) && time > 4

;---------------------------------------------------------------------------
;서서 강손
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 4
trigger3 = (stateno = 230) && time > 4

;---------------------------------------------------------------------------
;서서 약발
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 4
trigger3 = (stateno = 230) && time > 4

;---------------------------------------------------------------------------
;서서 강발
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 4
trigger3 = (stateno = 230) && time > 4

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

;---------------------------------------------------------------------------
;앉아서 약손
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && time > 4
trigger3 = (stateno = 430) && time > 4

;---------------------------------------------------------------------------
;앉아서 강손
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && time > 4
trigger3 = (stateno = 430) && time > 4

;---------------------------------------------------------------------------
;앉아서 약발
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && time > 4
trigger3 = (stateno = 430) && time > 4

;---------------------------------------------------------------------------
;앉아서 강발
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) && time > 4
trigger3 = (stateno = 430) && time > 4

;---------------------------------------------------------------------------
;뛰어서 약손
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;뛰어서 강손
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;뛰어서 약발
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;뛰어서 강발
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking
