;------------------------------------------------------------------
;Yami Barai
[Statedef 1000]
type=S
movetype=A
physics=S
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1

[State 1100, VarSet]
type=VarSet
trigger1 =!AILevel&& !time
var(10)=ifelse(command="YamiBarai1",0,ifelse(command="YamiBarai2",1,2))
ignorehitpause=1

[State 1100, VarSet]
type=VarSet
trigger1 =AILevel&& !time
var(10)=ifelse(random<700,1,2)
ignorehitpause=1

[State 1100, Anim]
type = ChangeAnim
trigger1 = !time
value = 1000+var(10)+ Var(11)*10000
ignorehitpause=1

[State 1000, width]
type=width
trigger1= animelemtime(6)=-1
value=30,0

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

[State 1000, Voice]
type=PlaySnd
trigger1 =Animelem=4
value=0,6
channel=0

[State 1000, Move Snd]
type=PlaySnd
trigger1=Animelem=4
value=0,43

[State 1000, Yami Barai]
type=helper
trigger1= animelem=4
helpertype=normal
stateno=1005
ID=1005
name="Yami Barai"
postype=p1
pos=44,0
ownpal=1
size.xscale=.5*const(size.xscale)
size.yscale=.5*const(size.yscale)

[State 1000, Hand Explod]
type = Explod
trigger1 = animelem = 3
anim = 1008
ID = 1008
pos = -20,-5
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 5
ontop = 1
ownpal = 1

[State 1000, StateTypeSet: Idle]
type=StateTypeSet
trigger1=AnimElemTime(4) =0
movetype=I

[State 1000, End]
type=ChangeState
trigger1=!AnimTime
value=0
ctrl=1
;------------------------------------------------------------------
;EX-Yami Barai
[Statedef 1025]
type=S
movetype=A
physics=S
anim=Ifelse(Var(11),11030,1030)
ctrl=0
velset=0,0
poweradd=-500
sprpriority=1
facep2=1

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

[State 1025, Custom Combo Juggle Reset]
type=VarSet
trigger1=!Time && var(20)
var(15)=0
ignoreHitPause=1

[State 1025, VarSet]
type=VarSet
trigger1 =!time
var(10)=3
ignorehitpause=1

[State 1025, VarSet]
type = VarSet
trigger1 =!time
var(12)=0

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

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

[State 1025, EX FX]
type=Explod
trigger1=!Time
anim=8210
sprPriority=3
posType=p1
pos=10, -67
scale=0.5, 0.5
pauseMoveTime=-1
superMoveTime=-1
ownPal=1

[State 1025, EX-SND]
type=PlaySnd
trigger1 =!time
value=0,1000
channel=3

[State 1000, Voice]
type=PlaySnd
trigger1 =Animelem=4
value=0,6
channel=0

[State 1000, Move Snd]
type=PlaySnd
trigger1=Animelem=4
value=0,43


[State 1000, width]
type=width
trigger1= animelemtime(6)=-1
value=30,0

[State 1000, Yami Barai]
type=helper
trigger1= animelem=4
helpertype=normal
stateno=1005
ID=1005
name="Yami Barai"
postype=p1
pos=44,0
ownpal=1
size.xscale=.5*const(size.xscale)
size.yscale=.5*const(size.yscale)

[State 1000, Hand Explod]
type = Explod
trigger1 = animelem = 3
anim = 1008
ID = 1008
pos = -20,-5
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 5
ontop = 1
ownpal = 1

[State 1000, StateTypeSet: Idle]
type=StateTypeSet
trigger1=AnimElemTime(4) =0
movetype=I

[State 1025, End]
type=ChangeState
trigger1=!AnimTime
value=0
ctrl=1
;------------------------------------------------------------------
;Oni Yaki
[Statedef 1100]
type=S
movetype=A
physics=S
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1

[State 1100, VarSet]
type=VarSet
trigger1 =!AILevel&& !time
var(10)=ifelse(command="OniYaki1",0,ifelse(command="OniYaki2",1,2))
ignorehitpause=1

[State 1100, VarSet]
type=VarSet
trigger1 =AILevel&& !time
var(10)=ifelse(random<700,1,2)
ignorehitpause=1

[State 1100, Anim]
type = ChangeAnim
trigger1 = !time
value = 1100+var(10)+ Var(11)*10000
ignorehitpause=1

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

[State 220, Swing Snd]
type=playsnd
trigger1=animelem=4
value=41,0
channel=4

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

[State 1100, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1100, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(4)<0
value = SCA
ignorehitpause = 1

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(4) = 1
StateType = A
physics = N

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,8
volume = 255
channel = 0

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) = 1
y = ifElse(!var(10), -7.5, ifElse(var(10) = 1, -9, -10.5))

[State 1100, VelAdd]
type = Veladd
trigger1 = AnimElemTime(4) >= 2
y = 0.55

[State 1100, PosAdd]
type = PosAdd
trigger1 = Animelem=2
x = 16

[State 1100, PosAdd]
type = PosAdd
trigger1 =animelem=4
x = 32

