;地上遠距離Ｃ
[Statedef 6020]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = -30

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(-30*Pi/180)*5
Y = -Sin(-30*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = FrontEdgeDist < -70

[Statedef 6021]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = -15

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(-15*Pi/180)*5
Y = -Sin(-15*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = FrontEdgeDist < -70

[Statedef 6022]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(0*Pi/180)*5
Y = -Sin(0*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = FrontEdgeDist < -70

[Statedef 6023]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = 15

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(15*Pi/180)*5
Y = -Sin(15*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = FrontEdgeDist < -70

[Statedef 6024]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = 30

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(30*Pi/180)*5
Y = -Sin(30*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = FrontEdgeDist < -70
;---------------------------
;しゃがみ遠距離 - 近
[Statedef 6025]
Anim = 7100
movetype = A

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 1.2,0.5

[State -1]
type = VelSet
trigger1 = time = 0
x = 6

[State -1]
type = VelAdd
trigger1 = Vel X > -6
X = -0.25

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*800)/10), 10
animtype = high
getpower = 40,40
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -8,0
airguard.velocity =  -2,-4   
air.velocity = -4,-4
fall = 0
fall.recovertime = Floor(30*Parent,FVar(20))
air.fall = 1
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15703

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = BackEdgeDist < -50
;---------------------------
;しゃがみ遠距離 - 中
[Statedef 6026]
Anim = 7100
movetype = A

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 1.2,0.5

[State -1]
type = VelSet
trigger1 = time = 0
x = 7

[State -1]
type = VelAdd
trigger1 = time >= 20
trigger1 = Vel X > -7
X = -0.25

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*800)/10), 10
animtype = high
getpower = 40,40
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -8,0
airguard.velocity =  -2,-4   
air.velocity = -4,-4
fall = 0
fall.recovertime = Floor(30*Parent,FVar(20))
air.fall = 1
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15703

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = BackEdgeDist < -50
;---------------------------
;しゃがみ遠距離 - 遠
[Statedef 6027]
Anim = 7100
movetype = A

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 1.2,0.5

[State -1]
type = VelSet
trigger1 = time = 0
x = 8

[State -1]
type = VelAdd
trigger1 = time >= 40
trigger1 = Vel X > -8
X = -0.25

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*800)/10), 10
animtype = high
getpower = 40,40
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -8,0
airguard.velocity =  -2,-4   
air.velocity = -4,-4
fall = 0
fall.recovertime = Floor(30*Parent,FVar(20))
air.fall = 1
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15703

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = BackEdgeDist < -50
;---------------------------
;立ち遠距離Ａ射撃上段
[Statedef 6030]
Anim = 6030
movetype = A
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = 60+Var(1)
scale = 0.75,0.75

[State -1]
type = VarAdd
trigger1 = Time >= 0
V = 1
Value = -5

[State -1]
type = VelSet
trigger1 = 1
x = Cos((60+Var(1))*pi/180)*20
y = -Sin((60+Var(1))*pi/180)*20

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*430)/10), 6
animtype = high
getpower = 30,30
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -4,-4
airguard.velocity =  -2,-4   
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(40*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = Parentvarset
trigger1 = moveguarded = 1
v = 10
value = 2

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15704

[State -1]
type = ChangeState
trigger1 = movecontact = 1
trigger2 = Time = 50
Value = 6080
;---------------------------
;立ち遠距離Ａ射撃下段
[Statedef 6031]
Anim = 6030
movetype = A
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = -60+Var(1)
scale = 0.75,0.75

[State -1]
type = VarAdd
trigger1 = Time >= 0
V = 1
Value = 5

[State -1]
type = VelSet
trigger1 = 1
x = Cos((-60+Var(1))*pi/180)*20
y = -Sin((-60+Var(1))*pi/180)*20

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*430)/10), 6
animtype = high
getpower = 30,30
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -4,-4
airguard.velocity =  -2,-4   
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(40*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = Parentvarset
trigger1 = moveguarded = 1
v = 10
value = 2

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15704

[State -1]
type = ChangeState
trigger1 = movecontact = 1
trigger2 = Time = 50
Value = 6080
;---------------------------
;立ち遠距離Ａ対空
[Statedef 6033]
Anim = 6032
movetype = A
ctrl = 0
SprPriority = 9

[State -1]
type = SprPriority
trigger1 = 1
Value = 9

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = Explod
trigger1 = time%2 = 1
Anim = 6033
ID = 6033
Pos = 0,0
PosType=P1
Ownpal = 1
Scale = 0.75,0.75

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 0.75,0.75

[State -1]
type = VelSet
trigger1 = time = 0
X = Cos(30*Pi/180)*20
Y = -Sin(30*Pi/180)*20

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*900)/10), 12
animtype = high
getpower = 50,50
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -4,-3
airguard.velocity =  -2,-4   
air.velocity = -4,-3
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.88
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15703

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = Time = 50
;---------------------------
;立ち遠距離Ａ対地
[Statedef 6034]
Anim = 6034
movetype = A
ctrl = 0
SprPriority = 9

