;SakuyaOS用ナイフ投げファイル




;---------------------------------------------

;---------------------------------------------



;---------------------------------------------

;---------------------------------------------

;---------------------------------------------
[Statedef 230];通常射撃
Type     = S
MoveType = I
Physics  = S
Ctrl     = 0
Anim     = 2220

[State 230,~ナイフ発射~]
Type     = PlaySnd
Trigger1 = Anim = 2220 && AnimElem = 7
Value    = S5,62
Channel  = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-10
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-20
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-30
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-40
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-50
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-60
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-70
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
trigger1                   = AnimElem = 7
Attr                       = S, NA
projanim                   = 18200
ProjID                     = 15201
projhitanim                = -1
offset                     = 20,-80
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 10
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 8,0
pausemovetime = 1
supermovetime = 1

[State 230,~立ちに~]
Type     = ChangeState
Trigger1 = AnimTime = 0
Value    = 0
Ctrl     = 1

;---------------------------------------------
[StateDef 231]
MoveType    = A
Physics     = N
Anim        = 36666
VelSet      = IfElse(IsHelper(231),15,10), IfElse(IsHelper(231),0, IfElse(IsHelper(232),-4.8,3.8))
SprPriority = 3

[State 231,~影なし~]
Type     = AssertSpecial
Trigger1 = 1
Flag     = NoShadow

[State 231,~透明~]
Type     = Trans
Trigger1 = 1
Trans    = Add

[State 231,~サイズ大きく~]
Type     = VarAdd
Trigger1 = 1
FV       = 0
Value    = 0.25

[State 231,~サイズ変更~]
Type     = AngleDraw
Trigger1 = 1
Value    = ATan (Vel Y / Vel X) * (-180.0 / Pi)
Scale    = 1+FVar(0),1

[State 231,~攻撃力変更~]
Type     = AttackMulSet
Trigger1 = 1
Value    = Root,FVar(3)
IgnoreHitPause = 1

[State 1031,~ヒット定義~]
Type                       = Projectile
trigger1                   = P2BodyDist X = [0,2]
trigger2                   = P2BodyDist Y = [2,-2]
Attr                       = S, NP
projanim                   = 7720
ProjID                     = 15001
projhitanim                = -1
offset                     = 0,0
postype                    = p1
projscale                  = 1,1
projremove                 = 1
projremovetime             = 1
HitFlag                    = MAF
GuardFlag                  = MA
AnimType                   = Medium
Damage                     = 200
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
Ground.SlideTime           = 14
Ground.HitTime             = 16
Air.HitTime                = 16
Ground.Velocity            = -4,0
Air.Velocity               = -4.6,-4.8
Ground.CornerPush.VelOff   = 0
Air.CornerPush.VelOff      = 0
Guard.CornerPush.VelOff    = 0
Airguard.CornerPush.VelOff = 0
Air.Fall                   = 1
Fall.RecoverTime           = 35
Guard.Kill                 = 0
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3






[State 231,~消滅~]
Type     = DestroySelf
Trigger1 = Time >= 200
Trigger2 = FrontEdgeBodyDist <= -50
Trigger3 = MoveHit && EnemyNear,MoveType != H
;---------------------------------------------
; 通常射撃（空中）
;
; 空中でのナイフ投げこそ真髄です。
; 他の空中ナイフ投げと違い、反動で後ろに戻されます。
; 下や後ろを押していると下方向に投げますが、私は下がメインだと思っています。

[Statedef 2440]
type     = A
movetype = A
physics  = N
ctrl     = 0
anim     = 2240
poweradd = 50
juggle   = 2

[State 650,~ナイフ発射~]
Type     = PlaySnd
Trigger1 = AnimElem = 6 
Trigger2 = AnimElem = 8, = 1 || AnimElem = 8, = 3
Value    = S5,62
Channel  = 1

[State 650,~速度設定 X~]
Type     = VelSet
Trigger1 = Vel X != 0 && AnimElem = 6,<= 0
X        = IfElse(Vel X >= 0.00001, 2, -2)
[State 650,~速度設定 Y~]
Type     = VelSet
Trigger1 = Vel Y != 0 && AnimElem = 6,<= 0
Y        = IfElse(Vel Y >= 0.00001, 1.5, -1.5)
[State 650,~速度設定~]
Type     = VelSet
Trigger1 = AnimElem = 6
X        = -2.8
Y        = -4.4
[State 650,~速度設定~]
Type     = VelAdd
Trigger1 = AnimElem = 6,>= 1
Y        = 0.3
[State 650,~地上に着いた~]
Type     = VelSet
Trigger1 = Vel Y = 0 || Pos Y >= 5
Y        = 0


[State 1031,~ヒット定義~]
Type                       = projectile
Trigger1 = AnimElem = 6 
Trigger2 = AnimElem = 8, = 1 || AnimElem = 8, = 3
Attr                       = S, NA
projanim                   = 18205
ProjID                     = 15201
projhitanim                = -1
offset                     = 10,-50
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 25
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 1.5,5
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
Trigger1 = AnimElem = 6 
Trigger2 = AnimElem = 8, = 1 || AnimElem = 8, = 3
Attr                       = S, NA
projanim                   = 18204
ProjID                     = 15201
projhitanim                = -1
offset                     = 10,-50
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 25
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 4.5,5
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
Trigger1 = AnimElem = 6 
Trigger2 = AnimElem = 8, = 1 || AnimElem = 8, = 3
Attr                       = S, NA
projanim                   = 18203
ProjID                     = 15201
projhitanim                = -1
offset                     = -20,-50
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 25
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 6,3
pausemovetime = 1
supermovetime = 1
[State 1031,~ヒット定義~]
Type                       = projectile
Trigger1 = AnimElem = 6 
Trigger2 = AnimElem = 8, = 1 || AnimElem = 8, = 3
Attr                       = S, NA
projanim                   = 18202
ProjID                     = 15201
projhitanim                = -1
offset                     = -20,-50
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 25
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 6,2
pausemovetime = 1
supermovetime = 1