[State 1100, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Oni Yaki Front Flames"
ID = 1105
stateno = 1105
pos = 0,10
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .5


[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1=var(10)!=2&&animelem=3
priority=4, Hit
attr=A, SP
damage=Ifelse(var(20),76,76+8*var(10)), 10
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=ifElse(var(20), 3, 7), ifElse(var(20), 3, 7)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=S2+10*var(44),2
guardsound=s130,1
animType = Back
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -2.16, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -2.16, -8.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=Ifelse(random<=500,-3,3)

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1=var(10)!=0&&animelem=2
attr=A, SA
damage=Ifelse(var(20),33,45), 5
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=ifElse(var(20), 3, 9), ifElse(var(20), 3, 9)
sparkNo=-1 + 0 * (var(33) :=8013) 
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=S2+10*var(44),2
guardsound=s130,1
animType = Back
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=Ifelse(random<=500,-3,3)

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1=var(10)=1&&animelem=3
attr=A, SA
damage=Ifelse(var(20),43,43), 5
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=ifElse(var(20), 3, 7), ifElse(var(20), 3, 7)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=S2+10*var(44),2
guardsound=s130,1
animType = Back
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -2.16, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -2.16, -8.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=Ifelse(random<=500,-3,3)

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1=var(10)=2&&animelem=3
attr=A, SA
damage=Ifelse(var(20),33,15), 5
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=ifElse(var(20), 3, 7), ifElse(var(20), 3, 7)
sparkNo=-1 + 0 * (var(33) :=8013) 
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=S2+10*var(44),2
guardsound=s130,1
animType = Back
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=Ifelse(random<=500,-3,3)

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1=var(10)=2&&animelem=4
attr=A, SA
damage=Ifelse(var(20),43,35), 5
animtype=Hard
hitflag=MAF
guardflag=MA
pausetime=ifElse(var(20), 3, 7), ifElse(var(20), 3, 7)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=S2+10*var(44),2
guardsound=s130,1
animType = Back
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -2.16, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -2.16, -8.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=Ifelse(random<=500,-3,3)

[State 1100, flames]
type = helper
trigger1 = movehit && numtarget && !numhelper(7180)
trigger1 = !(target, time) && (target, movetype = H)&&(enemynear,stateno=[5000,5050])
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(7)>= 0
movetype = I

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1101
;----------------------------------------------------------------------------------------------
;Landing
[StateDef 1101]
type = S
physics = N
moveType = I
velSet = 0,0

[State 1100, Anim]
type = ChangeAnim
trigger1 = !time
value = 1132+var(10)
ignorehitpause=1

[State 1100, Anim]
type = ChangeAnim
trigger1 = !time && Var(10)=3
value = 1132
ignorehitpause=1

[State 1201, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 52, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

[State 52, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8106
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
;------------------------------------------------------------------
;EX-Oni Yaki
[Statedef 1125]
type=S
movetype=A
physics=S
anim=1130
ctrl=0
velset=0,0
poweradd=-500
sprpriority=1
facep2=1

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

[State 1025, Custom Combo Juggle Reset]
type=VarSet
trigger1=!Time && var(20)
var(15)=0
ignoreHitPause=1

[State 1025, VarSet]
type=VarSet
trigger1 =!time
var(10)=3
ignorehitpause=1

[State 1025, VarSet]
type = VarSet
trigger1 =!time
var(12)=0

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

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

[State 1025, EX FX]
type=Explod
trigger1=!Time
anim=8210
sprPriority=3
posType=p1
pos=10, -67
scale=0.5, 0.5
pauseMoveTime=-1
superMoveTime=-1
ownPal=1

[State 1025, EX-SND]
type=PlaySnd
trigger1 =!time
value=0,1000
channel=3

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 9
value = S0,11
volume = 255
channel = 0

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 17
value = S0,8
volume = 255
channel = 0

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 11
value = S0,42
volume = 255
channel = 2

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 19
value = S0,42
volume = 255
channel = 2

[State 1100, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1100]
type = NotHitBy
trigger1 = time <= 8
value = SCA
ignorehitpause = 1

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(4) = 1
StateType = A
physics = N

[State 1100]
type = VelSet
trigger1 = animelem = 3
x = 6
[State 1100]
type = VelSet
trigger1 = animelem = 6
x = 1
[State 1100]
type = VelSet
trigger1 = animelem = 14
x = 6
[State 1100]
type = VelSet
trigger1 = animelem = 17
x = 1
[State 1100]
type = VelSet
trigger1 = animelem = 25
x = 6

[State 1100]
type = PosAdd
trigger1 = animelem = 12
trigger2 = animelem = 23
x = 20

[State 1100, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Oni Yaki Front Flames"
ID = 1105
stateno = 1105
pos = 0,-40
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .4

[State 1100, Helper]
type = Helper
trigger1 = animelem = 12
helpertype = normal
name = "Oni Yaki Front Flames"
ID = 1105
stateno = 1105
pos = 0,-40
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .4

[State 1005, flames]
type = helper
trigger1 = movehit && numtarget && !numhelper(7180)
trigger1 = !(target, time) && (target, movetype = H)&&(enemynear,stateno=[5000,5050])
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1005, Counter FX]
type=Helper
trigger1=MoveContact=1 && NumTarget && var(9)
trigger1=!(Target, HitShakeOver)
helperType=Normal
stateNo=8290
ID=8290
name="Counter FX"
posType=P1
pos=ifElse(P2Dist x < 0, 0, ifElse(P2Dist x < 20, ceil(P2Dist x), 20)), 0
ownPal=1
pauseMoveTime=65535
superMoveTime=65535
ignoreHitPause=1

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 10
trigger4 = animelem = 11
trigger5 = animelem = 18
trigger6 = animelem = 19
priority=4, Hit
attr = S,SA
damage = 20,6
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = MA
hitflag = MAF
priority= 4,Hit
pausetime = ifElse(var(20), 2, 6), ifElse(var(20), 2, 6)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-84
hitsound=S2+10*var(44),2
guardsound=s130,1
ground.type = Low
ground.slidetime = 9
ground.hittime = 25
ground.velocity = -1,0
guard.velocity = -8
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.type = Low
air.hittime = 18
air.velocity = -2,-10.8
getpower= 0,0
givepower = 36,36
yaccel = .5
airguard.ctrltime = 16
airguard.velocity = -8, -1.5
fall=0
fall.recover = 0
air.fall=1
air.fall.recover=0
envshake.time=12
envshake.ampl=5
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(19)>= 0
movetype = I

[State 1100]
type = ChangeState
trigger1 = animtime = 0
value = 1126
;---------------------------------------------------------------------------
;EX-Oni Yaki
[Statedef 1126]
type = A
movetype = A
physics = N
velset = 3,-7
sprpriority = 0
anim = 1131
ctrl = 0

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

[State 1126]
type = VelSet
trigger1 = time = 13
x = 1
ignorehitpause = 1

[State 1126]
type = VelSet
trigger1 = time = 13
y = -5
ignorehitpause = 1

[State 1126]
type = VelSet
trigger1 = time = 21
y = 1
ignorehitpause = 1

[State 1126]
type = VelAdd
trigger1 = time >= 6 && time < 22
y = .52
ignorehitpause = 1

[State 1126]
type = VelAdd
trigger1 = time >= 22
y = .62
ignorehitpause = 1

[State 1126]
type = VelSet
trigger1 = animelem = 6
x = 0
ignorehitpause = 1

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

[State 1100, Helper]
type = Helper
trigger1 = animelem = 1
helpertype = normal
name = "Oni Yaki Front Flames"
ID = 1105
stateno = 1105
pos = 0,10
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .5

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 1
priority=4, Hit
attr = S,SA
damage = 20,6
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = MA
hitflag = MAF
priority= 4,Hit
pausetime = ifElse(var(20), 2, 6), ifElse(var(20), 2, 6)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-84
hitsound=S2+10*var(44),2
guardsound=s130,1
ground.type = Low
ground.slidetime = 12
ground.hittime = 25
ground.velocity = -1,0
guard.velocity = -8
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.type = Low
air.hittime = 18
air.velocity = -2,-10.8
getpower= 0,0
givepower = 36,36
yaccel = .5
airguard.ctrltime = 16
airguard.velocity = -8, -1.5
fall=0
fall.recover = 0
air.fall=1
air.fall.recover=0
envshake.time=12
envshake.ampl=5
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4

[State 1005, High]
type=hitdef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 2
priority=4, Hit
attr = S,SA
damage = 10,6
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = MA
hitflag = MAF
priority= 4,Hit
pausetime = ifElse(var(20), 3, 7), ifElse(var(20), 3, 7)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-84
hitsound=S2+10*var(44),2
guardsound=s130,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
ground.velocity = -5,-10
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.type = Low
air.hittime = 18
air.velocity = -2,-4
getpower= 0,0
givepower = 36,36
yaccel = .5
fall=1
fall.recover = 0
air.fall=1
air.fall.recover=0
airguard.ctrltime = 16
airguard.velocity = -8, -1.5
fall.recover = 0
envshake.time=12
envshake.ampl=5
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(4)>= 0
movetype = I

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 52
;------------------------------------------------------------------
;EX-Oni Yaki Orochi
[Statedef 1127]
type=S
movetype=A
physics=S
anim=11130
ctrl=0
velset=0,0
poweradd=-500
sprpriority=1
facep2=1

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

[State 1025, Custom Combo Juggle Reset]
type=VarSet
trigger1=!Time && var(20)
var(15)=0
ignoreHitPause=1

[State 1025, VarSet]
type=VarSet
trigger1 =!time
var(10)=3
ignorehitpause=1

[State 1025, VarSet]
type = VarSet
trigger1 =!time
var(12)=0

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

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

[State 1025, EX FX]
type=Explod
trigger1=!Time
anim=8210
sprPriority=3
posType=p1
pos=10, -67
scale=0.5, 0.5
pauseMoveTime=-1
superMoveTime=-1
ownPal=1

[State 1025, EX-SND]
type=PlaySnd
trigger1 =!time
value=0,1000
channel=3

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

[State 1100, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElem=4
y = -7
[State 1100, VelAdd]
type = Veladd
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(9) <= 0
y = .5
[State 1100, VelSet]
type = VelSet
trigger1 = AnimElem=9
y = -7

[State 1100, VelAdd]
type = Veladd
trigger1 = AnimElemTime(10) >= 0
y = .5

[State 1100, PosAdd]
type = PosAdd
trigger1 = Animelem=2
x = 16
[State 1100, PosAdd]
type = PosAdd
trigger1 =animelem=4
x = 32

[State 1100, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Oni Yaki Front Flames"
ID = 1105
stateno = 1105
pos = 0,10
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .5

[State 1100, Helper]
type = Helper
trigger1 = animelem = 9
helpertype = normal
name = "Oni Yaki Front Flames"
ID = 1105
stateno = 1105
pos = 0,10
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .5

[State 1100, Hit]
type=HitDef
trigger1=animelem=2
attr=S, SA
damage=20,6
priority=4, hit
animtype=Hard
getpower=Ifelse(var(10)=2,24,Ifelse(var(10)=1,36,72))* (!var(20)), 0
givepower=Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30)), Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30))
guardflag=M
hitflag=MAF
hitsound=S2+10*var(44),5
guardsound=S130,0
pauseTime=Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12))),Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12)))
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-65
air.animtype=up
fall.animtype=Back
ground.type=high
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=-1,-8
air.velocity=-1,-6
guard.velocity=Ifelse(var(20),-4,-8)
airguard.velocity =Ifelse(var(20),-3,-6), -3
airguard.ctrlTime=12
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.4
fall=1
fall.recover=0
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=4
envShake.freq=120

