;---------------------------------------------------------------------------
;立ち弱攻撃
[Statedef 300]
type    = S                      
movetype= A                      
physics = S                       
;velset = 0,0 
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 300]
type = changeanim
trigger1 = anim != 300
trigger2 = prevstateno = 300
trigger2 = time = 0
value = 300

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 5
ignoerhitpause = 1
persistent = 0

[State 200]
type = PlaySnd
trigger1 = animelem = 1
value = 200,0

[State 300]
type = HitDef
trigger1 = animelemno(0) = 3
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
id = 300
attr = S, NA 
damage = ceil(30 * fvar(0))
animtype = Light
hitflag = MAF
guardflag = M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,12
sparkno = S7000
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S200, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 10
guard.ctrltime = 9
ground.hittime  = 10
ground.velocity = -2.5/(fvar(1) + 0.0001)
air.type = High
air.velocity = -2.7,-2.2
yaccel = 0.37
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 12
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[State 300]
type = HitDef
trigger1 = animelemno(0) = 4
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
attr = S, NA
id = 301 
damage = ceil(35 * fvar(0))
animtype = Light
hitflag = MAF
guardflag = L
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7000
guard.sparkno = S7007
sparkxy = -15, -20
hitsound = S200, 1
guardsound = S120, 0
ground.type = Low
ground.slidetime = 10
guard.ctrltime = 9
ground.hittime  = 10
ground.velocity = -3.5/(fvar(1) + 0.0001)
air.type = High
air.velocity = -2.7,-2.2
yaccel = 0.37
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ち近中攻撃
[Statedef 310]
type    = S                      
movetype= A                      
physics = S                      
;juggle  = 1                      
;velset = 0,0 
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 310]
type = changeanim
trigger1 = anim != 310
value = 310

[state 200]
type = poweradd
trigger1 = animelem = 1
value = 15
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)<=3
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)>3
var(20) = 0
ignorehitpause = 1

ignorehitpause = 1
[State 200]
type = PlaySnd
trigger1 = animelem = 5
value = 210,0

[State 300]
type = HitDef
trigger1 = animelemno(0) = [8,9]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = var(21) = 0
attr = S, NA
id = 310 
damage = ceil(56 * fvar(0))
animtype = Medium
guardflag = M
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,12
sparkno = S7001
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S210, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 14
guard.ctrltime = 12
ground.hittime  = 14
ground.velocity = -4/(fvar(1) + 0.0001)
air.type = High
air.velocity = -3.5,-3
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 12
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;立ち遠中攻撃
[Statedef 315]
type    = S                      
movetype= A                      
physics = S                      
;juggle  = 1                      
;velset = 0,0 
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 315
value = 315

[state 200]
type = poweradd
trigger1 = animelem = 1
value = 15
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[3,12]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[3,12]
var(20) = 0
ignorehitpause = 1

[State 200]
type = PlaySnd
trigger1 = animelem = 11
value = 210,0

[State 300]
type = HitDef
trigger1 = animelemno(0) = [13,14]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = S, NA
id = 315 
damage = ceil(70 * fvar(0))
animtype = Hard
guardflag = M
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,12
sparkno = S7002
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 14
guard.ctrltime = 12
ground.hittime  = 14
ground.velocity = -4/(fvar(1) + 0.0001)
air.type = High
air.velocity = -3.5,-3.5
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 12
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[State 300]
type = HitDef
trigger1 = animelemno(0) = 8
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = S, NA
id = 316 
damage = ceil(60 * fvar(0))
animtype = Hard
guardflag = M
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,12
sparkno = S7002
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 14
guard.ctrltime = 12
ground.hittime  = 14
ground.velocity = -4/(fvar(1) + 0.0001)
air.type = High
air.velocity = -3.5,-3.5
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 12
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;立ち強攻撃
[Statedef 320]
type    = S                      
movetype= A                      
physics = S       
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 320
value = 320

[state 200]
type = poweradd
trigger1 = animelem = 1
value = 35
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[10,24]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[10,24]
var(20) = 0
ignorehitpause = 1

[State 200]
type = PlaySnd
trigger1 = animelem = 25
value = 210,0

[State 300]
type = HitDef
trigger1 = animelemno(0) = [26,27]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = S, NA
id = 320 
damage = ceil(220 * fvar(0))
animtype = Hard
guardflag = M
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5/(fvar(1) + 0.0001)
air.type = High
air.velocity = -6,-4.5
yaccel = 0.40
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(35 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.89 * (1 - 0.11*(0.89*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0
[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ち弱攻撃（ダッシュ）
[Statedef 350]
type    = S                      
movetype= A                      
physics = N                      
;juggle  = 1                      
velset = 5,0
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 300]
type = changeanim
trigger1 = anim != 350
value = 350

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 20
ignoerhitpause = 1
persistent = 0

[State 250]
type = PlaySnd
trigger1 = Time = 1
value = 200,0

[State 260]
type = velset
trigger1 = vel x > 2
x = 0.955*vel x

[State 260]
type = velset
trigger1 = vel x <= 2
x = 0

[State 250]
type = HitDef
trigger1 = animelemno(0) = 3
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
attr = S, NA
id = 350
damage = ceil(35 * fvar(0))
animtype = Light
guardflag = L
getpower = 20,7
givepower = 10,4
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = S7000
guard.sparkno = S7007
sparkxy = -10, -20
hitsound = S200, 1
guardsound = S120, 0
ground.type = Low
ground.slidetime = 10
guard.ctrltime = 9
ground.hittime  = 10
ground.velocity = -3/(fvar(1) + 0.0001)
air.type = High
air.velocity = -3,-2.0;-3
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(30 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 250]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(0.94*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 250]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[State 250]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ち中攻撃（ダッシュ）
[Statedef 360]
type    = S
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 360
value = 360

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 20
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[3,10]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[3,10]
var(20) = 0
ignorehitpause = 1

[State 260]
type = PlaySnd
trigger1 = animelem = 11
value = 210,0

[State 260]
type = velset
trigger1 = animelem = 1
x = 5

[State 260]
type = velset
trigger1 = !(animelem = 1)
trigger1 = prevstateno = 6000
x = fvar(15)
ignorehitpause = 1
persistent = 0

[State 260]
type = velset
trigger1 = vel x > 2
x = 0.95*vel x

[State 260]
type = velset
trigger1 = vel x <= 2
x = 0

[state 360]
type = varset
trigger1 = vel x > 0
fvar(15) = vel x
ignorehitpause = 1

[State 260]
type = HitDef
trigger1 = animelemno(0) = [13,14]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = S, NA
id = 360
animtype  = Hard
damage = ceil(90 * fvar(0))
guardflag = M
getpower = 60,20
givepower = 30,10
pausetime = 9,9
sparkno = S7001
guard.sparkno = S7007
sparkxy = -10,-50
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -4/(fvar(1) + 0.0001)
air.type = High
air.velocity = -3,-3 
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[State 260]
type = HitDef
trigger1 = animelemno(0) = [15,16]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = S, NA
id = 361
animtype  = Hard
damage = ceil(80 * fvar(0))
guardflag = M
getpower = 60,20
givepower = 30,10
pausetime = 9,9
sparkno = S7001
guard.sparkno = S7007
sparkxy = -10,-50
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -4/(fvar(1) + 0.0001)
air.type = High
air.velocity = -3,-3 
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 260]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 260]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[State 260]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ち強攻撃（ダッシュ）
[Statedef 370]
type    = S
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 370
value = 370

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 35
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[6,11]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[6,11]
var(20) = 0
ignorehitpause = 1

[State 260]
type = velset
trigger1 = animelem = 1
x = 5

[State 260]
type = velset
trigger1 = vel x > 2
x = 0.95*vel x

[State 260]
type = velset
trigger1 = !(animelem = 1)
trigger1 = prevstateno = 6000
x = fvar(15)
ignorehitpause = 1
persistent = 0

[State 260]
type = velset
trigger1 = vel x <= 2
x = 0

[state 360]
type = varset
trigger1 = vel x > 0
fvar(15) = vel x
ignorehitpause = 1

[State 270]
type = PlaySnd
trigger1 = AnimElem = 13
value = 210,0

[State 270]
type = HitDef
trigger1 = animelemno(0) = [14,15]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
id = 370
attr = S, NA
animtype  = Hard
damage = ceil(70 * fvar(0))
guardflag = M
getpower = 60,20
givepower = 30,10
pausetime = 9,9
sparkno = S7002
guard.sparkno = S7007
sparkxy = -10,-80
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5/(fvar(1) + 0.0001),-4.0
air.type = High
air.velocity = -7.0,-4.0
air.fall = 1
fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 270]
type = targetstate
trigger1 = movehit =1
trigger1 = numtarget(370)
trigger1 = target(370),statetype = A
trigger1 = target(370),stateno != 280 && target(370),stateno != 5656
trigger1 = target(370),stateno != [120,155]
value = 280
ignoerhitpause = 1
persistent = 0

[state 270]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.85 * (1 - 0.15*(0.85*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 270]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[State 270]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;屈み弱攻撃
[Statedef 500]
type    = C
movetype= A
physics = C
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 300]
type = changeanim
trigger1 = anim != 500
trigger2 = prevstateno = 500
trigger2 = time = 0
value = 500

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 5
ignoerhitpause = 1
persistent = 0

[State 400]
type = PlaySnd
trigger1 = Time = 1
value = 200,0

[State 400]
type = HitDef
trigger1 = animelemno(0) = 2
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
attr = C, NA
id = 500
damage = ceil(24 * fvar(0))
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
getpower = 20,7
givepower = 10,4
pausetime = 9,9
sparkno = S7000
guard.sparkno = S7007
sparkxy = -5,-10
hitsound = S200, 1
guardsound = S120, 0
ground.type = Low
ground.slidetime = 10
guard.ctrltime = 9
ground.hittime  = 10
ground.velocity = -3.5/(fvar(1) + 0.0001)
air.velocity = -3.5,-3
air.type = High
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(30 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 400]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 400]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


;---------------------------------------------------------------------------
;屈み中攻撃
[Statedef 510]
type    = C
movetype= A
physics = C
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 510
value = 510

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 13
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[2,9]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[2,9]
var(20) = 0
ignorehitpause = 1

[State 410]
type = PlaySnd
trigger1 = AnimElem = 11
value = 210,0

[State 410]
type = HitDef
trigger1 = animelemno(0) = 13
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 510
damage = ceil(60 * fvar(0))
animtype  = Hard
hitflag = MAF
guardflag = M
getpower = 30,10
givepower = 15,5
pausetime = 9,9+3*(p2statetype = A)
sparkno = S7003
guard.sparkno = S7007
sparkxy = -5,-40
hitsound = S220, 1
guardsound = S120, 0
ground.type = high
ground.slidetime = 16
guard.ctrltime = 14
ground.hittime  = 16
ground.velocity = -4/(fvar(1) + 0.0001)
air.velocity = -3,-5.5
yaccel = 0.38
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[State 410]
type = HitDef
trigger1 = animelemno(0) = [14,15]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 511
damage = ceil(70 * fvar(0))
animtype  = Hard
hitflag = MAF
guardflag = M
getpower = 30,10
givepower = 15,5
pausetime = 9,9+3*(p2statetype = A)
sparkno = S7003
guard.sparkno = S7007
sparkxy = -5,-40
hitsound = S220, 1
guardsound = S120, 0
ground.type = high
ground.slidetime = 16
guard.ctrltime = 14
ground.hittime  = 16
ground.velocity = -4/(fvar(1) + 0.0001)
air.velocity = -3,-5.5
yaccel = 0.38
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 410]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 410]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;屈み強攻撃
[Statedef 520]
type    = C
movetype= A
physics = C
ctrl = 0
sprpriority = 1

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 520
value = 520

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 25
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[2,16]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[2,16]
var(20) = 0
ignorehitpause = 1

[State 420]
type = PlaySnd
trigger1 = AnimElem = 18
value = 210,0

[State 420]
type = velset
trigger1 = AnimElemno(0) = [19,23]
x = 6

[State 420]
type = HitDef
trigger1 = animelemno(0) = [19,20]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 520
animtype = Hard
damage = ceil(100 * fvar(0))
priority  = 7
guardflag = M
getpower = 60,20
givepower = 30,10
pausetime = 9,9
hitflag = MAF
guard.pausetime = 1,0
guard.velocity = -4
sparkno = S7003
sparkxy = 0,-40
hitsound = S220, 1
guard.sparkno = S7007
guardsound = S120, 0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
guard.ctrltime = 21
ground.velocity = -4/(fvar(1) + 0.0001)  
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
air.type = Low
air.velocity = -3,-3
guard.velocity = -3
sprpriority = 2 
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 410]
type = varset
triggerall = P2MoveType = H
triggerall = time <= 11
trigger1 = movehit = 1
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(0.94*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 410]
type = varset
triggerall = P2MoveType = H
triggerall = time >= 12
trigger1 = movehit = 1
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(0.94*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 420]
type = ChangeState
trigger1 = AnimTime = 0
value = 521

;---------------------------------------------------------------------------
;屈み強攻撃
[Statedef 521]
type    = C
movetype= I
physics = C
;juggle  = 6
anim = 5120
ctrl = 0
sprpriority = 1


[State 420]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;屈み弱攻撃（ダッシュ）
[Statedef 550]
type    = C
movetype= A
physics = N
ctrl = 0
velset = 5,0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 300]
type = changeanim
trigger1 = anim != 500
value = 500

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 20
ignoerhitpause = 1
persistent = 0

[State 405]
type = PlaySnd
trigger1 = Time = 1
value = 200,0

[State 260]
type = velset
trigger1 = vel x > 2
x = 0.95*vel x

[State 260]
type = velset
trigger1 = vel x <= 2
x = 0

