; 황충
; 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 = "Mega1"
command = ~D, DF, F, D, DF, F, a
time = 30

[Command] ; 맹룡과강
name = "Mega1"
command = ~D, F, D, F, a
time = 30

[Command] ; 맹룡과강
name = "Mega1"
command = ~D, DF, F, D, DF, F, b
time = 30

[Command] ; 맹룡과강
name = "Mega1"
command = ~D, F, D, F, b
time = 30

[Command] ; 만적영심
name = "SMega"
command = ~D, DF, F, D, DF, F, x+y
time = 30

[Command] ; 만적영심
name = "SMega"
command = ~D, F, D, F, x+y
time = 30

[Command] ; 백보영양
name = "Mega2L"
command = ~D, DF, F, D, DF, F, x
time = 30

[Command] ; 백보영양
name = "Mega2L"
command = ~D, F, D, F, x
time = 30

[Command] ; 백보영양
name = "Mega2S"
command = ~D, DF, F, D, DF, F, y
time = 30

[Command] ; 백보영양
name = "Mega2S"
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

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

[Command]
name = "AI"
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 |-----------------------------------------------
name = "recovery";Required (do not remove)
command = x+y
time = 1

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

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

[Command]
name = "Rolling";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

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

;===========================================================================
;---------------------------------------------------------------------------
;만적영심 (초필살기)
[State -1, Super Mega Arrow]
type = ChangeState
value = 1220
triggerall = command = "SMega"
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = p2statetype != l
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [1040,1050]
trigger2 = stateno != [1200,1220]
trigger2 = stateno != [1000,1001]
trigger2 = movecontact

;---------------------------------------------------------------------------
;백보영양 약 (필살기)
[State -1, Mega Arrow]
type = ChangeState
value = 1200
triggerall = command = "Mega2L"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = p2statetype != l
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [1040,1050]
trigger2 = stateno != [1200,1220]
trigger2 = stateno != [1000,1001]
trigger2 = movecontact

;---------------------------------------------------------------------------
;백보영양 강 (필살기)
[State -1, Mega Arrow]
type = ChangeState
value = 1210
triggerall = command = "Mega2S"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = p2statetype != l
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [1040,1050]
trigger2 = stateno != [1200,1220]
trigger2 = stateno != [1000,1001]
trigger2 = movecontact

;---------------------------------------------------------------------------
;맹룡과강 (필살기)
[State -1, Mega Assult]
type = ChangeState
value = 1040
triggerall = command = "Mega1"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = p2statetype != l
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = p2bodydist X <= 40
trigger2 = stateno != [1040,1050]
trigger2 = stateno != [1200,1220]
trigger2 = stateno != [1000,1001]
trigger2 = movecontact