[State 1100, Hit]
type=HitDef
trigger1=animelem=3
attr=S, SA
damage=20, 6
priority=4, hit
animtype=Hard
getpower=Ifelse(var(10)=2,24,Ifelse(var(10)=1,36,72))* (!var(20)), 0
givepower=Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30)), Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30))
guardflag=MA
hitflag=MAF
hitsound=S2+10*var(44),5
guardsound=S130,0
pauseTime=Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12))),Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12)))
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-80
air.animtype=up
fall.animtype=Back
ground.type=high
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=-1,-8
air.velocity=-1,-6
guard.velocity=Ifelse(var(20),-4,-8)
airguard.velocity =Ifelse(var(20),-3,-6), -3
airguard.ctrlTime=12
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.4
fall=1
fall.recover=0
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=4
envShake.freq=120

[State 1100, Hit]
type=HitDef
trigger1=Animelem=4
attr=S, SA
damage=20, 6
priority=4, hit
animtype=Hard
getpower=Ifelse(var(10)=2,24,Ifelse(var(10)=1,36,72))* (!var(20)), 0
givepower=Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30)), Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30))
guardflag=MA
hitflag=MAF
hitsound=S2+10*var(44),5
guardsound=S130,0
pauseTime=Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12))),Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12)))
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-95
air.animtype=up
fall.animtype=Back
ground.type=high
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=-1,-8
air.velocity=-1,-8
guard.velocity=Ifelse(var(20),-4,-8)
airguard.velocity =Ifelse(var(20),-3,-6), -3
airguard.ctrlTime=12
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.4
fall=1
fall.recover=0
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=4
envShake.freq=120

[State 1100, Hit]
type=HitDef
trigger1=animelem=10
attr=S, SA
damage=20,6
priority=4, hit
animtype=Hard
getpower=Ifelse(var(10)=2,24,Ifelse(var(10)=1,36,72))* (!var(20)), 0
givepower=Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30)), Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30))
guardflag=M
hitflag=MAF
hitsound=S2+10*var(44),5
guardsound=S130,0
pauseTime=Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12))),Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12)))
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-65
air.animtype=up
fall.animtype=Back
ground.type=high
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=-1,-8
air.velocity=-1,-6
guard.velocity=Ifelse(var(20),-4,-8)
airguard.velocity =Ifelse(var(20),-3,-6), -3
airguard.ctrlTime=12
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.4
fall=1
fall.recover=0
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=4
envShake.freq=120

[State 1100, Hit]
type=HitDef
trigger1=animelem=11
attr=S, SA
damage=20, 6
priority=4, hit
animtype=Hard
getpower=Ifelse(var(10)=2,24,Ifelse(var(10)=1,36,72))* (!var(20)), 0
givepower=Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30)), Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30))
guardflag=MA
hitflag=MAF
hitsound=S2+10*var(44),5
guardsound=S130,0
pauseTime=Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12))),Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12)))
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-80
air.animtype=up
fall.animtype=Back
ground.type=high
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=-1,-5
air.velocity=-1,-5
guard.velocity=Ifelse(var(20),-4,-8)
airguard.velocity =Ifelse(var(20),-3,-6), -3
airguard.ctrlTime=12
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.4
fall=1
fall.recover=0
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=4
envShake.freq=120

[State 1100, Hit]
type=HitDef
trigger1=Animelem=12
attr=S, SA
damage=30, 6
priority=4, hit
animtype=Hard
getpower=Ifelse(var(10)=2,24,Ifelse(var(10)=1,36,72))* (!var(20)), 0
givepower=Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30)), Ifelse(var(10)=2,10,Ifelse(var(10)=1,15,30))
guardflag=MA
hitflag=MAF
hitsound=S2+10*var(44),5
guardsound=S130,0
pauseTime=Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12))),Ifelse(var(20),4,Ifelse(var(10)=2,6,Ifelse(var(10),8,12)))
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-95
air.animtype=up
fall.animtype=Back
ground.type=high
air.type=Low
ground.slidetime=12
ground.hittime =12
guard.hittime=12
ground.velocity=-1,-5
air.velocity=-1,-5
guard.velocity=Ifelse(var(20),-4,-8)
airguard.velocity =Ifelse(var(20),-3,-6), -3
airguard.ctrlTime=12
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.4
fall=1
fall.recover=0
forcestand=1
palFX.time = 30
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=12
envshake.ampl=4
envShake.freq=120

[State 650, Hit]
type=HitDef
triggerall = p2statetype = A
trigger1=Animelem = 19
attr=A, NA
damage = 20, 4
animtype=Hard
guardflag=HA
hitflag=MAF
getpower=30 * !var(20), 0
givepower=30, 30
priority=4, Hit
pausetime = 4,8
sparkNo=-1 + 0 * (var(33) := 8013)
guard.sparkNo=-1 + 0 * (var(34) := 8000)
sparkXY=-10 + 0 * (var(35) := 80), var(36) := -54
hitsound=S2+10*var(44),5
guardsound=s130, 0
ground.type=High
ground.slidetime=12 + 4*var(9)
ground.hittime =12 + 4*var(9)
guard.hittime=18
ground.velocity=Ifelse(var(20),-2.5,-5)
guard.velocity=Ifelse(var(20),-2.5,-5)
air.type=High
airguard.ctrlTime=16
air.velocity =-10,10
airguard.velocity = -5.5, -1
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
air.hittime = 120
airguard.ctrlTime = 16
yaccel = .58
fall = 0
air.fall=var(55)=2
fall.recover = 0
fall.recovertime = 120
palFX.time = 20
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 12
envshake.ampl = Ifelse(random<=500,-4,4)
fall.envshake.time = 12
fall.envshake.ampl = Ifelse(random<=500,-5,5)

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(22)>= 0
movetype = I

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1101
;------------------------------------------------------------------
;Aoi Hana
[Statedef 1200]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1