[State 405]
type = HitDef
trigger1 = animelemno(0) = 2
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 550
damage = ceil(22 * fvar(0))
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
getpower = 20,7
givepower = 10,4
pausetime = 9,9
sparkno = S7000
guard.sparkno = S7007
sparkxy = -5,-10
hitsound = S200, 1
guardsound = S120, 0
ground.type = Low
ground.slidetime = 10
guard.ctrltime = 9
ground.hittime  = 10
ground.velocity = -4/(fvar(1) + 0.0001)
air.velocity = -3.5,-3
air.type = High
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(30 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 405]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 405]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[State 405]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;--------------------------------------------------------------
;屈み中攻撃（ダッシュ）
[Statedef 560]
type    = C
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 510
value = 510

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 20
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[2,9]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[2,9]
var(20) = 0
ignorehitpause = 1

[State 416]
type = PlaySnd
trigger1 = animelem = 12
value = 210,0

[State 260]
type = velset
trigger1 = animelem = 1
x = 5

[State 260]
type = velset
trigger1 = !(animelem = 1)
trigger1 = prevstateno = 6000
x = fvar(15)
ignorehitpause = 1
persistent = 0

[State 260]
type = velset
trigger1 = vel x > 2
x = 0.96*vel x

[State 260]
type = velset
trigger1 = vel x <= 2
x = 0

[state 360]
type = varset
trigger1 = vel x > 0
fvar(15) = vel x
ignorehitpause = 1

[State 416]
type = HitDef
trigger1 = animelemno(0) = 13
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 560
animtype  = Medium
damage = ceil(60 * fvar(0))
guardflag = M
hitflag = MAF
getpower = 30,10
givepower = 15,5
priority = 4
pausetime = 9,9
sparkno = S7002
guard.sparkno = S7007
sparkxy = -10,-30
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 16
guard.ctrltime = 14
ground.hittime  = 16
ground.velocity = -4/(fvar(1) + 0.0001)
air.velocity = -3,-7.5
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.type = High
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
[State 416]
type = HitDef
trigger1 = animelemno(0) = [14,15]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 561
animtype  = Medium
damage = ceil(70 * fvar(0))
guardflag = M
hitflag = MAF
getpower = 30,10
givepower = 15,5
priority = 4
pausetime = 9,9
sparkno = S7002
guard.sparkno = S7007
sparkxy = -10,-30
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 16
guard.ctrltime = 14
ground.hittime  = 16
ground.velocity = -4/(fvar(1) + 0.0001)
air.velocity = -3,-7.5
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.type = High
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 416]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 416]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[State 416]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------
;屈み強攻撃（ダッシュ）
[Statedef 570]
type    = C
movetype= A
physics = N
;juggle  = 4
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 570
value = 570

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 20
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[1,7]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[1,7]
var(20) = 0
ignorehitpause = 1

[State 416]
type = PlaySnd
trigger1 = animelem = 9
value = 210,0

[State 260]
type = velset
trigger1 = animelem = 1
x = 5

[State 260]
type = velset
trigger1 = !(animelem = 1)
trigger1 = prevstateno = 6000
x = fvar(15)
ignorehitpause = 1
persistent = 0

[State 260]
type = velset
trigger1 = vel x > 2
x = 0.965*vel x

[State 260]
type = velset
trigger1 = vel x <= 2
x = 0

[state 360]
type = varset
trigger1 = vel x > 0
fvar(15) = vel x
ignorehitpause = 1

[State 416]
type = HitDef
trigger1 = animelemno(0) = [10,11]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = C, NA
id = 570
animtype  = Medium
damage = ceil(150 * fvar(0))
guardflag = M
hitflag = MAF
getpower = 80,26
givepower = 40,13
priority = 4
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -10,-30
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 21
guard.ctrltime = 21
ground.hittime  = 23
;ground.velocity = -7
ground.velocity = -7.0/(fvar(1) + 0.0001),-11.7
air.velocity = -7.0,-11.7
yaccel = .38
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(60 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.type = High
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 416]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.93 * (1 - 0.07*(0.93*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 416]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[State 416]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;空中弱攻撃
[Statedef 700]
type    = A
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 300]
type = changeanim
trigger1 = anim != 700
value = 700

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 5
ignoerhitpause = 1
persistent = 0

[State 600]
type = PlaySnd
trigger1 = Time = 1
value = 200,0

[State 600]
type = HitDef
trigger1 = animelemno(0) = 3
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = A, NA
id = 700
animtype  = light
damage = ceil(28 * fvar(0))
hitflag = MAF
guardflag = HA
getpower = 20,7
givepower = 10,4
priority = 3
pausetime = 9,9
sparkno = S7000
guard.sparkno = S7007
sparkxy = -5,-5
hitsound = S200, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 10
ground.hittime = 10 
guard.hittime = 9
guard.ctrltime = 9
ground.velocity = -3/(fvar(1) + 0.0001)
air.type = High
air.velocity = -2.5,-3.8
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
ground.cornerpush.veloff = -5/(fvar(1)+0.0001)

[state 600]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(0.94*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 600]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[state 600]
type = veladd
trigger1 = time > 0
y = const(movement.yaccel)

[state 600]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y > 20
value = 52

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;空中中攻撃
[Statedef 710]
type    = A
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 300]
type = changeanim
trigger1 = anim != 710
value = 710

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 13
ignoerhitpause = 1
persistent = 0

[State 610]
type = PlaySnd
trigger1 = Time = 1
value = 210,0

[State 610]
type = HitDef
trigger1 = animelemno(0) = [3,5]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
attr = A, NA
id = 710
animtype  = Medium
damage = ceil(65 * fvar(0))
hitflag = MAF
guardflag = HA
getpower = 40,13
givepower = 20,7
priority = 4
pausetime = 9,9
sparkno = S7001
guard.sparkno = S7007
sparkxy = -10,-10
hitsound = S210, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 16
ground.hittime = 16 
guard.hittime = 14
guard.ctrltime = 14
airguard.ctrltime = 19
ground.velocity = -4/(fvar(1) + 0.0001)
air.type = High
airguard.velocity = -3,-3;4
air.velocity = -2.5,-6.5;4 
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40 * fvar(1) * 0.75) + 9
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
ground.cornerpush.veloff = -4.5/(fvar(1)+0.0001)

[state 610]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.93 * (1 - 0.07*(0.93*fvar(1)>1.000001))
ignorehitpause = 1
persistent = 0

[State 610]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[state 600]
type = veladd
trigger1 = time > 0
y = const(movement.yaccel)

[state 600]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y > 20
value = 52

[State 610]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;空中強攻撃
[Statedef 720]
type    = A
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 100

[state 3000]
type = changeanim
trigger1 = anim != 720
value = 720

[state 300]
type = poweradd
trigger1 = animelem = 3
value = 30
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)=[1,4]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[1,4]
var(20) = 0
ignorehitpause = 1


[State 620]
type = PlaySnd
trigger1 = animelem = 16
value = 210,0

[State 260]
type = velset
trigger1 = prevstateno = 6000
x = fvar(15)
ignorehitpause = 1
persistent = 0

[state 360]
type = varset
trigger1 = 1
fvar(15) = vel x
ignorehitpause = 1

[State 260]
type = velset
trigger1 = prevstateno = 6000
y = fvar(16)
ignorehitpause = 1
persistent = 0

[state 360]
type = varset
trigger1 = 1
fvar(16) = vel y
ignorehitpause = 1

[State 850]
type = Hitdef
triggerall = AnimElem = 2
triggerall = var(0) = 1
triggerall = enemynear(var(31)),movetype != H
triggerall = prevstateno != 120 || !var(13)
trigger1 = command = "holdfwd"
trigger2 = var(59)
attr = A, NT
id = 850
hitflag = A-
priority = 1, Miss
sparkno = S7003
sparkxy = -10, -50
sprpriority = 1 
guard.dist = 0
p1stateno = 851
p2stateno = 860
p2facing = ifelse((facing!=enemynear,facing),0,-1)
hitsound   = S800,0

[State 620]
type = HitDef
trigger1 = animelemno(0) =[18,19]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = !var(21)
attr = A, NA
id = 720
damage    = ceil(90 * fvar(0))
hitflag = MAF
guardflag = HA
getpower = 60,20
givepower = 30,10
priority = 4
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -10,-40
hitsound = S220, 1
guardsound = S120, 0
animtype = Hard
ground.type = High
ground.slidetime = 16
ground.hittime = 16 
guard.hittime = 14
guard.ctrltime = 14
ground.velocity = -5/(fvar(1) + 0.0001)
air.type = High
airguard.velocity = -3,-3
air.velocity = -7,-6.2 + 0.2*fvar(11)
yaccel = 0.365
id = 620
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 10
p2facing = ifelse(p2dist x > 0 , 1 , -1)
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
ground.cornerpush.veloff = -6/(fvar(1)+0.0001)

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 620]
type = varset
triggerall = P2MoveType = H
triggerall = time >= 3
trigger1 = movehit
fvar(1) = fvar(1) * 0.91 * (1 - 0.09*(0.91*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 620]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

[state 600]
type = veladd
trigger1 = time > 0
y = const(movement.yaccel)

[state 600]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y > 20
value = 52

[State 620]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1



;________________________

;必殺技
;________________________
;------------------------------------------------------------------------------
;弱乙女富嶽
[statedef 1100]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0

[state 1100]
type = attackdist
trigger1 = 1
value = 0

[state 300]
type = changeanim
trigger1 = anim != 1100
value = 1100

[state 1200]
type = nothitby
trigger1 = time <= 2
value = SCA
ignorehitpause = 1

[State 1000]
type = Hitdef
trigger1 = AnimElem = 1
attr = S, ST
id = 1100
hitflag = M-
priority = 3, Miss
sparkno = S7003
sparkxy = -10, -50
sprpriority = 1 
guard.dist = 0
p1stateno = 1150
p2stateno = 1190
p2facing = 1
yaccel = 0.29
fall = 1
fall.recover = 0
air.fall = 1
hitsound   = S800,0

[State 1000]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------------------------------------------------
;中乙女富嶽
[statedef 1110]
type = S
movetype = A
physics = S
anim  = 1110
ctrl = 0
velset = 0

[state 1100]
type = attackdist
trigger1 = 1
value = 0

[state 300]
type = changeanim
trigger1 = anim != 1110
value = 1110

[state 1200]
type = nothitby
trigger1 = time <= 2
value = SCA
ignorehitpause = 1

[State 1000]
type = Hitdef
trigger1 = AnimElem = 1
attr = S, ST
id = 1100
hitflag = M-
priority = 3, Miss
sparkno = S7003
sparkxy = -10, -50
sprpriority = 1 
guard.dist = 0
p1stateno = 1150
p2stateno = 1190
p2facing = 1
yaccel = 0.29
fall = 1
fall.recover = 0
air.fall = 1
hitsound   = S800,0

[State 1000]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------
;強乙女富嶽
[statedef 1120]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0

[state 1100]
type = attackdist
trigger1 = 1
value = 0

[state 1200]
type = nothitby
trigger1 = animelemno(0) = [1,2]
value = SCA
ignorehitpause = 1

[state 3000]
type = changeanim
trigger1 = anim != 1120
value = 1120

[state 3000]
type = varset
trigger1 = animelemno(0)=[1,28]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)!=[1,28]
var(20) = 0
ignorehitpause = 1

[State 1000]
type = Hitdef
trigger1 = animelem = 29
attr = S, ST
id = 1100
hitflag = M-
priority = 3, Miss
sparkno = S7003
sparkxy = -10, -50
sprpriority = 1 
guard.dist = 0
p1stateno = 1150
p2stateno = 1190
p2facing = 1
yaccel = 0.29
fall = 1
fall.recover = 0
air.fall = 1
hitsound   = S800,0

[State 1000]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;竹刀版乙女富嶽
[statedef 1150]
type = S
movetype = A
physics = S
anim  = 1150
ctrl = 0
velset = 0