;===========================================================================
[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 = movecontact
var(1) = 1

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

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

;---------------------------------------------------------------------------
; 뒤구르기
[State -1, Rolling Backward] 
type = ChangeState 
value = 751
triggerall = command = "Rolling"
trigger1 = command = "holdback" && statetype = S && ctrl 

;---------------------------------------------------------------------------
; 황룡심조 약
[State -1, Light Upper]
type = ChangeState
value = 1000
triggerall = command = "UpperL"
trigger1 = p2movetype != H
trigger1 = var(1) ;Use combo condition (above)
trigger2 = p2movetype = H
trigger2 = p2bodydist X <= 25
trigger2 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
; 황룡심조 강
[State -1, Strong Upper]
type = ChangeState
value = 1001
triggerall = command = "UpperS"
trigger1 = p2movetype != H
trigger1 = var(1) ;Use combo condition (above)
trigger2 = p2movetype = H
trigger2 = p2bodydist X <= 25
trigger2 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
; 쌍한각 약
[State -1, Light Assult]
type = ChangeState
value = 1010
triggerall = command = "AssultL"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
; 쌍한각 강
[State -1, Strong Assult]
type = ChangeState
value = 1011
triggerall = command = "AssultS"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
; 성화폭원 약
[State -1, Light Wind]
type = ChangeState
value = 1020
triggerall = command = "WindL"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
; 성화폭원 강
[State -1, Strong Wind]
type = ChangeState
value = 1031
triggerall = command = "WindS"
trigger1 = var(1) ;Use combo condition (above)

;===========================================================================
;---------------------------------------------------------------------------
; 인공지능 발동
[state -1, AI_Enable]
type = varset
trigger1 = command = "AI"
var(10) = 1

;---------------------------------------------------------------------------
; 인공지능 구르기
[state -1, AI_RollingF]
type = ChangeState
value = 750
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = movetype != A
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 35
trigger1 = random <= 250
trigger1 = P2Life > 0

[state -1, AI_RollingB]
type = ChangeState
value = 751
trigger1 = 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
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 기모으기
[state -1, AI_Burning]
type = ChangeState
value = 1100
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = movetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 250
trigger1 = random <= 50
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 만적영심 (초필살기)
[State -1, AI_Super Mega Arrow]
type = ChangeState
value = 1220
trigger1 = power >= 2000
trigger1 = statetype != A
trigger1 = var(10) = 1
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X >= 50
trigger1 = random <= 500
trigger1 = p2statetype != L
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 백보영양 (필살기)
[State -1, AI_Mega Arrow Light] ;약
type = ChangeState
value = 1200
trigger1 = power >= 1000
trigger1 = statetype != A
trigger1 = var(10) = 1
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X >= 50
trigger1 = random <= 250
trigger1 = p2statetype != L
trigger1 = P2Life > 0

[State -1, AI_Mega Arrow Strong] ;강
type = ChangeState
value = 1210
trigger1 = power >= 1000
trigger1 = statetype != A
trigger1 = var(10) = 1
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X >= 50
trigger1 = random <= 250
trigger1 = p2statetype != L
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 맹룡과강 (필살기)
[State -1, AI_Mega Assult]
type = ChangeState
value = 1040
trigger1 = power >= 1000
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(10) = 1
trigger1 = p2statetype != L
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 50
trigger1 = random <= 500
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 황룡심조
[state -1, AI_UpperL] ; 약
type = ChangeState
value = 1000
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2statetype != L
trigger1 = p2statetype = A
trigger1 = p2bodydist X <= 50
trigger1 = random <= 500
trigger1 = P2Life > 0

[state -1, AI_UpperS] ; 강
type = ChangeState
value = 1001
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2statetype != L
trigger1 = p2statetype = A
trigger1 = p2bodydist X <= 40
trigger1 = random <= 500
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 쌍한각

[state -1, AI_AssultL] ; 약
type = ChangeState
value = 1010
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2statetype != L
trigger1 = p2bodydist X <= 100
trigger1 = random <= 100
trigger1 = P2Life > 0

[state -1, AI_Assult] ; 강
type = ChangeState
value = 1011
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2statetype != L
trigger1 = p2bodydist X <= 150
trigger1 = random <= 100
trigger1 = P2Life > 0

;---------------------------------------------------------------------------
; 인공지능 성화폭원
[state -1, AI_WindL] ; 약
type = ChangeState
value = 1020
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X >= 150
trigger1 = random <= 50
trigger1 = P2Life > 0

[state -1, AI_WindL] ; 강
type = ChangeState
value = 1031
trigger1 = var(10) = 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X >= 150
trigger1 = random <= 50
trigger1 = P2Life > 0

;===========================================================================
;---------------------------------------------------------------------------
;달리기
[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 Near Strong Punch]
type = ChangeState
value = 220
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = P2BodyDist X < 45
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, Stand Near Strong Kick]
type = ChangeState
value = 250
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = P2BodyDist X < 30
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

;---------------------------------------------------------------------------
;Taunt
;[State -1, Taunt]
;type = ChangeState
;value = 195
;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