[State 1100, VarSet]
type=VarSet
trigger1 =!AILevel&& !time
var(10)=ifelse(command="AoiHana1",0,ifelse(command="AoiHana2",1,2))
ignorehitpause=1

[State 1100, VarSet]
type=VarSet
trigger1 =AILevel&& !time
var(10)=ifelse(random<700,1,2)
ignorehitpause=1

[State 1100, Anim]
type = ChangeAnim
trigger1 = !time
value = 1200+var(10)+ Var(11)*10000
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,29
channel = 1

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

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(2) < 0 && var(10)=0
x = (5.53125*exp((-0.0814)*(time-1)))

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(2) < 0 && var(10)=1
x = (6.4531*exp((-0.0814)*(time-1)))

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(2) < 0 && var(10)=2
x = (7.375*exp((-0.0814)*(time-1)))

[State -2, Vel]
type = VelSet
trigger1 = animelem = 2 && var(10)=0
x = 18.33

[State -2, Vel]
type = VelSet
trigger1 = animelem = 2 && var(10)=1
x = 18.425

[State -2, Vel]
type = VelSet
trigger1 = animelem = 2 && var(10)=2
x = 18.52

[State -2, Vel]
type = VelSet
trigger1 = animelemtime(2) >= 1 && animelemtime(3) < 1 && var(10)=0
x = (3.9949493408203125*exp((-0.0814)*(time-7)))

[State -2, Vel]
type = VelSet
trigger1 = animelemtime(2) >= 1 && animelemtime(3) < 1 && var(10)=1
x = (4.084068*exp((-0.0814)*(time-7)))

[State -2, Vel]
type = VelSet
trigger1 = animelemtime(2) >= 1 && animelemtime(3) < 1 && var(10)=2
x = (4.173187255859375*exp((-0.0814)*(time-8)))

[State -2, Vel]
type = VelSet
trigger1 = animelem = 4
x = 0

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 4
attr=S,NA        
hitflag=MAF       
guardflag=M         
priority=4 ,Hit   
damage = 40, 0
ID = 200*!var(20)
getpower=20 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
animType=Medium
air.animType=Back
fall.animType=Back
ground.type=High
air.type=Low
ground.slidetime=15 + 3*var(9)
ground.hittime=15 + 3*var(9)
guard.hittime=15
air.hittime=120
ground.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
guard.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
air.velocity=-3.24, -7.73
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.58
fall=0
fall.recover=1
fall.recoverTime=120
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(12)=0

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5)>=1 && var(12)>0
triggerall = AILevel<1
value = IfElse(var(12)=4,1300,1210)

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElem = 5 && MoveContact
triggerall = AILevel
value = IfElse(random>500,1300,1210)

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(6)>= 0
movetype = I

[State 1000, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Aoi Hana 2nd Hit
[Statedef 1210]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1

[State 1100, VarSet]
type=VarSet
trigger1 =!AILevel&& !time
var(10)=ifelse(command="AoiHana1",0,ifelse(command="AoiHana2",1,2))
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 1210+var(10)+ Var(11)*10000

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(4) < 0 && var(12)=0
x = (7.53125*exp((-0.0814)*(time-1)))

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(4) < 0 && var(12)=1
x = (8.4531*exp((-0.0814)*(time-1)))

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(4) < 0 && var(12)=2
x = (9.375*exp((-0.0814)*(time-1)))

[State -2, Accel]
type = VelSet
trigger1 = animelem = 4
x = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,30
channel = 1

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 4
attr=S,NA        
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = MA
hitflag = MAF       
priority=4 ,Hit   
damage = 40, 0
ID = 200*!var(20)
getpower=20 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -2.16, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -2.16, -8.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(10)=0

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5)>=1 && var(10)>0
triggerall = AILevel<1
value = 1220

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElem = 5 &&Movecontact
triggerall = AILevel
value = 1220

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(6)>= 0
movetype = I