[State 801]
type = Explod
trigger1 = time = 0
anim = 7012
id = 7012
vel = 10 + (var(4)), (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = time = 0
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[state 1001]
type = assertspecial
trigger1 = 1
flag = noautoturn

[state 1001,0]
type = turn
trigger1 = animelem = 2

[state 1001,1a]
type = targetbind
trigger1 = animelem = 1
pos = 20,0
time = 6

[state 1001,1a]
type = targetbind
trigger1 = animelem = 2
pos = -20,0
time = 6

[state 1001,1b]
type = targetbind
trigger1 = animelem = 3
pos = -10,-65
time = 3

[state 1001,1b]
type = targetbind
trigger1 = animelemtime(3) = 4
pos = -7,-65
time = 3

[state 1001,1c]
type = targetbind
trigger1 = animelem = 4
pos = 5,-70
time = 3

[state 1001,1c]
type = targetbind
trigger1 = animelemtime(4) = 4
pos = 10,-75
time = 3

[state 1001,d]
type = targetbind
trigger1 = animelem = 5
pos = 25,-80
time = 1

[State 1000]
type = changestate
trigger1 = time >= 50
trigger1 = target(1100),pos y >= 0
trigger2 = time >= 250
value = 1151

;終了
[statedef 1151]
type    = S
movetype = I
physics = S
anim = 1151

[State 1000]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;フルスイング
[Statedef 1160]
type    = S                      
movetype= A                      
physics = S                       
velset = 0,0 
ctrl = 0
sprpriority = 2
anim = 1160

[state 1200]
type = Null
triggerall = numtarget(1100)
trigger1 = target(1100),pos y < -80
trigger1 = var(11) := 0
trigger2 = target(1100),pos y = [-80 , -65)
trigger2 = var(11) := 1
trigger3 = target(1100),pos y = [-65 , -50)
trigger3 = var(11) := 2
trigger4 = target(1100),pos y = [-50 , -35)
trigger4 = var(11) := 3
trigger5 = target(1100),pos y = [-35 , -20)
trigger5 = var(11) := 4
trigger6 = target(1100),pos y >= -20
trigger6 = var(11) := 5
ignorehitpause = 1

[State 200]
type = PlaySnd
trigger1 = animelem = 3
value = 210,0

[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 0
attr = S, SA 
id = 1160
damage = ceil(21.9 * fvar(0))
animtype = Hard
getpower = 0,0
givepower = 30,0
hitflag = AF+
priority = 3, Hit
pausetime = 5,5
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 2,-4
yaccel = 0.40
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 1
attr = S, SA 
id = 1161 
damage = ceil(21.9 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,0
priority = 3, Hit
pausetime = 5,5
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 2,-4
yaccel = 0.40
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 2
attr = S, SA 
id = 1162 
damage = ceil(104.4 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,0
priority = 3, Hit
pausetime = 10,10
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 6,-7.5
yaccel = 0.45
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 3
attr = S, SA 
id = 1163 
damage = ceil(188.5 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,0
priority = 3, Hit
pausetime = 13,13
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 8,-10.5
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 4
attr = S, SA 
id = 1164 
damage = ceil(274.2 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,0
priority = 3, Hit
pausetime = 17,17
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 9,-11.5
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 5
attr = S, SA 
id = 1165 
damage = ceil(361.5 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,0
priority = 3, Hit
pausetime = 25,25
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 20,-17.5
yaccel = 0.58
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 200]
type = PlaySnd
trigger1 = movehit
trigger1 = hitpausetime > 20
value = S7000,1
ignorehitpause = 1
persistent = 0

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.50 * (1 - 0.50*(0.50*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;乙女バント
[Statedef 1170]
type    = S                      
movetype= A                      
physics = S                       
velset = 0,0 
ctrl = 0
sprpriority = 2
anim = 1170

[State 300]
type = HitDef
trigger1 = time = 0
attr = S, SA 
id = 1170 
damage = ceil(30 * fvar(0))
animtype = light
hitflag = MAF
getpower = 20,0
givepower = 10,0
priority = 3, Hit
pausetime = 3,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S200, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 10
guard.ctrltime = 9
ground.hittime  = 10
ground.velocity = -3
air.type = High
air.velocity = 0,-4;.5
yaccel = 0.35
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.75 * (1 - 0.25*(0.75*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = changestate
trigger1 = movecontact
value = 1180
ignorehitpause = 1

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;乙女バント
[Statedef 1180]
type    = S                      
movetype= A                      
physics = S                       
velset = 0,0 
ctrl = 0
sprpriority = 2
anim = 1180

[state 1180]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; やられ
[Statedef 1190]
type    = A
movetype = H
physics = N
poweradd = 0
velset = 0,0
ctrl = 0

[state 1190]
type = ScreenBound
trigger1 = 1
value = 1
[State 810]
type = changeanim2
trigger1 = time = 0
value = 1010

[state 1010]
type = sprpriority
trigger1 = animelem = 2
value = 2

[state 1001,0]
type = turn
trigger1 = animelem = 3

[state 1010]
type = velset
trigger1 = time = 26
x = 0
y = -15

[State 810]
type = changeanim2
trigger1 = time = 26
value = 1190

[State 810]
type = changeanim2
trigger1 = anim = 1190
trigger1 = vel y > 0
value = 1191

[state 1190]
type = veladd
triggerall = vel y < 15
trigger1 = anim = 1190
trigger2 = anim = 1191
y = 0.30 + 0.05*const(movement.yaccel)

[State 810]
type = changestate
trigger1 = pos y > 12
value = 4600


;----------------------------------------------------------------------------
;弱紅蓮竹刀
[statedef 1200]
type = S
movetype = A
physics = S
poweradd = 100
ctrl = 0
velset = 0,0
anim = 1200

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = 0
ctrl = 1
ignorehitpause = 1

[state 300]
type = changeanim
trigger1 = anim != 1200
value = 1200

[state 1200]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[state 1200]
type = Changestate
trigger1 = animtime = 0
value = 1201

;----------------------------------------------------------------------------
;弱紅蓮竹刀
[statedef 1201]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,-6.6
anim = 1201

[state 300]
type = changeanim
trigger1 = anim != 1201
value = 1201

[state 1200]
type = veladd
trigger1 = 1
y = 0.325

[State 300]
type = HitDef
trigger1 = animelem = 2
trigger1 = var(0) = 1
attr = A, SA 
id = 1201 
damage = ceil(80 * fvar(0)),ceil(20 * fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1.5,-8.5
air.type = High
air.velocity = -1.5,-6.5
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999
[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.80 * (1 - 0.20*(0.80 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1200]
type = Changestate
trigger1 = time >= 14
value = 1202


;----------------------------------------------------------------------------
;弱紅蓮竹刀
[statedef 1202]
type = A
movetype = A
physics = N
ctrl = 0
movehitpersist = 1

[state 300]
type = changeanim
trigger1 = anim != 1202
value = 1202

[state 1208]
type = movehitreset
trigger1 = prevstateno != 1201

[state 1200]
type = veladd
trigger1 = prevstateno = 1201
y = 0.38

[state 1200]
type = veladd
trigger1 = prevstateno != 1201
y = const(movement.yaccel)

[State 1200]
type = Helper
trigger1 = AnimElem = 5
helpertype = normal
name = "shinai"
postype = p1
pos = 35,-45
stateno = 1250
id = 1250
keyctrl = 0
ownpal = 1
facing = 1

[state 1202]
type = changestate
trigger1 = pos y >= 0
trigger1 = vel y > 0
value = 1210
;----------------------------------------------------------------------------
;中紅蓮竹刀
[statedef 1203]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = 0
ctrl = 1
ignorehitpause = 1

[state 300]
type = changeanim
trigger1 = anim != 1200
value = 1200

[state 1200]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[state 1200]
type = Changestate
trigger1 = animtime = 0
value = 1204

;----------------------------------------------------------------------------
;中紅蓮竹刀
[statedef 1204]
type = A
movetype = A
physics = N
poweradd = 0
ctrl = 0
velset = 0,-8.0

[state 300]
type = changeanim
trigger1 = anim != 1201
value = 1201

[state 1200]
type = veladd
trigger1 = 1
y = 0.235

[state 1200]
type = nothitby
trigger1 = time <= 4
value = SCA
ignorehitpause = 1

[State 300]
type = HitDef
trigger1 = animelem = 2
trigger1 = var(0) = 1
attr = A, SA 
id = 1204 
damage = ceil(80 * fvar(0)),ceil(20 * fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1.5,-8.5
air.type = High
air.velocity = -1.5,-8.0
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999
[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.80 * (1 - 0.20*(0.80 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1200]
type = Changestate
trigger1 = time >= 21
value = 1205
;----------------------------------------------------------------------------
;中紅蓮竹刀
[statedef 1205]
type = A
movetype = A
physics = N
ctrl = 0
movehitpersist = 1

[state 300]
type = changeanim
trigger1 = anim != 1202
value = 1202

[state 1208]
type = movehitreset
trigger1 = prevstateno != 1204

[state 1200]
type = veladd
trigger1 = prevstateno = 1204
y = 0.235

[state 1200]
type = veladd
trigger1 = prevstateno != 1204
y = const(movement.yaccel)

[State 1200]
type = Helper
trigger1 = AnimElem = 5
helpertype = normal
name = "shinai"
postype = p1
pos = 50,-50
stateno = 1250
id = 1250
keyctrl = 0
ownpal = 1
facing = 1

[state 1202]
type = changestate
trigger1 = pos y >= 0
trigger1 = vel y > 0
value = 1210


;----------------------------------------------------------------------------
;RF紅蓮竹刀
[statedef 1206]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = 0
ctrl = 1
ignorehitpause = 1

[state 300]
type = changeanim
trigger1 = anim != 1203
value = 1203

[State 1210]
type = VarAdd
triggerall = var(8) = 0
trigger1 = time = 0
v = 7
value = -200
ignorehitpause = 1

[State 1210]
type = VarAdd
triggerall = var(8) = 1
triggerall = var(7) >= 101
trigger1 = time = 0
v = 7
value = -100
ignorehitpause = 1

[State 1210]
type = VarSet
triggerall = var(8) = 1
triggerall = var(7) <= 100
trigger1 = time = 0
v = 7
value = 0
ignorehitpause = 1

[State 1210]
type = PlaySnd
trigger1 = time = 0
value = 20,0

[State 1210]
type = Explod
trigger1 = time = 0
anim = 7006
pos = 0, -50
ontop = 1
ownpal = 1
pausemovetime = 99999

[State 1210]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[state 1200]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[state 1200]
type = Changestate
trigger1 = animtime = 0
value = 1207

;----------------------------------------------------------------------------
;RF紅蓮竹刀
[statedef 1207]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,-8.0
anim = 1201

[state 300]
type = changeanim
trigger1 = anim != 1201
value = 1201

[state 1200]
type = veladd
trigger1 = 1
y = 0.225

[state 1200]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 300]
type = HitDef
trigger1 = animelem = 2
trigger1 = var(0) = 1
attr = A, SA 
id = 1207 
damage = ceil(80 * fvar(0)),ceil(20 * fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1,-9
air.type = High
air.velocity = -1,-8
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-50
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999
[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.80 * (1 - 0.20*(0.80 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1200]
type = Changestate
trigger1 = time >= 22
value = 1208
;----------------------------------------------------------------------------
;RF紅蓮竹刀
[statedef 1208]
type = A
movetype = A
physics = N
poweradd = 0
ctrl = 0
movehitpersist = 1

[state 300]
type = changeanim
trigger1 = anim != 1204
value = 1204

[state 1208]
type = movehitreset
trigger1 = prevstateno != 1207

[State 1210]
type = VarAdd
triggerall = var(8) = 0
trigger1 = time = 0
trigger1 = prevstateno != 1207
v = 7
value = -200
ignorehitpause = 1

[State 1210]
type = VarAdd
triggerall = var(8) = 1
triggerall = var(7) >= 101
trigger1 = time = 0
trigger1 = prevstateno != 1207
v = 7
value = -100
ignorehitpause = 1

[State 1210]
type = VarSet
triggerall = var(8) = 1
triggerall = var(7) <= 100
trigger1 = time = 0
trigger1 = prevstateno != 1207
v = 7
value = 0
ignorehitpause = 1

[State 1210]
type = PlaySnd
trigger1 = time = 0
trigger1 = prevstateno != 1207
value = 20,0

[State 1210]
type = Explod
trigger1 = time = 0
trigger1 = prevstateno != 1207
anim = 7006
pos = 0, -50
ontop = 1
bindtime = -1
ownpal = 1
pausemovetime = 99999

[state 1200]
type = veladd
trigger1 = prevstateno = 1207
y = 0.225

[state 1200]
type = veladd
trigger1 = prevstateno != 1207
y = const(movement.yaccel)

[State 1200]
type = Helper
trigger1 = AnimElem = 5
helpertype = normal
name = "shinai"
postype = p1
pos = 50,-50
stateno = 1260
id = 1250
keyctrl = 0
ownpal = 1
facing = 1

[state 1202]
type = changestate
trigger1 = pos y >= 0
trigger1 = vel y > 0
value = 1210

;----------------------------------------------------------------------------
;着地硬直
[statedef 1210]
type = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
velset = 0,0

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 5
ignoerhitpause = 1
persistent = 0

[state 300]
type = changeanim
trigger1 = anim != 1210
value = 1210

[state 1200]
type = posset
trigger1 = time = 0
y = 0

[state 1202]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;------------------------------------------------------------------------------
;竹刀ヘルパー
;飛んでいく竹刀
[statedef 1250]
type = A
movetype = A
physics = N
ctrl = 0
anim = 8000
velset = 8.5,6.4

[State 200]
type = PlaySnd
trigger1 = time = 0
value = 7000,2

[state 300]
type = Explod
trigger1 = !numexplod(8006)
anim = 8006
id = 8006
pos = 0,0
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
removetime = -1
bindtime = -1
Persistent = 0
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,30
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-20
random = 30,50
vel = 0.01*(random%100) - 0.4 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 1250]
type = hitdef
trigger1 = animelemno(0) = 1
;trigger1 = animelemtime(1) = 0
trigger1 = root,var(0) = 1
attr = A, SP 
id = 1250 
damage = ceil(10 * root,fvar(0)),ceil(10 * root,fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 10,3
givepower = 5,2
priority = 3, Hit
pausetime = 0,0
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -12,-3.5
air.type = High
air.velocity = -11,-2 + 0.3*(enemynear,vel y)
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = parentvarset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = root,fvar(1) * 0.98 * (1 - 0.02*(0.98 * root,fvar(1)>1.00000))
ignorehitpause = 1

[state 200]
type = movehitreset
trigger1 = movehit
ignorehitpause = 1

[state 1250]
type = velset
trigger1 = frontedgedist < 10
x = 0
[state 1250]
type = velset
trigger1 = frontedgedist > 10
x = 13

[state 1250]
type = posadd
trigger1 = frontedgedist < 8
x = - 2

[state 1250]
type = changestate
trigger1 = pos y > 0
trigger1 = vel y > 0
value = 1255


;回転する竹刀
[statedef 1255]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8001
velset = 2,-13

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = 0,-5
stateno = 1280
id = 1280
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 300]
type = removeExplod
trigger1 = numexplod(8006)
id = 8006

[state 1260]
type = velset
trigger1 = vel x > 0
trigger1 = frontedgedist < 5
x = - vel x

[state 1260]
type = veladd
trigger1 = time >= 1
y = 0.30

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1280)
trigger1 = helper(1280),movehit
fvar(1) = root,fvar(1) * 0.90 * (1 - 0.10*(0.90 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1260]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= -10
value = 1270


;------------------------------------------------------------------------------
;RF竹刀ヘルパー
;飛んでいく竹刀
[statedef 1260]
type = A
movetype = A
physics = N
ctrl = 0
anim = 8000
velset = 8.5,6.4

[State 200]
type = PlaySnd
trigger1 = time = 0
value = 7000,2

[state 300]
type = Explod
trigger1 = !numexplod(8006)
anim = 8006
id = 8006
pos = 0,0
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
removetime = -1
bindtime = -1
Persistent = 0
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,30
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-20
random = 30,50
vel = 0.01*(random%100) - 0.4 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) >= 3
trigger1 = numexplod(8009) < 65
trigger1 = random%2=0
trigger1 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 1250]
type = hitdef
trigger1 = animelemno(0) = 1
;trigger1 = animelemtime(1) = 0
trigger1 = root,var(0) = 1
attr = A, SP 
id = 1260 
damage = ceil(10 * root,fvar(0)),ceil(10 * fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 10,3
givepower = 5,2
priority = 3, Hit
pausetime = 0,0
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -12,-3.5
air.type = High
air.velocity = -11,-2 + 0.3*(enemynear,vel y)
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = parentvarset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = root,fvar(1) * 0.98 * (1 - 0.02*(0.98 * root,fvar(1)>1.00000))
ignorehitpause = 1

[state 200]
type = movehitreset
trigger1 = movehit
ignorehitpause = 1

[state 1250]
type = velset
trigger1 = frontedgedist < 10
x = 0
[state 1250]
type = velset
trigger1 = frontedgedist > 10
x = 13

[state 1250]
type = posadd
trigger1 = frontedgedist < 8
x = - 2

[state 1250]
type = changestate
trigger1 = pos y > 0
trigger1 = vel y > 0
value = 1265


;回転する竹刀
[statedef 1265]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8001
velset = 2,-13

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = 0,-5
stateno = 1280
id = 1280
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%160 - 80,-5
stateno = 1280
id = 1281
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%160 - 80,-5
stateno = 1280
id = 1282
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%160 - 80,-5
stateno = 1280
id = 1283
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%60 - 30,-5
stateno = 1281
id = 1284
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%60 -30,-5
stateno = 1281
id = 1285
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%60 - 30,-5
stateno = 1281
id = 1286
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Explosion"
postype = p1
pos = random%61 - 30,-5
stateno = 1281
id = 1287
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 300]
type = removeExplod
trigger1 = numexplod(8006)
id = 8006

[state 1260]
type = velset
trigger1 = vel x > 0
trigger1 = frontedgedist < 5
x = - vel x

[state 1260]
type = veladd
trigger1 = time >= 1
y = 0.30

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1280)
trigger1 = helper(1280),movehit
fvar(1) = root,fvar(1) * 0.90 * (1 - 0.10*(0.90 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1281)
trigger1 = helper(1281),movehit
fvar(1) = root,fvar(1) * 0.90 * (1 - 0.10*(0.90 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1282)
trigger1 = helper(1282),movehit
fvar(1) = root,fvar(1) * 0.90 * (1 - 0.10*(0.90 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1283)
trigger1 = helper(1283),movehit
fvar(1) = root,fvar(1) * 0.90 * (1 - 0.10*(0.90 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1284)
trigger1 = helper(1284),movehit
fvar(1) = root,fvar(1) * 0.96 * (1 - 0.04*(0.96 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1285)
trigger1 = helper(1285),movehit
fvar(1) = root,fvar(1) * 0.96 * (1 - 0.04*(0.96 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1286)
trigger1 = helper(1286),movehit
fvar(1) = root,fvar(1) * 0.96 * (1 - 0.04*(0.96 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 200]
type = parentvarset
triggerall = P2MoveType = H
triggerall = numhelper(1287)
trigger1 = helper(1287),movehit
fvar(1) = root,fvar(1) * 0.96 * (1 - 0.04*(0.96 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1260]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= 10
value = 1270

;刺さる竹刀
[statedef 1270]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9000
velset = 0,0

[state 1270]
type = posset
trigger1 = time = 0
y = 0

[state 1270]
type = destroyself
trigger1 = root,stateno = 950

;爆発ヘルパー
[statedef 1280]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8007
velset = 0,0
sprpriority = 7

[state 1280]
type = changeanim
trigger1 = ishelper(1281)
trigger1 = time = 0
value = 8010
[state 1280]
type = changeanim
trigger1 = ishelper(1282)
trigger1 = time = 0
value = 8011
[state 1280]
type = changeanim
trigger1 = ishelper(1283)
trigger1 = time = 0
value = 8012

[State 200]
type = PlaySnd
trigger1 = ishelper(1280)
trigger1 = time = 0
trigger2 = ishelper(1283)
trigger2 = time = 8
value = 7000,3

[state 300]
type = Explod
trigger1 = ishelper(1280)
trigger1 = numexplod(8008) < 5
trigger1 = random%10=1
trigger1 = time = [7,30]
anim = 8008
id = 8008
pos =  0,-70
random = 80,60
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = ishelper(1280)
triggerall = numhelper(1250)
triggerall = time = [6,30]
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 40,30
vel = 0.03*(random%100) - 2 , -0.05*(random%100)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = ishelper(1280)
triggerall = numhelper(1250)
triggerall = time = [15,45]
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 40,30
vel = 0.03*(random%100) - 2 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = ishelper(1280)
triggerall = numhelper(1250)
triggerall = time = [15,60]
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 30,30
vel = 0.03*(random%100) - 2 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250) && numhelper(1280)&& numhelper(1281)&& numhelper(1282)&& numhelper(1283)
triggerall = time = [30,55]
trigger1 = floor(0.001*root,var(29)) = 2
trigger1 = helper(1250),numexplod(8009) + helper(1280),numexplod(8009)+ helper(1281),numexplod(8009)+ helper(1282),numexplod(8009)+ helper(1283),numexplod(8009) < 70
trigger1 = random%4 <=2
trigger2 = floor(0.001*root,var(29)) = 3
trigger2 = helper(1250),numexplod(8009) + helper(1280),numexplod(8009)+ helper(1281),numexplod(8009)+ helper(1282),numexplod(8009)+ helper(1283),numexplod(8009) < 120
trigger2 = random%6 <= 4
trigger3 = floor(0.001*root,var(29)) >= 4
trigger3 = helper(1250),numexplod(8009) + helper(1280),numexplod(8009)+ helper(1281),numexplod(8009)+ helper(1282),numexplod(8009)+ helper(1283),numexplod(8009) < 250
trigger3 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 40,30
vel = 0.01*(random%100) - 0.75 , -0.01*(random%100)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250) && numhelper(1280)&& numhelper(1281)&& numhelper(1282)&& numhelper(1283)
triggerall = time = [30,55]
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + helper(1280),numexplod(8009)+ helper(1281),numexplod(8009)+ helper(1282),numexplod(8009)+ helper(1283),numexplod(8009) < 120
trigger1 = random%6<=4
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + helper(1280),numexplod(8009)+ helper(1281),numexplod(8009)+ helper(1282),numexplod(8009)+ helper(1283),numexplod(8009) < 250
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 50,30
vel = 0.01*(random%100) - 0.75 , -0.01*(random%100)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 1250]
type = hitdef
trigger1 = animelem = 4
trigger1 = root,var(0) = 1
ID = 1280
attr = A, SP 
damage = ceil(45 * root,fvar(0)),ceil(4 * root,fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 40,13
givepower = 20,7
priority = 3, Hit
pausetime = 0,0
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = 0,-8
air.type = High
air.velocity = 0,-8
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(45*root,fvar(1)*0.75)
p2facing = ifelse(p2dist x > 0 , 1 , -1)
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0

[state 1280]
type = targetstate
trigger1 = movehit = 1
trigger1 = numtarget(1280)
trigger1 = target(1280),movetype =H && target(1280),stateno!=[120,155]
trigger1 = target(1280),selfanimexist(7697) || target(1280),selfanimexist(9015)
value = 9015
ignorehitpause = 1

[State 1280]
type = Explod
trigger1 = movehit = 1
trigger1 = !NumExplod(7023)
anim = 7023
id = 7023
pos = 0,0
bindtime = -1
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1

[state 1280]
type = destroyself
trigger1 = animtime = 0

;爆発ヘルパー2
[statedef 1281]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8007
velset = 0,0
sprpriority = 7

[state 1280]
type = changeanim
trigger1 = ishelper(1284)
trigger1 = time = 0
value = 8013
[state 1280]
type = changeanim
trigger1 = ishelper(1285)
trigger1 = time = 0
value = 8014
[state 1280]
type = changeanim
trigger1 = ishelper(1286)
trigger1 = time = 0
value = 8015
[state 1280]
type = changeanim
trigger1 = ishelper(1287)
trigger1 = time = 0
value = 8016

[state 1250]
type = hitdef
trigger1 = animelem = 4
trigger1 = root,var(0) = 1
ID = 1280
attr = A, SP 
damage = ceil(25 * root,fvar(0)),ceil(4 * root,fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =MA
getpower = 30,10
givepower = 15,5
priority = 3, Hit
pausetime = 0,0
guard.sparkno = S7007
sparkxy = -15, -60
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = 0,-8
air.type = High
air.velocity = 0,-8
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(45*root,fvar(1)*0.75)
p2facing = ifelse(p2dist x > 0 , 1 , -1)
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0

[state 1280]
type = targetstate
trigger1 = movehit = 1
trigger1 = numtarget(1280)
trigger1 = target(1280),movetype =H && target(1280),stateno!=[120,155]
trigger1 = target(1280),selfanimexist(7697) || target(1280),selfanimexist(9015)
value = 9015
ignorehitpause = 1

[state 1280]
type = destroyself
trigger1 = animtime = 0


;-----------------------------------------------------------------------------------------------
;弱乙女牙突
[statedef 1300]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1300
value = 1300

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 1301

;-----------------
[statedef 1301]
type = S
movetype = A
physics = N
ctrl = 0
velset = 6,0

[state 300]
type = changeanim
trigger1 = anim != 1302
value = 1302

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 15
ignoerhitpause = 1
persistent = 0

[State 300]
type = HitDef
triggerall = var(0) = 1
triggerall = p2statetype = A
trigger1 = !movecontact && hitcount = 0
trigger2 = hitcount = 1
trigger2 = movehit = 3
attr = S, SA 
id = 1301 
damage = ceil(10 * fvar(0)),ceil(5 * fvar(0))
animtype = Hard
hitflag = AF
Guardflag =M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
air.type = High
air.velocity = -7,-9
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 300]
type = HitDef
triggerall = var(0) = 1
triggerall = p2statetype != A
trigger1 = !movecontact && !movereversed
attr = S, SA 
id = 1301 
damage = ceil(10 * fvar(0)),ceil(5 * fvar(0))
animtype = Hard
hitflag = M
Guardflag =M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1.5
guard.velocity = -6
air.type = High
air.velocity = -7,-9
forcestand = 1
yaccel = 0.35
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= -9
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)


[state 1301]
type = changestate
trigger1 = movehit
trigger1 = p2movetype = H && p2statetype != A
value = 1302

[state 1300]
type = changestate
trigger1 = time > 24
value = 1310

[state 1300]
type = changestate
trigger1 = moveguarded
trigger2 = movehit
trigger2 = p2movetype != H
value = 1312

[statedef 1302]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1303
value = 1303

[State 300]
type = HitDef
triggerall = var(0) = 1
trigger1 = animelem = 2
attr = S, SA 
id = 1302 
damage = ceil(120 * fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =M
getpower = 40,13
givepower = 20,7
priority = 3, Hit
pausetime = 9,39
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
air.type = High
air.velocity = -1,-8
yaccel = 0.65
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)


[state 1302]
type = targetstate
triggerall = movehit
trigger1 = numtarget(1302)
trigger1 = target(1302),stateno !=[120,155]
trigger1 = animelemno(0) = 3
trigger1 = target(1302),stateno != 1315
value = 1315

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.85 * (1 - 0.15*(0.85 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1303]
type = playerpush
trigger1 = animelemno(0) = [4,6]
value = 0

[state 1303]
type = posadd
trigger1 = animelem = 2
trigger1 = p2dist x > 45
trigger2 = animelem = 4
trigger3 = animelem = 5
trigger4 = animelem = 6
trigger5 = animelem = 7
x = 23

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------
;中乙女牙突
[statedef 1304]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1301
value = 1301

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 1305

;-----------------
[statedef 1305]
type = S
movetype = A
physics = N
ctrl = 0
velset = 9,0

[state 300]
type = changeanim
trigger1 = anim != 1302
value = 1302

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 15
ignoerhitpause = 1
persistent = 0

[State 300]
type = HitDef
triggerall = var(0) = 1
triggerall = p2statetype = A
trigger1 = !movecontact && hitcount = 0
trigger2 = hitcount < 5
trigger2 = movehit = 3
attr = S, SA 
id = 1305 
damage = ceil(10 * fvar(0)),ceil(5 * fvar(0))
animtype = Hard
hitflag = AF
Guardflag =M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
air.type = High
air.velocity = -7,-9
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 300]
type = HitDef
triggerall = var(0) = 1
triggerall = p2statetype != A
trigger1 = !movecontact && !movereversed
attr = S, SA 
id = 1305 
damage = ceil(10 * fvar(0)),ceil(5 * fvar(0))
animtype = Hard
hitflag = M
Guardflag =M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
guard.velocity = -6
air.type = High
air.velocity = -7,-9
forcestand = 1
yaccel = 0.35
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= -9
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)


[state 1301]
type = changestate
trigger1 = movehit
trigger1 = p2movetype = H && p2statetype != A
value = 1306

[state 1300]
type = changestate
trigger1 = time > 48
value = 1311

[state 1300]
type = changestate
trigger1 = moveguarded
trigger2 = movehit
trigger2 = p2movetype != H
value = 1313

;--------------------------------
[statedef 1306]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1303
value = 1303

[State 300]
type = HitDef
triggerall = var(0) = 1
trigger1 = animelem = 2
attr = S, SA 
id = 1306 
damage = ceil(175 * fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =M
getpower = 40,13
givepower = 20,7
priority = 3, Hit
pausetime = 9,39
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
air.type = High
air.velocity = -1,-8
yaccel = 0.65
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 1302]
type = targetstate
triggerall = movehit
trigger1 = numtarget(1306)
trigger1 = target(1306),stateno !=[120,155]
trigger1 = animelemno(0) = 3
trigger1 = target(1306),stateno != 1315
value = 1315

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.85 * (1 - 0.15*(0.85 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1303]
type = playerpush
trigger1 = animelemno(0) = [4,6]
value = 0

[state 1303]
type = posadd
trigger1 = animelem = 2
trigger1 = p2dist x > 45
trigger2 = animelem = 4
trigger3 = animelem = 5
trigger4 = animelem = 6
trigger5 = animelem = 7
x = 23

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------
;RF乙女牙突
[statedef 1307]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0

[state 3000]
type = changeanim
trigger1 = anim != 1300
value = 1300

[state 3000]
type = varset
trigger1 = 1
var(20) = stateno
ignorehitpause = 1

[State 1210]
type = VarAdd
triggerall = var(8) = 0
trigger1 = animelem = 1
v = 7
value = -200
ignorehitpause = 1

[State 1210]
type = VarAdd
triggerall = var(8) = 1
triggerall = var(7) >= 101
trigger1 = animelem = 1
v = 7
value = -100
ignorehitpause = 1

[State 1210]
type = VarSet
triggerall = var(8) = 1
triggerall = var(7) <= 100
trigger1 = animelem = 1
v = 7
value = 0
ignorehitpause = 1

[State 1210]
type = PlaySnd
trigger1 = animelem = 1
value = 20,0

[State 1210]
type = Explod
trigger1 = animelem = 1
anim = 7006
pos = 0, -50
ontop = 1
ownpal = 1
pausemovetime = 99999

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 1308

;-----------------
[statedef 1308]
type = S
movetype = A
physics = N
ctrl = 0
velset = 6,0

[state 300]
type = changeanim
trigger1 = anim != 1302
value = 1302

[state 300]
type = poweradd
trigger1 = animelem = 1
value = 15
ignoerhitpause = 1
persistent = 0

[State 300]
type = HitDef
triggerall = var(0) = 1
triggerall = p2statetype = A
trigger1 = !movecontact && hitcount = 0
trigger2 = hitcount = 1
trigger2 = movehit = 3
attr = S, SA 
id = 1308 
damage = ceil(10 * fvar(0)),ceil(5 * fvar(0))
animtype = Hard
hitflag = AF
Guardflag =M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
air.type = High
air.velocity = -7,-9
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 300]
type = HitDef
triggerall = var(0) = 1
triggerall = p2statetype != A
trigger1 = !movecontact && !movereversed
attr = S, SA 
id = 1308 
damage = ceil(10 * fvar(0)),ceil(5 * fvar(0))
animtype = Hard
hitflag = M
Guardflag =M
getpower = 20,7
givepower = 10,4
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
guard.velocity = -6
air.type = High
air.velocity = -7,-9
forcestand = 1
yaccel = 0.35
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= -9
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)


[state 1301]
type = changestate
trigger1 = movehit
trigger1 = p2movetype = H && p2statetype != A
value = 1309

[state 1300]
type = changestate
trigger1 = time > 24
value = 1311

[state 1300]
type = changestate
trigger1 = moveguarded
trigger2 = movehit
trigger2 = p2movetype != H
value = 1313

;--------------------------------
[statedef 1309]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1304
value = 1304

[State 300]
type = HitDef
triggerall = var(0) = 1
trigger1 = animelem = 2
attr = S, SA 
id = 1309 
damage = ceil(80 * fvar(0))
animtype = Hard
hitflag = MAF
getpower = 40,13
givepower = 20,7
priority = 3, Hit
pausetime = 9,59
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1
air.type = High
air.velocity = -1,-8
yaccel = 0.65
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit=1
trigger1 = animelemno(0) < 12 
fvar(1) = fvar(1) * 0.85 * (1 - 0.15*(0.85 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 300]
type = HitDef
triggerall = var(0) = 1
trigger1 = animelem = 12
attr = S, SA 
id = 1310
damage = ceil(80 * fvar(0))
animtype = Hard
hitflag = MAF
getpower = 40,13
givepower = 20,7
priority = 3, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1,-7
air.type = High
air.velocity = -1,-8
yaccel = 0.65
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit=1
trigger1 = animelemno(0) >= 12 
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 270]
type = targetstate
trigger1 = movehit =1
trigger1 = numtarget(1310)
trigger1 = target(1310),statetype = A
trigger1 = target(1310),stateno != 280 && target(1310),stateno != 5656
trigger1 = target(1310),stateno != [120,155]
value = 280
ignoerhitpause = 1
persistent = 0

[state 1303]
type = posadd
trigger1 = animelem = 2
trigger1 = p2dist x > 45

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;-------------------------------------------
;牙突終了
[statedef 1310]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1310

[state 300]
type = changeanim
trigger1 = anim != 1310
value = 1310

[state 1310]
type = velset
trigger1 = vel x > 1.5
x = 0.96*vel x

[state 1310]
type = velset
trigger1 = vel x <= 1.5
x = 0

[state 1300]
type = changestate
trigger1 = time >= 16
value = 0
ctrl = 1
;-------------------------------------------
;牙突終了
[statedef 1311]
type = S
movetype = A
physics = N
ctrl = 0

[state 300]
type = changeanim
trigger1 = anim != 1310
value = 1310

[state 1310]
type = velset
trigger1 = vel x > 1.5
x = 0.95*vel x

[state 1310]
type = velset
trigger1 = vel x <= 1.5
x = 0

[state 1300]
type = changestate
trigger1 = time >= 27
value = 0
ctrl = 1

;-------------------------------------------
;牙突終了
[statedef 1312]
type = S
movetype = A
physics = N
ctrl = 0

[state 300]
type = changeanim
trigger1 = anim != 1312
value = 1312

[state 1310]
type = velset
trigger1 = vel x > 1.5
x = 0.60*vel x

[state 1310]
type = velset
trigger1 = vel x <= 1.5
x = 0

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------
;牙突終了
[statedef 1313]
type = S
movetype = A
physics = N
ctrl = 0

[state 300]
type = changeanim
trigger1 = anim != 1313
value = 1313

[state 1310]
type = velset
trigger1 = vel x > 1.5
x = 0.60*vel x

[state 1310]
type = velset
trigger1 = vel x <= 1.5
x = 0

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------
;やられ
[statedef 1315]
type = S
movetype = H
physics = N
ctrl = 0
anim = 5002
velset = 0,0

[state 1315]
type = posset
trigger1 = time = 0
y = 0

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 7]
type = Statetypeset
trigger1 = HitShakeOver
statetype = A

[State 5000, 7]
type = HitFallset
trigger1 = HitShakeOver
value = 1
xvel = 0
yvel = 0

[State 5000, 7]
type = selfState
trigger1 = HitShakeOver
value = 5050





;-------------------------------------------------------------------------------
;弱爆砕鉄拳
[statedef 1400]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1400
value = 1400

[state 1400]
type = playsnd
trigger1 = animelem = 5
value = S7000,4

[state 1400]
type = playsnd
trigger1 = animelem = 6
value = S7000,5

[state 300]
type = Explod
trigger1 = animelem = 5
anim = 7025
id = 7025
pos =  10,0
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
persistent = 0
facing = 1

[State 1200];岩
type = Helper
trigger1 = animelem = 5
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 5
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 5
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 5
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 5
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 5
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 1400]
type = EnvShake
trigger1 = animelem = 5
time = 15
freq = 60
ampl = -10

[State 1400]
type = HitDef
triggerall = var(0) = 1
trigger1 = animelem = 5
attr = S, SP  
id = 1400
damage = ceil(70 * fvar(0)),ceil(10 * fvar(0))
animtype = Hard
hitflag = MAF
guardflag = L
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,19
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = 0,-6.5
air.type = High
air.velocity = 0,-6.5
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(fvar(1)*50*0.75) + 19
p2facing = ifelse(p2dist x > 0 , 1 , -1)
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit 
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(0.94 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;-------------------------------------------------------------------------------
;中爆砕鉄拳
[statedef 1401]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0

[state 3000]
type = changeanim
trigger1 = anim != 1401
value = 1401

[state 3000]
type = varset
trigger1 = animelemno(0) = [4,32]
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0) != [4,32]
var(20) = 0
ignorehitpause = 1

[state 1400]
type = playsnd
trigger1 = animelem = 35
value = S7000,4

[state 1400]
type = playsnd
trigger1 = animelem = 35
value = S7000,5

[state 300]
type = Explod
trigger1 = !numexplod(7025)
trigger1 = animelem = 35
anim = 7025
id = 7025
pos =  10,0
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
persistent = 0
facing = 1

[State 1200];岩
type = Helper
trigger1 = animelem = 35
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 35
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 35
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 35
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 35
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 1200];岩
type = Helper
trigger1 = animelem = 35
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 1
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 1400]
type = EnvShake
trigger1 = animelem = 35
time = 15
freq = 60
ampl = -10

[State 1400]
type = HitDef
triggerall = var(0) = 1
triggerall = !var(21)
trigger1 = animelemno(0) = [35,36]
trigger1 = !movecontact
attr = S, SP 
id = 1401 
damage = ceil(85 * fvar(0)),ceil(10 * fvar(0))
animtype = Hard
hitflag = MAF
guardflag = L
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,19
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = 0,-6.5
air.type = High
air.velocity = 0,-6.5
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(fvar(1)*50*0.75) + 19
p2facing = ifelse(p2dist x > 0 , 1 , -1)
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit 
fvar(1) = fvar(1) * 0.94 * (1 - 0.06*(0.94 * fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
;RF爆砕鉄拳
[statedef 1402]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0

[state 300]
type = changeanim
trigger1 = anim != 1402
value = 1402

[State 1210]
type = VarAdd
triggerall = var(8) = 0
trigger1 = animelem = 1
v = 7
value = -200
ignorehitpause = 1

[State 1210]
type = VarAdd
triggerall = var(8) = 1
triggerall = var(7) >= 101
trigger1 = animelem = 1
v = 7
value = -100
ignorehitpause = 1

[State 1210]
type = VarSet
triggerall = var(8) = 1
triggerall = var(7) <= 100
trigger1 = animelem = 1
v = 7
value = 0
ignorehitpause = 1

[State 1210]
type = PlaySnd
trigger1 = animelem = 1
value = 20,0

[State 1210]
type = Explod
trigger1 = animelem = 1
anim = 7006
pos = 0, -50
ontop = 1
ownpal = 1
pausemovetime = 99999

[state 1400]
type = playsnd
trigger1 = animelem = 6
value = S7000,4

[state 1400]
type = EnvShake
trigger1 = animelem = 6
time = 15
freq = 60
ampl = -10

[State 1200];岩
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "rock2"
postype = p1
pos = -10,0
stateno = 1460
id = 1460
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 1300]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;-----------------------
;演出用岩ヘルパー
[statedef 1450]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8023
sprpriority = random%10 -2

[state 1420]
type = velset
trigger1 = time = 0
x = 0.1*(random%25) - 1
y = -0.1*(random%30) - 5

[state 1420]
type = veladd
trigger1 = 1
y = 0.35

[state 1420]
type = velset
trigger1 = vel y > 0
trigger1 = pos y > 0
y = - 0.6*vel y

[state 1420]
type = Trans
trigger1 = time > 48
trigger1 = numhelper(20000)
trigger1 = helper(20000),var(55) >= 2
trans = addalpha
alpha = 256-8*(time-48),4*(time-48)

[state 1420]
type = destroyself
trigger1 = time >= 80

;-----------------------
;攻撃発生用ヘルパー
[statedef 1460]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8023
sprpriority = 0

[state 1460]
type = assertspecial
trigger1 = 1
flag = invisible

[state 1460]
type = varrandom
trigger1 = time = 0
V=0
range = 0,3

[state 300]
type = Explod
triggerall = frontedgebodydist > -80
trigger1 = time%10 = 0
anim = 7025
id = 7025
pos =  -20,0
postype = p1
ontop = 1
ownpal = 1
facing = 1

[state 1460]
type = null
trigger1 = !numhelper(1470)
trigger1 = var(0) := 0
trigger2 = numhelper(1470) && !numhelper(1471)
trigger2 = var(0) := 1
trigger3 = numhelper(1470) && numhelper(1471) && !numhelper(1472)
trigger3 = var(0) := 2
trigger4 = numhelper(1470) && numhelper(1471) && numhelper(1472) 
trigger4 = !numhelper(1473)
trigger4 = var(0) := 3
trigger5 = numhelper(1470) && numhelper(1471) && numhelper(1472)
trigger5 = numhelper(1473) && !numhelper(1474)
trigger5 = var(0) := 4
trigger6 = numhelper(1470) && numhelper(1471) && numhelper(1472)
trigger6 = numhelper(1473) && numhelper(1474) && !numhelper(1475)
trigger6 = var(0) := 5
ignorehitpause = 1

[State 1200];岩
type = Helper
triggerall = time <= 40
triggerall = frontedgebodydist > -80
trigger1 = time%12 = 1
helpertype = normal
name = "rock2"
postype = p1
pos = -10,0
stateno = 1470
id = 1470 + var(0)
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7

[state 200]
type = parentvarset
trigger1 = numhelper(1470)
trigger1 = helper(1470),movehit = 2
trigger2 = numhelper(1471)
trigger2 = helper(1471),movehit = 2
trigger3 = numhelper(1472)
trigger3 = helper(1472),movehit = 2
trigger4 = numhelper(1473)
trigger4 = helper(1473),movehit = 2
trigger5 = numhelper(1474)
trigger5 = helper(1474),movehit = 2
trigger6 = numhelper(1475)
trigger6 = helper(1475),movehit = 2
fvar(1) = root,fvar(1) * 0.95 * (1 - 0.05*(0.95 * root,fvar(1)>1.00000))
ignorehitpause = 1

[state 1460]
type = turn
trigger1 = facing !=root,facing
trigger1 = time = 0

[state 1420]
type = velset
trigger1 = time = 0
x = 6.0
y = 0

[state 1420]
type = posset
trigger1 = 1
y = 0

[state 1420]
type = destroyself
trigger1 = time >= 180

[state 1460]
type = null
trigger1 = !numprojid(8000)
trigger1 = var(1) := 0
trigger2 = numprojid(8000) && !numprojid(8001)
trigger2 = var(1) := 1
trigger3 = numprojid(8000) && numprojid(8001) && !numprojid(8002)
trigger3 = var(1) := 2
trigger4 = numprojid(8000) && numprojid(8001) && numprojid(8002) 
trigger4 = !numprojid(8003)
trigger4 = var(1) := 3
trigger5 = numprojid(8000) && numprojid(8001) && numprojid(8002)
trigger5 = numprojid(8003) && !numprojid(8004)
trigger5 = var(1) := 4
trigger6 = numprojid(8000) && numprojid(8001) && numprojid(8002)
trigger6 = numprojid(8003) && numprojid(8004) && !numprojid(8005)
trigger6 = var(1) := 5
ignorehitpause = 1

[state 1460]
type = Projectile
triggerall = time <= 40
triggerall = frontedgebodydist > -80
trigger1 = var(0) = 0
trigger1 = time%9 = 3
trigger2 = var(0) = 1
trigger2 = time%11 = 5
trigger3 = var(0) = 2
trigger3 = time%13 = 7
trigger4 = var(0) = 3
trigger4 = time%17 = 11
attr = S,SP
Hitflag = MAF
GuardFlag = MA
damage = ceil(25*root,fvar(0)) , ceil(5 * root,fvar(0))
projID = 8000 + var(1)
projanim = 8020
projremove = 0
getpower = 10
velocity = 0.1*(random%25), -4.0 - 0.3*(random%25)
accel = 0, 0.4
projhits = 1
projpriority = 4
projsprpriority = 2
sparkno = S7002
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
offset = -random%40, 0
postype = p1
supermovetime = 0
pausemovetime = 0
ground.velocity = -4, -5
guard.velocity = -4
air.velocity = -3, -6
airguard.velocity = -3, -6
fall = 1
Air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40*root,fvar(1)*0.75)
p2facing = ifelse(p2dist x > 0 , 1 , -1)
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[state 1460]
type = null
trigger1 = !numprojid(8010)
trigger1 = var(2) := 0
trigger2 = numprojid(8010) && !numprojid(8011)
trigger2 = var(2) := 1
trigger3 = numprojid(8010) && numprojid(8011) && !numprojid(8012)
trigger3 = var(2) := 2
trigger4 = numprojid(8010) && numprojid(8011) && numprojid(8012) 
trigger4 = !numprojid(8013)
trigger4 = var(2) := 3
trigger5 = numprojid(8010) && numprojid(8011) && numprojid(8012)
trigger5 = numprojid(8013) && !numprojid(8014)
trigger5 = var(2) := 4
trigger6 = numprojid(8010) && numprojid(8011) && numprojid(8012)
trigger6 = numprojid(8013) && numprojid(8014) && !numprojid(8015)
trigger6 = var(2) := 5
ignorehitpause = 1

[state 1460]
type = Projectile
triggerall = time <= 40
triggerall = frontedgebodydist > -80
trigger1 = var(0) = 3
trigger1 = time%9 = 3
trigger2 = var(0) = 2
trigger2 = time%11 = 5
trigger3 = var(0) = 1
trigger3 = time%13 = 7
trigger4 = var(0) = 0
trigger4 = time%17 = 11
attr = S,SP
Hitflag = MAF
GuardFlag = MA
damage = ceil(25*root,fvar(0)) , ceil(5 * root,fvar(0))
projID = 8010 + var(2)
projanim = 8021
projremove = 0
getpower = 10
velocity = 0.1*(random%25), -4.0 - 0.2*(random%30)
accel = 0, 0.33
projhits = 1
projpriority = 4
projsprpriority = 2
sparkno = S7002
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
offset = -random%40, 0
postype = p1
supermovetime = 0
pausemovetime = 0
ground.velocity = -4, -5
guard.velocity = -4
air.velocity = -3, -6
airguard.velocity = -3, -6
fall = 1
Air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40*root,fvar(1)*0.75)
p2facing = ifelse(p2dist x > 0 , 1 , -1)
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[state 1460]
type = null
trigger1 = !numprojid(8020)
trigger1 = var(3) := 0
trigger2 = numprojid(8020) && !numprojid(8021)
trigger2 = var(3) := 1
trigger3 = numprojid(8020) && numprojid(8021) && !numprojid(8022)
trigger3 = var(3) := 2
trigger4 = numprojid(8020) && numprojid(8021) && numprojid(8022) 
trigger4 = !numprojid(8023)
trigger4 = var(3) := 3
trigger5 = numprojid(8020) && numprojid(8021) && numprojid(8022)
trigger5 = numprojid(8023) && !numprojid(8024)
trigger5 = var(3) := 4
trigger6 = numprojid(8020) && numprojid(8021) && numprojid(8022)
trigger6 = numprojid(8023) && numprojid(8024) && !numprojid(8025)
trigger6 = var(3) := 5
ignorehitpause = 1

[state 1460]
type = Projectile
triggerall = time <= 40
triggerall = frontedgebodydist > -80
trigger1 = time%10 = 0
attr = S,SP
Hitflag = MAF
GuardFlag = MA
projID = 8020 + var(3)
projanim = 8025
damage = ceil(25*root,fvar(0)) , ceil(5 * root,fvar(0))
projremove = 0
getpower = 10
velocity = 0.1*(random%25), -4.0 - 0.3*(random%25)
accel = 0, 0.35
projhits = 1
projpriority = 4
projsprpriority = 2
sparkno = S7002
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
offset = -random%40, 0
postype = p1
supermovetime = 0
pausemovetime = 0
ground.velocity = -4, -5
guard.velocity = -4
air.velocity = -3, -6
airguard.velocity = -3, -6
fall = 1
Air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40*root,fvar(1)*0.75)
p2facing = ifelse(p2dist x > 0 , 1 , -1)
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0


;----------------------------------
[statedef 1470]
type = A
movetype = A
physics = N
anim = 8022
ctrl = 0
velset = 0.05*(random%30) , -5 - 0.2*(random%20)

[state 1470]
type = veladd
trigger1 = 1
y = 0.35

[state 1470]
type = playsnd
trigger1 = time = 0
value = S7000,5
persistent = 0

[state 1470]
type = hitdef
trigger1 = root,var(0) = 1
trigger1 = !movecontact
attr = S,SP
Hitflag = MAF
GuardFlag = MA
damage = ceil(25*root,fvar(0)) , ceil(5 * root,fvar(0))
sparkno = S7002
pausetime = 0,0
getpower = 10,3
givepower = 5,2
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
ground.velocity = -4, -5
guard.velocity = -4
air.velocity = -3, -6
airguard.velocity = -3, -6
numhits = 1
fall = 1
Air.fall = 1
fall.recover = 1
fall.recovertime = ceil(40*root,fvar(1)*0.75)
p2facing = ifelse(p2dist x > 0 , 1 , -1)
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0

[State 1200];岩
type = Helper
triggerall = numhelper(20000)
triggerall = helper(20000),var(55) >= 1
trigger1 = pos y >= 0
trigger1 = vel y >= 0
trigger2 = movecontact > 2
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0
[State 1200];岩
type = Helper
triggerall = numhelper(20000)
triggerall = helper(20000),var(55) >= 1
trigger1 = pos y >= 0
trigger1 = vel y >= 0
trigger2 = movecontact > 2
helpertype = normal
name = "rock"
postype = p1
pos = random%60 - 20,0
stateno = 1450
id = 1450
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0
[state 1470]
type = changestate
triggerall = numhelper(20000)
triggerall = helper(20000),var(55) >= 1
trigger1 = pos y > 0
trigger1 = vel y > 0
trigger2 = movecontact > 2
value = 1450


[state 1470]
type = destroyself
trigger1 = pos y > 0
trigger1 = vel y > 0
trigger2 = movecontact > 2




;______________________________________________________________________

;                   Eterny Special
;______________________________________________________________________

;------------------------------------------------------------------------------
;Lv1 乙女桜
[statedef 3100]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0

[state 3100]
type = changeanim
trigger1 = anim != 3100
value = 3100

[State 3100]
type = poweradd
trigger1 = animelem = 1
value = -1000

[State 3000]
type = Envcolor
trigger1 = animelem = 1
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 30
under = 1
supermove = 1

[State 3000]
type = superpause
trigger1 = animelem = 1
time = 30
anim = s7014
pos = 20, -50
movetime = 20
darken = 0
SprPriority = -5
p2defmul = 1

[State 3000]
type = PlaySnd
trigger1 = animelem = 1
value = 20,3

[State 3000]
type = changestate
trigger1 = animtime = 0
value = 3101

;Lv1 乙女桜
[statedef 3101]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0, 0

[state 3100]
type = changeanim
trigger1 = anim != 3101
value = 3101

[State 1200];竹刀
type = Helper
trigger1 = time = 0
helpertype = normal
name = "rock"
postype = p1
pos = 20,-30
stateno = 3150
id = 1250
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 3001]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;------------------------------------------------------------------------------
;Lv2 乙女桜
[statedef 3102]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0

[state 3100]
type = changeanim
trigger1 = anim != 3100
value = 3100

[State 3102]
type = poweradd
trigger1 = animelem = 1
value = -2000

[State 3102]
type = Envcolor
trigger1 = animelem = 1
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 30
under = 1
supermove = 1

[State 3102]
type = superpause
trigger1 = animelem = 1
time = 35
anim = s7015
pos = 20, -50
movetime = 20
darken = 0
SprPriority = -5
p2defmul = 1

[State 3102]
type = PlaySnd
trigger1 = animelem = 1
value = 20,1

[State 3000]
type = changestate
trigger1 = animtime = 0
value = 3103

;Lv2 乙女桜
[statedef 3103]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0, 0

[state 3100]
type = changeanim
trigger1 = anim != 3102
value = 3102

[State 1200];竹刀
type = Helper
trigger1 = time = 0
helpertype = normal
name = "rock"
postype = p1
pos = 20,-30
stateno = 3153
id = 1250
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 3001]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------
;Lv3 乙女桜
[statedef 3104]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0
anim = 3100

[state 3100]
type = changeanim
trigger1 = anim != 3100
value = 3100

[State 3000]
type = poweradd
trigger1 = animelem = 1
value = -3000

[State 3040]
type = Envcolor
trigger1 = animelem = 1
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 40
under = 1
supermove = 1

[State 3040]
type = superpause
trigger1 = animelem = 1
time = 40
anim = s7016
pos = 20, -50
movetime = 20
darken = 0
SprPriority = -5
p2defmul = 1

[State 3040]
type = PlaySnd
trigger1 = animelem = 1
value = 20,4

[State 3040]
type = PlaySnd
trigger1 = animelem = 1
value = 20,2

[State 3040]
type = BGPalfx
trigger1 = animelem = 1
persistent = 1
invertall = 1
ignorehitpause = 1
time = 140
color = 0
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 3000]
type = changestate
trigger1 = animtime = 0
value = 3105

;Lv3 乙女桜
[statedef 3105]
type = S
movetype = A
physics = N
poweradd= 0
ctrl = 0
velset = 0, 0

[state 3100]
type = changeanim
trigger1 = anim != 3103
value = 3103

[State 1200];竹刀
type = Helper
trigger1 = time = 0
helpertype = normal
name = "rock"
postype = p1
pos = 20,-30
stateno = 3156
id = 1250
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[State 3001]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Lv1 乙女桜ヘルパー
[statedef 3150]
type = A
movetype = A
physics = N
ctrl = 0
anim = 8027
velset = 7,1

[state 3150]
type = playsnd
trigger1 = time = 0
value = S7000,0

[state 3150]
type = velset
trigger1 = frontedgedist < 10
x = 0

[state 3150]
type = velset
trigger1 = frontedgedist > 10
trigger1 = vel x = 0
x = 5

[state 3150]
type = Explod
trigger1 = !numexplod(8026)
anim = 8026
id = 8026
pos = 0,0
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
removetime = -1
bindtime = -1
Persistent = 0
facing = 1

[state 1470]
type = hitdef
trigger1 = root,var(0) = 1
trigger1 = hitcount < 3
trigger1 = movecontact = 0 || movecontact > 3
attr = S,HP 
id = 3150
Hitflag = MAF
GuardFlag = HA
damage = ceil(30*root,fvar(0)) , ceil(5 * root,fvar(0))
getpower = 0,0
givepower = 10,3
sparkno = S7002
pausetime = 0,0
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
ground.velocity = -4, -2
guard.velocity = -4
air.velocity = -4.5, -2
airguard.velocity = -3, -2
numhits = 1
fall = 1
Air.fall = 1
fall.recover = 0
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = parentvarset
trigger1 = movehit = 1
fvar(1) = root,fvar(1) * 0.99 * (1 - 0.01*(0.99 * root,fvar(1)>1.00000))

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-10
random = 30,30
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-20
random = 30,50
vel = 0.01*(random%100) - 0.4 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) >= 3
trigger1 = numexplod(8009) < 65
trigger1 = random%2=0
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 3150]
type = changestate
trigger1 = time >= 12
value = 3151

;竹刀上へ参りまーす
[statedef 3151]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0.5 , -18
anim = 8001

[State 1200];爆発
type = Helper
trigger1 = time = 0
helpertype = normal
name = "super_explosion"
postype = p1
pos = 0,0
stateno = 3152
id = 3152
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 300]
type = removeExplod
trigger1 = numexplod(8026)
id = 8026

[state 3151]
type = velset
trigger1 = vel x > 0
trigger1 = frontedgedist < 5
trigger2 = vel x < 0
trigger2 = backedgedist < 5
x = - vel x

[state 3151]
type = veladd
trigger1 = time >= 1
y = 0.20

[state 200]
type = parentvarset
trigger1 = numhelper(3152)
trigger1 = helper(3152),movehit 
fvar(1) = root,fvar(1) * 0.9 * (1 - 0.1*(0.9 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 3151]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= 10
value = 1270

;爆発ヘルパー
[statedef 3152]
type = A
movetype = A
phsics = N 
velset = 0,0
anim = 8028

[state 3152]
type = posset
trigger1 = time = 0
y = 0

[State 200]
type = PlaySnd
trigger1 = time = 0
value = 7000,3

[state 300]
type = Explod
trigger1 = numexplod(8008) < 5
trigger1 = random%10=1
trigger1 = time = [2,30]
anim = 8008
id = 8008
pos =  0,-70
random = 80,60
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time = [15,60]
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -5,-70
random = 70,30
vel = 0.03*(random%100) - 1.5 , -0.04*(random%40)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -5,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.04*(random%40)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.02*(random%30)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger1 = random%5<=3
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.01*(random%30)
accel = 0 , 0.0015*(random%10) + 0.01
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger1 = random%5<=3
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.01*(random%30)
accel = 0 , 0.0015*(random%10) + 0.01
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = time = 2
anim = 8007
id = 8007
pos =  30,0
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = time = 3
anim = 8007
id = 8007
pos =  -30,0
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 1250]
type = hitdef
trigger1 = animelem = 2
trigger1 = root,var(0) = 1
ID = 3152
attr = S, HP 
damage = ceil(140 * root,fvar(0)),ceil(10 * root,fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =HA
getpower = 0,0
givepower = 60,20
priority = 7, Hit
pausetime = 0,0
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1,-6
air.type = High
air.velocity = -1,-9
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 1280]
type = targetstate
trigger1 = movehit = 1
trigger1 = numtarget(3152)
trigger1 = target(3152),movetype =H && target(3152),stateno!=[120,155]
trigger1 = target(3152),selfanimexist(7697) || target(3152),selfanimexist(9015)
value = 9015
ignorehitpause = 1

[State 1280]
type = Explod
trigger1 = movehit = 1
trigger1 = !NumExplod(7023)
anim = 7023
id = 7023
pos = 0,0
bindtime = -1
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1

[state 3152]
type = destroyself
trigger1 = animtime = 0



;---------------------------------------------------------------------------
;Lv2 乙女桜ヘルパー
[statedef 3153]
type = A
movetype = A
physics = N
ctrl = 0
anim = 8027
velset = 7,1

[state 3150]
type = playsnd
trigger1 = time = 0
value = S7000,0

[state 3150]
type = velset
trigger1 = frontedgedist < 10
x = 0

[state 3150]
type = velset
trigger1 = frontedgedist > 10
trigger1 = vel x = 0
x = 5

[state 3150]
type = Explod
trigger1 = !numexplod(8026)
anim = 8026
id = 8026
pos = 0,0
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
removetime = -1
bindtime = -1
Persistent = 0
facing = 1

[state 1470]
type = hitdef
trigger1 = root,var(0) = 1
trigger1 = hitcount < 4
trigger1 = movecontact = 0 || movecontact > 3
attr = S,SP
id = 3153
Hitflag = MAF
GuardFlag = HA
damage = ceil(30*root,fvar(0)) , ceil(5 * root,fvar(0))
sparkno = S7002
pausetime = 0,0
getpower = 0,0
givepower = 10,3
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
ground.velocity = -4, -2
guard.velocity = -4
air.velocity = -4.5, -2
airguard.velocity = -3, -2
numhits = 1
fall = 1
Air.fall = 1
fall.recover = 0
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = parentvarset
trigger1 = movehit = 1
fvar(1) = root,fvar(1) * 0.99 * (1 - 0.01*(0.99 * root,fvar(1)>1.00000))

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-10
random = 30,30
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-20
random = 30,50
vel = 0.01*(random%100) - 0.4 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = 1
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = 1
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = 1
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) >= 3
trigger1 = numexplod(8009) < 65
trigger1 = random%2=0
trigger1 = 1
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 3150]
type = changestate
trigger1 = time >= 16
value = 3154

;竹刀上へ参りまーす
[statedef 3154]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0.5 , -18
anim = 8001

[State 1200];爆発
type = Helper
trigger1 = time = 0
helpertype = normal
name = "super_explosion"
postype = p1
pos = 0,0
stateno = 3155
id = 3152
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 300]
type = removeExplod
trigger1 = numexplod(8026)
id = 8026

[state 3151]
type = velset
trigger1 = vel x > 0
trigger1 = frontedgedist < 5
trigger2 = vel x < 0
trigger2 = backedgedist < 5
x = - vel x

[state 3151]
type = veladd
trigger1 = time >= 1
y = 0.20

[state 200]
type = parentvarset
trigger1 = numhelper(3152)
trigger1 = helper(3152),movehit 
fvar(1) = root,fvar(1) * 0.9 * (1 - 0.1*(0.9 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 3151]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= 10
value = 1270

;爆発ヘルパー
[statedef 3155]
type = A
movetype = A
phsics = N 
velset = 0,0
anim = 8028

[state 3152]
type = posset
trigger1 = time = 0
y = 0

[State 200]
type = PlaySnd
trigger1 = time = 0
value = 7000,3

[state 300]
type = Explod
trigger1 = numexplod(8008) < 5
trigger1 = random%10=1
trigger1 = time = [2,30]
anim = 8008
id = 8008
pos =  0,-70
random = 80,60
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time = [15,60]
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -5,-70
random = 70,30
vel = 0.03*(random%100) - 1.5 , -0.04*(random%40)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -5,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.04*(random%40)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.02*(random%30)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger1 = random%5<=3
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.01*(random%30)
accel = 0 , 0.0015*(random%10) + 0.01
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger1 = random%5<=3
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.01*(random%30)
accel = 0 , 0.0015*(random%10) + 0.01
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = time = 2
anim = 8007
id = 8007
pos =  30,0
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = time = 3
anim = 8007
id = 8007
pos =  -30,0
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 1250]
type = hitdef
trigger1 = animelem = 2
trigger1 = root,var(0) = 1
ID = 3152
attr = S, HP 
damage = ceil(220 * root,fvar(0)),ceil(10 * root,fvar(0))
animtype = Hard
hitflag = MAF
Guardflag =HA
getpower = 0,0
givepower = 60,20
priority = 7, Hit
pausetime = 0,0
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1,-7
air.type = High
air.velocity = -1,-8.4
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 1280]
type = targetstate
trigger1 = movehit = 1
trigger1 = numtarget(3152)
trigger1 = target(3152),movetype =H && target(3152),stateno!=[120,155]
trigger1 = target(3152),selfanimexist(7697) || target(3152),selfanimexist(9015)
value = 9015
ignorehitpause = 1

[State 1280]
type = Explod
trigger1 = movehit = 1
trigger1 = !NumExplod(7023)
anim = 7023
id = 7023
pos = 0,0
bindtime = -1
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1

[state 3152]
type = destroyself
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Lv3 乙女桜ヘルパー
[statedef 3156]
type = A
movetype = A
physics = N
ctrl = 0
anim = 8027
velset = 9,0.5

[state 3150]
type = playsnd
trigger1 = time = 0
value = S7000,0

[state 3150]
type = velset
trigger1 = frontedgedist < 10
x = 0

[state 3150]
type = velset
trigger1 = frontedgedist > 10
trigger1 = vel x = 0
x = 5

[state 3150]
type = Explod
trigger1 = !numexplod(8026)
anim = 8026
id = 8026
pos = 0,0
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
removetime = -1
bindtime = -1
Persistent = 0
facing = 1

[state 1470]
type = hitdef
trigger1 = root,var(0) = 1
trigger1 = hitcount < 9
trigger1 = movecontact = 0 || movecontact > 3
attr = S,SP
id = 3156
Hitflag = MAF
GuardFlag = HA
damage = ceil(30*root,fvar(0)) , ceil(5 * root,fvar(0))
getpower = 0,0
givepower = 10,3
sparkno = S7002
pausetime = 0,0
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
sparkxy = 0, -40
ground.velocity = -4, -2
guard.velocity = -4
air.velocity = -7.5, -1.5
airguard.velocity = -3, -2
numhits = 1
fall = 1
Air.fall = 1
fall.recover = 0
ground.slidetime = 23
guard.slidetime = 21
ground.hittime = 23
guard.ctrltime = 21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 200]
type = parentvarset
trigger1 = movehit = 1
fvar(1) = root,fvar(1) * 0.99 * (1 - 0.01*(0.99 * root,fvar(1)>1.00000))
[state 300]
type = Explod
trigger1 = numexplod(8009) < 25
trigger1 = random%3=0
anim = 8009
id = 8009
pos =  -20,-10
random = 30,30
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,30
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-20
random = 30,50
vel = 0.01*(random%100) - 0.4 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = numexplod(8009) < 10
trigger1 = random%7=0
trigger1 = pos y < -20
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = numexplod(8009) < 25
trigger2 = random%3=0
trigger2 = pos y < -20
trigger3 = floor(0.001*root,var(29)) >= 2
trigger3 = numexplod(8009) < 45
trigger3 = random%2=0
trigger3 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = floor(0.001*root,var(29)) >= 3
trigger1 = numexplod(8009) < 65
trigger1 = random%2=0
trigger1 = pos y < -20
anim = 8009
id = 8009
pos =  -20,-10
random = 30,40
vel = 0.01*(random%100) - 0.6 , -0.02*(random%100)
accel = 0 , 0.001*(random%10) + 0.025
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 3150]
type = changestate
trigger1 = time >= 36
value = 3157