[State 1031,~ヒット定義~]
Type                       = projectile
Trigger1 = AnimElem = 6 
Trigger2 = AnimElem = 8, = 1 || AnimElem = 8, = 3
Attr                       = S, NA
projanim                   = 18206
ProjID                     = 15201
projhitanim                = -1
offset                     = -20,-50
postype                    = p1
projscale                  = 1,1
projremove                 = 0
projremovetime             = 100
HitFlag                    = MAFDL
AnimType                   = Medium
Damage                     = 25
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3
projheightbound = -10000, 10000
ProjEdgeBound = 10000
ProjStageBound = 10000
velocity = 0,5
pausemovetime = 1
supermovetime = 1

[State 650,~立ちか何もしないに~]
Type     = ChangeState
Trigger1 =  pos y >=0
Value    = 0
Ctrl     = 1




;---------------------------------------------

[StateDef 251];ヘルパ
MoveType    = A
Physics     = N
Anim        = 36666
SprPriority = 3

[State 251,~影なし~]
Type     = AssertSpecial
Trigger1 = 1
Flag     = NoShadow

[State 251,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(251) || IsHelper(252) || IsHelper(253) || IsHelper(254) || IsHelper(255) || IsHelper(256) || IsHelper(257)
X        = 4.2
Y        = IfElse(IsHelper(251),0.6 ,IfElse(IsHelper(252),0.3, IfElse(IsHelper(253),0, IfElse(IsHelper(254),-0.3, IfElse(IsHelper(255),-0.6, IfElse(IsHelper(256),-0.9, -1.2))))))
[State 251,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(258) || IsHelper(259) || IsHelper(260) || IsHelper(261) || IsHelper(262) || IsHelper(263) || IsHelper(264)
X        = IfElse(IsHelper(258),2.8 ,IfElse(IsHelper(259),2.6, IfElse(IsHelper(260),2.4, IfElse(IsHelper(261),2.2, IfElse(IsHelper(262),2, IfElse(IsHelper(263),1.8, 1.6))))))
Y        = -1.2
[State 251,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(265) || IsHelper(266) || IsHelper(267) || IsHelper(268) || IsHelper(269) || IsHelper(270) || IsHelper(271)
X        = IfElse(IsHelper(265),2.4 ,IfElse(IsHelper(266),2.1, IfElse(IsHelper(267),1.8, IfElse(IsHelper(268),1.5, IfElse(IsHelper(269),1.2, IfElse(IsHelper(270),0.9, 0.6))))))
Y        = -2.8
[State 251,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(272) || IsHelper(273) || IsHelper(274) || IsHelper(275) || IsHelper(276) || IsHelper(277) || IsHelper(278)
X        = IfElse(IsHelper(272),1.6 ,IfElse(IsHelper(273),2.2 ,IfElse(IsHelper(274),2.8, IfElse(IsHelper(275),3.2, IfElse(IsHelper(276),3.8, IfElse(IsHelper(277),4.4, 5))))))
Y        = 2.8

[State 251,~移動加速~]
Type     = VelMul
Trigger1 = 1
X        = 1.04
Y        = 1.04

[State 251,~サイズ変更~]
Type     = AngleDraw
Trigger1 = 1
Value    = ATan (Vel Y / Vel X) * (-180.0 / Pi)

[State 1031,~ヒット定義~]
Type                       = Projectile
trigger1                   = P2BodyDist X = [0,2]
trigger2                   = P2BodyDist Y = [2,-2]
Attr                       = S, NP
projanim                   = 7720
ProjID                     = 15001
projhitanim                = -1
offset                     = 0,0
postype                    = p1
projscale                  = 1,1
projremove                 = 1
projremovetime             = 1
HitFlag                    = MAF
GuardFlag                  = MA
AnimType                   = Medium
Damage                     = 30
PauseTime                  = 0,0
SparkNo                    = -1
Guard.SparkNo              = -1
SparkXY                    = 0,0
HitSound                   = S1,0
GuardSound                 = -1
Ground.Type                = High
Ground.SlideTime           = 14
Ground.HitTime             = 16
Air.HitTime                = 16
Ground.Velocity            = -4,0
Air.Velocity               = -4.6,-4.8
Ground.CornerPush.VelOff   = 0
Air.CornerPush.VelOff      = 0
Guard.CornerPush.VelOff    = 0
Airguard.CornerPush.VelOff = 0
Air.Fall                   = 1
Fall.RecoverTime           = 35
Guard.Kill                 = 0
GetPower                   = 40,20
Hitonce                    = 1
NumHits                    = 0
SprPriority                = 3


[State 251,~消滅~]
Type     = DestroySelf
Trigger1 = Time >= 200
Trigger2 = FrontEdgeBodyDist <= -50
Trigger3 = MoveHit && EnemyNear,MoveType != H
;---------------------------------------------

;---------------------------------------------
; バウンスノーバウンス
;
; 上、または後ろ斜め上にナイフの束を投げます。
; そのナイフは上や後ろの壁に反射するので、
; 時間差攻撃を仕掛けられます。
[Statedef 2520]
type     = S
movetype = A
physics  = S
ctrl     = 0
anim     = 2520
poweradd = 150
velset   = 0,0
juggle   = 2

[State 1030,~ナイフ発射~]
Type     = PlaySnd
Trigger1 = AnimElem = 6 || AnimElem = 6, = 2 || AnimElem = 7, = 1
Trigger2 = AnimElem = 8 || AnimElem = 8, = 2
Value    = S5,62
Channel  = 1

[State 1030,~反射ナイフ1~]
Type     = Helper
Trigger1 = AnimElem = 6
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1031, 1046)
Pos      = IfElse(Anim = 1030, 40, -40),-62
PosType  = P1
OwnPal   = 1

;───────────────

[State 1030,~反射ナイフ2~]
Type     = Helper
Trigger1 = AnimElem = 6, = 2
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1032, 1047)
Pos      = IfElse(Anim = 1030, 40, -40),-62
PosType  = P1
OwnPal   = 1

;───────────────

[State 1030,~反射ナイフ3~]
Type     = Helper
Trigger1 = AnimElem = 7, = 1
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1033, 1048)
Pos      = IfElse(Anim = 1030, 40, -40),-62
PosType  = P1
OwnPal   = 1

;───────────────

[State 1030,~反射ナイフ4~]
Type     = Helper
Trigger1 = AnimElem = 8
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1034, 1049)
Pos      = IfElse(Anim = 1030, 40, -40),-62
PosType  = P1
OwnPal   = 1