[State -1]
type = SprPriority
trigger1 = 1
Value = 9

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = Explod
trigger1 = time%2 = 1
Anim = 6035
ID = 6035
Pos = 0,0
PosType=P1
Ownpal = 1
Scale = 0.75,0.75

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 0.75,0.75

[State -1]
type = VelSet
trigger1 = time = 0
X = Cos(-30*Pi/180)*20
Y = -Sin(-30*Pi/180)*20

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*900)/10), 12
animtype = high
getpower = 50,50
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -4,-3
airguard.velocity =  -2,-4   
air.velocity = -4,-3
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.88
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15703

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = Time = 50
;---------------------------
;補扇
[Statedef 6355]
Anim = 6031
movetype = A
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
type = ParentVarSet
trigger1 = time = 0
V = 11
Value = 2

[State -1]
type = ParentVarAdd
trigger1 = time = 0
trigger1 = Parent,FVar(2) = 0
FV = 1
Value = -25

[State -1]
type = ParentVarSet
trigger1 = time = 0
trigger1 = Parent,FVar(2) = 0
FV = 3
Value = 60

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = Add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarRandom
trigger1 = time = 0
V = 0
Range = -10,10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)
scale = 0.5,1

[State -1]
type = VelSet
trigger1 = time = 0
X = 10
Y = Var(0)*-0.1

[State -1]
type = PalFx
trigger1 = 1
mul = 255,0,0
time = 1

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*80)/10), 1
animtype = high
getpower = 2,2
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime  = 16
numhits = 1
ground.type = high
air.type = high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
fall = 0
fall.recovertime = floor(25*Parent,FVar(20))
air.fall = 1
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.97
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = Parentvarset
trigger1 = moveguarded = 1
v = 10
value = 2
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15701

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = Time = 50
;---------------------------
;レバー入れ射撃
[Statedef 6040]
Anim = 6040
movetype = A
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VelSet
trigger1 = time = 0
x = 5

[State -1]
type = VelAdd
trigger1 = time >= 20
trigger1 = Vel X >= 0.2
X = -0.2

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = !MoveContact
attr = S,SP
damage    = floor((Parent,FVar(20)*600)/10) ,1
animtype = high
getpower = 10,10
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.pausetime = 0,0
guard.slidetime = 32
guard.hittime = 32
guard.ctrltime = 32
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 33
ground.hittime  = 33
ground.velocity = -8,0
airguard.velocity =  -2,-4
air.velocity = -3,-4
fall = 0
fall.recovertime = floor(40*Parent,FVar(20))
air.fall = 1
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit = 1
FV = 20
Value = Parent,FVar(20)*0.92
ignorehitpause = 1
persistent = 10

[State -1]
type = TargetState
triggerall = (NumTarget>0)*(P2StateType!=A)*(movehit=1)
triggerall = (Target,AuthorName="Enap")*(Target,Alive)
trigger1 = (Target,Name="Sakuya Izayoi")+(Target,Name="Aya Syameimaru")+(Target,Name="Marisa Kirisame")+(Target,Name="Remilia Scarlet")
Value = 3000

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15703