;竹刀上へ参りまーす
[statedef 3157]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0.5 , -18
anim = 8001

[State 1200];爆発
type = Helper
trigger1 = time = 0
helpertype = normal
name = "super_explosion"
postype = p1
pos = 0,0
stateno = 3158
id = 3152
keyctrl = 0
ownpal = 1
facing = 1
sprpriority = 7
persistent = 0

[state 300]
type = removeExplod
trigger1 = numexplod(8026)
id = 8026

[state 3151]
type = velset
trigger1 = vel x > 0
trigger1 = frontedgedist < 5
trigger2 = vel x < 0
trigger2 = backedgedist < 5
x = - vel x

[state 3151]
type = veladd
trigger1 = time >= 1
y = 0.20

[state 200]
type = parentvarset
trigger1 = numhelper(3152)
trigger1 = helper(3152),movehit 
fvar(1) = root,fvar(1) * 0.9 * (1 - 0.1*(0.9 * root,fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[state 3151]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= 10
value = 1270

;爆発ヘルパー
[statedef 3158]
type = A
movetype = A
phsics = N 
velset = 0,0
anim = 8028

[state 3152]
type = posset
trigger1 = time = 0
y = 0

[State 200]
type = PlaySnd
trigger1 = time = 0
value = 7000,3

[state 300]
type = Explod
trigger1 = numexplod(8008) < 5
trigger1 = random%10=1
trigger1 = time = [2,30]
anim = 8008
id = 8008
pos =  0,-70
random = 80,60
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.05*(random%50)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time = [15,60]
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -5,-70
random = 70,30
vel = 0.03*(random%100) - 1.5 , -0.04*(random%40)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  -5,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.04*(random%40)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 0
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 10
trigger1 = random%6=0
trigger2 = floor(0.001*root,var(29)) = 1
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 35
trigger2 = random%2=0
trigger3 = floor(0.001*root,var(29)) = 2
trigger3 = helper(1250),numexplod(8009) + numexplod(8009) < 70
trigger3 = random%4<=2
trigger4 = floor(0.001*root,var(29)) = 3
trigger4 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger4 = random%5<=3
trigger5 = floor(0.001*root,var(29)) >= 4
trigger5 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger5 = 1
anim = 8009
id = 8009
pos =  0,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.02*(random%30)
accel = 0 , 0.0015*(random%10) + 0.040
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger1 = random%5<=3
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.01*(random%30)
accel = 0 , 0.0015*(random%10) + 0.01
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
triggerall = numhelper(1250)
triggerall = time > 8
trigger1 = floor(0.001*root,var(29)) = 3
trigger1 = helper(1250),numexplod(8009) + numexplod(8009) < 120
trigger1 = random%5<=3
trigger2 = floor(0.001*root,var(29)) >= 4
trigger2 = helper(1250),numexplod(8009) + numexplod(8009) < 240
trigger2 = 1
anim = 8009
id = 8009
pos =  -10,-70
random = 80,30
vel = 0.03*(random%100) - 1.5 , -0.01*(random%30)
accel = 0 , 0.0015*(random%10) + 0.01
postype = p1
ontop = 1
ownpal = 1
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = time = 2
anim = 8007
id = 8007
pos =  30,0
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 300]
type = Explod
trigger1 = time = 3
anim = 8007
id = 8007
pos =  -30,0
postype = p1
ontop = 1
ownpal = 1
sprpriority = 7
IgnoreHitPause = 1
facing = 1

[state 1250]
type = hitdef
trigger1 = animelem = 2
trigger1 = root,var(0) = 1
ID = 3152
attr = S, HP 
damage = ceil(250 * root,fvar(0)),ceil(10 * root,fvar(0))
animtype = Hard
getpower = 0,0
givepower = 80,40
hitflag = MAF
Guardflag =HA
getpower = 0
priority = 7, Hit
pausetime = 0,0
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -1,-9
air.type = High
air.velocity = -1,-9
yaccel = 0.35
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 1280]
type = targetstate
trigger1 = movehit = 1
trigger1 = numtarget(3152)
trigger1 = target(3152),movetype =H && target(3152),stateno!=[120,155]
trigger1 = target(3152),selfanimexist(7697) || target(3152),selfanimexist(9015)
value = 9015
ignorehitpause = 1