;───────────────

[State 1030,~反射ナイフ5~]
Type     = Helper
Trigger1 = animelem = 8, = 1
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1035, 1050)
Pos      = IfElse(Anim = 1030, 40, -40),-62
PosType  = P1
OwnPal   = 1

;───────────────

[State 1030,~反射ナイフ6~]
Type     = Helper
Trigger1 = animelem = 7
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1051, 1052)
Pos      = -40,-62
PosType  = P1
OwnPal   = 1

[State 1030,~反射ナイフ7~]
Type     = Helper
Trigger1 = animelem = 8
Name     = "Knife"
Stateno  = 1031
ID       = IfElse(Anim != 1030, 1053, 1054)
Pos      = -40,-62
PosType  = P1
OwnPal   = 1

[State 1030,~立ちに~]
Type     = ChangeState
Trigger1 = animtime = 0
Value    = 0
Ctrl     = 1



;---------------------------------------------

;---------------------------------------------
[StateDef 1031]
MoveType    = A
Physics     = N
Anim        = 18200
VelSet      = 0,0
SprPriority = 3

[State 1031,~影なし~]
Type     = AssertSpecial
Trigger1 = 1
Flag     = NoShadow
IgnoreHitPause = 1

[State 1031,~残像~]
Type     = Null;Helper
Trigger1 = Time = 0
Name     = "After"
Stateno  = 258
ID       = 258
Pos      = 0,0
PosType  = P1
OwnPal   = 1
IgnoreHitPause = 1

[State 1031,~移動速度~]
Type     = null;VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1031) || IsHelper(1032) || IsHelper(1033) || IsHelper(1034) || IsHelper(1035) 
X        = IfElse(IsHelper(1031),4.0 ,IfElse(IsHelper(1032),4.2, IfElse(IsHelper(1033),4.4, IfElse(IsHelper(1034),4.6,4.8))))
Y        = IfElse(IsHelper(1031),-4.8 ,IfElse(IsHelper(1032),-4.6, IfElse(IsHelper(1033),-4.4, IfElse(IsHelper(1034),-4.2, -4.0))))

[State 1031,~移動速度~]
Type     = null;VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1051) || IsHelper(1053)
X        = IfElse(IsHelper(1051),5.0 , IfElse(IsHelper(1053),5.2,5.2))
Y        = IfElse(IsHelper(1051),-3.8 ,IfElse(IsHelper(1053),-3.6, -4.0))

[State 1031,~移動速度~]
Type     = null;VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1052) || IsHelper(1054)
X        = IfElse(IsHelper(1052),1.4 , IfElse(IsHelper(1054),-1.4,5.2))
Y        = -4.8

[State 1031,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1031) || IsHelper(1032) || IsHelper(1033) || IsHelper(1034) || IsHelper(1035) 
X        = IfElse(IsHelper(1031),4.0 ,IfElse(IsHelper(1032),4.2, IfElse(IsHelper(1033),4.4, IfElse(IsHelper(1034),4.6,4.8))))*2
Y        = IfElse(IsHelper(1031),-4.8 ,IfElse(IsHelper(1032),-4.6, IfElse(IsHelper(1033),-4.4, IfElse(IsHelper(1034),-4.2, -4.0))))*2

[State 1031,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1051) || IsHelper(1053)
X        = IfElse(IsHelper(1051),5.0 , IfElse(IsHelper(1053),5.2,5.2))*2
Y        = IfElse(IsHelper(1051),-3.8 ,IfElse(IsHelper(1053),-3.6, -4.0))*2

[State 1031,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1052) || IsHelper(1054)
X        = IfElse(IsHelper(1052),1.4 , IfElse(IsHelper(1054),-1.4,5.2))*2
Y        = -4.8*2



[State 1031,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1036) || IsHelper(1037) || IsHelper(1038) || IsHelper(1039) || IsHelper(1040)
X        = IfElse(IsHelper(1036),4.1 ,IfElse(IsHelper(1037),4.3, IfElse(IsHelper(1038),4.5, IfElse(IsHelper(1039),4.7, 4.9))))*0.01
Y        = IfElse(IsHelper(1036),-4.9 ,IfElse(IsHelper(1037),-4.7, IfElse(IsHelper(1038),-4.5, IfElse(IsHelper(1039),-4.3, -4.1))))*0.01
[State 1031,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1041) || IsHelper(1042) || IsHelper(1043) || IsHelper(1044) || IsHelper(1045)
X        = IfElse(IsHelper(1041),4.2 ,IfElse(IsHelper(1042),4.4, IfElse(IsHelper(1043),4.6, IfElse(IsHelper(1044),4.8, 5.0))))*0.01
Y        = IfElse(IsHelper(1041),-5.0 ,IfElse(IsHelper(1042),-4.8, IfElse(IsHelper(1043),-4.6, IfElse(IsHelper(1044),-4.4, -4.2))))*0.01
[State 1031,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1046) || IsHelper(1047) || IsHelper(1048) || IsHelper(1049) || IsHelper(1050)
X        = IfElse(IsHelper(1046),1.2 ,IfElse(IsHelper(1047),0.6, IfElse(IsHelper(1048),0.00001, IfElse(IsHelper(1049),-0.6, -1.2))))*0.01
Y        = -4.8*0.01

[State 1031,~反射 Y~]
Type     = VelSet
Trigger1 = Vel Y <= -1 && Var(0) = 2
Y        = Vel Y - Vel Y - Vel Y

