;cmdに入れるやつ
;↓同じようなとこに適当に貼り付ける


;---------------------------------------------
;---------------------------------------------------------------------------
;Kung Fu Throw
;ぶっとばし投げ
[State -1, Kung Fu 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


;---------------------------------------------------------------------------
;↑cmd
;↓ここからAIR
;---------------------------------------------------------------------------
;ぶっとばし投げ
[Begin Action 800]
Clsn1: 1
 Clsn1[0] =   8,-81, 26,  0
Clsn2: 2
 Clsn2[0] =  -8,-81, 21,  0
 Clsn2[1] =  10,-94, 20,-80
200, 0, 0, 0, 1
Clsn2: 2
 Clsn2[0] =  -8,-81, 21,  0
 Clsn2[1] =  10,-94, 20,-80
230, 0, 0, 0, 1
Clsn2: 2
 Clsn2[0] =  -8,-81, 21,  0
 Clsn2[1] =  10,-94, 20,-80
230, 1, 0, 0, 3
Clsn2: 2
 Clsn2[0] =  -8,-81, 21,  0
 Clsn2[1] =  10,-94, 20,-80
230, 2, 0, 0, 14
Clsn2: 2
 Clsn2[0] =  -8,-81, 21,  0
 Clsn2[1] =  10,-94, 20,-80
230, 0, 0, 0, 2
Clsn2: 2
 Clsn2[0] =  -8,-81, 21,  0
 Clsn2[1] =  10,-94, 20,-80
230, 0, 0, 0, 1

[Begin Action 810]
200, 0, 0, 0, 1
230, 0, 0, 0, 1
230, 1, 0, 0, 1
230, 1, 0, 0, 1
230, 1, 0, 0, 1
230, 1, 0, 0, 1
230, 2, 0, 0, 1
230, 2, 0, 0, 1
230, 2, 0, 0, 1
230, 2, 0, 0, 1
230, 2, 0, 0, 1, H
230, 2, 0, 0, 14, H
230, 0, 0, 0, 2, H
230, 0, 0, 0, 1
200, 0, 0, 0, 5
;---------------------------------------------------------------------------
;↑AIRここまで
;ここからcns↓
;---------------------------------------------------------------------------
;-----------------------------------------------
;---------------------------------------------------------------------------
;ぶっとばし投げ
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2


[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60


[State 810, Holding fwd?]
type = VarSet
trigger1 = Time = 0
var(2) = command = "holdfwd"

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = 47, 0

[State 810, holdfwd - Turn 6] ;If was holding fwd before, turn now
type = Turn
trigger1 = var(2)
trigger1 = AnimElem = 6

[State 810, holdfwd - Pos 6] ;If was holding fwd before, move a little
type = PosAdd
trigger1 = var(2)
trigger1 = AnimElem = 6
x = -37

[State 810, holdfwd - Turn Target 6] ;If was holding fwd before, turn target too
type = TargetFacing
trigger1 = var(2)
trigger1 = AnimElem = 6
value = -1

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -50, -50

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 11
value = -78

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 11
value = 821

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

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -10

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

;---------------------------------------------------------------------------
;
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820


[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;---------------------------------------------------------------------------
;
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground


;貼る時はこの↓より上に張ってね
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