[State 1280]
type = Explod
trigger1 = movehit = 1
trigger1 = !NumExplod(7023)
anim = 7023
id = 7023
pos = 0,0
bindtime = -1
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1

[state 3152]
type = destroyself
trigger1 = animtime = 0


;---------------------------------------------------------------------------
;Lv1 ちょこまかすんなぁ
[statedef 3200]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0

[state 3200]
type = attackdist
trigger1 = 1
value = 320

[state 3000]
type = varset
trigger1 = animelemno(0) <= 21
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0) > 21
var(20) = 0
ignorehitpause = 1

[state 3000]
type = changeanim
trigger1 = anim != 3200
value = 3200

[State 3000]
type = poweradd
trigger1 = animelem = 16
value = -1000

[State 3000]
type = Envcolor
trigger1 = animelem = 16
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 30
under = 1
supermove = 1

[State 3000]
type = superpause
trigger1 = animelem = 16
time = 30
anim = s7014
pos = 20, -50
movetime = 0
darken = 0
SprPriority = -5
p2defmul = 1

[State 3000]
type = PlaySnd
trigger1 = animelem = 16
value = 20,3

[State 3000]
type = PlaySnd
trigger1 = animelem = 22
value = s3000,0

[state 1400]
type = EnvShake
trigger1 = animelem = 22
time = 15
freq = 50
ampl = -10

