;=====================<Gouhadouken>==========================
[StateDef 1000]
type = S
physics = S
moveType = A
anim = 1000
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = 84 * !var(20)
faceP2 = 1

[State 1000, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(var(10)=2, 1002, ifelse(var(10)=1, 1001, 1000))

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000,2
channel = 0

[State 1000, Energy Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 0
channel = 2

[State 1000, Width: Edge]
type = Width
trigger1 = AnimElemTime(11)<0
edge = 45,0

[State 1000, Width: Player]
type = Width
trigger1 = AnimElem = 5
player = 35,0

[State 1000, Projectile]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 1010
ID = 1010
name = "Hadouken"
posType = P1
pos = 71,-66
size.xScale = 0.5
size.yScale = 0.5
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

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

;=====================<Gouhadouken EX>==========================
[StateDef 1030]
type = S
physics = S
moveType = A
anim = 1030
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
faceP2 = 1

[State 1030, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1030, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1030, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 35

[State 1030, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 5, -74
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1030, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1030, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1030, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000,2
channel = 0

[State 1030, Energy Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 0
channel = 2

[State 1030, Width: Edge]
type = Width
trigger1 = AnimElemTime(11)<0
edge = 45,0

[State 1030, Width: Player]
type = Width
trigger1 = AnimElem = 5
player = 35,0

[State 1030, Projectile]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 1020
ID = 1010
name = "Hadouken EX"
posType = P1
pos = 71,-66
size.xScale = 0.5
size.yScale = 0.5
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

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

;=====================<Shakunetsu Hadouken>==========================
[StateDef 1100]
type = S
physics = S
moveType = A
anim = 1100
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = 84 * !var(20)
faceP2 = 1

[State 1100, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 730,1
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 10
value = 0,0
channel = 0

[State 1100, Energy Snd]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1000, 0
channel = 2

[State 1100, Width: Edge]
type = Width
trigger1 = AnimElemTime(16)<0
edge = 45,0

[State 1100, Width: Player]
type = Width
trigger1 = AnimElem = 10
player = 35,0

[State 1100, Evil Aura FX]
type = Explod
trigger1 = !NumExplod(736)
trigger1 = !Time
anim = 736
ID = 736
pos = 0, 0
postype = P1
sprpriority = -1
;scale = .5,.5
ignorehitpause = 1
bindtime = -1
removetime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1100, Projectile]
type = Helper
trigger1 = var(10)=0
trigger1 = AnimElem = 10
helperType = Normal
stateNo = 1110
ID = 1010
name = "Shaku Hadouken"
posType = P1
pos = 71,-66
size.xScale = 0.7
size.yScale = 0.7
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1100, Projectile]
type = Helper
trigger1 = var(10)=1
trigger1 = AnimElem = 10
helperType = Normal
stateNo = 1116
ID = 1010
name = "Shaku Hadouken"
posType = P1
pos = 71,-66
size.xScale = 0.7
size.yScale = 0.7
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1100, Projectile]
type = Helper
trigger1 = var(10)=2
trigger1 = AnimElem = 10
helperType = Normal
stateNo = 1117
ID = 1010
name = "Shaku Hadouken"
posType = P1
pos = 71,-66
size.xScale = 0.7
size.yScale = 0.7
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1100, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 6
id = 736
ignorehitpause = 1 

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

;=====================<Shakunetsu Hadouken EX>==========================
[StateDef 1130]
type = S
physics = S
moveType = A
anim = 1130
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
faceP2 = 1

[State 1130, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1130, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1130, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 45

[State 1130, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = -4, -55
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1130, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1130, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1130, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 730,1
channel = 0

[State 1130, Voice]
type = PlaySnd
trigger1 = AnimElem = 10
value = 0,0
channel = 0

[State 1130, Energy Snd]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1000, 0
channel = 2

[State 1130, Width: Edge]
type = Width
trigger1 = AnimElemTime(16)<0
edge = 45,0

[State 1130, Width: Player]
type = Width
trigger1 = AnimElem = 10
player = 35,0

[State 1130, Evil Aura FX]
type = Explod
trigger1 = !NumExplod(736)
trigger1 = !Time
anim = 736
ID = 736
pos = 0, 0
postype = P1
sprpriority = -1
;scale = .5,.5
ignorehitpause = 1
bindtime = -1
removetime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1130, Projectile]
type = Helper
trigger1 = AnimElem = 10
helperType = Normal
stateNo = 1118
ID = 1010
name = "Shaku Hadouken EX"
posType = P1
pos = 71,-66
size.xScale = 0.7
size.yScale = 0.7
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1130, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 6
id = 736
ignorehitpause = 1 

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

;=====================<Zanku Hadouken>==========================
[StateDef 1200]
type = A
physics = N
moveType = A
anim = 1200
ctrl = 0
sprPriority = 1
poweradd = 84 * !var(20)
;faceP2 = 1

[State 1200, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1200, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2
channel = 0

[State 1200, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 0
channel = 2

[State 1200, Width: Player]
type = Width
trigger1 = AnimElem = 5
player = 15,0

[State 1200, Width: Edge]
type = Width
trigger1 = 1
player = 10,0

[State 1200, Gravity]
type = VelAdd
trigger1 = 1
y = 0.5

[State 1200, Projectile]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 1205
ID = 1010
name = "Zanku Hadouken"
posType = P1
pos = 53,-57
size.xScale = 0.5
size.yScale = 0.5
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1200, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(9) >= 0
moveType = I

[State 1200, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1201

;Landing
[Statedef 1201]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1201
velset = 0, 0

[State 1201, On Ground]
type = Posset
trigger1 = !Time
y = 0

[State 1201, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1201, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;=====================<Zanku Hadouken EX>==========================
[StateDef 1230]
type = A
physics = N
moveType = A
anim = 1230
ctrl = 0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
;faceP2 = 1

[State 1230, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1230, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1230, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 40

[State 1230, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 4, -82
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1230, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1230, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1230, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 || AnimElem = 5
value = 0,0
channel = 0

[State 1230, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 2 || AnimElem = 5
value = 1000, 0
channel = 2

[State 1230, Width: Player]
type = Width
trigger1 = AnimElemTime(6)<0
player = 15,0

[State 1230, Width: Edge]
type = Width
trigger1 = 1
player = 10,0

[State 1200, Gravity]
type = VelAdd
trigger1 = 1
y = 0.5

[State 1230, Projectile 1]
type = Helper
trigger1 = AnimElem = 2
helperType = Normal
stateNo = 1206
ID = 1010
name = "EX Zanku Hadouken"
posType = P1
pos = 41,-57
size.xScale = 0.5
size.yScale = 0.5
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1230, Projectile 2]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 1206
ID = 1010
name = "EX Zanku Hadouken"
posType = P1
pos = 53,-57
size.xScale = 0.5
size.yScale = 0.5
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1230, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(9) >= 0
moveType = I

[State 1230, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1201

;========================<Goushouryuken>=======================
[Statedef 1300]
type = S
movetype = A
physics = S
anim = 1300
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1300, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1
channel = 0

[State 1300, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 2
value = 1, 2
channel = 2

[State 1300, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1300, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1300, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1300, Width]
type = Width
trigger1 = 1  
edge = 10,0

[State 1300, Muteki]
type = Nothitby
trigger1 = AnimElemTime(4) < 0
time = 1
value = SCA

[State 1300, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = 4
y = -6.65

[State 1300, Friction]
type = Velmul
trigger1 = vel x > 0
trigger1 = AnimElemTime(4) >= 0
x = 0.85

[State 1300, VelStop]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1300, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0
y = 0.6

[State 1300, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 2  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1300, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 3  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 41), var(36) := -84
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1300, Hit 3]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 4  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 10,10
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -135
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2.5,-10
air.velocity = -2.5,-10
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1300, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 1300, End]
type = ChangeState
trigger1 = AnimElemTime(5)>0
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1301

;Landing
[Statedef 1301]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1301
velset = 0, 0

[State 1301, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1301, EX Flash]
type = VarSet
triggerall = PrevStateNo=1330
trigger1 = !Time
var(25) = 5

[State 1301, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1301, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
pos = 5, 0
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;Med
[Statedef 1310]
type = S
movetype = A
physics = S
anim = 1310
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1310, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1
channel = 0

[State 1310, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 2
value = 1, 2
channel = 2

[State 1310, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1310, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1310, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1310, Width]
type = Width
trigger1 = 1  
edge = 10,0

[State 1310, Muteki]
type = Nothitby
trigger1 = AnimElemTime(4) < 0
time = 1
value = SCA

[State 1310, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = 6.5
y = -8.5

[State 1310, Friction]
type = Velmul
trigger1 = vel x > 0
trigger1 = AnimElemTime(4) >= 0
x = 0.85

[State 1310, VelStop]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1310, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0
y = 0.6

[State 1310, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 2  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1310, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 3  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 41), var(36) := -84
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1310, Hit 3]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 4  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 10,10
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -135
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2.5,-10
air.velocity = -2.5,-10
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1310, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 1310, End]
type = ChangeState
trigger1 = AnimElemTime(5)>0
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1301

;Strong
[Statedef 1320]
type = S
movetype = A
physics = S
anim = 1320
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1320, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1
channel = 0

[State 1320, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 2
value = 1, 2
channel = 2

[State 1320, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1320, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1320, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1320, Width]
type = Width
trigger1 = 1  
edge = 10,0

[State 1320, Muteki]
type = Nothitby
trigger1 = AnimElemTime(4) < 0
time = 1
value = SCA

[State 1320, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = 9
y = -11

[State 1320, Friction]
type = Velmul
trigger1 = vel x > 0
trigger1 = AnimElemTime(4) >= 0
x = 0.85

[State 1320, VelStop]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1320, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0
y = 0.6

[State 1320, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 2  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1320, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 3  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 41), var(36) := -84
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1320, Hit 3]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 4  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 10,10
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -135
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2.5,-10
air.velocity = -2.5,-10
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1320, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 1320, End]
type = ChangeState
trigger1 = AnimElemTime(5)>0
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1301

;EX
[Statedef 1330]
type = S
movetype = A
physics = S
anim = 1330
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
facep2 = 1

[State 1330, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1330, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1330, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 45

[State 1330, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 14, -55
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1330, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1330, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1330, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,4
channel = 0

[State 1330, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 2
value = 1000, 1
channel = 2

[State 1330, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1330, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1330, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1330, Width]
type = Width
trigger1 = 1  
edge = 10,0

[State 1330, Muteki]
type = Nothitby
trigger1 = AnimElemTime(4) < 3
time = 1
value = SCA

[State 1330, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = 12
y = -11

[State 1330, Friction]
type = Velmul
trigger1 = vel x > 0
trigger1 = AnimElemTime(4) > 0
x = 0.89

[State 1330, VelStop]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1330, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0
y = 0.6

[State 1330, Flames FX 1]
type = Explod
trigger1 = !NumExplod(1340)
trigger1 = !Time
anim = 1340
ID = 1340
sprPriority = 3
bindTime = 6
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1330, Flames FX 2]
type = Explod
trigger1 = !NumExplod(1341)
trigger1 = AnimElem = 4
anim = 1341
id = 1341
sprPriority = 3
bindTime = -1
removeTime = 13
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1330, Flames FX Fade]
type = Explod
trigger1 = !NumExplod(1342)
trigger1 = AnimElemTime(5) = -2
anim = 1342
id = 1342
sprPriority = 3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1330, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 2  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 7
priority = 4, hit
animtype = Hard
getpower = 0,0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,9
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10.5
air.velocity = -1.5,-10.5
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palfx.time = 30
palfx.mul = 128,128,128
palfx.sinadd = 96,96,96,4
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 3  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Hard
getpower = 0,0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,9
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 41), var(36) := -84
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-10.5
air.velocity = -1.5,-10.5
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palfx.time = 30
palfx.mul = 128,128,128
palfx.sinadd = 96,96,96,4
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, Hit 3]
type = HitDef
trigger1 = !var(16) && var(15) < 4
trigger1 = AnimElem = 4  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 0,0
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,9
guardsound = S130,0
pausetime = 10,10
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 25), var(36) := -135
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2.5,-10.5
air.velocity = -2.5,-10.5
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palfx.time = 50
palfx.mul = 128,128,128
palfx.sinadd = 96,96,96,4
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, Flame Particles]
type = Helper
trigger1 = !NumHelper(8150)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = !(Target, HitShakeOver)
trigger1 = var(40) := (Target, ID)
helperType = Normal
stateNo = 8150
ID = 8150
name = "Flame Particles"
posType = P2
ownPal = 1
ignoreHitPause = 1

[State 1330, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

[State 1330, End]
type = ChangeState
trigger1 = AnimElemTime(5)>0
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1301

;========================<Tatsumaki Zankukyaku>=======================
[Statedef 1400]
type = A
movetype = A
physics = N
anim = 1400
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1400, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2
channel = 0

[State 1400, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 1 || Animelem = 5 || Animelem = 9
value = 1, 5
;channel = 2

[State 1400, Width: Edge]
type = Width
trigger1 = 1  
edge = 15,0

[State 1400, Width: Player]
type = Width
trigger1 = AnimElemTime(12)<0  
player = 12,12

[State 1400, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = 2.75
y = -4

[State 1400, Friction]
type = Velmul
trigger1 = AnimElemTime(13) >= 0
x = 0.96

[State 1400, VelStop]
type = VelSet
trigger1 = AnimElem = 6
y = 0

[State 1400, Gravity]
type = VelAdd
trigger1 = AnimElemTime(13) >= 0
y = 0.48

[State 1400, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 33), var(36) := -67
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -4,-7.5
air.velocity = -4,-7
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1400, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 8  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-8
air.velocity = -1.5,-6.25
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1400, Hit 3]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 11  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -50), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = 1.5,-8
air.velocity = 1.5,-6.25
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
p2facing = -1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1400, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(12) >= 0
moveType = I

[State 1400, End]
type = ChangeState
trigger1 = AnimElemTime(12)>0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1401

;Landing
[Statedef 1401]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1401
velset = 0, 0

[State 1401, On Ground]
type = Posset
trigger1 = !Time
y = 0

[State 1401, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1401, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;Med
[Statedef 1410]
type = A
movetype = A
physics = N
anim = 1410
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1410, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2
channel = 0

[State 1410, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 1 || Animelem = 5 || Animelem = 9 || AnimElem = 12 || AnimElem = 15 || AnimElem = 18 || AnimElem = 21
value = 1, 5
;channel = 2

[State 1410, Width: Edge]
type = Width
trigger1 = 1  
edge = 15,0

[State 1410, Width: Player]
type = Width
trigger1 = AnimElemTime(24)<0  
player = 12,12

[State 1410, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = 3
y = -4

[State 1410, Friction]
type = Velmul
trigger1 = AnimElemTime(25) >= 0
x = 0.96

[State 1410, VelStop]
type = VelSet
trigger1 = AnimElem = 6
y = 0

[State 1410, Gravity]
type = VelAdd
trigger1 = AnimElemTime(25) >= 0
y = 0.48

[State 1410, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 33), var(36) := -67
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -4,-7.5
air.velocity = -4,-7
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1410, Hits Fwd]
type = HitDef
trigger1 = !var(16) && var(15) < 4
trigger1 = AnimElem = 8 || AnimElem = 14 || AnimElem = 20  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-8
air.velocity = -1.5,-6.25
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1410, Hits Back]
type = HitDef
trigger1 = !var(16) && var(15) < 4
trigger1 = AnimElem = 11 || AnimElem = 17 || AnimElem = 23  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -50), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = 1.5,-8
air.velocity = 1.5,-6.25
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
p2facing = -1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1410, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(24) >= 0
moveType = I

[State 1410, End]
type = ChangeState
trigger1 = AnimElemTime(24)>0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1401

;Strong
[Statedef 1420]
type = A
movetype = A
physics = N
anim = 1420
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1420, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2
channel = 0

[State 1420, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 1 || AnimElem = 5 || AnimElem = 9 || AnimElem = 12
trigger2 = AnimElem = 15 || AnimElem = 18 || AnimElem = 21
trigger3 = AnimElem = 24 || AnimElem = 27
value = 1, 5
;channel = 2

[State 1420, Width: Edge]
type = Width
trigger1 = 1  
edge = 15,0

[State 1420, Width: Player]
type = Width
trigger1 = AnimElemTime(30)<0  
player = 12,12

[State 1420, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = 3.6
y = -4

[State 1420, Friction]
type = Velmul
trigger1 = AnimElemTime(31) >= 0
x = 0.96

[State 1420, VelStop]
type = VelSet
trigger1 = AnimElem = 6
y = 0

[State 1420, Gravity]
type = VelAdd
trigger1 = AnimElemTime(31) >= 0
y = 0.48

[State 1420, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 2  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 33), var(36) := -67
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -4,-7.5
air.velocity = -4,-7
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1420, Hits Fwd]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 8 || AnimElem = 14 || AnimElem = 20 || AnimElem = 26  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-8
air.velocity = -1.5,-6.25
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1420, Hits Back]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 11 || AnimElem = 17 || AnimElem = 23 || AnimElem = 29  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -50), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = 1.5,-8
air.velocity = 1.5,-6.25
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
p2facing = -1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1420, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(30) >= 0
moveType = I

[State 1420, End]
type = ChangeState
trigger1 = AnimElemTime(30)>0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1401

;EX
[Statedef 1430]
type = A
movetype = A
physics = N
anim = 1430
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
facep2 = 1

[State 1430, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1430, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)
channel = 9

[State 1430, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 40

[State 1430, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 1, -85
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1430, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1430, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1430, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 800,2
channel = 0

[State 1430, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 5 || Animelem = 9 || AnimElem = 12
trigger2 = AnimElem = 15 || AnimElem = 18 || AnimElem = 21
value = 1, 5
;channel = 2

[State 1430, Width]
type = Width
trigger1 = MoveHit  
edge = 50,35

[State 1430, No Push]
type= PlayerPush
trigger1 = AnimElemTime(4)>0 && AnimElemTime(28)<0 
value = 0
ignorehitpause = 1

[State 1430, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = 1.5
y = -4

[State 1430, VelStop]
type = VelSet
trigger1 = AnimElem = 6
x = 0
y = 0

[State 1430, Gravity]
type = VelAdd
trigger1 = AnimElemTime(24) >= 0
y = 0.48

[State 1430, Dust]
type = Explod
trigger1 = AnimElem = 6 || AnimElem = 12 || AnimElem = 18
anim = 8105
ID = 8105
sprpriority = -2
postype = p1
pos = 1, floor(-pos y)
scale = 0.5, 0.5
ownpal = 1
removeongethit = 1
ignorehitpause = 1
pausemovetime = -1
supermovetime = -1

[State 1430, Hits Fwd]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 7 || AnimElem = 13
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,0
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifelse(p2dist x > 30, 16, 14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
air.velocity = ifelse(p2dist x > 30, 16, 14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
;ground.velocity = ifelse(P2Dist x > 30, 20, 15), 0
;air.velocity = ifelse((p2dist x!=[-30,30]),10,8), ifelse(p2dist y<(enemy,const(size.mid.pos.y))+45,-1,-4)
guard.velocity = -8.5
;airguard.velocity = -6.5, -1
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .48;.52
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
p2facing = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1430, Hits Back]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 10 || AnimElem = 16
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,0
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -50), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifelse(p2dist x > 30, -16, -14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
air.velocity = ifelse(p2dist x > 30, -16, -14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
;ground.velocity = ifelse(P2Dist x > 30, -20, -15), 0
;air.velocity = ifelse((p2dist x!=[-30,30]),-10,-8), ifelse(p2dist y<(enemy,const(size.mid.pos.y))+45,-1,-4)
guard.velocity = -8.5
;airguard.velocity = -6.5, -1
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .48;.52
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
p2facing = -1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1430, Hit Final]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 19  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Diagup
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 6,6
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Diagup
fall.animtype = Diagup
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifelse(P2Dist x < 0, 7, -7), -5.5
air.velocity = ifelse(P2Dist x < 0, 7, -7), -5.5
guard.velocity = -8.5
;airguard.velocity = -6.5, -1
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .48
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
p2facing = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1430, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(20) >= 0
moveType = I

[State 1430, End]
type = ChangeState
trigger1 = AnimElemTime(23)>0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1401

;========================<Air Tatsumaki Zankukyaku>=======================
[Statedef 1450]
type = A
movetype = A
physics = N
anim = 1450
ctrl = 0
velset = (vel x)+ifelse(vel x>=0,1,-1),(vel y)-1
poweradd = 70 * !var(20)
sprpriority = 2
;facep2 = 1

[State 1450, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2
channel = 0

[State 1450, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 6 || AnimElem = 9 || AnimElem = 12
value = 1, 5
;channel = 2

[State 1450, Width]
type = Width
trigger1 = 1  
edge = 8,0

[State 1450, Gravity]
type = VelAdd
trigger1 = 1
y = 0.48

[State 1450, Hit Fwd]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 5 || AnimElem = 11   
attr = A, SA
damage = ceil(ifElse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,-7
air.velocity = -1.5,-6.5
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1450, Hit Back]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 8 || AnimElem = 14  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -50), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = 1.5,-7
air.velocity = 1.5,-6.5
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .52
fall = 1
fall.recover = 0
forcestand = 1
p2facing = -1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1450, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(15) >= 0
moveType = I

[State 1450, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1401

;Air EX
[Statedef 1460]
type = A
movetype = A
physics = A;N
anim = 1460
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
;facep2 = 1

[State 1460, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1460, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)
channel = 9

[State 1460, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 35

[State 1460, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 3, -91
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1460, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1460, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1460, Width]
type = Width
trigger1 = MoveHit  
edge = 50,35

[State 1460, No Push]
type= PlayerPush
trigger1 = AnimElemTime(4)>=0 && AnimElemTime(28)<0 
value = 0
ignorehitpause = 1

[State 1460, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 800,2
channel = 0

[State 1460, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 6 || AnimElem = 9 || AnimElem = 12 || AnimElem = 15
value = 1, 5
;channel = 2

[State 1460, Width]
type = Width
trigger1 = MoveHit  
edge = 50,35

[State 1460, Velmul]
type = VelMul
trigger1 = AnimElemTime(4)>=0 && AnimElemTime(22)<0 && vel y>0
x = 0.95
y = 0.65

[State 1460, VelStop]
type = VelSet
trigger1 = AnimElemTime(14)<0 && pos y>=-10
x = 0
y = 0

[State 1460, Hits Fwd]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 5 || AnimElem = 11 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,0
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifelse(p2dist x > 30, 16, 14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
air.velocity = ifelse(p2dist x > 30, 16, 14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
;ground.velocity = ifelse(p2dist x>30,16,14)-vel x,ifelse(p2dist y<(enemy,const(size.mid.pos.y))+60,0,-3)
;air.velocity = ifelse(p2dist x>30,16,14)-vel x,ifelse(p2dist y<(enemy,const(size.mid.pos.y))+60,0,-3)+vel y
guard.velocity = -8.5
airguard.velocity = -8.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .48
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
p2facing = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1460, Hits Back]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 8 || AnimElem = 14  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 3,0
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -50), var(36) := -70
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifelse(p2dist x > 30, -16, -14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
air.velocity = ifelse(p2dist x > 30, -16, -14), ifelse(p2dist y < (-60 - enemy, const(size.mid.pos.y)), 0, -4) + vel y
;ground.velocity = ifelse(p2dist x>30,-16,-14)-vel x,ifelse(p2dist y<(enemy,const(size.mid.pos.y))+60,0,-3)
;air.velocity = ifelse(p2dist x>30,-16,-14)-vel x,ifelse(p2dist y<(enemy,const(size.mid.pos.y))+60,0,-3)+vel y
guard.velocity = -8.5
airguard.velocity = -8.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .48
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
p2facing = -1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1460, Hit Final]
type = HitDef
trigger1 = !var(16) && var(15) < 5
trigger1 = AnimElem = 17  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
priority = 4, hit
animtype = Diagup
getpower = 0, 0
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 6,6
guard.pausetime = 4,4
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
air.animtype = Diagup
fall.animtype = Diagup
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifelse(P2Dist x < 0, 8, -8), -1
air.velocity = ifelse(P2Dist x < 0, 8, -8), -1
guard.velocity = -8.5
airguard.velocity = -8.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .48
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
p2facing = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1460, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(19) >= 0
moveType = I

[State 1460, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1401

;========================<Hyakkishu>=======================
[Statedef 1500]
type = S
movetype = I;A
physics = S
anim = 1500
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1500, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(3)) || (helper(10371), var(10)), 0, ifElse((helper(10371), var(4)) || (helper(10371), var(11)), 1, 2))

[State 1500, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0
channel = 0

[State 1500, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 41,0
channel = 3

[State 1500, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 2
stateType = A
physics = N

[State 1500, Width]
type = Width
trigger1 = 1  
edge = 8,0

[State 1500, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 2+(var(10)*1)
y = -9

[State 1500, Gravity]
type = Veladd
trigger1 = AnimElemTime(2) > 0
y = .55

[State 1500, Hyakki Goushou]
type = ChangeState
triggerall = Time > 15
trigger1 = (helper(10371), var(0)) || (helper(10371), var(1)) || (helper(10371), var(2))
value = 1510

[State 1500, Hyakki Goudan]
type = ChangeState
triggerall = Time > 15
trigger1 = (helper(10371), var(3)) || (helper(10371), var(4)) || (helper(10371), var(5))
value = 1515

[State 1500, Hyakki Gouza End]
type = ChangeState
trigger1 = AnimElemTime(2)>0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1505

;Hyakki Gouzan
[Statedef 1505]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1505
;velset = 0, 0

[State 1505, On Ground]
type = Posset
trigger1 = !Time
y = 0

[State 1505, On Ground]
type = Velset
trigger1 = !Time
y = 0

[State 1505, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1505, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
pos = 20, 0
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1505, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 1
channel=0

[State 1505, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,5
channel=1

[State 1505, Width: Edge]
type = Width
trigger1 = 1
edge = 25,0

[State 1505, Width: Player]
type = Width
trigger1 = AnimElemTime(3) = 0
player = 30,0

[State 1505, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = L
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 100), var(36):=-10
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.35,-6.5
air.velocity = -1.35,-6.5
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1505, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

;Hyakki Goushou
[Statedef 1510]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1510
;velset = 0, 0

[State 1510, Gravity]
type = Veladd
trigger1 = 1
y = 0.55

[State 1510, Voice]
type=playsnd
trigger1= animelem=3
value= 0, 0
channel=0

[State 1510, Swing Snd]
type=playsnd
trigger1= animelem=4
value=1,2
channel=1

[State 1510, HitDef: Hyakki Gousai]
type = HitDef
triggerall = P2bodydist X = [-const(size.ground.front),11]
triggerall = P2bodydist Y = [-18,-enemynear,const(size.head.pos.y)+2]
triggerall = !var(38)
trigger1 = AnimElemTime(2) < 0
trigger1 = command = "holdfwd" || command = "holdback"
attr = A,ST
hitFlag = MA-;F
priority = 4,Miss
getPower = 0,0
givePower = 0,0
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 1520
p2stateno = 1525
p2getp1state = 1
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 1510, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 58), var(36):=-55
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,8
air.velocity = -5,8
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1510, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 1510, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1511

;Hyakki Goushou Landing
[Statedef 1511]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1511
velset = 0, 0

[State 1511, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo=1515 
trigger1 = !Time
value = 1516

[State 1511, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1511, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1511, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
pos = 5, 0
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;Hyakki Goudan
[Statedef 1515]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1515
;velset = 0, 0

[State 1515, Gravity]
type = Veladd
trigger1 = 1
y = 0.55

[State 1515, Voice]
type=playsnd
trigger1= animelem=2
value= 0, 2
channel=0

[State 1515, Swing Snd]
type=playsnd
trigger1= animelem=3
value=1,5
channel=1

[State 1515, HitDef: Hyakki Goutsui]
type = HitDef
triggerall = P2bodydist X = [-const(size.ground.front),30]
triggerall = P2bodydist Y = [-45,-enemynear,const(size.head.pos.y)-23]
triggerall = !var(38)
trigger1 = AnimElemTime(2) < 0
trigger1 = command = "holdfwd" || command = "holdback"
attr = A,ST
hitFlag = MA-;F
priority = 4,Miss
getPower = 0,0
givePower = 0,0
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 1530
p2stateno = 1535
p2getp1state = 1
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 1515, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 7
priority = 4, hit
animtype = Hard
getpower = 50 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 52), var(36):=-61
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,8
air.velocity = -5,8
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1515, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1511

;Hyakki Gousai
[Statedef 1520]
type = A
movetype = A
physics = N
anim = 1520
velset = 0, 0
poweradd = 0
sprpriority = 1

[State 1520, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 1520, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1520, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 1525

[State 1520, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 1520, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1520, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 195, 1
channel = 0

[State 1520, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 5
channel = 1

[State 1520, Width]
type = Width
trigger1 = 1
edge = 25,45

[State 1520, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 1.5
y = -4.5

[State 1520, Gravity]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = .55

[State 1520, Bind 1-2]
type = BindtoTarget
trigger1 = AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(-9 * const(size.xScale)), ceil(24 * const(size.yScale)),Head

[State 1520, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = NumTarget
pos = ceil(-23 * const(size.xScale)), ceil(-57 * const(size.yScale))

[State 1520, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = NumTarget
pos = ceil(-18 * const(size.xScale)), ceil(-85 * const(size.yScale))

[State 1520, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = NumTarget
pos = ceil(21 * const(size.xScale)), ceil(-85 * const(size.yScale))

[State 1520, Bind 6+]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0
trigger1 = NumTarget
pos = ceil(26 * const(size.xScale)), ceil(-77 * const(size.yScale))

[State 1520, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1521

;Hyakki Gousai Land
[Statedef 1521]
type    = C
movetype = A
physics = N
velset = 0,0
anim = 1521

[State 1521, TargetState]
type = TargetState
trigger1 = NumTarget && !Time
value = 1526

[State 1521, Shakunetsu Hadouken Juggle Restrict]
type = VarSet
trigger1 = !Time
var(8) = 1
ignoreHitPause=1

[State 1521, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1521, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2,5
channel = 1

[State 1521, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5000,11
channel = 3

[State 1521, Impact Dust]
type = Helper
trigger1 = NumTarget && AnimElem = 1
helpertype = Normal
stateno = 8110
ID = 8100
name = "Impact Dust"
postype = p1
pos = ceil(30 * const(size.xscale)), 0
ownpal = 1

[State 1521, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
trigger1 = NumTarget
pos = ceil(30 * const(size.xScale)), ceil(0 * const(size.yScale))
time = 1

[State 1521, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 1
value = floor(ifElse(77 * fvar(11) < 7, -7, -77 * fvar(11)))

[State 1521, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 1
value = 35

[State 1521, PowerAdd]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 1 && !var(20)
value = 70

[State 1521, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 1
value = 1

[State 1521, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(13) = 1

[State 1521, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(15) = 1
ignoreHitPause = 1

[State 1521, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 1
var(16) = 0
ignoreHitPause = 1

[State 1521, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 1
time = 20     
ampl = 6    
freq = 120

[State 1521, State End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;===========<Hyakki Gousai(TARGET)>================
[Statedef 1525]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 0

[State 1525, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 1525, ChangeAnim2]
type = ChangeAnim2
Trigger1 = !Time
value = 1525

[State 1525, SprPriority]
type = SprPriority
trigger1 = AnimElem = 4 
value = 2

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 1525, Safety]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

[State 1525, AngleSet]
type = AngleSet
trigger1 = AnimElem = 5
value = 90

[State 1525, AngleSet]
type = AngleSet
trigger1 = AnimElem = 6
value = 0

[State 1525, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(5)>=0 && AnimelemTime(6)<0

;===========<Hyakki Gousai(TARGET FALL)>================
[Statedef 1526]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = 2

[State 1526, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1526

[State 1526, Muteki]
type = NotHitBy
trigger1 = Time < 15
value = SCA

[State 1526, Velocity]
type = VelSet
trigger1 = AnimElemTime(1) = 20
x = -4.5
y = -6

[State 1526, Gravity]
type = VelAdd
trigger1 = AnimElemTime(1) >= 20
y = .49

[State 1526, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0 && Pos Y >= 0
time = 10     
ampl = 6    
freq = 120

[State 1526, SelfState]
type = SelfState
trigger1 = AnimElemTime(1) > 28
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;Hyakki Goutsui
[Statedef 1530]
type = A
movetype = A
physics = N
anim = 1530
velset = 0, 0
poweradd = 0
sprpriority = 1

[State 1530, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 1530, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1530, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 1535

[State 1530, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 1530, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1530, Voice]
type = PlaySnd
trigger1 = AnimElem = 8
value = 3000, 0
channel = 0

[State 1530, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 7 || AnimElem = 11 || AnimElem= 15
value = 1, 5

[State 1530, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1530, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 4
y = -8

[State 1530, Friction]
type = VelMul
trigger1 = AnimElemTime(2) > 0
x = .98

[State 1530, VelStop]
type = VelSet
trigger1 = AnimElemTime(16) = 3
x = 0

[State 1530, Gravity]
type = VelAdd
trigger1 = AnimElemTime(2) > 0 && AnimElemTime(16) < 3
y = 0.2

[State 1530, Gravity]
type = VelAdd
trigger1 = AnimElemTime(16) >= 3
y = 0.55

[State 1530, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
trigger1 = NumTarget
pos = ceil(29 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 1530, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(-15 * const(size.xScale)), ceil(-71 * const(size.yScale))

[State 1530, Bind 3,7,11,15]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger2 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
trigger3 = AnimElemTime(11) >= 0 && AnimElemTime(12) < 0
trigger4 = AnimElemTime(15) >= 0 && AnimElemTime(16) < 0
pos = ceil(-1 * const(size.xScale)), ceil(-45 * const(size.yScale))

[State 1530, Bind 4,8,12,16]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger2 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
trigger3 = AnimElemTime(12) >= 0 && AnimElemTime(13) < 0
trigger4 = AnimElemTime(16) >= 0
pos = ceil(9 * const(size.xScale)), ceil(-23 * const(size.yScale))

[State 1530, Bind 5,9,13]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger2 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
trigger3 = AnimElemTime(13) >= 0 && AnimElemTime(14) < 0
pos = ceil(-24 * const(size.xScale)), ceil(-17 * const(size.yScale))

[State 1530, Bind 6,10,14]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
trigger2 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
trigger3 = AnimElemTime(14) >= 0 && AnimElemTime(15) < 0
pos = ceil(-23 * const(size.xScale)), ceil(-65 * const(size.yScale))

[State 1530, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1531

;Hyakki Goutsui Land
[Statedef 1531]
type    = S
movetype = A
physics = N
velset = 0,0
anim = 1531
sprpriority = 2

[State 1531, TargetState]
type = TargetState
trigger1 = NumTarget && !Time
value = 1536

[State 1531, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1531, PosAdd]
type = PosAdd
trigger1 = !Time
x = -15

[State 1531, Width]
type = Width
trigger1 = AnimElemTime(3)<0
edge = 15,0

[State 1531, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2,5
channel = 1

[State 1531, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5000,11
channel = 3

[State 1531, Impact Dust]
type = Helper
trigger1 = NumTarget && AnimElem = 1
helpertype = Normal
stateno = 8110
ID = 8100
name = "Impact Dust"
postype = p1
pos = ceil(28 * const(size.xscale)), 0
ownpal = 1

[State 1531, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
trigger1 = NumTarget
pos = ceil(28 * const(size.xScale)), ceil(0 * const(size.yScale))
time = 1

[State 1531, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 1
value = floor(ifElse(98 * fvar(11) < 7, -7, -98 * fvar(11)))

[State 1531, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 1
value = 35

[State 1531, PowerAdd]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 1 && !var(20)
value = 70

[State 1531, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 1
value = 1

[State 1531, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(13) = 1

[State 1531, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(15) = 1
ignoreHitPause = 1

[State 1531, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 1
var(16) = 1
ignoreHitPause = 1

[State 1531, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 1
time = 20     
ampl = 6    
freq = 120

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

;===========<Hyakki Goutsui(TARGET)>================
[Statedef 1535]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 0

[State 1525, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 1525, ChangeAnim2]
type = ChangeAnim2
Trigger1 = !Time
value = 1535

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 1525, Safety]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;===========<Hyakki Goutsui(TARGET FALL)>================
[Statedef 1536]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 1536, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1536

[State 1536, Muteki]
type = NotHitBy
trigger1 = Time < 15
value = SCA

[State 1536, Velocity]
type = VelSet
trigger1 = AnimElemTime(1) = 15
x = -3.5
y = -7.5

[State 1536, Gravity]
type = VelAdd
trigger1 = AnimElemTime(1) >= 15
y = .42

[State 1536, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0 && Pos Y >= 0
time = 10     
ampl = 6    
freq = 120

[State 1536, Turn]
type = Turn
trigger1 = Vel Y > 0 && Pos Y >= 0
ignorehitpause = 1

[State 1536, SelfState]
type = SelfState
trigger1 = AnimElemTime(1) > 25
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;========================<EX Hyakkishu>=======================
[Statedef 1550]
type = S
movetype = I;A
physics = S
anim = 1550
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
facep2 = 1

[State 1550, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1550, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)
channel = 9

[State 1550, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 40

[State 1550, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 2, -47
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1550, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1550, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1550, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0
channel = 0

[State 1550, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 41,0
channel = 3

[State 1550, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 2
stateType = A
physics = N

[State 1550, Width]
type = Width
trigger1 = 1  
edge = 8,0

[State 1550, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = floor((P2dist x)/29)
y = -9.15

[State 1550, Velocity]
type = VelSet
trigger1 = P2dist x <= 26
x = 1.735

[State 1550, Gravity]
type = Veladd
trigger1 = AnimElemTime(2) > 0
y = .55

[State 1550, EX Hyakki Goushou]
type = ChangeState
triggerall = Time >= 15
trigger1 = (helper(10371), var(0)) || (helper(10371), var(1)) || (helper(10371), var(2))
value = 1560

[State 1550, EX Hyakki Goudan]
type = ChangeState
triggerall = Time >= 15
trigger1 = (helper(10371), var(3)) || (helper(10371), var(4)) || (helper(10371), var(5))
value = 1570

[State 1550, EX Hyakki Gouza End]
type = ChangeState
trigger1 = AnimElemTime(2)>0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1551

;EX Hyakki Gouzan
[Statedef 1551]
type = S
movetype = A
physics = S
ctrl = 0
poweradd = 0
anim = 1551
facep2 = 1
;velset = 0, 0

[State 1551, On Ground]
type = Posset
trigger1 = !Time
y = 0

[State 1551, On Ground]
type = Velset
trigger1 = !Time
y = 0

[State 1551, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 25

[State 1551, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1551, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
pos = 20, 0
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1551, Voice]
type=playsnd
trigger1= animelem=1
value= 0, 1
channel=0

[State 1551, Swing Snd]
type=playsnd
trigger1= animelem=2
value=1,5
channel=1

[State 1551, Width: Edge]
type = Width
trigger1 = 1
edge = 25,0

[State 1551, Width: Player]
type = Width
trigger1 = AnimElemTime(3) = 0
player = 30,0

[State 1551, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3  
attr = S, SA
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = L
hitflag = MAF
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 100), var(36):=-10
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.35,-6.75
air.velocity = -1.35,-6.75
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1551, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

;EX Hyakki Goushou
[Statedef 1560]
type = A
movetype = A
physics = N
ctrl = 0
poweradd = 0
anim = 1560
;velset = 0, 0

[State 1560, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 25

[State 1560, Gravity]
type = Veladd
trigger1 = 1
y = 0.55

[State 1560, Voice]
type=playsnd
trigger1= animelem=3
value= 0, 0
channel=0

[State 1560, Swing Snd]
type=playsnd
trigger1= animelem=4
value=1,2
channel=1

[State 1560, HitDef: EX Hyakki Gousai]
type = HitDef
triggerall = P2bodydist X = [-const(size.ground.front),11]
triggerall = P2bodydist Y = [-18,-enemynear,const(size.head.pos.y)+2]
triggerall = !var(38)
trigger1 = AnimElemTime(2) < 0
trigger1 = command = "holdfwd" || command = "holdback"
attr = A,ST
hitFlag = MA-;F
priority = 4,Miss
getPower = 0,0
givePower = 0,0
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 1561
p2stateno = 1525
p2getp1state = 1
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 1560, Hit]
type = HitDef
triggerall = !NumTarget(1560)
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 7
ID = 1560
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = HA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 10,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 58), var(36):=-55
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.5,8
air.velocity = -5,8
guard.velocity = -8
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
p2facing = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1560, P2 Custom State]
type = TargetState
triggerall = AnimElemTime(2)>=0
trigger1= MoveHit =1 && NumTarget(1560)
trigger1= Target(1560),MoveType=H
ID = 1560
value = 1580
ignorehitpause=0

[State 1560, Juggle Reset]
type = VarSet
trigger1 = MoveHit=1
var(15) = 0
ignoreHitPause=1

[State 1560, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 1560, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1511

;EX Hyakki Gousai
[Statedef 1561]
type = A
movetype = A
physics = N
anim = 1520
velset = 0, 0
poweradd = 0
sprpriority = 1

[State 1561, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 1561, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1561, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 1525

[State 1561, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 1561, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1561, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 40

[State 1561, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 195, 1
channel = 0

[State 1561, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 5
channel = 1

[State 1561, Width]
type = Width
trigger1 = 1
edge = 25,45

[State 1561, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 1.5
y = -4.5

[State 1561, Gravity]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = .55

[State 1561, Bind 1-2]
type = BindtoTarget
trigger1 = AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(-9 * const(size.xScale)), ceil(24 * const(size.yScale)),Head

[State 1561, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = NumTarget
pos = ceil(-23 * const(size.xScale)), ceil(-57 * const(size.yScale))

[State 1561, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = NumTarget
pos = ceil(-18 * const(size.xScale)), ceil(-85 * const(size.yScale))

[State 1561, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = NumTarget
pos = ceil(21 * const(size.xScale)), ceil(-85 * const(size.yScale))

[State 1561, Bind 6+]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0
trigger1 = NumTarget
pos = ceil(26 * const(size.xScale)), ceil(-77 * const(size.yScale))

[State 1561, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1562

;EX Hyakki Gousai Land
[Statedef 1562]
type    = C
movetype = A
physics = N
velset = 0,0
poweradd = 0
anim = 1521

[State 1562, TargetState]
type = TargetState
trigger1 = NumTarget && !Time
value = 1526

[State 1562, Shakunetsu Hadouken Juggle Restrict]
type = VarSet
trigger1 = !Time
var(8) = 1
ignoreHitPause=1

[State 1562, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 10

[State 1562, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1562, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2,5
channel = 1

[State 1562, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5000,11
channel = 3

[State 1562, Impact Dust]
type = Helper
trigger1 = NumTarget && AnimElem = 1
helpertype = Normal
stateno = 8110
ID = 8100
name = "Impact Dust"
postype = p1
pos = ceil(30 * const(size.xscale)), 0
ownpal = 1

[State 1562, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
trigger1 = NumTarget
pos = ceil(30 * const(size.xScale)), ceil(0 * const(size.yScale))
time = 1

[State 1562, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 1
value = floor(ifElse(91 * fvar(11) < 7, -7, -91 * fvar(11)))

[State 1562, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 1
value = 35

[State 1562, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 1
value = 1

[State 1562, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(13) = 1

[State 1562, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(15) = 1
ignoreHitPause = 1

[State 1562, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 1
var(16) = 0
ignoreHitPause = 1

[State 1562, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 1
time = 20     
ampl = 6    
freq = 120

[State 1562, State End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;Hyakki Gou Jin/(EX Hyakki Goudan);)OLD
[Statedef 1570]
type = A
movetype = A
physics = N
ctrl = 0
poweradd = 0
anim = 1580;1570
velset = 0, 0;not for old

[State 1570, OTG Restrict]
type = VarSet
trigger1 = MoveHit=1
var(12) = 1
ignoreHitPause=1

[State 1570, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 20

[State 1570, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 4
channel = 0

[State 1570, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,5
channel = 1

[State 1570, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) >= 0
x = 9
y = 9

[State 1570, HitDef: EX Hyakki Goutsui]
type = HitDef
triggerall = P2bodydist X = [-const(size.ground.front),30]
triggerall = P2bodydist Y = [-45,-enemynear,const(size.head.pos.y)-23]
triggerall = !var(38)
trigger1 = AnimElemTime(2) < 0
trigger1 = command = "holdfwd" || command = "holdback"
attr = A,ST
hitFlag = MA-;F
priority = 4,Miss
getPower = 0,0
givePower = 0,0
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 1575
p2stateno = 1535
p2getp1state = 1
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 1570, Hit]
type = HitDef
triggerall = !var(12)
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4  
attr = A, SA
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = HA
hitflag = MAFD
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 43), var(36):=-8
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.hittime = 16
down.hittime = 24
down.velocity = 0, 0
down.bounce = 0
ground.velocity = -4.5
air.velocity = -8,9
guard.velocity = -10
airguard.velocity = -6.5, -1
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1570, End]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1571

;Hyakki Gou Jin Landing
[Statedef 1571]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1581;(new anim)
velset = 0, 0
poweradd = 0

[State 1571, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1571, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1571, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
pos = 5, 0
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

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

;EX Hyakki Goutsui
[Statedef 1575]
type = A
movetype = A
physics = N
anim = 1530
velset = 0, 0
poweradd = 0
sprpriority = 1

[State 1575, Safety]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 1575, More Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1575, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 85

[State 1575, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 1535

[State 1575, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = -1

[State 1575, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1575, Voice]
type = PlaySnd
trigger1 = AnimElem = 8
value = 3000, 0
channel = 0

[State 1575, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 7 || AnimElem = 11 || AnimElem= 15
value = 1, 5

[State 1575, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1575, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 4
y = -8

[State 1575, Friction]
type = VelMul
trigger1 = AnimElemTime(2) > 0
x = .98

[State 1575, VelStop]
type = VelSet
trigger1 = AnimElemTime(16) = 3
x = 0

[State 1575, Gravity]
type = VelAdd
trigger1 = AnimElemTime(2) > 0 && AnimElemTime(16) < 3
y = 0.2

[State 1575, Gravity]
type = VelAdd
trigger1 = AnimElemTime(16) >= 3
y = 0.56

[State 1575, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
trigger1 = NumTarget
pos = ceil(29 * const(size.xScale)), ceil(0 * const(size.yScale))

[State 1575, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(-15 * const(size.xScale)), ceil(-71 * const(size.yScale))

[State 1575, Bind 3,7,11,15]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger2 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
trigger3 = AnimElemTime(11) >= 0 && AnimElemTime(12) < 0
trigger4 = AnimElemTime(15) >= 0 && AnimElemTime(16) < 0
pos = ceil(-1 * const(size.xScale)), ceil(-45 * const(size.yScale))

[State 1575, Bind 4,8,12,16]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger2 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
trigger3 = AnimElemTime(12) >= 0 && AnimElemTime(13) < 0
trigger4 = AnimElemTime(16) >= 0
pos = ceil(9 * const(size.xScale)), ceil(-23 * const(size.yScale))

[State 1575, Bind 5,9,13]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger2 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
trigger3 = AnimElemTime(13) >= 0 && AnimElemTime(14) < 0
pos = ceil(-24 * const(size.xScale)), ceil(-17 * const(size.yScale))

[State 1575, Bind 6,10,14]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
trigger2 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
trigger3 = AnimElemTime(14) >= 0 && AnimElemTime(15) < 0
pos = ceil(-23 * const(size.xScale)), ceil(-65 * const(size.yScale))

[State 1575, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1576

;EX Hyakki Goutsui Land
[Statedef 1576]
type    = S
movetype = A
physics = N
velset = 0,0
poweradd = 0
anim = 1531
sprpriority = 2

[State 1576, TargetState]
type = TargetState
trigger1 = NumTarget && !Time
value = 1536

[State 1576, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1576, PosAdd]
type = PosAdd
trigger1 = !Time
x = -15

[State 1576, Width]
type = Width
trigger1 = AnimElemTime(3)<0
edge = 15,0

[State 1576, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 30

[State 1576, Width]
type = Width
trigger1 = AnimElemTime(3)<0
edge = 20,0

[State 1576, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2,5
channel = 1

[State 1576, Slam Snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5000,11
channel = 3

[State 1576, Impact Dust]
type = Helper
trigger1 = NumTarget && AnimElem = 1
helpertype = Normal
stateno = 8110
ID = 8100
name = "Impact Dust"
postype = p1
pos = ceil(28 * const(size.xscale)), 0
ownpal = 1

[State 1576, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
trigger1 = NumTarget
pos = ceil(28 * const(size.xScale)), ceil(0 * const(size.yScale))
time = 1

[State 1576, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 1
value = floor(ifElse(119 * fvar(11) < 7, -7, -119 * fvar(11)))

[State 1576, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 1
value = 35

[State 1576, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 1
value = 1

[State 1576, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(13) = 1

[State 1576, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 1
var(15) = 1
ignoreHitPause = 1

[State 1576, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 1
var(16) = 1
ignoreHitPause = 1

[State 1576, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 1
time = 20     
ampl = 6    
freq = 120

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

;Hit by EX Hyakki Goushou State(Fall)
[Statedef 1580]
type = A
movetype = H
physics = N
velset = -1.35,8

[State 1580, Width]
type = Width
trigger1 = 1
edge = 25,-25
player = 25,0

[State 1580, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 5030

[State 1581, Muteki]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1580, Bounce]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1581

;Ground Bounce Neo
[Statedef 1581]
type = A
movetype = H
physics = N
velset = 0,0

[State 1581, On Ground]
type = PosSet
trigger1 = !Time
y = 0

[State 1581, Muteki]
type = NotHitBy
trigger1 = AnimElemTime(2)<0
value = SCA

[State 1581, SFX]
type = PlaySnd
trigger1 = Time=1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 1581, EnvShake]
type = EnvShake
trigger1 = !Time
time = 14
ampl = 5

[State 1581, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 6160;5160

[State 1581, Velset]
type = VelSet
trigger1 = AnimElemTime(2)=0;Time=0
x = -0.8
y = -6.5

[State 1581, Gravity]
type = VelAdd
trigger1 = 1
y = 0.42

;------------------
[State 1581, AngleAdd];special thanks to Zzyzzyxx
type = AngleAdd
trigger1 = Time > 2
value = ifelse((facing != enemynear, facing), 22, -22)

[State 1581, AngleDraw]
type = AngleDraw
trigger1 = Time > 2

[State 1581, AngleSet]
type = AngleSet
trigger1 = (pos y-16)>-vel y;pos y > -vel y
value = 0
ignorehitpause = 1
;------------------

[State 1581, End]
type = SelfState
trigger1 = (pos y-16)>-vel y
value = 5100

;=====================<Zenpou Tenshin>==========================
[StateDef 1600]
type = S
physics = N
moveType = I
anim = 1600
ctrl = 0
velset = 0,0
sprPriority = 2
poweradd = 50 * !var(20)
faceP2 = 1

[State 1600, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1600, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(var(10)=2, 1602, ifelse(var(10)=1, 1601, 1600))

[State 1600, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,1
channel = 0

[State 1600, Roll Sound]
type = PlaySnd
trigger1 = Time = 1
value = 110,0

[State 1600, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 4.4

[State 1600, Velocity]
type = VelSet
trigger1 = AnimElem = 9
x = 0

[State 1600, No Push]
type = PlayerPush
trigger1 = AnimElemTime(9) < 0
value = 0

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

;=====================<Ashura Senku>==========================
[StateDef 1700]
type = S
physics = N
moveType = I
anim = 1700
ctrl = 0
velset = 0,0
sprPriority = 2
poweradd = 30 * !var(20)
;faceP2 = 1

[State 1700, Button Detect(Punch Fwd)]
type = VarSet
trigger1 = !Time
trigger1 = helper(10371), var(23)
trigger1 = (helper(10371), var(0) = [1,3]) && (helper(10371), var(1) = [1,3]) && (helper(10371), var(2) = [1,3])
var(10) = 0

[State 1700, Button Detect(Punch Back)]
type = VarSet
trigger1 = !Time
trigger1 = helper(10371), var(24)
trigger1 = (helper(10371), var(0) = [1,3]) && (helper(10371), var(1) = [1,3]) && (helper(10371), var(2) = [1,3])
var(10) = 1

[State 1700, Button Detect(Kick Fwd)]
type = VarSet
trigger1 = !Time
trigger1 = helper(10371), var(23)
trigger1 = (helper(10371), var(3) = [1,3]) && (helper(10371), var(4) = [1,3]) && (helper(10371), var(5) = [1,3])
var(10) = 2

[State 1700, Button Detect(Kick Back)]
type = VarSet
trigger1 = !Time
trigger1 = helper(10371), var(24)
trigger1 = (helper(10371), var(3) = [1,3]) && (helper(10371), var(4) = [1,3]) && (helper(10371), var(5) = [1,3])
var(10) = 3

[State 1700, Evil Aura FX]
type = Explod
trigger1 = !NumExplod(736)
trigger1 = !Time
anim = 736
ID = 736
pos = 0, 0
postype = P1
sprpriority = -1
;scale = .5,.5
ignorehitpause = 1
bindtime = -1
removetime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1700, Velocity]
type = VelSet
trigger1 = !Time || AnimElemTime(4)=0
x = ifelse(!Time, 3.5, -3.5)

[State 1700, Muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1700, End]
type = ChangeState
trigger1 = !AnimTime
value = 1701

;Warping
[StateDef 1701]
type = S
physics = N
moveType = I
anim = 1701
ctrl = 0
velset = ifelse(!var(10),15, ifelse(var(10)=1,-15, ifelse(var(10)=2,10,-10))), 0

[State 1701, Friction]
type = VelAdd
trigger1 = AnimElemTime(1) > 0
x = ifelse(vel X > 0, -0.32, 0.32)

[State 1701, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,3
channel = 0

[State 1701, Warp Snd]
type = PlaySnd
trigger1 = !Time
value = 1700,0
channel = 1

[State 1701, Muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1701, No Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 1701, Turn]
type = Turn
trigger1 = P2Dist X < -5

[State 1701, End]
type = ChangeState
trigger1 = (Time=34 && var(10)=[0,1]) || (Time=22 && var(10)=[2,3])
trigger2 = AnimElemTime(1)>0 && vel x<0 && backedgebodydist<=0
trigger3 = AnimElemTime(1)>0 && vel x>0 && frontedgebodydist<=0
value = 1702

;End
[Statedef 1702]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1702
velset = 0, 0

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