[State 1031,~反射 X~]
Type     = Turn
Trigger1 = Time = 0
Trigger1 = IsHelper(1031) || IsHelper(1032) || IsHelper(1033) || IsHelper(1034) || IsHelper(1035)
Trigger2 = Time = 0
Trigger2 = IsHelper(1036) || IsHelper(1037) || IsHelper(1038) || IsHelper(1039) || IsHelper(1040)
Trigger3 = Time = 0
Trigger3 = IsHelper(1041) || IsHelper(1042) || IsHelper(1043) || IsHelper(1044) || IsHelper(1045) || IsHelper(1049) || IsHelper(1050)
Trigger4 = Time = 0
Trigger4 = IsHelper(1051) || IsHelper(1053)
Trigger5 = Time = 0
Trigger5 = IsHelper(1052) || IsHelper(1054)
Trigger6 = Var(5) <= 3
Trigger6 = Var(0) = 1 || Var(0) = 3
[State 1031,~反射 X~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1031) || IsHelper(1032) || IsHelper(1033) || IsHelper(1034) || IsHelper(1035)
Trigger2 = Time = 0
Trigger2 = IsHelper(1036) || IsHelper(1037) || IsHelper(1038) || IsHelper(1039) || IsHelper(1040)
Trigger3 = Time = 0
Trigger3 = IsHelper(1041) || IsHelper(1042) || IsHelper(1043) || IsHelper(1044) || IsHelper(1045)
Trigger4 = Time = 0
Trigger4 = IsHelper(1051) || IsHelper(1053)
Trigger5 = Time = 0
Trigger5 = IsHelper(1052) || IsHelper(1054)
Trigger6 = Var(5) <= 3
Trigger6 = Var(0) = 1 || Var(0) = 3
X        = Vel X - Vel X - Vel X

[State 1031,~反射回数~]
Type     = VarAdd
Trigger1 = Var(0) != 0
V        = 5
Value    = 1
IgnoreHitPause = 1
[State 1031,~反射しないように~]
Type     = VarSet
Trigger1 = Var(0) != 0 && Var(5) <= 3
V        = 0
Value    = 0
IgnoreHitPause = 1
[State 1031,~反射しないように2nd.~]
Type     = VarSet
Trigger1 = Var(5) >= 5
V        = 6
Value    = 0
IgnoreHitPause = 1

[State 1031,~角度変更~]
Type     = AngleDraw
Trigger1 = 1
Value    = ATan (Vel Y / Vel X) * (-180.0 / Pi)

[State 1031,~反射した~]
Type       = VarSet
TriggerAll = Var(5) <= 1
Trigger1   = Vel Y <= -0.00001 && ScreenPos Y <= 10
Trigger2   = Vel X >= 0.00001 && FrontEdgeBodyDist <= -10 || Vel X <= -0.00001 && BackEdgeBodyDist <= 0
V          = 0
Value      = IfElse(FrontEdgeBodyDist <= 0,1, IfElse(Vel Y <= 0 && ScreenPos Y <= 10,2, IfElse(BackEdgeBodyDist <= 0,3, 0)))

[State 2000, 6]
type = PlaySnd
TriggerAll = Var(5) <= 1
Trigger1   = Vel Y <= -0.00001 && ScreenPos Y <= 10
Trigger2   = Vel X >= 0.00001 && FrontEdgeBodyDist <= -10 || Vel X <= -0.00001 && BackEdgeBodyDist <= 0
value = 400,1

[State 600,***]
type = Explod
trigger1 = MoveGuarded = 1
anim = 4151
id = -1
pos = 30-random%25,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999

[State 600,***]
type = Explod
trigger1 = movehit = 1
anim = 23400
id = 11111
pos = 30-random%10,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999


[State 1011,~回転アニメに~]
Type     = ChangeState
Trigger1 = MoveGuarded
Value    = 2269

[State 2350, 4〜6ヒット]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype = Hard
damage = 4,2
guard.dist = 123 ;リーチ7
hitflag = MAF
guardflag = HA
hitsound = S63,1
guardsound = S60,8
priority = 7, Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-50
pausetime = 2,2
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,-3
guard.velocity = -6
air.velocity = -1.6,-5
airguard.velocity = -4,-4
guard.cornerpush.veloff = -7.8
airguard.cornerpush.veloff = 0
getpower = 30
fall = 1
fall.recover = 0
guard.kill = 0

[State 1031,~消滅~]
Type     = DestroySelf
Trigger1 = Time >= 200
Trigger2 = Pos Y >= 50 || ScreenPos Y <= -50
Trigger3 = FrontEdgeBodyDist <= -50 || BackEdgeBodyDist <= -50

;---------------------------------------------

;---------------------------------------------

;---------------------------------------------

;---------------------------------------------
; アンビシャスジャック
;
; 2本のナイフを前方へ投げます。
; そのナイフは5方向へランダムに向きを変えながら進むので、
; 軌道を見切ることが出来ません。
; 原作では9本で、曲がる角度も細かいです。


[Statedef 2590]
Type     = S
MoveType = A
Physics  = N
Anim     = 2580
poweradd = 180
Ctrl     = 0

[State 1010,~状況設定~]
Type     = StateTypeSet
Trigger1 = Time = 0 && StateType != A
Value    = S
Physics  = S

[State 1010,~アニメ変更~]
Type     = ChangeAnim
Trigger1 = Time = 0
Value    = IfElse(StateType != A, 1010, 1011)

[State 1010,~ナイフ発射~]
Type     = PlaySnd
Trigger1 = AnimElem = 7
Value    = S2,0
Channel  = 1

[State 1010,~速度設定 X~]
Type     = VelSet
Trigger1 = StateType = A && Vel X != 0
X        = IfElse(Vel X >= 0.00001, 1, -1)
[State 1010,~速度設定 Y~]
Type     = VelSet
Trigger1 = StateType = A && Vel Y != 0
Y        = IfElse(Vel Y >= 0.00001, 1, -1)
[State 1010,~地上に着いた~]
Type     = VelSet
Trigger1 = StateType = A && Vel Y = 0 || StateType = A && Pos Y >= 5
Y        = 0