[State 3001]
type = Hitdef
trigger1 = var(0) = 1
trigger1 = var(21) = 0
trigger1 = animelemno(0) = [22,23]
trigger1 = !(hitdefattr = S,HP)
attr = S, HP
id = 3200
damage = ceil(250*fvar(0)),ceil(40 * fvar(0))
animtype = hard
hitflag = MAF
sparkxy = 0,0
guardflag = L
attackteam = E
getpower = 0,0
givepower = 80,40
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
ground.hittime = 23
guard.hittime = 21
guard.ctrltime = 21
ground.type = high
ground.slidetime = 23
ground.velocity = 0,-11
air.velocity = 0,-11
yaccel = 0.65
fall = 1
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 3200]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 3200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.80 * (1 - 0.20*(0.80*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3200]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1




;---------------------------------------------------------------------------
;Lv2 ちょこまかすんなぁ
[statedef 3205]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0

[state 3200]
type = attackdist
trigger1 = 1
value = 320

[state 3000]
type = varset
trigger1 = animelemno(0) <= 21
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0) > 21
var(20) = 0
ignorehitpause = 1

[state 3000]
type = changeanim
trigger1 = anim != 3201
value = 3201

[State 3000]
type = poweradd
trigger1 = animelem = 16
value = -2000

[State 3000]
type = Envcolor
trigger1 = animelem = 16
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 30
under = 1
supermove = 1

