
;ヘヴィーよろけ=======================================================

[Statedef 390, ヘヴィーストライクよろけ]
type= S
movetype = H
physics = S
anim = 5300
velset = 0,0
ctrl = 0
sprpriority = 0

[State 390, 投げ無敵]
type = null;NotHitBy
trigger1 = 1
value = S,AT

[State 390]
type = AssertSpecial
trigger1 = 1
flag = nowalk
flag2 = nojugglecheck

[State 390]
type = Posset
trigger1 = time = 0
y = 0

[State 390]
type = selfstate
trigger1 = time >= 120
value = 0
ctrl = 1

;投げ==============================================================--

;２Ｐ側制御・投げられる
[statedef 752]
type    = A
movetype= H
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
;anim = 752
sprpriority = 0

[State 752, 無敵] ; ユダ様の投げとは違うけど……
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 752, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = Time = 0
value = 752

;↓持ち上げられる動き------------------------------------------------

[State 752]
type = veladd
trigger1 = time >= 21 && time < 33
y = -0.86

[State 752]
type = velset
trigger1 = time >= 33 && time < 43
y = -0.48

[State 752]
type = velset
trigger1 = time = 43
y = 0

[State 752, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = Time >= 85
value = 753

[State 752,　萃香の手の位置に足を合わせる]
type = posadd
trigger1 = time = 85
y = -50

;↓振り回してから投げ飛ばす-----------------------------------------

[State 752] 
type = AngleDraw 
trigger1 = time >= 85

[State 752] 
type = AngleAdd 
trigger1 = time >= 85
value = 32

[State 752]
type = velset
trigger1 = time = 145
x = -18
y = 7

[State 752]
type = LifeAdd
trigger1 = time = 145
value = -130

;↑-------------------------------------------------------------

[State 752, ステート変更]
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 752, 相手ステートに戻す]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 752, 相手ステートに戻す]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;バニシング===========================================================

;壁まで飛んでいく----------------------------
[statedef 4000]
type    = A
movetype= H
physics = N
ctrl = 0
velset = -10.5,0
anim = 5030

;↓移動・位置・属性-----------------------------------------

[state 4000, 自動振り向き]
type = turn
trigger1 = facing = enemy,facing
trigger1 = time = 0

[state 4000, ヒット時の浮き]
type = velset
triggerall = Pos Y >= 0
trigger1 = time = 0
y = -3.0

[state 4000, ヒット時の浮きを消す]
type = velset
trigger1 = time >= 5
y = 0

[state 4000, 壁に当たったら停止]
type = velset
trigger1 = FrontEdgeBodyDist <= 5
trigger2 = BackEdgeBodyDist <= 5
x = 0

[state 4000,　吹っ飛んだままの時間切れ防止]
type = selfstate
trigger1 = time >= 100
value = 5050
ctrl = 0

[state 4000, 壁バウンド状態へ]
type = changestate
trigger1 = FrontEdgeBodyDist <= 5
trigger2 = BackEdgeBodyDist <= 5
value = 4001
ctrl = 0

;壁でバウンド-----------------------------------
[statedef 4001]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
anim = 5030

[State 4001, 壁バウンドの揺れ]
type = envshake
trigger1 = time = 0
time = 12

[State 4001, 壁バウンドのダメージ]
type = LifeAdd
trigger1 = FrontEdgeBodyDist <= 5
trigger2 = BackEdgeBodyDist <= 5
value = -5
kill = 0
absolute = 1
;ignorehitpause = 1
persistent = 0

;↓移動・位置・属性-----------------------------------------

[state 4001,自動振り向き]
type = turn
trigger1 = facing = enemy,facing
trigger1 = time = 0

[state 4001, 画面端密着状態でバニが当たった場合、ここで無理矢理浮かせる]
type = posset
triggerall = Pos Y > -10
trigger1 = time = 0
y = -10

[state 4001, 保険の初期速度設定]
type = velset
trigger1 = time = 0
x = 0
y = 0

[state 4001, 壁から離れる動き]
type = velset
triggerall = P2Dist X > 50
trigger1 = time = 19
x = 3.0
y = 0

[state 4001, 壁から離れる動き・終了]
type = velset
trigger1 = time >= 31
x = 0

[state 4001, 自前の重力]
type = veladd
triggerall = enemynear,statetype != A
trigger1 = time >= 31
y = 0.35+(gethitvar(hitcount)*0.02)

[state 4001, 自前の重力]
type = veladd
triggerall = enemynear,statetype = A
trigger1 = time >= 31
y = 0.25

[State 4001, 壁から離れるアニメ]
type = ChangeAnim2
trigger1 = Time = 19
value = 5075
elem = 1

[State 4001, うつぶせに倒れるアニメ]
type = ChangeAnim2
trigger1 = Time = 31
value = 5076
elem = 1

[state 4001]
type = selfstate
trigger1 = vel y > 0 && pos y >= 0
value = 5110;5100

;バスケ=============================================================

;百烈用バウンド------------------------------------------

[Statedef 12000, 技をくらって空中から地面へ]
type = A
movetype = H
physics = N
anim = 5110
ctrl = 0
sprpriority = 0
facep2 = 1

[State 12000, 技を当てると跳ねる]
type = hitoverride
trigger1 = enemy,gethitvar(hitcount) < 75
trigger1 = time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 12000
persistent = 0

[State 12000, バスケ状態へ]
type = hitoverride
triggerall = gethitvar(hitcount) >= 75
trigger1 = time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 12200
persistent = 0