[State 1000, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Aoi Hana 3rd Hit
[Statedef 1220]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1

[State 1100, VarSet]
type=VarSet
trigger1 =!AILevel&& !time
var(10)=ifelse(command="AoiHana1",0,ifelse(command="AoiHana2",1,2))
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 1220+var(10)+ Var(11)*10000

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A
physics = N

[State 1101, VelSet]
type = VelSet
trigger1 = AnimElem = 3
y = IfElse(var(10)=0,-5,IfElse(var(10)=1,-5,-6))                ;14
x = 5.5

[State 220, Swing Snd]
type=playsnd
trigger1=animelem=2
value=41,0
channel=4

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

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

[State 1101, pos]
type = Veladd
trigger1 = AnimElemTime(3)>0
y = .625

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,31
channel = 1

[State 210, Hit]
type=hitdef
trigger1= animelem = 5
attr = S,SA
damage = 40, 0
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = HA
hitflag = MAF
priority= 4,Hit
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
hitsound = s2,6
guardsound = s2,0
ground.type = High
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -11.1796875*fvar(6)
guard.velocity = -7.17
guard.ctrltime = 24
guard.hittime = 17
guard.slidetime = 17
air.type = High
air.hittime = 13
air.velocity = -6,9
getpower= ifelse(p2movetype=H,72,216)*(!var(15)), 36
givepower = 36,36
yaccel = .5
airguard.ctrltime = 16
airguard.velocity = -8, -1.5
fall=1
fall.recover = 0
air.fall=1
air.fall.recover=0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0
fall.envshake=1
fall.envshake.time= 14
fall.envshake.ampl=-5
fall.envshake.freq=120
envshake.time=14
envshake.freq=120
envshake.ampl=4
persistent = 0

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = time>19
movetype = I

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1290
;------------------------------------------------------------------
;Aoi Hana 3rd Hit-landing
[Statedef 1290]
type = S
physics = S
movetype= I
ctrl = 0
anim = Ifelse(Var(11),11290,1290)
velset = 0,0

[State 1290, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 52, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

[State 52, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8106
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1290, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;EX-Aoi Hana
[Statedef 1230]
type=S
physics=N
movetype=A
anim = Ifelse(Var(11),11200,1200)
ctrl=0
velset=0,0
poweradd=-500
sprpriority=1
facep2=1

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

[State 1025, Custom Combo Juggle Reset]
type=VarSet
trigger1=!Time && var(20)
var(15)=0
ignoreHitPause=1

[State 1025, VarSet]
type=VarSet
trigger1 =!time
var(10)=3
ignorehitpause=1

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

[State 1025, VarSet]
type = VarSet
trigger1 =!time
var(12)=0

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

[State 1025, EX FX]
type=Explod
trigger1=!Time
anim=8210
sprPriority=3
posType=p1
pos=10, -67
scale=0.5, 0.5
pauseMoveTime=-1
superMoveTime=-1
ownPal=1

[State 1025, EX-SND]
type=PlaySnd
trigger1 =!time
value=0,1000
channel=3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,29
channel = 1

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(2) < 0 
x = (7.375*exp((-0.0814)*(time-1)))

[State -2, Vel]
type = VelSet
trigger1 = animelem = 2 
x = 18.52

[State -2, Vel]
type = VelSet
trigger1 = animelemtime(2) >= 1 && animelemtime(3) < 1 
x = (4.173187255859375*exp((-0.0814)*(time-8)))

[State -2, Vel]
type = VelSet
trigger1 = animelem = 4
x = 0

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 4
attr=S,NA        
hitflag=MAF       
guardflag=M         
priority=4 ,Hit   
damage = 50
ID = 200*!var(20)
getpower=0 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
animType=Medium
air.animType=Back
fall.animType=Back
ground.type=High
air.type=Low
ground.slidetime=15 + 3*var(9)
ground.hittime=15 + 3*var(9)
guard.hittime=15
air.hittime=120
ground.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
guard.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
air.velocity=-3.24, -7.73
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.58
fall=0
fall.recover=1
fall.recoverTime=120
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(6)>= 0
movetype = I

[State 1000, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;EX-Aoi Hana 2nd Hit
[Statedef 1240]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=1
facep2=1
anim = Ifelse(Var(11),11210,1210)

[State -2, Accel]
type = VelSet
trigger1 = time > 0 && animelemtime(4) < 0 
x = (9.375*exp((-0.0814)*(time-1)))

[State -2, Accel]
type = VelSet
trigger1 = animelem = 4
x = 0

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,30
channel = 1

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = animelem = 4
attr=S,NA        
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = MA
hitflag = MAF       
priority=4 ,Hit   
damage = 50, 0
ID = 200*!var(20)
getpower=0 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -2.16, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -2.16, -8.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
airguard.ctrltime=12
airguard.velocity=ifelse((var(20)),-4,-8),-3
forcestand=1
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(10)=0

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5)>=1 && var(10)>0
triggerall = AILevel<1
value = 1250

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimElem = 5 &&Movecontact
triggerall = AILevel
value = 1250

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemtime(6)>= 0
movetype = I

[State 1000, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;EX-Aoi Hana 3rd Hit
[Statedef 1250]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
facep2=1
anim = Ifelse(Var(11),11220,1220)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A
physics = N

[State 1101, VelSet]
type = VelSet
trigger1 = AnimElem = 3
y = -7               
x = 5.5

[State 1101, pos]
type = Veladd
trigger1 = AnimElemTime(3)>0
y = .625

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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,31
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S0,41
channel = 1

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 6130
ID = 6130
pos = 57,-64
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
ownpal = 1
scale = .5,.5
sprpriority = 6

[State 210, Hit]
type=hitdef
trigger1= animelem = 5
attr = S,SA
damage = 50, 0
animtype = Hard
air.animtype = Back
fall.animtype = Back
guardflag = HA
hitflag = MAF
priority= 4,Hit
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
hitsound = s2,6
guardsound = s2,0
ground.type = High
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -11.1796875*fvar(6)
guard.velocity = -7.17
guard.ctrltime = 24
guard.hittime = 17
guard.slidetime = 17
air.type = High
air.hittime = 13
air.velocity = -6,9
getpower= 0
givepower = 36,36
yaccel = .5
airguard.ctrltime = 16
airguard.velocity = -8, -1.5
fall=1
fall.recover = 0
air.fall=1
air.fall.recover=0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0
fall.envshake=1
fall.envshake.time= 14
fall.envshake.ampl=-5
fall.envshake.freq=120
envshake.time=14
envshake.freq=120
envshake.ampl=4
persistent = 0

[State 1100, StateTypeSet]
type = StateTypeSet
trigger1 = time>19
movetype = I

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1290
;------------------------------------------------------------------
;Kototsuki In
[Statedef 1300]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1
anim = Ifelse(Var(11),11300,1300)

[State 1000, strengthvar]
type=varset
trigger1= !time && AILevel<1
var(10)=ifelse(command="KototsukiIn1",1,ifelse(command="KototsukiIn2",2,3))

[State 1000, VarSet]
type=VarSet
trigger1 =AILevel&& !time
var(10)=ifelse(random<700,1,2)
ignorehitpause=1

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
value = S100,0
volume = 255

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,36
volume = 255
channel = 0

[State 1400, VelSet]
type = VelSet
trigger1 = !Time
x = 8.5

[State 1300, ChangeState]
type = Changestate
trigger1 = P2BodyDist x <= 55
value = 1310

[State 1300, ChangeState]
type = Changestate
trigger1 = var(10)=1 && Time = 10
trigger2 = var(10)=2 && Time = 14
trigger3 = var(10)=3 && Time = 18
value = 1301
ctrl = 0
;------------------------------------------------------------------
;Kototsuki In-End
[Statedef 1301]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=1
anim = Ifelse(Var(11),11301,1301)

[State -2, Accel]
type = VelSet
trigger1 = !time
x = 15.7603302001953125

[State -2, Vel]
type = VelSet
trigger1 = time > 0
x = (6.2014617919921875*exp((-0.1576)*(time-1)))

[State 1310, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Kototsuki In-Close to P2
[Statedef 1310]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1
anim = Ifelse(Var(11),11310,1310)

[State 1320, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1,1
volume = 255
channel = 1

[State 1000, width]
type=width
trigger1= animelemtime(1)=-1
value=30,0

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

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

[State -2, Accel]
type = VelSet
trigger1 = time < 2
x = (7.96875*exp((-0.0645)*(time)))

[State -2, Vel]
type = VelSet
trigger1 = time = 2
x = 19.0037841796875

[State -2, Vel]
type = VelSet
trigger1 = time > 2
x = (6.5660552978515625*exp((-0.0645)*(time-3)))

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = !Time
attr=S,NA        
hitflag=MAF       
guardflag=MA         
priority=4 ,Hit   
damage = Ifelse(var(55),60,60), 0
ID = 1300
getpower=20 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=s2,6
guardsound=s130,1
animtype = Heavy
air.animType=Back
fall.animType=Back
ground.type = low
guard.pausetime = 5,10
ground.slidetime = 11
ground.hittime  = 11
ground.velocity = -5
guard.slidetime = 17
guard.ctrltime = 24
guard.velocity = -1
air.type = High
air.velocity = -4,-7.77564102564102564102564102563869
air.hittime = 13
p1stateno = 1330
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0

[State 1320, ChangeState]
type = ChangeState
trigger1 = AnimElem = 5 && MoveContact
value = 1320
ctrl = 0

[State 1320, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Kototsuki In-Second Attempt
[Statedef 1320]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=2
facep2=1
anim = Ifelse(Var(11),11320,1320)

[State 1320, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,1
volume = 255
channel = 1

[State 1000, width]
type=width
trigger1= animelemtime(1)=-1
value=30,0

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

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

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = Time = 0
attr=S,NA        
hitflag=MAF       
guardflag=MA         
priority=4 ,Hit   
damage = 0,0
ID = 1300
getpower=20 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=s2,6
guardsound=s130,1
animtype = Heavy
air.animType=Back
fall.animType=Back
ground.type = low
guard.pausetime = 5,10
ground.slidetime = 11
ground.hittime  = 11
ground.velocity = -5
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 24
guard.velocity = -1
air.type = High
air.velocity = -4,-7.77564102564102564102564102563869
air.hittime = 13
p1stateno = 1340
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0

[State 1330, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Kototsuki In-1st Hit Connected
[Statedef 1330]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
anim = Ifelse(Var(11),11330,1330)

[State 1340, TargetState]
type = TargetState
trigger1 = !Time
value = 1350

[State 1340, TargetState]
type = TargetState
trigger1 = AnimElem = 4
value = 1360

[State 1340, TargetState]
type = TargetState
trigger1 = AnimElemTime(7)= 3
value = 1370

[State 1340, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)>=0 && animelemtime(2)<0
pos =  75,-97
time = 1

[State 1340, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(2)>=0 && animelemtime(3)<0
pos = 74,-97
time = 1

[State 1340, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(3)>=0 && animelemtime(4)<0
pos = 77,-55
time = 1

[State 1340, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(4)>=0 && animelemtime(7)<3
pos = 71,-2
time = 1

[State 1340, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S0,32
volume = 255
channel = 0

[State 1340, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S0,44
volume = 255

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 7
anim = 6130
ID = 6130
pos = 95,-21
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = .5,.5
sprpriority = 6

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 6130
ID = 6131
pos = 50,-21
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = .5,.5
sprpriority = 6

[State 1100, flames]
type = helper
trigger1 = animelem = 7
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1340, EnvShake]
type = EnvShake
trigger1 = AnimElem = 7
time = 15
freq = 60
ampl = -6
phase = 90

[State 1340, HitAdd]
type = HitAdd
trigger1 = AnimElemTime(7) = 3
value = 1

[State 1340, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(7) = 3
value = IfElse(var(10)=1,-88,IfElse(var(10)=2,-54,-68))
absolute = 1
kill = 1

[State 1340, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Kototsuki In-2nd Hit Connected
[Statedef 1340]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
anim = Ifelse(Var(11),11340,1340)

[State 1340, TargetState]
type = TargetState
trigger1 = !Time
value = 1360

[State 1340, TargetState]
type = TargetState
trigger1 = AnimElemTime(4)= 3
value = 1370

[State 1340, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)>=0 && animelemtime(4)<3
pos = 71,-2
time = 1

[State 1340, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S0,32
volume = 255
channel = 0

[State 1340, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S0,44
volume = 255

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 6130
ID = 6130
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = .5,.5
sprpriority = 6

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 6130
ID = 6131
pos = 20,-21
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = .5,.5
sprpriority = 6

[State 1100, flames]
type = helper
trigger1 = animelem = 7
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1340, EnvShake]
type = EnvShake
trigger1 = AnimElem = 4
time = 15
freq = 60
ampl = -6
phase = 90

[State 1340, HitAdd]
type = HitAdd
trigger1 = AnimElemTime(4) = 3
value = 1

[State 1340, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(4) = 3
value = IfElse(var(10)=1,-88,IfElse(var(10)=2,-54,-68))
absolute = 1
kill = 1

[State 1340, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Kototsuki In-P2 State
[Statedef 1350]
type = S
movetype = H
physics = N

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
ignorehitpause = 1

[State 1360, Turn]
type = Turn
trigger1 = !Time && facing = enemy, facing

[State 1360, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1360, SprPriority]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 1360, ChangeAnim]
type= ChangeAnim2
trigger1 = !Time
triggerall = anim !=1350+ Var(11)*10000
value = 1350+ Var(11)*10000

[State 1360, CtrlSet]
type = CtrlSet
trigger1 = 1
value = 0
;------------------------------------------------------------------
;Kototsuki In-P2 State
[Statedef 1360]
type = S
movetype = H
physics = N
velset = 0,0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
ignorehitpause = 1

[State 1370, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1370, SprPriority]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 1370, ChangeAnim]
type= ChangeAnim2
trigger1 = Time = 0
triggerall = anim !=1360+ Var(11)*10000
value = 1360+ Var(11)*10000

[State 1370, CtrlSet]
type = CtrlSet
trigger1 = 1
value = 0
;------------------------------------------------------------------
;Kototsuki In-P2 State
[Statedef 1365]
type = S
movetype = H
physics = N

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
ignorehitpause = 1

[State 11375, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime (2) < 0
value = SCA
time = 1

[State 1375, SprPriority]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 1375, ChangeAnim]
type= ChangeAnim2
trigger1 = Time = 0
triggerall = anim !=1360+ Var(11)*10000
value = 1360+ Var(11)*10000

[State 1375, CtrlSet]
type = CtrlSet
trigger1 = 1
value = 0
;------------------------------------------------------------------
;Kototsuki In-P2 State
[Statedef 1370]
type = A
movetype = H
physics = N

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
ignorehitpause = 1

[State 1380, PosAdd]
type = PosAdd
trigger1 = !Time
y = -5

[State 1380, SprPriority]
type = SprPriority
trigger1 = !Time
value = -1

[State 1380, ChangeAnim]
type= ChangeAnim2
trigger1 = !Time
triggerall = anim !=5160
value = 5160

[State 1380, CtrlSet]
type = CtrlSet
trigger1 = 1
value = 0

[State 1380, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = -6.1
y = -7.8

[State 1380, VelAdd]
type = VelAdd
trigger1 = AnimElemTime (1) > 0
y = .5

[State 1531, PalFX]
type = PalFX
trigger1 = !Time
time = 30
mul = 128, 128, 128
sinAdd = 96, 96, 96, 4

[State 0, EnvShake]
type = EnvShake
trigger1= vel y > 0
trigger1= pos y > -vel y
time = 14
freq = 120
ampl = -3

[State 1380, SelfState]
type = SelfState
trigger1= vel y > 0
trigger1= pos y > -vel y && AnimElemTime (1) > 0
value = 5100
;------------------------------------------------------------------
;EX-Kototsuki In
[Statedef 1380]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
poweradd=-500
sprpriority=1
facep2=1
anim = Ifelse(Var(11),11320,1320)

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

[State 1000, width]
type=width
trigger1= animelemtime(1)=0
value=30,0

[State 1025, Custom Combo Juggle Reset]
type=VarSet
trigger1=!Time && var(20)
var(15)=0
ignoreHitPause=1

[State 1025, VarSet]
type=VarSet
trigger1 =!time
var(10)=3
ignorehitpause=1

[State 1025, VarSet]
type = VarSet
trigger1 =!time
var(12)=0

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

[State 1025, EX FX]
type=Explod
trigger1=!Time
anim=8210
sprPriority=3
posType=p1
pos=10, -67
scale=0.5, 0.5
pauseMoveTime=-1
superMoveTime=-1
ownPal=1

[State 1025, EX-SND]
type=PlaySnd
trigger1 =!time
value=0,1000
channel=3

[State 1320, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1,1
volume = 255
channel = 1

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

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = Time = 0
attr=S,NA        
hitflag=MAFD       
guardflag=MA         
priority=4 ,Hit   
damage = 0,0
ID = 1300
getpower=20 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) :=8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
hitsound=s2,6
guardsound=s130,1
animtype = Heavy
air.animType=Back
fall.animType=Back
ground.type = low
guard.pausetime = 5,10
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = 0
guard.velocity = -1
air.type = High
air.velocity = -4,-7.77564102564102564102564102563869
air.hittime = 13
p1stateno = 1382
palFX.time=12 * var(9)
palFX.add=255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0

[State 1330, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------
;EX-Kototsuki In-2nd Hit Connected
[Statedef 1382]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
anim = Ifelse(Var(11),11340,1340)

[State 1340, TargetState]
type = TargetState
trigger1 = !Time
value = 1360

[State 1340, TargetState]
type = TargetState
trigger1 = AnimElemTime(4)= 3
value = 1370

[State 1340, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)>=0 && animelemtime(4)<3
pos = 71,-2
time = 1

[State 1025, EX Flash]
type=VarSet
trigger1=!Time
var(25)=Ifelse(Var(11),70,30)

[State 1340, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S0,32
volume = 255
channel = 0

[State 1340, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S0,44
volume = 255

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 6130
ID = 6130
pos = 20,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
Ownpal = 1
scale = .5,.5
sprpriority = 6

[State 0, Explod]
type = Explod
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0 && timemod = 8,0 && Var(11)
anim = 8150
ID = 8150
pos = 0+random%-40,-10+(random%-20)
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
ownpal = 1
scale = .6,.6
sprpriority = 7
ontop = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0 && timemod = 8,0 && Var(11)
time = 8
freq = 65
ampl = -5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0 && timemod = 8,0 && Var(11)
value = S0,42
volume = 255

[State 1340, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 6130
ID = 6131
pos = 30,-21
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
Ownpal = 1
scale = .5,.5
sprpriority = 6

[State 1100, flames]
type = helper
trigger1 = animelem = 4
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1340, EnvShake]
type = EnvShake
trigger1 = AnimElem = 4
time = 15
freq = 60
ampl = -6
phase = 90


[State 1340, HitAdd]
type = HitAdd
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0 && timemod = 8,0 && Var(11)
value = 1

[State 1340, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelemtime(3) >= 0 && animelemtime(4) <= 0 && timemod = 8,0 && Var(11)
value = -2
absolute = 1
kill = 0

[State 1340, HitAdd]
type = HitAdd
trigger1 = AnimElemTime(4) = 3
value = 1

[State 1340, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(4) = 3
value = -160
absolute = 1
kill = 1

[State 1340, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Tsumagushi
[Statedef 1400]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1

[State 1100, VarSet]
type=VarSet
trigger1 =!AILevel&& !time
var(10)=ifelse(command="Tsumagushi1",0,ifelse(command="Tsumagushi2",1,2))
ignorehitpause=1

[State 1100, VarSet]
type=VarSet
trigger1 =AILevel&& !time
var(10)=ifelse(random<700,1,2)
ignorehitpause=1

[State 1100, Anim]
type = ChangeAnim
trigger1 = !time
value = 1400+var(10)
ignorehitpause=1

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem =2||animelem=3||animelem=4||animelem=5
x = 12

[State 220, Swing Snd]
type=playsnd
trigger1=animelem=3
value=41,0
channel=4

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

[State 1000, End]
type=changestate
trigger1= !animtime
value=1410
;------------------------------------------------------------------
;Tsumagushi
[Statedef 1410]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=1
anim = 1410

[State 0, VarSet]
type = VarSet
trigger1 = PrevStateNo=1410
var(12)=0
ignorehitpause = 1
[State 0, HitOverride]
type = HitOverride
trigger1 = var(12)=1
attr = S,NP,SP
slot = 7
stateno = 1410
time = 1
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = PrevStateNo=1400&&!Time
x = IfElse(var(10)=0,3,IfElse(var(10)=1,5,7))
y = IfElse(var(10)=0,-4.5,IfElse(var(10)=1,-4.5,-5))

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y =.5

[State 1000, End]
type=changestate
trigger1= !animtime
value=1420
;------------------------------------------------------------------
;Tsumagushi
[Statedef 1420]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=1
anim = 1420

[State 0, VarSet]
type = VarSet
trigger1 = PrevStateNo=1420
var(12)=0
ignorehitpause = 1
[State 0, HitOverride]
type = HitOverride
trigger1 = var(12)=1
attr = S,NP,SP
slot = 7
stateno = 1420
time = 1
ignorehitpause = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y =.5

[State 1000, End]
type=changestate
trigger1= !animtime
value=1430
;------------------------------------------------------------------
;Tsumagushi
[Statedef 1430]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=1
anim = 1430

[State 0, VarSet]
type = VarSet
trigger1 = PrevStateNo=1430
var(12)=0
ignorehitpause = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = var(12)=1
attr = S,NP,SP
slot = 7
stateno = 1430
time = 1
ignorehitpause = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y =IfElse(var(10)=0,.9,IfElse(var(10)=1,.9,.9))

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1440
;------------------------------------------------------------------
;Tsumagushi-Slash
[Statedef 1440]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
anim = 1440+var(10)

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

[State 52, Snd]
type = playsnd
trigger1 = !time
value = S40,0

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

[State 52, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

[State 52, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8106
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,50
volume = 255
channel = 0

[State 1000, width]
type=width
trigger1= !Time
value=30,0

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State 1100, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal
name = "Flames"
ID = 1405
stateno = 1405
pos = 45,-20
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .5

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = !Time
attr=S,NA        
hitflag=MAF       
guardflag=M         
priority=4 ,Hit   
damage = floor(Ifelse(var(20),60,Ifelse(var(10)=3,60,Ifelse(var(10)=3,60,76+6*var(10))))*fvar(10)),10
ID = 200*!var(20)
getpower=20 * !var(20), 0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) := 8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
animType=Medium
air.animType=Back
fall.animType=Back
ground.type=High
air.type=Low
ground.slidetime=15 + 3*var(9)
ground.hittime=15 + 3*var(9)
guard.hittime=15
air.hittime=120
ground.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
guard.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
air.velocity=-3.24, -7.73
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.58
fall=0
fall.recover=1
fall.recoverTime=120
palFX.time = 25
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)

[State 1100, flames]
type = helper
trigger1 = movehit && numtarget && !numhelper(7180)
trigger1 = !(target, time) && (target, movetype = H)&&(enemynear,stateno=[5000,5050])
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1000, End]
type=changestate
trigger1= !animtime
value=0
ctrl = 1
;------------------------------------------------------------------
;EX-Tsumagushi
[Statedef 1425]
type=S
physics=S
movetype=A
anim = 1400
ctrl=0
velset=0,0
poweradd=-500
sprpriority=1
facep2=1

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

[State 1025, Custom Combo Juggle Reset]
type=VarSet
trigger1=!Time && var(20)
var(15)=0
ignoreHitPause=1

[State 1025, VarSet]
type=VarSet
trigger1 =!time
var(10)=3
ignorehitpause=1

[State 1025, VarSet]
type = VarSet
trigger1 =!time
var(12)=0

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

[State 220, Swing Snd]
type=playsnd
trigger1=animelem=3
value=41,0
channel=4

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

[State 1025, EX FX]
type=Explod
trigger1=!Time
anim=8210
sprPriority=3
posType=p1
pos=10, -67
scale=0.5, 0.5
pauseMoveTime=-1
superMoveTime=-1
ownPal=1

[State 1025, EX-SND]
type=PlaySnd
trigger1 =!time
value=0,1000
channel=3

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem =2||animelem=3||animelem=4||animelem=5
x = 12

[State 1000, End]
type=changestate
trigger1= !animtime
value=1435
;------------------------------------------------------------------
;EX-Tsumagushi
[Statedef 1435]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=1
anim = 1410

[State 0, VelSet]
type = VelSet
trigger1 = PrevStateNo=1425&&!Time
x = 11
y = -2.5

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y =.5

[State 1000, Auto Guard]
type = ReversalDef
trigger1 = AnimElem= 1
reversal.attr = SCA, NA, SA
pauseTime = 12,12
sparkNo = -1 + 0 * (var(33) := 8001)
sparkXY = -10 + 10 * (var(35) := 44), var(36):=-65
hitSound = s130, 0
numHits = 0

[State 1000, End]
type=changestate
trigger1= !animtime
value=1445
;------------------------------------------------------------------
;EX-Tsumagushi
[Statedef 1445]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=1
anim = 1420

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y =.5

[State 1000, Auto Guard]
type = ReversalDef
trigger1 = AnimElem= 1
reversal.attr = SCA, NA, SA
pauseTime = 12,12
sparkNo = -1 + 0 * (var(33) := 8001)
sparkXY = -10 + 10 * (var(35) := 44), var(36):=-65
hitSound = s130, 0
numHits = 0

[State 1000, End]
type=changestate
trigger1= !animtime
value=1455
;------------------------------------------------------------------
;EX-Tsumagushi
[Statedef 1455]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=1
anim = 1430

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y =.5

[State 1000, Auto Guard]
type = ReversalDef
trigger1 = AnimElem= 1
reversal.attr = SCA, NA, SA
pauseTime = 12,12
sparkNo = -1 + 0 * (var(33) := 8001)
sparkXY = -10 + 10 * (var(35) := 44), var(36):=-65
hitSound = s130, 0
numHits = 0

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1465
;------------------------------------------------------------------
;EX-Tsumagushi-Slash
[Statedef 1465]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
anim = 1445

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

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

[State 52, Snd]
type = playsnd
trigger1 = !time
value = S40,0

[State 52, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

[State 1000, Auto Guard]
type = ReversalDef
trigger1 = AnimElemTime(1)  >= 0 && AnimElemTime(1) < 0
reversal.attr = SCA, NA, SA
pauseTime = 12,12
sparkNo = -1 + 0 * (var(33) := 8001)
sparkXY = -10 + 10 * (var(35) := 44), var(36):=-65
hitSound = s130, 0
numHits = 0

[State 52, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8106
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S0,50
volume = 255
channel = 0

[State 1000, width]
type=width
trigger1= !Time
value=30,0

[State 1100, HitSound]
type=playsnd
trigger1=movehit && numtarget
trigger1=target, time=0 && target, movetype=H
value=2, 6
persistent=0
ignorehitpause=1

[State 1100, Helper]
type = Helper
trigger1 = AnimElem = 1
helpertype = normal
name = "Flames"
ID = 1405
stateno = 1405
pos = 45,-20
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = .5
size.yscale = .6

[State 210, Hit]
type=HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = Animelem = 2
attr=S,NA        
hitflag=MAF       
guardflag=M         
priority=4 ,Hit   
damage = 100,10
ID = 200*!var(20)
getpower=0
givepower=30, 30
pausetime =Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
guard.pausetime = Ifelse(var(20), 5, 10), Ifelse(var(20), 5, 10)
sparkNo=-1 + 0 * (var(33) := 8013)
guard.sparkNo=-1 + 0 * (var(34) :=8001)
sparkXY=-10 + 0 * (var(35) :=100), var(36) :=-78
guardsound=s130,1
animType=Hard
air.animType=Back
fall.animType=Back
ground.type=High
air.type=Low
ground.slidetime=15 + 3*var(9)
ground.hittime=18 
guard.hittime=15
air.hittime=18
ground.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
guard.velocity=ceil(Ifelse(var(55),-5,-7.51)*(ifelse(!var(20),1,.5)))
air.velocity=-3.24, -7.73
ground.cornerPush.velOff=0
guard.cornerPush.velOff=0
air.cornerPush.velOff=0
yaccel=.58
fall=0
fall.recover=1
fall.recoverTime=120
palFX.time = 55
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envshake.time=10
envshake.ampl=Ifelse(random<=500,-2,2)

[State 1100, flames]
type = helper
trigger1 = movehit && numtarget && !numhelper(7180)
trigger1 = !(target, time) && (target, movetype = H)&&(enemynear,stateno=[5000,5050])
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
ownpal = 1
facing = -1
ignorehitpause = 1
pauseMoveTime=255

[State 1000, End]
type=changestate
trigger1= !animtime
value=0
ctrl = 1
;------------------------------------------------------------------
;Kuzukaze
[Statedef 1500]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
poweradd=72 * !var(20)
sprpriority=1
facep2=1
anim = Ifelse(Var(11),11500,1500)

[State 1500, VarSet]
type = VarSet
trigger1 =1 
var(33)=0
ignorehitpause =1

[State 800, Hitdef]
type = HitDef
trigger1 = !var(16) && (var(15)<1 || var(20))
trigger1 = !Time
attr = S, ST
damage = 0,0
animtype = Heavy
guardflag =
hitflag = MAF
priority = 3,Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
hitsound=s800, 0
guardsound = S130,0
numhits = 0
ground.type = low
ground.slidetime = 1
ground.hittime = 1
ground.velocity = 0
air.velocity = 0
p1stateno = 1510
p1facing = 1
kill = 0
ID=800

[State 1000, End]
type=changestate
trigger1= !animtime
value=0
ctrl=1
;------------------------------------------------------------------
;Kuzukaze-Connection
[Statedef 1510]
type = S
movetype = A
physics = S
anim = Ifelse(Var(11),11510,1510)
ctrl = 0
velset = 0,0
sprpriority=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 12
value = S0,17
volume = 255
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 12
value = S1,2
volume = 255

[State 810, TargetState]
type = TargetState
trigger1 = !Time
value = 1520

[State 0, TargetBind]
type = TargetBind
trigger1 = AnimelemTime(1)=1
time = 1
pos = 20,0

[State 0, Turn]
type = Turn
trigger1 = AnimElemTime(18)>1

[State 810, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------------------
;Kuzukaze-P2 Connection
[Statedef 1520]
type = S
movetype = H
physics = S

[State 0, Turn]
type = Turn
trigger1 = !Time && facing = enemynear, facing
ignorehitpause = 1

[State 820, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
ignorehitpause=1

[State 820, SprPriority]
type = SprPriority
trigger1 = !Time
value = 0
ignorehitpause=1
[State 820, SprPriority]
type = SprPriority
trigger1 = Time=30
value = 2
ignorehitpause=1

[State 820, ChangeAnim]
type= ChangeAnim2
trigger1 = Anim !=1520+ Var(11)*10000
value = 1520+ Var(11)*10000
ignorehitpause=1

[State 820, CtrlSet]
type = CtrlSet
trigger1 = 1
value = 0

[State 1401, Turn]
type = Turn
trigger1 = AnimElem = 7

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 8
x = -32

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7
x = 8

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
trigger3 = AnimElem = 8
trigger4 = AnimElem = 11
x = 4

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 9
x = -4

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
x = -8

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 10
x = -12

[State 1402, VelSet]
type = VelSet
trigger1 = AnimElemTime(8) = 1
x = -12.921875

[State 1402, VelMul]
type = VelMul
trigger1 = AnimElemTime(8) > 0
x = 0.8515625

[State 0, SelfState]
type = SelfState
trigger1 = !AnimTime
value = 0
ctrl = 1

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