[State 3020]
type = superpause
trigger1 = animelem = 16
time = 35
anim = s7015
pos = 20, -50
movetime = 0
darken = 0
SprPriority = -5
p2defmul = 1

[State 3000]
type = PlaySnd
trigger1 = animelem = 16
value = 20,1

[State 3000]
type = PlaySnd
trigger1 = animelem = 22
value = s3000,0

[state 1400]
type = EnvShake
trigger1 = animelem = 22
time = 15
freq = 50
ampl = -10

[State 3001]
type = Hitdef
trigger1 = var(0) = 1
trigger1 = var(21) = 0
trigger1 = animelemno(0) = [22,23]
trigger1 = !(hitdefattr = S,HP)
attr = S, HP
id = 3205
damage = ceil(265*fvar(0)),ceil(40 * fvar(0))
animtype = hard
hitflag = MAF
sparkxy = 0,0
guardflag = L
attackteam = E
getpower = 0,0
givepower = 80,40
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
ground.hittime = 23
guard.hittime = 21
guard.ctrltime = 21
ground.type = high
ground.slidetime = 23
ground.velocity = 0,-10
air.velocity = 0,-10
yaccel = 0.34
fall = 1
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 3200]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 3200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.75 * (1 - 0.25*(0.75*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3200]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Lv3 ちょこまかすんなぁ
[statedef 3210]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0

[state 3200]
type = attackdist
trigger1 = 1
value = 320

[state 3000]
type = varset
trigger1 = animelemno(0) <= 21
var(20) = stateno
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0) > 21
var(20) = 0
ignorehitpause = 1