[State 1010,~アンビシャスジャック1~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1011
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック2~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1012
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック3~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1013
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック4~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1014
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック5~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1015
Pos      = 20,-62
PosType  = P1
OwnPal   = 1

[State 1010,~アンビシャスジャック1~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1011
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック2~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1012
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック3~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1013
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック4~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1014
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック5~]
Type     = Helper
Trigger1 = AnimElem = 7
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1015
Pos      = 20,-62
PosType  = P1
OwnPal   = 1

[State 1010,~立ちへ~]
Type     = ChangeState
Trigger1 = animtime = 0
Value    = 0
Ctrl     = 1
;---------------------------------------------
[StateDef 1011];ヘルパ
MoveType    = A
Physics     = N
Anim        = 18200
SprPriority = 3

[State 1011,~影なし~]
Type     = AssertSpecial
Trigger1 = 1
Flag     = NoShadow
IgnoreHitPause = 1

[State 1011,~移動速度~]
Type     = VelSet
Trigger1 = Time = 0
Trigger1 = IsHelper(1011) || IsHelper(1012) || IsHelper(1013) || IsHelper(1014) || IsHelper(1015)
X        = IfElse(IsHelper(1011),4.8 ,IfElse(IsHelper(1012),5.1, IfElse(IsHelper(1013),5.4, IfElse(IsHelper(1014),5.1, 4.8))))*2
Y        = IfElse(IsHelper(1011),-1.8 ,IfElse(IsHelper(1012),-0.9, IfElse(IsHelper(1013),0, IfElse(IsHelper(1014),0.9, 1.8))))*2

[State 1011,~ランダム~]
Type     = VarRandom
Trigger1 = 1
V        = 10
Range    = 0,80

[State 1011,~速度設定1~]
Type     = VarSet
Trigger1 = Var(0) != 0 && Vel X != 0.400000 && Vel Y != -5.800000
Trigger1 = (Var(10) = [0,10]) || (Var(10) = [41,50])
V        = 0
Value    = 0
[State 1011,~速度設定2~]
Type     = VarSet
Trigger1 = Var(0) != 1 && Vel X != 1.4 && Vel Y != -4.8
Trigger1 = (Var(10) = [11,20]) || (Var(10) = [51,60])
V        = 0
Value    = 1
[State 1011,~速度設定3~]
Type     = VarSet
Trigger1 = Var(0) != 2 && Vel X != 2.8 && Vel Y != -3.4
Trigger1 = (Var(10) = [21,30]) || (Var(10) = [61,70])
V        = 0
Value    = 2
[State 1011,~速度設定4~]
Type     = VarSet
Trigger1 = Var(0) != 3 && Vel X != 5.0 && Vel Y != -1.2
Trigger1 = (Var(10) = [31,40]) || (Var(10) = [0,10])
V        = 0
Value    = 3
[State 1011,~速度設定5~]
Type     = VarSet
Trigger1 = Var(0) != 4 && Vel X != 6.2 && Vel Y != 0
Trigger1 = (Var(10) = [31,40]) || (Var(10) = [31,40])
V        = 0
Value    = 4
[State 1011,~速度設定6~]
Type     = VarSet
Trigger1 = Var(0) != 5 && Vel X != 5.0 && Vel Y != 1.2
Trigger1 = (Var(10) = [41,50]) || (Var(10) = [71,80])
V        = 0
Value    = 5
[State 1011,~速度設定5~]
Type     = VarSet
Trigger1 = Var(0) != 6 && Vel X != 2.8 && Vel Y != 3.4
Trigger1 = (Var(10) = [51,60]) || (Var(10) = [11,20])
V        = 0
Value    = 6
[State 1011,~速度設定6~]
Type     = VarSet
Trigger1 = Var(0) != 7 && Vel X != 1.4 && Vel Y = 4.8
Trigger1 = (Var(10) = [61,70]) || (Var(10) = [21,30])
V        = 0
Value    = 7
[State 1011,~速度設定5~]
Type     = VarSet
Trigger1 = Var(0) != 8 && Vel X != 0.4 && Vel Y = 5.8
Trigger1 = (Var(10) = [71,80]) || (Var(10) = [0,10])
V        = 0
Value    = 8

[State 1011,~移動速度1~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 0
X        = 0.4  *2
Y        = -5.8 *2
[State 1011,~移動速度2~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 1
X        = 1.4*2
Y        = -4.8*2
[State 1011,~移動速度3~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 2
X        = 2.8*2
Y        = -3.4*2
[State 1011,~移動速度4~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 3
X        = 5.0*2
Y        = -1.2*2
[State 1011,~移動速度5~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 4
X        = 6.2*2
Y        = 0*2
[State 1011,~移動速度6~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 5
X        = 5.0*2
Y        = 1.2*2
[State 1011,~移動速度7~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 6
X        = 2.8*2
Y        = 3.4*2
[State 1011,~移動速度8~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 7
X        = 1.4*2
Y        = 4.8*2
[State 1011,~移動速度9~]
Type     = VelSet
Trigger1 = Time%5 = 0 && Time >= 5 && Var(0) = 8
X        = 0.4*2
Y        = 5.8*2

[State 1011,~角度変更~]
Type     = AngleDraw
Trigger1 = 1
Value    = ATan (Vel Y / Vel X) * (-180.0 / Pi)

[State 1011,~回転アニメに~]
Type     = ChangeState
Trigger1 = MoveGuarded
Value    = 2269

[State 1000, 0]
type = AfterImage
trigger1 = time <= 3
time = 200
timegap = 1
Length = 50
palcolor = 256
;PalBright =50,50,0
;PalMul =60,60,0
PalContrast = 150,150,0
trans = add

[State 600,***]
type = Explod
trigger1 = MoveGuarded = 1
anim = 4151
id = -1
pos = 30-random%25,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999

[State 2350, 4〜6ヒット]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype = Hard
damage = 4,2
hitflag = MAF
guardflag = MHA
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-50
pausetime = 0,4
hitsound = S63,1
guardsound = S60,8
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,0
guard.velocity = -6
air.velocity = -1.6,-1
airguard.velocity = -4,-4
guard.cornerpush.veloff = -7.8
airguard.cornerpush.veloff = 0
getpower = 30
fall = 1
fall.recover = 1
guard.kill = 0


[State 600,***]
type = Explod
trigger1 = movehit = 1
anim = 23400
id = 11111
pos = 30-random%10,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999

[State 1011,~消滅~]
Type     = DestroySelf
Trigger1 = Time >= 500
Trigger2 = Pos Y >= 50 || ScreenPos Y <= -50
Trigger3 = FrontEdgeBodyDist <= -50 || BackEdgeBodyDist <= -50
;---------------------------------------------


;---------------------------------------------
;---------------------------------------------

;空中アンビシャスジャック
[Statedef 2591]
type     = A
movetype = A
physics  = N
ctrl     = 0
anim     = 2591
poweradd = 150
juggle   = 2

[State 2591, 減速X]
type = VelSet
trigger1 = Time = 0
trigger1 = Vel X != [-3,3]
x = ifelse(vel X > 0,3,-3)

[State 2591, 減速Y]
type = VelSet
trigger1 = Time = 0
trigger1 = Vel Y != [-3,3]
y = ifelse(vel Y > 0,3,-3)

[State 2591, 低空補正X]
type = VelAdd
trigger1 = AnimElemTime(5) < 0
trigger1 = Pos Y > -4
trigger1 = Vel X != 0
x = ifelse(vel X > 0,-0.1,0.1)

[State 2591, 低空補正Y]
type = VelSet
trigger1 = AnimElemTime(5) < 0
trigger1 = Pos Y > -4
y = -0.2

[State 2591, 基本速度補正]
type = VelAdd
trigger1 = AnimElemTime(2) < 0
trigger1 = Vel X != [-0.6,0.6]
trigger1 = Vel Y != [-0.4,0.5]
x = ifelse(vel X >= 0,-0.6,0.6)
y = ifelse(vel Y >= 0,-0.4,0.5)

[State 2591, 初期反動]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = -1
y = -2

[State 2591, 反動]
type = VelAdd
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(8) <= 1
x = -0.09
y = -0.18

[State 2591, 音]
type = PlaySnd
trigger1 = AnimElemTime(4) = 4
value = 2, 0

[State 1010,~アンビシャスジャック1~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1011
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック2~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1012
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック3~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1013
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック4~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1014
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック5~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1015
Pos      = 20,-62
PosType  = P1
OwnPal   = 1

[State 1010,~アンビシャスジャック1~]
Type     = Helper
Trigger1 = AnimElem =5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1011
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック2~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1012
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック3~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1013
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック4~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1014
Pos      = 20,-62
PosType  = P1
OwnPal   = 1
[State 1010,~アンビシャスジャック5~]
Type     = Helper
Trigger1 = AnimElem = 5
Name     = "AmbitiouszJack"
Stateno  = 1011
ID       = 1015
Pos      = 20,-62
PosType  = P1
OwnPal   = 1

[State 2591, 元の重力]
type = VelAdd
triggerall = AnimElemTime(8) > 2
trigger1 = Pos Y < -10
trigger1 = AnimElemTime(12) < 0
trigger2 = AnimElemTime(12) >= 0
y = 0.43

[State 2591, 着地防止]
type = VelAdd
trigger1 = Pos Y = [-9,0]
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(12) < 0
y = -0.2

[State 2591, ダッシュキャンセル]
type = ChangeState
triggerall = command = "FF"
triggerall = Var(4) != 0
trigger1 = AnimElemTime(6) >= 1
value = 103
ctrl = 0

[State 2591, ダッシュキャンセル]
type = ChangeState
triggerall = command = "BB"
triggerall = Var(4) != 0
trigger1 = AnimElemTime(6) >= 1
value = 108
ctrl = 0

[State 2591, コントロール可]
type = CtrlSet
trigger1 = AnimElemTime(14) >= 0
value = 1

[State 2591, 着地]
type = ChangeState
trigger1 = Pos Y > -4
trigger1 = AnimElemTime(12) >= 0
value = 52
ctrl = 1


;45ナイフ1
[Statedef 2592]
type     = A
movetype = A
physics  = N
anim     = 6101
sprpriority = 4

[State 2592, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2592, 残像]
type = AfterImage
trigger1 = Time = 0
time = 300
trans = add
timegap = 1
framegap = 1
length = 12
palbright = 0,8,64
palcontrast = 0,16,144
palpostbright = 0,0,8
paladd = 0,0,16
palmul = 0.5,1,1

[State 2592, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 5.66
y = -5.66

[State 2592, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2592, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2592, 光エフェクト]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6181
anim = 6133
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2592, グレイズ対策]
type = SprPriority
trigger1 = MoveReversed
value = 4

[State 2592, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2592, 転進1]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,24]
value = 2595
ctrl = 0

[State 2592, 転進3]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,49]
value = 2597
ctrl = 0

[State 2592, 転進4]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [50,74]
value = 2598
ctrl = 0

[State 2592, 転進5]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [75,99]
value = 2599
ctrl = 0

[State 2592, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120

;0ナイフ1
[Statedef 2593]
type     = A
movetype = A
physics  = N
anim     = 6100
sprpriority = 4

[State 2593, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2593, 残像]
type = AfterImage
trigger1 = Time = 0
time = 300
trans = add
timegap = 1
framegap = 1
length = 12
palbright = 0,8,64
palcontrast = 0,16,144
palpostbright = 0,0,8
paladd = 0,0,16
palmul = 0.5,1,1

[State 2593, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 8
y = 0

[State 2593, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2593, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2593, エフェクト]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6182
anim = 6134
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2593, グレイズ対策]
type = SprPriority
trigger1 = MoveReversed
value = 4

[State 2593, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2593, 転進1]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,24]
value = 2595
ctrl = 0

[State 2593, 転進2]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [50,79]
value = 2596
ctrl = 0

[State 2593, 転進4]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,49]
value = 2598
ctrl = 0

[State 2593, 転進5]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [80,99]
value = 2599
ctrl = 0

[State 2593, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120

;-45ナイフ1
[Statedef 2594]
type     = A
movetype = A
physics  = N
anim     = 6101
sprpriority = 4

[State 2594, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2594, 残像]
type = AfterImage
trigger1 = Time = 0
time = 300
trans = add
timegap = 1
framegap = 1
length = 12
palbright = 0,8,64
palcontrast = 0,16,144
palpostbright = 0,0,8
paladd = 0,0,16
palmul = 0.5,1,1

[State 2594, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 5.66
y = 5.66

[State 2594, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2594, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2594, 角度]
type = AngleDraw
trigger1 = 1
value = -90

[State 2594, 光エフェ]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6183
anim = 6135
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2594, グレイズ対策]
type = SprPriority
trigger1 = MoveReversed
value = 4

[State 2594, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2594, 転進1]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,24]
value = 2595
ctrl = 0

[State 2594, 転進2]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,49]
value = 2596
ctrl = 0

[State 2594, 転進3]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [50,74]
value = 2597
ctrl = 0

[State 2594, 転進5]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [75,99]
value = 2599
ctrl = 0

[State 2594, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120


;90ナイフ
[Statedef 2595]
type     = A
movetype = A
physics  = N
anim     = 6102
sprpriority = 4
hitdefpersist = 1

[State 2595, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2595, 角度]
type = AngleDraw
trigger1 = 1
value = 90

[State 2595, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 0
y = -8

[State 2595, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2595, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2595, 幻影]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6180
anim = 6132
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2595, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2595, 転進2]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,32]
trigger1 = ScreenPos Y > -60
value = 2596
ctrl = 0

[State 2595, 転進3]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [32,66]
value = 2597
ctrl = 0

[State 2595, 転進4]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [67,99]
trigger2 = Var(21) = [0,32]
trigger2 = ScreenPos Y <= -60 ;上に行き過ぎた際に下方向に曲がりやすい
value = 2598
ctrl = 0

[State 2595, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120


;45ナイフ2
[Statedef 2596]
type     = A
movetype = A
physics  = N
anim     = 6101
sprpriority = 4
hitdefpersist = 1

[State 2596, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2596, 角度]
type = AngleDraw
trigger1 = Time = [0,1]

[State 2596, 角度設定]
type = AngleSet
trigger1 = 1
value = 0

[State 2596, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2596, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2596, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 5.66
y = -5.66

[State 2596, 幻エフェクト]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6181
anim = 6133
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2596, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2596, 転進1]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,24]
value = 2595
ctrl = 0

[State 2596, 転進3]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,49]
value = 2597
ctrl = 0

[State 2596, 転進4]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [50,74]
value = 2598
ctrl = 0

[State 2596, 転進5]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [75,99]
value = 2599
ctrl = 0

[State 2596, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120

;0ナイフ2
[Statedef 2597]
type     = A
movetype = A
physics  = N
anim     = 6100
sprpriority = 4
hitdefpersist = 1

[State 2597, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2597, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2597, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2597, 角度]
type = AngleDraw
trigger1 = Time = [0,1]

[State 2597, 角度設定]
type = AngleSet
trigger1 = 1
value = 0

[State 2597, 角度設定]
type = VelSet
trigger1 = Time = 0
x = 8
y = 0

[State 2597, 発光]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6182
anim = 6134
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2597, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2597, 転進1]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,24]
value = 2595
ctrl = 0

[State 2597, 転進2]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,74]
trigger1 = P2Dist Y <= 10
value = 2596
ctrl = 0

[State 2597, 転進4]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,74]
trigger1 = P2Dist Y > 10
value = 2598
ctrl = 0

[State 2597, 転進5]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [75,99]
value = 2599
ctrl = 0

[State 2597, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120

;-45ナイフ2
[Statedef 2598]
type     = A
movetype = A
physics  = N
anim     = 6101
sprpriority = 4
hitdefpersist = 1

[State 2598, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2598, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2598, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2598, 角度]
type = AngleDraw
trigger1 = 1
value = -90

[State 2598, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 5.66
y = 5.66

[State 2598, 光エフェクト]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6183
anim = 6135
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2598, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2598, 転進1]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,24]
value = 2595
ctrl = 0

[State 2598, 転進2]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [25,49]
value = 2596
ctrl = 0

[State 2598, 転進3]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [50,74]
value = 2597
ctrl = 0

[State 2598, 転進5]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [75,99]
value = 2599
ctrl = 0

[State 2598, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120

;-90ナイフ
[Statedef 2599]
type     = A
movetype = A
physics  = N
anim     = 6102
sprpriority = 4
hitdefpersist = 1

[State 2599, 影消去]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 2599, 角度]
type = AngleDraw
trigger1 = 1
value = -90

[State 2599, 速度設定]
type = VelSet
trigger1 = Time = 0
x = 0
y = 8

[State 2599, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 2599, 対策]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 6
stateno = 2269

[State 2599, 幻光]
type = Explod
trigger1 = Time = 1
trigger2 = Time = 3
trigger3 = Time = 5
ID = 6184
anim = 6136
postype = P1
ownpal = 1
sprpriority = 3
ignorehitpause = 1

[State 2599, ランダム]
type = VarRandom
trigger1 = Time = 4
v = 21
range = 0,99

[State 2599, 転進2]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [0,33]
trigger2 = Var(21) = [67,99] ;下に行き過ぎた際に上方向に曲がりやすい
trigger2 = Pos Y >= 45
value = 2596
ctrl = 0

[State 2599, 転進3]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [33,66]
value = 2597
ctrl = 0

[State 2599, 転進4]
type = ChangeState
triggerall = Time = 6
trigger1 = Var(21) = [67,99]
trigger1 = Pos Y < 45
value = 2598
ctrl = 0

[State 2599, 自己消滅]
type = DestroySelf
trigger1 = Time = 200
trigger2 = FrontEdgeDist <= -60
trigger3 = BackEdgeDist <= -60
trigger4 = Pos Y > 90
trigger5 = ScreenPos Y <= -120


;--------------------------------
[Statedef 51255];直線ナイフ
type     = A
movetype = A
physics  = N
anim     = 12417
sprpriority = 4
hitdefpersist = 1

[State 1000, 0]
type = Velset
trigger1 = 1
x = 15

[State 600,***]
type = Explod
trigger1 = MoveGuarded = 1
anim = 4151
id = -1
pos = 30-random%25,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999

[State 600,***]
type = Explod
trigger1 = movehit = 1
anim = 23400
id = 11111
pos = 30-random%10,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999


[State 1011,~回転アニメに~]
Type     = ChangeState
Trigger1 = MoveGuarded
Value    = 2269

[State 2350, 4〜6ヒット]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype = Hard
damage = ifelse(root,var(2)=1,15,40),10
guard.dist = 123 ;リーチ7
hitflag = MAF
guardflag = HA
hitsound = S63,1
guardsound = S60,8
priority = 7, Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-50
pausetime = 2,2
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,-3
guard.velocity = -6
air.velocity = -1.6,-5
airguard.velocity = -4,-4
guard.cornerpush.veloff = -7.8
airguard.cornerpush.veloff = 0
getpower = 30
fall = 1
fall.recover = 0
guard.kill = 0
kill = ifelse(root,var(2)=0,1,0)

[State 1031,~消滅~]
Type     = DestroySelf
Trigger1 = Time >= 200
Trigger2 = Pos Y >= 50 || ScreenPos Y <= -50
Trigger3 = FrontEdgeBodyDist <= -50 || BackEdgeBodyDist <= -50

;--------------------------------
[Statedef 52411];落下ナイフ
type     = A
movetype = A
physics  = N
anim     = 8777+random%3
sprpriority = 4
hitdefpersist = 1

[State 2594, 残像]
type = AfterImage
trigger1 = Time = 0 && gametime%2=0
time = 300
trans = add
timegap = 1
framegap = 1
length = 12
palbright = 0,8,64
palcontrast = 0,16,144
palpostbright = 0,0,8
paladd = 0,0,16
palmul = 0.5,1,1

[State 1000, 0]
type = Velset
trigger1 = anim = 8777 && time = 0
x = -4
y = 15+random%10

[State 1000, 0]
type = Velset
trigger1 = anim = 8778&& time = 0
y = 15+random%10

[State 1000, 0]
type = Velset
trigger1 = anim = 8779&& time = 0
x = 4
y = 15+random%10-4

[State 600,***]
type = Explod
trigger1 = MoveGuarded = 1
anim = 4151
id = -1
pos = 30-random%25,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999

[State 600,***]
type = Explod
trigger1 = movehit = 1
anim = 23400
id = 11111
pos = 30-random%10,-70+random%40
postype = p2
sprpriority = 999999
supermovetime = 99999999

[State 1011,~回転アニメに~]
Type     =  ChangeState
Trigger1 = MoveGuarded
Value    = 2269

[State 1000, 0]
type = Velset
Trigger1 = pos y >0
x = 0
y = 0

[State 1011,~回転アニメに~]
Type     = ChangeState
Trigger1 = pos y >0
Value    = 2255

[State 2350, 4〜6ヒット]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype = Hard
damage = ifelse(root,var(2)=1,11,20),2
guard.dist = 123 ;リーチ7
hitflag = MAF
guardflag = HA
hitsound = S63,1
guardsound = S60,8
priority = 7, Hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-50
pausetime = 2,2
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.2,-3
guard.velocity = -6
air.velocity = -1.6,-5
airguard.velocity = -4,-4
guard.cornerpush.veloff = -7.8
airguard.cornerpush.veloff = 0
getpower = 30
fall = 1
fall.recover = 0
guard.kill = 0
kill = ifelse(root,var(2)=0,1,0)

[State 2269, 影がない]
type = AssertSpecial
trigger1 = 1
flag = Noshadow

[State 1031,~消滅~]
Type     = DestroySelf
Trigger1 = Time >= 200
Trigger2 = Pos Y >= 50 || ScreenPos Y <= -400
Trigger3 = FrontEdgeBodyDist <= -50 || BackEdgeBodyDist <= -50



;--------------------------------------------------------------------
;弾かれたナイフ
[Statedef 2269]
type     = A
movetype = I
physics  = N
anim     = 18200
poweradd = 0
velset   = 0,0
sprpriority = 5

[State 2269, 加速]
type = Velset
Trigger1 = time = 0
y = -4-(random/334)
x = -0.5-(random/500)

[State 2269, 影がない]
type = AssertSpecial
trigger1 = 1
flag = Noshadow

[State 2269, 残像消去]
type = AfterImageTime
trigger1 = Time = 0
time = 0

[State 2269, 角度変更]
type = AngleDraw
trigger1 = 1

[State 2269, 15度回転]
type = AngleAdd
trigger1 = 1
value = -15

[State 2269, 加速]
type = VelAdd
trigger1 = Time > 0
y = 0.3

[State 2269, 加速]
type = Velset
Trigger1 = pos y > 0
y = 0
x = 0

[State 1011,~回転アニメに~]
Type     = ChangeState
Trigger1 = pos y > 0
Value    = 2255
;--------------------------------------------------
;弾かれたナイフ
[Statedef 2255]
type     = S
movetype = I
physics  = N
anim     = 8124+random%3
poweradd = 0
sprpriority = 5

[State 2591, 音]
type = PlaySnd
trigger1 = time = 0
value = S63,2

[State 1000, 0]
type = AssertSpecial
trigger1 = time%2=0
flag = invisible

[State 1000, 0]
type = Turn
trigger1 = time = 0 && random>=500

[State 2269, 消滅]
type = DestroySelf
trigger1 = Time = 40
;---------------------------------------------