[State 12000, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 5110

[State 12000, 落ちる速度]
type = velset
trigger1 = time = 0
y = 13

[State 12000, 地面に衝突]
type = changestate
trigger1 = pos Y >= 0
value = 12100
ctrl = 0

[Statedef 12100,　地面にぶつかって跳ね上がる];-------------------------------
type = A
movetype = H
physics = N
anim = 5110
ctrl = 0
sprpriority = 0

[State 12100, 叩きつけダメージ]
type = null;LifeAdd
trigger1 = time = 0
value = -5
kill = 0
absolute = 1

[State 12100, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 5110

[State 12100, 技を当てると跳ねる]
type = hitoverride
triggerall = gethitvar(hitcount) < 75
trigger1 = time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 12000
persistent = 0

[State 12100, バスケ状態へ]
type = hitoverride
triggerall = gethitvar(hitcount) >= 75
trigger1 = time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 12200
persistent = 0

[State 12100, 横移動と浮き上がる速度]
type = velset

trigger1 = time = 0
x = -1.85
y = -8.5

[State 12100, 落ちる速度]
type = veladd
trigger1 = time >= 5
y = 1.0

;着地したら地上属性に
[state 12100]
type = StatetypeSet
trigger1 = time >= 5
trigger1 = pos Y >= 0
value = S

;攻撃に移行
[state 12100]
type =SelfState
trigger1 = time >= 5
trigger1 = statetype = S 
value = 5110
ctrl = 0

;バスケ用バウンド--------------------------------------------------

[Statedef 12200, 技をくらって空中から地面へ]
type = A
movetype = H
physics = N
anim = 5110
ctrl = 0
sprpriority = 0
facep2 = 1

[State 12200, 技を当てると跳ねる]
type = hitoverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 12200
persistent = 0

[State 12200, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 5110

[State 12200, 落ちる速度]
type = velset

trigger1 = time = 0
y = 16

[State 12200, 地面に衝突]
type = changestate
trigger1 = pos Y >= 0
value = 12300
ctrl = 0

[Statedef 12300,　地面にぶつかって跳ね上がる];-------------------------------
type = A
movetype = H
physics = N
anim = 5110
ctrl = 0
sprpriority = 0

[State 12300, 叩きつけダメージ]
type = null;LifeAdd
trigger1 = time = 0
value = -5
kill = 0
absolute = 1

[State 12300, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 5110

[State 12300, 技を当てると跳ねる]
type = hitoverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 12200
persistent = 0

[State 12300, 横移動と浮き上がる速度]
type = velset

trigger1 = time = 0
x = -1.85
y = -13

[State 12100, 落ちる速度]
type = veladd
trigger1 = time >= gethitvar(hitcount)/4
y = 0.8

;着地したら地上属性に
[state 12300]
type = StatetypeSet
trigger1 = time >= 5
trigger1 = pos Y >= 0
value = S

;攻撃に移行
[state 12300]
type =SelfState
trigger1 = time >= 5
trigger1 = statetype = S 
value = 5110
ctrl = 0

;新型バスケ=============================================================

;百烈用バウンド------------------------------------------

[Statedef 29000, 技をくらって空中から地面へ]
type = A
movetype = H
physics = N
anim = 5110
ctrl = 0
sprpriority = 0
facep2 = 1

[State 29000, 技を当てると跳ねる]
type = hitoverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 29000
persistent = 0

[State 29000, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 5110

[State 29000, 横移動]
type = velset
trigger1 = time = 0
x = GetHitVar(xvel)*ifelse(Facing=1,1,-1)

[State 29000, 落ちる速度]
type = veladd
trigger1 = 1
y = GetHitVar(yaccel)/1.5

[State 29000, 落ちる速度・保険]
type = velset
trigger1 = time >= 200
trigger2 = Pos Y < -1200
y = 12

[State 29000, 地面に衝突]
type = changestate
trigger1 = pos Y >= 0
value = 29100
ctrl = 0

[Statedef 29100,　地面にぶつかって跳ね上がる];-------------------------------
type = A
movetype = H
physics = N
anim = 5110
ctrl = 0
sprpriority = 0
facep2 = 1

[State 29100, 横移動]
type = Posset
trigger1 = time = 0
trigger2 = Pos Y >= 0
y = 0

[State 29100, 叩きつけダメージ]
type = LifeAdd
trigger1 = time = 0
value = -5
kill = 0
absolute = 1

[State 29100, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 5110

[State 29100, 技を当てると跳ねる]
type = hitoverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 29000
persistent = 0

[State 29100, 横移動と浮き上がる速度]
type = velset

trigger1 = time = 0
x = GetHitVar(xvel)*ifelse(Facing=1,1,-1)*1.0
y = ((GetHitVar(hitcount)/15)+(abs(enemy,fvar(35)/32.0)+1)-(GetHitVar(yvel)*0.65))*(-1)

[State 29100, 落ちる速度]
type = veladd
trigger1 = 1
y = Const(movement.yaccel)+0.08

[State 29100, 落ちる速度・保険]
type = velset
trigger1 = time >= 600
trigger2 = Pos Y < -1200
y = 12

;着地したら地上属性に
[state 29100]
type = StatetypeSet
trigger1 = time >= 5
trigger1 = pos Y >= 0
value = S

;攻撃に移行
[state 29100]
type =SelfState
trigger1 = time >= 5
trigger1 = statetype = S 
value = 5110
ctrl = 0