[state 3000]
type = changeanim
trigger1 = anim != 3201
value = 3201

[State 3000]
type = poweradd
trigger1 = animelem = 16
value = -3000

[State 3040]
type = Envcolor
trigger1 = animelem = 16
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 40
under = 1
supermove = 1

[State 3040]
type = superpause
trigger1 = animelem = 16
time = 40
anim = s7016
pos = 20, -50
movetime = 0
darken = 0
SprPriority = -5
p2defmul = 1

[State 3040]
type = PlaySnd
trigger1 = animelem = 16
value = 20,4

[State 3040]
type = PlaySnd
trigger1 = animelem = 16
value = 20,2

[State 3040]
type = BGPalfx
trigger1 = animelem = 16
persistent = 1
invertall = 1
ignorehitpause = 1
time = 140
color = 0
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 3000]
type = PlaySnd
trigger1 = animelem = 22
value = s3000,0

[state 1400]
type = EnvShake
trigger1 = animelem = 22
time = 15
freq = 50
ampl = -10

[State 3001]
type = Hitdef
trigger1 = var(0) = 1
trigger1 = var(21) = 0
trigger1 = animelemno(0) = [22,23]
trigger1 = !(hitdefattr = S,HP)
attr = S, HP
id = 3205
damage = ceil(285*fvar(0)),ceil(40 * fvar(0))
animtype = hard
hitflag = MAF
sparkxy = 0,0
guardflag = L
attackteam = E
getpower = 0,0
givepower = 80,40
pausetime = 9,109
sparkno = S7003
guard.sparkno = S7007
hitsound   = S220,1
guardsound = S120,0
ground.hittime = 23
guard.hittime = 21
guard.ctrltime = 21
ground.type = high
ground.slidetime = 23
ground.velocity = 0,-1.2
air.velocity = 0,-1.2
yaccel = 0.50
fall = 1
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 3200]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 3200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.75 * (1 - 0.25*(0.75*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 + (var(5)), 1 + (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), 10 + (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 - (var(5)), 1 + (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = -10 + (var(4)), 0 - (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = -1 + (var(5)), -1 - (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7012
id = 7012
vel = 0 - (var(4)), -10 - (var(5))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 801]
type = Explod
trigger1 = movehit = 1
anim = 7013
id = 7012
vel = 1 - (var(5)), -1 - (var(4))
pos = 0,-10
postype = p2
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 3200]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;_____________________________________________________________________________
;
;                     Final Memory
;_____________________________________________________________________________
;---------------------------------------------------------------------------
;耐える乙女の美学
[statedef 4000]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0

[state 3100]
type = changeanim
trigger1 = anim != 4000
value = 4000

[state 4000]
type = nothitby
trigger1 = animelemno(0) <= 10
value = SCA
ignorehitpause = 1

[State 3200]
type = poweradd
trigger1 = AnimElem = 1
value = -3000

[State 3200]
type = Envcolor
trigger1 = AnimElem = 1
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 30
under = 1
supermove = 1

[State 3200]
type = superpause
trigger1 = AnimElem = 1
time = 40
anim = s7016
pos = 0, -50
movetime = 20
darken = 0
SprPriority = -5
p2defmul = 1

[State 3200]
type = Explod
trigger1 = AnimElem = 1
anim = 7017
id = 7017
pos = 0,-50
postype = p1
sprpriority = -5
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 4000]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20,4

[State 4000]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20,2
Volume = 999
persistent = 0

[State 4000]
type = BGPalfx
trigger1 = AnimElem = 1
persistent = 1
invertall = 1
ignorehitpause = 1
time = 90
color = 0
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 4000]
type = PlaySnd
trigger1 = AnimElem = 9
value = 7000,0
channel=10
[state 1400]
type = EnvShake
trigger1 = animelem = 9
time = 15
freq = 50
ampl = -10

[State 300]
type = HitDef
trigger1 = animelemno(0) = 9
trigger1 = !movecontact
trigger1 = !(hitdefattr = S,HP)
attr = S, HP
id = 4000 
damage = ceil(150 * fvar(0)),ceil(20 * fvar(0))
animtype = Hard
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 100,50
priority = 7, Hit
pausetime = 9,9
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S220,1
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = -4,-4
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
guard.kill = 0
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[state 4000]
type = varset
trigger1 = animelemno(0) = 9
var(25) = 960
ignorehitpause = 1
persistent = 0

[state 4000]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;ビッグバン打法
[statedef 4100]
type = S
movetype = A
poweradd= 0
ctrl = 0
velset = 0
anim = 1160

[State 3200]
type = poweradd
trigger1 = AnimElem = 2
value = -3000

[State 3200]
type = Envcolor
trigger1 = AnimElem = 1
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 30
under = 1
supermove = 1

[State 3200]
type = superpause
trigger1 = AnimElem = 1
time = 40
anim = s7016
pos = 0, -50
movetime = 0
darken = 0
SprPriority = -5
p2defmul = 1

[State 3200]
type = Explod
trigger1 = AnimElem = 1
anim = 7017
id = 7017
pos = 0,-50
postype = p1
sprpriority = -5
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 3200]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20,4

[State 3200]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20,2
Volume = 999
persistent = 0

[State 3200]
type = BGPalfx
trigger1 = AnimElem = 1
persistent = 1
invertall = 1
ignorehitpause = 1
time = 90
color = 0
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[state 300]
type = Explod
trigger1 = animelem = 3
anim = 8002
id = 8002
pos = -40,-60
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
facing = -1
pausemovetime = 0

[state 300]
type = removeExplod
trigger1 = numexplod(8003)||numexplod(8004)||numexplod(8005)
id = 8002
IgnoreHitPause = 1

[state 300]
type = Explod
trigger1 = animelemno(0) = 5
trigger1 = animelemtime(animelemno(0)) = 1
anim = 8003
id = 8003
pos = -40,-60
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
facing = -1

[state 300]
type = Explod
trigger1 = animelemno(0) = 5
trigger1 = animelemtime(animelemno(0)) = 2
anim = 8004
id = 8004
pos = -40,-60
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
facing = -1

[state 300]
type = Explod
trigger1 = animelem = 6
anim = 8005
id = 8005
pos = -40,-60
postype = p1
ontop = 1
sprpriority = 7
IgnoreHitPause = 1
Persistent = 0
facing = -1

[state 1200]
type = Null
triggerall = numtarget(1100)
trigger1 = target(1100),pos y < -80
trigger1 = var(11) := 0
trigger2 = target(1100),pos y = [-80 , -65)
trigger2 = var(11) := 1
trigger3 = target(1100),pos y = [-65 , -50)
trigger3 = var(11) := 2
trigger4 = target(1100),pos y = [-50 , -35)
trigger4 = var(11) := 3
trigger5 = target(1100),pos y = [-35 , -20)
trigger5 = var(11) := 4
trigger6 = target(1100),pos y >= -20
trigger6 = var(11) := 5
ignorehitpause = 1

[State 200]
type = PlaySnd
trigger1 = animelem = 3
value = 210,0

[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 0
attr = S, HA
id = 4100 
damage = ceil(0.1 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,10
priority = 3, Hit
pausetime = 0,0
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 1,-1
yaccel = 0.4
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 1
attr = S, HA
id = 4101 
damage = ceil(31.5 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,10
priority = 3, Hit
pausetime = 5,5
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 3,-4
yaccel = 0.4
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 2
attr = S, HA
id = 4102 
damage = ceil(150.8 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,10
priority = 3, Hit
pausetime = 10,10
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 6,-8.5
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 3
attr = S, HA
id = 4103 
damage = ceil(272.2 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,10
priority = 3, Hit
pausetime = 15,15
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 10,-9.5
yaccel = 0.55
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)
[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 4
attr = S, HA
id = 4104 
damage = ceil(396.0 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,10
priority = 3, Hit
pausetime = 20,20
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 12,-10.5
yaccel = 0.6
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 300]
type = HitDef
trigger1 = animelem = 5
trigger1 = !movecontact
trigger1 = var(11) = 5
attr = S, HA
id = 4105 
damage = ceil(668.4 * fvar(0))
animtype = Hard
hitflag = AF+
getpower = 0,0
givepower = 30,10
priority = 3, Hit
pausetime = 25,25
sparkno = S7003
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S7000, 6
guardsound = S120, 0
ground.type = High
ground.slidetime = 23
guard.ctrltime = 21
ground.hittime  = 23
ground.velocity = -5
air.type = High
air.velocity = 20,-17.5
yaccel = 0.6
fall = 1
air.fall = 1
fall.recover = 0
cornerpush.veloff    = 0
guard.cornerpush.veloff= 0
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0
p2stateno = 4520
p2facing = ifelse(p2dist x > 0 , 1 , -1)

[State 200]
type = PlaySnd
trigger1 = movehit
trigger1 = hitpausetime > 20
value = S7000,1
ignorehitpause = 1
persistent = 0


[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.50 * (1 - 0.50*(0.50*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;__________________________________

;HR後のステート奪取
;__________________________________
;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 4520]
type    = A
movetype= H
physics = N

[state 5000,0.5]
type = velset
trigger1 = time = 0
x= 0
y= 0
ignorehitpause = 1

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 4530

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 4530]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 4550;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 4535;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 4535]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim = [5051,5059] ;Not if in hit up anim
trigger1 = Anim = 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035
value = 4550

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 4550]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim= [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 4600 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 4600]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim!= [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim  = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 4610 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 4601

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 4601]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim  = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160  + (anim % 10)

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 4610

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 4610]
type    = L
movetype= H
physics = N

[State 5110, Envshake]
type = envshake
Trigger1 = time = 0
time = 10
ampl = -3
freq = 110

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim= [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)


[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = selfState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[state 4610]
type = selfstate
trigger1 = alive
trigger1 = time >= 30
trigger1 = time >= (0.5*const(data.liedown.time))
value = 5120