; Chotto-Ko Ryu cns file No.2
;===========================================================================
; 特殊攻撃技
;===========================================================================
;---------------------------------------------------------------------------
;鎖骨割り
[Statedef 700]
type     = S
movetype = A
physics  = S
juggle   = 1
poweradd = 60
ctrl     = 0
anim     = 700
;velset   = 0,0

[State 700, Change]
type = ChangeState
triggerall = ((var(38) = 1) && (time = [0,7]))
trigger1 = ((command = "a") && (command = "x"))
value = 800

[State 700, Width]
type = Width
trigger1 = 1
value = 20,-9

[State 700, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 700, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(5) = 0
trigger2 = AnimElemTime(6) = 0
x = 10

;*********************************
[State 700, Ryu Voice]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = s3,0

[State 700, SE]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = s0,2

;*********************************
[State 700, Hit]
type = HitDef
trigger1 = AnimElemTime(5) = 0
attr             = S, NA
animtype         = Hard
damage           = 15
getpower         = 15,5
guardflag        = H
priority         = 4
pausetime        = 11,12
sparkno          = s4201
sparkxy          = -10,-80
guard.sparkno    = s4200
hitsound         = s0,8
guardsound       = s0,6
ground.type      = Low
ground.slidetime = 12
ground.hittime   = 15
ground.velocity  = -6
air.velocity     = -6,-3

[State 700, Hit-2]
type = HitDef
trigger1 = AnimElemTime(6) = 0
attr             = S, NA
animtype         = Hard
damage           = 15
getpower         = 15,5
guardflag        = HA
priority         = 4
pausetime        = 11,12
sparkno          = s4201
sparkxy          = -10,-30
guard.sparkno    = s4200
hitsound         = s0,8
guardsound       = s0,6
ground.type      = Low
ground.slidetime = 12
ground.hittime   = 15
ground.velocity  = -6
air.velocity     = -6,-3

[State 700, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;鳩尾砕き
[Statedef 710]
type     = S
movetype = A
physics  = S
juggle   = 1
poweradd = 60
ctrl     = 0
anim     = 710
;velset   = 0,0

[State 710, Width]
type = Width
trigger1 = 1
value = 20,-9

[State 710, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 710, Vel]
type = VelSet
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(4) = 0
x = 1.25

[State 710, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(4) = 0
x = 15

;*********************************
[State 710, Ryu Voice]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = s3,1

[State 710, SE]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = s0,2

;*********************************
[State 710, Hit]
type = HitDef
trigger1 = AnimElemTime(4) = 0
attr             = S, NA
animtype         = Hard
damage           = 15
getpower         = 30,10
guardflag        = MA
priority         = 4
pausetime        = 11,12
sparkno          = s4201
sparkxy          = -10,-58
guard.sparkno    = s4200
hitsound         = s0,9
guardsound       = s0,6
ground.type      = Low
ground.slidetime = 12
ground.hittime   = 15
ground.velocity  = -6
air.velocity     = -6,-3

[State 710, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;旋風脚
[Statedef 720]
type     = S
movetype = A
physics  = S
juggle   = 0
poweradd = 0
ctrl     = 0
anim     = 720
velset   = 0,0

[State 720, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 720, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 721

;---------------------------------
;旋風脚・攻撃
[Statedef 721]
type     = A
movetype = A
physics  = N
juggle   = 1
poweradd = 60
ctrl     = 0
anim     = 721

[State 721, Vel]
type = VelSet
trigger1 = time = 0
x = 4
y = -4

[State 721, VelAdd]
type = VelAdd
trigger1 = time >= 1
y = 0.45

;*********************************
[State 721, Ryu Voice]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = s3,2

[State 721, SE]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = s0,1

;*********************************
[State 721, Hit]
type = HitDef
trigger1 = AnimElemTime(6) = 0
attr             = A, NA
animtype         = Hard
damage           = 30
getpower         = 30,10
guardflag        = MA
priority         = 4
pausetime        = 12,10
sparkno          = s4201
sparkxy          = -10,-58
guard.sparkno    = s4200
hitsound         = s2,4
guardsound       = s0,6
ground.type      = High
ground.slidetime = 12
ground.hittime   = 15
ground.velocity  = -6
air.velocity     = -6,-3

[State 721, Change]
type = ChangeState
trigger1 = ((Time > 0) && (Pos Y >= 0))
value = 52

;===========================================================================
; 投げ技
;===========================================================================
;---------------------------------------------------------------------------
;投げ掴み
[Statedef 800]
type     = S
movetype = A
physics  = S
juggle   = 8
velset   = 0,0
ctrl     = 0
anim     = 800
sprpriority = 1

[State 800, PosAdd]
type = PosAdd
triggerall = PrevStateNo = 700
trigger1 = Time = 0
x = 20

[State 800, Seoi]
type = HitDef
triggerall = command != "holdback"
trigger1 = AnimElem = 3
attr      = S, NT
hitflag   = M-
priority  = 1, Miss
sparkno   = -1
hitsound  = s1,4
p1facing  = 1
p2facing  = 1
p1stateno = 801
p2stateno = 802

[State 800, Tomoe]
type = HitDef
triggerall = command = "holdback"
trigger1 = AnimElem = 3
attr      = S, NT
hitflag   = M-
priority  = 1, Miss
sparkno   = -1
hitsound  = s1,4
p1facing  = 1
p2facing  = 1
p1stateno = 810
p2stateno = 811

[State 800, Change]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;背負い投げ
[Statedef 801]
type     = S
movetype = A
physics  = N
anim     = 801
poweradd = 0
velset   = 0,0

[State 801, Shake] 
type = EnvShake
trigger1 = AnimElem = 5
time = 12
ampl = 6
freq = 100
phase = 100

[State 801, Turn]
type = Turn
trigger1 = AnimElem = 6

;****************************
[State 801, Tsukami-2]
type = TargetBind
trigger1 = AnimElem = 1
pos = 35,-54

[State 801, Tsukami-3]
type = TargetBind
trigger1 = AnimElem = 2
pos = 40,-80

[State 801, Tsukami-4]
type = TargetBind
trigger1 = AnimElem = 3
pos = 10,-90

[State 801, Tsukami-5]
type = TargetBind
trigger1 = AnimElem = 4
pos = -20,-82

[State 801, Tsukami-6]
type = TargetBind
trigger1 = AnimElem = 5
pos = -60,0

;****************************
[State 801, Ryu Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = s3,2

[State 801, SE]
type = PlaySnd
trigger1 = AnimElem = 5
value = s1,8

;****************************
[State 801, Damage]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -100

;****************************
[State 801, TargetChange]
type = TargetState
trigger1 = AnimElem = 5
value = 803

[State 801, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;背負い投げ：相手側
[Statedef 802]
type     = A
movetype = H
physics  = N
velset   = 0,0

[State 802, Anim]
type = ChangeAnim2
Trigger1 = Time = 0
value = 802

;---------------------------------------------------------------------------
;背負い投げ：相手側終了
[Statedef 803]
type     = A
movetype = H
physics  = N
velset   = 0,0
poweradd = 0

[State 803, Change Self] 
type = SelfState
trigger1 = AnimTime = 0
value = 5110

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;巴投げ
[Statedef 810]
type     = S
movetype = A
physics  = N
anim     = 810
poweradd = 0
velset   = 0,0

[State 810, Turn]
type = Turn
trigger1 = AnimElem = 7

;****************************
[State 810, Tsukami-1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 35,-54

[State 810, Tsukami-2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 55,-60

[State 810, Tsukami-3]
type = TargetBind
trigger1 = AnimElem = 3
pos = -20,-55

[State 810, Tsukami-4]
type = TargetBind
trigger1 = AnimElem = 4
pos = -30,-50

;****************************
[State 810, Ryu Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = s3,1

;****************************
[State 810, Damage]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -130

;****************************
[State 810, TargetChange]
type = TargetState
trigger1 = AnimElem = 4
value = 812

[State 810, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;巴投げ：相手側
[Statedef 811]
type     = A
movetype = H
physics  = N
velset   = 0,0

[State 811, Anim]
type = ChangeAnim2
Trigger1 = Time = 0
value = 811

;---------------------------------------------------------------------------
;巴投げ：相手側吹っ飛び〜終了
[Statedef 812]
type     = A
movetype = H
physics  = N
velset   = 0,0
poweradd = 0

[State 812, Anim]
type = ChangeAnim2
Trigger1 = Time = 0
value = 812

[State 812, Vel]
type = VelSet
trigger1 = time = 0
x = 8
y = -6

[State 812, VelAdd]
type = VelAdd
trigger1 = time >= 1
y = 0.45

[State 812, Change Self] 
type = SelfState
trigger1 = ((Time > 0) && (Pos Y >= 0))
value = 5110

;===========================================================================
;特殊防御技
;===========================================================================
;---------------------------------------------------------------------------
;ガードキャンセル
[Statedef 900]
type     = S
movetype = I
physics  = N
anim     = 900
poweradd = 0
velset   = 0,0
SprPriority = 6

[State 900, Pause]
type = Pause
trigger1 = time = 0
time = 12
movetime = 12
IgnoreHitPause = 1
Persistent = 1

[State 900, Muteki]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 900, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 900, BodyColor]
type = PalFX
trigger1 = Time = 0
time = 12
add = 20,70,150
sinadd = 64,32,5,3

[State 900, BG Color]
type = EnvColor
trigger1 = Time = 0
value = 255, 255, 255
time = 1

[State 900, Push] 
type = PlayerPush
trigger1 = Time >= 0
value = 1

;*********************************
[State 900, Effect]
type = Explod
trigger1 = time = 1
anim = 903
pos = 50,-70
postype = p1
sprpriority = 7
ownpal = 1
pausemovetime = 99999999

[State 900, SE]
type = Playsnd
trigger1 = Time = 0
value = s1,9

[State 900, Change]
type = ChangeState
Trigger1 = AnimTime = 0
value = 1020

;---------------------------------------------------------------------------
;空中ガードキャンセル
[Statedef 905]
type     = A
movetype = I
physics  = N
anim     = 902
poweradd = 0
velset   = 0,0
SprPriority = 6

[State 905, Pause]
type = Pause
trigger1 = time = 0
time = 12
movetime = 12
IgnoreHitPause = 1
Persistent = 1

[State 905, Muteki]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 905, BodyColor]
type = PalFX
trigger1 = Time = 0
time = 12
add = 20,70,150
sinadd = 64,32,5,3

[State 905, BG Color]
type = EnvColor
trigger1 = Time = 0
value = 255, 255, 255
time = 1

[State 905, Ctrl]
type = CtrlSet
trigger1 = time = 10
value = 1

[State 905, Push] 
type = PlayerPush
trigger1 = Time >= 0
value = 1

;*********************************
[State 905, Effect]
type = Explod
trigger1 = time = 1
anim = 903
pos = 20,-75
postype = p1
sprpriority = 7
ownpal = 1
pausemovetime = 99999999

[State 905, SE]
type = Playsnd
trigger1 = Time = 0
value = s1,9

[State 905, Change]
type = ChangeState
Trigger1 = AnimTime = 0
value = 1050

;============================================================================
;----------------------------------------------------------------------------
;クイックスタンディング
[Statedef 910]
type     = A
movetype = H
physics  = N
poweradd = 0
ctrl     = 0

[State 910, VelAdd]
type = VelAdd
trigger1 = Time >= 0
y = .39

[State 910, ChangeState]
type = ChangeState
trigger1 = ((Vel Y > 0) && (Pos Y >= 0))
value = 911

;----------------------------------------------------------------------------
;クイックスタンディング：着地
[Statedef 911]
type     = S
movetype = I
physics  = N
anim     = 5170
poweradd = 0
velset   = 0,0
ctrl     = 0

[State 911, Defence Default]
type = DefenceMulSet
triggerall = PrevStateNo = 910
trigger1 = AnimTime != 0
value = 1.0

[State 911, Shibuki]
type = Explod
trigger1 = AnimElem = 1
anim = 4100
postype = p1
pos = 0,0
sprpriority = -1
ownpal = 1

[State 911, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 911, SE]
type = PlaySnd
trigger1 = Time = 1
value = s1,8

[State 911, Change]
type = ChangeState
trigger1 = Time > 1
value = 912

;----------------------------------------------------------------------------
;クイックスタンディング：バウンド
[Statedef 912]
type     = A
movetype = I
physics  = N
anim     = 5200
poweradd = 0
velset   = -2,-5
ctrl     = 1

[State 912, VelAdd]
type = VelAdd
trigger1 = Time >= 0
y = .5

[State 912, Muteki]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 8

[State 912, Change]
type = ChangeState
trigger1 = Time > 0
trigger1 = Pos Y >= 0
value = 52

;===========================================================================
;===========================================================================
;===========================================================================
;===========================================================================
;===========================================================================
; その他
;===========================================================================
;---------------------------------------------------------------------------
;移動風しぶき
[Statedef 9000]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 1011
SprPriority = 7

;***********************************
[State 9000, No Shadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
IgnoreHitPause = 1
Persistent = 1

[State 9000, Armor]
type = HitOverride
trigger1 = time >= 0
attr = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT, AA, AT, AP
time = -1
stateno = 9999
ignorehitpause = 1

[State 9000, Push]
type = PlayerPush
trigger1 = time >= 0
value = 0

;***********************************
[State 9000, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 9000, Speed]
type = VelSet
trigger1 = ((Parent,StateNo = 1000) && (Time >= 0))
x = 3.5

[State 9000, Speed]
type = VelSet
trigger1 = ((Parent,StateNo = 1010) && (Time >= 0))
x = 5

[State 9000, Speed]
type = VelSet
trigger1 = ((Parent,StateNo = 1020) && (Time >= 0))
x = 6.5

;***********************************
[State 9000, Change]
type = ChangeState
trigger1 = ((Parent,var(42) = 1) || (Time > 80))
trigger2 = ((Parent,var(43) = 0) && (Time > 5))
value = 9001

;----------------------------------------------
;移動風しぶき消える
[Statedef 9001]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 1012
SprPriority = 7

;***********************************
[State 9001, No Shadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
IgnoreHitPause = 1
Persistent = 1

[State 9001, Armor]
type = HitOverride
trigger1 = time >= 0
attr = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT, AA, AT, AP
time = -1
stateno = 9999
ignorehitpause = 1

[State 9001, Push]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 9001, Color Gradation]
type = Palfx
trigger1 = 1
Mul = ceil(100-(StateTime*2)),ceil(100-(StateTime*2)),ceil(100-(StateTime*2))
time = 1
IgnoreHitPause = 1
Persistent = 1

;***********************************
[State 9001, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 9001, Speed]
type = VelSet
trigger1 = Time >= 0
x = 1

;***********************************
[State 9001, Change]
type = DestroySelf
trigger1 = AnimTime = 0

;===========================================================================
;---------------------------------------------------------------------------
;真空竜巻旋風脚用：風しぶき
[Statedef 9010]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 2103
SprPriority = -1

;***********************************
[State 9010, No Shadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
IgnoreHitPause = 1
Persistent = 1

[State 9010, Armor]
type = HitOverride
trigger1 = time >= 0
attr = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT, AA, AT, AP
time = -1
stateno = 9999
ignorehitpause = 1

[State 9010, Push]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 9010, Pos]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 9010, Pos]
type = PosAdd
trigger1 = 1
x = (Parent,Vel X)

[State 9010, Shibuki]
type = Explod
trigger1 = ((Time >= 0) && (TimeMod = 8,0))
anim = 2102
scale = 1,1
postype = p1
pos = 0,0
sprpriority = 5
bindtime = -1
supermove = 1
ownpal = 1

;***********************************
[State 9010, Change]
type = DestroySelf
trigger1 = (time = 200) || (Parent,MoveType != A)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
[Statedef 9999]
[State 9999, End] 
type = DestroySelf
trigger1 = time = 0