[State -1]
type = ChangeState
trigger1 = MoveGuarded = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = AnimTime = 0
;---------------------------
;地上遠距離Ｃ対空
[Statedef 6045]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = 45

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(45*Pi/180)*5
Y = -Sin(45*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = ScreenPos Y < -80

[Statedef 6046]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = 60

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(60*Pi/180)*5
Y = -Sin(60*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = ScreenPos Y < -80

[Statedef 6047]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = 75

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(75*Pi/180)*5
Y = -Sin(75*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = ScreenPos Y < -80
;---------------------------
遠距離空中Ｃ対地
[Statedef 6048]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
Value = -45

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(-45*Pi/180)*5
Y = -Sin(-45*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = ScreenPos Y > 300

[Statedef 6049]
Anim = 6020
movetype = A
SprPriority = 9
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = -1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = IfElse(IsHelper(6049),-75,-60)

[State -1]
type = AngleDraw
trigger1 = 1
Value = Var(0)

[State -1]
type = VelSet
trigger1 = time = 1
X = Cos(Var(0)*Pi/180)*5
Y = -Sin(Var(0)*Pi/180)*5

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 3
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
guardsound = s250,0
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -3,-4
air.fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15700

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = ScreenPos Y > 300
;---------------------------
;地上疾風扇
[Statedef 6050]
Anim = 6050
movetype = A
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5

[State -1]
type = VelSet
trigger1 = 1
x = 15

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*800)/10), 13
animtype = high
getpower = 60,60
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -6
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(40*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,StateNo = [5020,5110]
Value = 15703

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = DestroySelf
trigger1 = Time = 50
;---------------------------
;空中疾風扇
[Statedef 6051]
Anim = 6060
movetype = A
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , NT, ST, HT ,NA, SA, HA
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = Anim = 6060
value = -50
scale = 1.5,1.5

[State -1]
type = AngleDraw
trigger1 = Anim = 6050
Value = 0
scale = 1.5,1.5

[State -1]
type = VelSet
trigger1 = 6060
X = Cos(-50*Pi/180)*6
Y = -Sin(-50*Pi/180)*6

[State -1]
type = ChangeAnim
trigger1 = Pos Y >= 0
trigger1 = Anim != 6050
Value = 6050

[State -1]
type = PosSet
trigger1 = Anim = 6050
Y = 0

[State -1]
type = VelSet
trigger1 = Anim = 6050
X = 4
Y = 0

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*800)/10), 13
animtype = high
getpower = 60,60
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(40*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = movecontact = 1
Value = 6080

[State -1]
type = ChangeState
trigger1 = Parent,StateNo = [5020,5110]
Value = 15703

[State -1]
type = DestroySelf
trigger1 = Time = 300
;---------------------------
[Statedef 6052]
Anim = 7700
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 1.5,0.2
Value = 20

[State -1]
type = DestroySelf
trigger1 = Animtime = 0
;---------------------------
;烈風扇 - 正面 - 最下
[Statedef 6055]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = -25

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = ATan ( Vel Y / Vel X ) * ( -180.0 / Pi )

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 正面 - 真ん中
[Statedef 6056]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = -0

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = ATan ( Vel Y / Vel X ) * ( -180.0 / Pi )

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 正面 - 最上
[Statedef 6057]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = 25

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = ATan ( Vel Y / Vel X ) * ( -180.0 / Pi )

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 上段 - 最下
[Statedef 6058]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = 30

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 上段 - 中心
[Statedef 6059]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = 55

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 上段 - 最上
[Statedef 6060]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = 80

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 下段 - 中段
[Statedef 6061]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = -55

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;烈風扇 - 下段 - 最下
[Statedef 6062]
movetype = A
Anim = 6030

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = -80

[State -1]
type = VarAdd
trigger1 = 1
V = 0
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*10
Y = -Sin(Var(0)*Pi/180)*10

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)

[State -1]
type = HitOverride
trigger1 = 1
attr = SCA ,AA ,AT ,AP
slot = 1
stateno = 6080

[State -1]
type = AfterImage
trigger1 = time = 0
Time = -1
Length = 15
PalBright = 0, 0, 0
PalContrast = 250, 250, 250
PalAdd = -30, -30, -30
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*280)/10), 2
animtype = high
getpower = 20,20
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.velocity = -8
numhits = 1
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-4
airguard.velocity =  -2,-4
air.velocity = -4,-4
fall = 1
fall.recovertime = floor(35*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 0

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 1

[State -1]
type = ChangeState
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 15702

[State -1]
type = ChangeState
trigger1 = time = 180
trigger2 = movecontact
Value = 6080
;---------------------------
;風消滅
[Statedef 6080]
Anim = 7700
ctrl = 0

[State -1]
type = AfterImageTime
trigger1 = time = 0
time = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = VelMul
trigger1 = time = 0
X = 0.3
Y = 0.3

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,1

[State -1]
type = AngleSet
trigger1 = PrevStateNo = 7722
Value = Var(1)+90

[State -1]
type = DestroySelf
trigger1 = Animtime = 0
;---------------------------
;天狗道の開風
[Statedef 6090]
Anim = 10000
movetype = A
ctrl = 0
SprPriority = 9

[State -1]
type = SprPriority
trigger1 = 1
Value = 9

[State -1]
type = StateTypeSet
trigger1 = time = 0
trigger1 = Parent,StateType != A
StateType = S

[State -1]
type = StateTypeSet
trigger1 = time = 0
trigger1 = Parent,StateType = A
StateType = A

[State -1]
type = PlaySnd
trigger1 = time = 0
Value = s300,1

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = VelSet
trigger1 = time = 0
X = 15

[State -1]
type = trans
trigger1 = 1
trans = Add
ignorehitpause = 1

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State -1]
type = Explod
trigger1 = time%4 = 0
trigger1 = StateType != A
Anim = 7600
ID = 7600
Pos = -40,58
PosType = P1
ownpal = 1
SprPriority = 9998

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = Time%2 = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*200)/10), 2
animtype = high
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2,9
numhits = 1
ground.type = high
air.type = high
guard.pausetime = 2,9
guard.slidetime = 22
guard.hittime = 22
guard.velocity = -8
guard.ctrltime = 22
guard.dist = 120
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-3
airguard.velocity =  -2,-4
air.velocity = -4,-3
fall = 1
fall.recovertime = floor(40*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit = 1
FV = 20
Value = Parent,FVar(20)*0.95
ignorehitpause = 1
persistent = 3

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 2
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 2
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 2
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1
persistent = 2

[State -1]
type = Parentvarset
trigger1 = moveguarded = 1
v = 10
value = 2
ignorehitpause = 1
persistent = 2

[State -1]
type = DestroySelf
trigger1 = time = 90
;---------------------------
;猿田彦の先導
[Statedef 6100]
Anim = 10001
ctrl = 0

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = AngleDraw
trigger1 = 1
scale = 2,2

[State -1]
type = BindToParent
trigger1 = Parent,Stateno = [5800,5801]
Pos = -30,-50

[State -1]
type = DestroySelf
trigger1 = AnimTime = 0

[State -1]
type = null;ChangeState
trigger1 = Parent,Stateno != [5800,5801]
Value = 6101
;-------------------------------------
;猿田彦の先導消滅
[Statedef 6101]
Anim = 6091

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = trans
trigger1 = 1
trans = add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = DestroySelf
trigger1 = AnimTime = 0
;--------------------------------------------------------------------
;紅葉旋風
[Statedef 6105]
MoveType = A
Anim = 10002

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
type = ChangeAnim
trigger1 = Anim != 10003
trigger1 = Parent,MoveType = H
trigger1 = Parent,StateNo != [120,155]
Value = 10003

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
Time = -1

[State -1]
type = PlaySnd
trigger1 = time = 0
Value = s300,2

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = NoShadow

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 1,2

[State -1]
type = Trans
trigger1 = 1
Trans = Add

[State -1]
type = VelSet
trigger1 = time = 0
x = 4

[State -1]
type = VelAdd
trigger1 = Vel X > 0.1
X = -0.1

[State -1]
type = Explod
trigger1 = NumExplod(7600) = 0
Anim = 7650
ID = 7600
Pos = 0,-20
PosType = P1
ownpal = 1
SprPriority = 9998

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time%5 = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*250)/10), 1
animtype = high
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.pausetime = 0,0
guard.slidetime = 32
guard.hittime = 32
guard.ctrltime = 32
numhits = 1
ground.type = high
air.type = high
guard.dist = 200
ground.slidetime = 33
ground.hittime  = 33
ground.velocity = 0,-5
guard.velocity = -8
airguard.velocity =  -2,-4   
air.velocity = 0,-5
fall = 1
fall.recovertime = floor(60*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit = 1
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 1

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 11
value = 1

[State -1]
type = Parentvarset
trigger1 = moveguarded = 1
v = 10
value = 2

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = time = 100
trigger1 = Anim = 10002
Value = 6107

[State -1]
type = DestroySelf
trigger1 = Anim = 10003
trigger1 = AnimTime = 0
;-------------------------------------------------
;天孫降臨
[Statedef 6106]
Anim = 2008
movetype = A
SprPriority = 9999

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999
ignorehitpause = 1

[State -1]
type = Explod
trigger1 = NumExplod(7651) = 0
Anim = 7651
ID = 7651
Pos = 0,0
PosType = P1
ownpal = 1
SprPriority = 9998

[State -1]
type = BindToParent
trigger1 = 1
Pos = 0,0

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
Time = -1
ignorehitpause = 1

[State -1]
type = PlaySnd
trigger1 = time = 0
Value = s300,2

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = NoShadow
ignorehitpause = 1

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 2.5,2

[State -1]
type = Trans
trigger1 = 1
Trans = Add
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = EnemyNear,MoveType != H
trigger2 = EnemyNear,StateNo = [120,155]
trigger3 = EnemyNear,StateNo = 5300
V = 18
Value = 0

[State -2]
type = VarSet
trigger1 = EnemyNear,MoveType = H
trigger1 = Time >= EnemyNear,GetHitVar(Fall.RecoverTime)
trigger1 = EnemyNear,CanRecover
trigger1 = EnemyNear,StateNo != [120,155]
trigger1 = EnemyNear,StateNo != 5300
V = 18
Value = 1

[State -1]
type = hitdef
triggerall = Var(18) = 0
trigger1 = time%5 = 0
attr = S,HA
damage    = floor((Parent,FVar(20)*150)/10), 2
animtype = high
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.pausetime = 0,0
guard.slidetime = 32
guard.hittime = 32
guard.ctrltime = 32
numhits = 1
ground.type = high
air.type = high
guard.dist = 200
guardsound = s250,0
ground.slidetime = 33
ground.hittime  = 33
ground.velocity = 0,-3
guard.velocity = -8
airguard.velocity =  -2,-4   
air.velocity = 0,-3
fall = 1
fall.recovertime = floor(60*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit = 1
FV = 20
Value = Parent,FVar(20)*0.99
ignorehitpause = 1
persistent = 1

[State -1]
type = parentvarset
trigger1 = movehit = 1
v = 11
value = 1

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,StateNo != 5815
Value = 6107
;--------------------------------------------------
;竜巻消滅
[Statedef 6107]
Anim = 10003

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
Time = -1

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = NoShadow

[State -1]
type = AngleDraw
trigger1 = PrevStateNo = 6105
Scale = 1,2

[State -1]
type = AngleDraw
trigger1 = PrevStateNo = 6106
Scale = 2.5,2

[State -1]
type = Trans
trigger1 = 1
Trans = Add

[State -1]
type = DestroySelf
trigger1 = AnimTime = 0
;----------------------------------------------------------------------
;鎌鼬ベーリング
[Statedef 6110]
Anim = 7700
movetype = A

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
time = -1
ignorehitpause = 1

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = Noshadow
ignorehitpause = 1

[State -1]
type = Trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256 - (Time * 7),256
ignorehitpause = 1

[State -1]
type = VarRandom
trigger1 = time = 0
V = 0
Range = 10,50

[State -1]
type = VarSet
trigger1 = time = 0
V = 0
Value = Var(0)/100

[State -1]
type = VarRandom
trigger1 = time = 0
V = 1
Range = -180,180

[State -1]
type = VarAdd
trigger1 = 1
FV = 2
Value = 0.075

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 0.5+FVar(2),Var(0)+FVar(2)
Value = Var(1)

[State -1]
type = BindToParent
trigger1 = 1
Pos = 0,-50
time = -1
ignorehitpause = 1

[State -1]
type = hitdef
triggerall = Parent,Var(18) = 0
trigger1 = time = 0
attr = S,HA
damage    = floor((Parent,FVar(20)*80)/10), 1
animtype = high
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.pausetime = 0,2
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
numhits = 1
ground.type = high
air.type = high
guard.dist = 70
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,0
guard.velocity = -6
airguard.velocity =  -2,-4   
air.velocity = -4,-4
air.fall = 1
fall.recovertime = floor(30*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.98
ignorehitpause = 1
persistent = 0

[State -1]
type = parentvarset
trigger1 = movehit = 1
v = 11
value = 1

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Var(59) != 6
trigger2 = Parent,MoveType = H
trigger3 = MoveHit = 13
ignorehitpause = 1
;-----------------------------------------------------------------------
;人間禁制の道・岩石
[Statedef 6115]
movetype = A
Anim = 7710

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
time = -1
ignorehitpause = 1

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = Noshadow
ignorehitpause = 1

[State -1]
type = VarRandom
trigger1 = time = 0
V = 0
Range = -3,3

[State -1]
type = VelSet
trigger1 = 1
X = 15
Y = Var(0)

[State -1]
type = VarRandom
trigger1 = time = 0
V = 2
Range = 10,40

[State -1]
type = VarRandom
trigger1 = time = 0
V = 1
Range = -180,180

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 0.5-(Var(2)/100),0.5-(Var(2)/100)
Value = Var(1)

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,HA
damage    = floor((Root,FVar(20)*120)/10), 3
animtype = high
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
numhits = 1
ground.type = high
air.type = high
guard.dist = 120
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -4,-3
guard.velocity = -8
airguard.velocity =  -2,-4   
air.velocity = -4,-3
fall = 1
fall.recovertime = floor(60*Root,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = parentvarset
trigger1 = movehit = 1
v = 11
value = 1

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = DestroySelf
trigger1 = FrontEdgeDist < -30
;-----------------------------------------------------------------
;土台
[Statedef 6117]
Anim = 8500

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

;人間禁制の道
[State -2]
type = Helper
trigger1 = time%8 = 0
trigger1 = Root,Var(7) = 2
Stateno = 6115
ID = 6115
pos = 0,Ceil(Random/-3)
postype = P1
scale = 1,1
ownpal = 1
IgnoreHitPause = 1

[State -2]
type = Helper
trigger1 = NumHelper(6120) = 0
trigger1 = Root,Var(7) = 2
Stateno = 6120
ID = 6120
pos = 0,(Ceil(Random/-3))+150
postype = P1
ownpal = 1
IgnoreHitPause = 1

[State -2]
type = Helper
trigger1 = Root,Var(7) = 2
trigger1 = Time%30 = 0
Stateno = 6121
ID = 6121
pos = 0,0
postype = P1
scale = 1,1
ownpal = 1
IgnoreHitPause = 1
persistent = 20

[State -1, 射撃ヒット音]
type = playsnd
trigger1 = var(11) = 1
value = s200,2
channel = 4

[State -1, 射撃バー戻し]
type = VarSet
trigger1 = Var(11) > 0
v = 11
value = 0

[State -1]
type = DestroySelf
trigger1 = Parent,Var(7) = 0
trigger1 = NumHelper(6115) = 0
;-----------------------------------------------------------------
;風
[Statedef 6120]
Anim = 7711

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
time = -1

[State -1]
type = SprPriority
trigger1 = 1
Value = 9999

[State -1]
type = VelSet
trigger1 = 1
X = Cos(20*Pi/180)*20
Y = -Sin(20*Pi/180)*20

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 0.5,0.5
Value = 20

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = Noshadow

[State -1]
type = Trans
trigger1 = 1
Trans = Add

[State -1]
type = DestroySelf
trigger1 = time = 40
:---------------------------------------------------------------------
;風圧
[Statedef 6121]
Anim = 7712

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

[State -1]
type = PlayerPush
trigger1 = 1
Value = 1

[State -1]
type = VelSet
trigger1 = 1
X = 8

[State -1]
type = DestroySelf
trigger1 = time = 180
trigger2 = Root,Var(7) = 0
;-------------------------------------------------------------------
[Statedef 3510]
movetype = A
Anim = 3510
SprPriority = 9

[State -1]
type = SprPriority
trigger1 = 1
Value = 9

[State -1]
type = Trans
trigger1 = 1
Trans = Add

[State -1]
type = AssertSpecial
trigger1 = 1
Flag = NoShadow

[State -1]
type = VarSet
trigger1 = IsHelper(3512)
V = 0
Value = 70
persistent = 0

[State -1]
type = VarSet
trigger1 = IsHelper(3511)
V = 0
Value = -70
persistent = 0

[State -1]
type = VarSet
trigger1 = IsHelper(3510)
V = 0
Value = 110
persistent = 0

[State -1]
type = VarSet
trigger1 = IsHelper(3513)
V = 0
Value = -110
persistent = 0

[State -1]
type = VarAdd
trigger1 = IsHelper(3510)||IsHelper(3511)
V = 0
Value = 2

[State -1]
type = VarAdd
trigger1 = IsHelper(3512)||IsHelper(3513)
V = 0
Value = -2

[State -1]
type = VelSet
trigger1 = 1
X = Cos(Var(0)*Pi/180)*8
Y = -Sin(Var(0)*Pi/180)*8

[State -1]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
Value = Var(0)

[State -1]
type = VarSet
trigger1 = (EnemyNear,MoveType != H)+(EnemyNear,StateNo = [120,155])+(EnemyNear,StateNo = 5300)+(EnemyNear,Alive !)
	
V = 18
Value = 0
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Alive)*(Time>=EnemyNear,GetHitVar(Fall.RecoverTime))*(EnemyNear,StateType=A)*(EnemyNear,MoveType=H)
trigger1   = (EnemyNear,CanRecover)*(EnemyNear,StateNo !=[120,155])*(EnemyNear,StateNo !=5300)
V = 18
Value = 1
IgnoreHitPause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")*(EnemyNear,Name!="Remilia Scarlet")*(EnemyNear,Name!="Sanae Kotiya")*(EnemyNear,Name!="Komachi Onoduka")*(EnemyNear,Name!="Reisen Udongein Inaba")
triggerall = (EnemyNear,Name!="Iku Nagae")*(EnemyNear,Name!="Tensi Hinanai")*(EnemyNear,Name!="Mokou Fujiwara")*(EnemyNear,Name!="Cirno")
triggerall = P2StateNo != [120,155]
triggerall = EnemyNear,AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = EnemyNear,AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
trigger1 = Var(59) = 0
trigger1 = Var(18) = 0
attr = S,SP
damage    = floor((Parent,FVar(20)*200)/10), 3
animtype = high
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.slidetime = 16
guard.hittime = 16
guard.ctrltime = 16
guard.velocity = -6
numhits = 1
ground.type = high
air.type = high
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -6,0
airguard.velocity =  -2,-4   
air.velocity = -6,-4
air.fall = 1
fall.recovertime = floor(40*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
persistent = 20

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.94
ignorehitpause = 1
persistent = 0

[State -1]
type = Parentvarset
trigger1 = movehit = 1
v = 10
value = 1

[State -1]
type = Parentvarset
trigger1 = moveguarded = 1
v = 10
value = 2

[State -1]
type = VarRandom
trigger1 = 1
V = 40
Range = 0,14

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos = Floor(42+(-42+P2Dist x)*0.5),Floor(-44+(44+P2Dist Y)*0.5)
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(42+(-42+P2Dist x)*0.5),Floor(-44+(44+P2Dist Y)*0.5)
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14600+Var(40)
ID = 14600
pos = Floor(42+(-42+P2Dist x)*0.5),Floor(-44+(44+P2Dist Y)*0.5)
postype = p1
ownpal = 1
scale = 0.5,0.5
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = movehit = 1
Anim = 14700+Var(41)
ID = 14700
pos = Floor(42+(-42+P2Dist x)*0.5),Floor(-44+(44+P2Dist Y)*0.5)
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Parent,StateNo != 6550
trigger2 = Time >= 180
Value = 6080