;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170, lose]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
Value = SCA
Time = 1

;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175, draw]
type = S
ctrl = 0
velset = 0,0

[State 175, 1] ; If no anim, use go to lose state.
type = ChangeState
trigger1 = Time = 0
trigger1 = !SelfAnimExist(175)
Value = 170

[State 175, 2]
type = ChangeAnim
trigger1 = Time = 0
Value = 175

[State 175, 3]
type = NotHitBy
trigger1 = 1
Value = SCA
Time = 1


;---------------------------------------------------------------------------
[Statedef 180, win]
type = S
ctrl = 0

[State 0, PlaySnd]
type = changestate
trigger1 = var(0) = 2
value = 182
[State 0, PlaySnd]
type = changestate
trigger1 = !time
value = 181

;---------------------------------------------------------------------------
[Statedef 181, win]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 100
flag = roundnotover

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

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeState]
type = ChangeState
trigger1 = enemynear, authorname = "Crazy Koopa" && p2name = "Blaziken"
trigger2 = enemynear, authorname = "Dshiznetz" && p2name = "Lucario"
trigger3 = enemynear, authorname = "Ðshiznetz" && p2name = "Gardevoir"
trigger4 = enemynear, authorname = "Haseo" && (p2name = "HLucario" || p2name = "HGardevoir" || p2name = "HSnorlax")
value = 192
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = !time
value = 191
ctrl = 0

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 191, intro]
type = S
ctrl = 0
anim = 190

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,2
volume = 100

[State 0, VarSet]
type = VarSet
trigger1 = command = "start"
v = 50    ;fv = 10
value = 1

[State 191, 1]
type = Changeanim
trigger1 = time = 50
Value = 191
[State 191, 1]
type = Changestate
trigger1 = time = 66
Value = 0
ctrl = 0

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 192, intro vs pokemons]
type = S
ctrl = 0
anim = 190

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 0, PowerAdd]
type = PowerAdd
trigger1 = power <= 1000
value = 13

[State 0, Explod]
type = Explod
trigger1 = time = 10
anim = 11120
ID = 11120
pos = 3,16
removetime = -2
scale = 0.5,0.5
sprpriority = 5
ownpal = 1
removeongethit = 1
[State 0, EnvShake]
type = EnvShake
trigger1 = time%2 && time = [10,138]
time = 5
freq = 120
ampl = -8
phase = 180

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = S4,1
volume = 100

[State 191, 1]
type = Changeanim
trigger1 = time = 138
Value = 191
[State 191, 1]
type = Changestate
trigger1 = time = 154
Value = 0
ctrl = 0

;---------------------------------------
[Statedef 800, stand parry]
type = S
physics = S
movetype = I
anim = 120
velset = 0,0
ctrl = 0
sprpriority = 2
poweradd = 78

[State 700, hb]
type = hitby
trigger1 = 1
value = SCA,AT
time = 1
[State 700, stop]
type=posfreeze
trigger1 = 1
value = 1

[State 700, pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15
pausebg = 0
[State 700, pause]
type=pause
trigger1 = !time && numenemy
trigger1 = (enemynear, movehit = 1)
time = ifelse((enemynear, hitpausetime = [0,15]), 15 - (enemynear, hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 700, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15
[State 700, snd]
type=playsnd
trigger1= !time && random <= 333
value=3,6
channel=2
[State 700, snd]
type=playsnd
trigger1= !time
value=0,700
[State 700, spark]
type=explod
trigger1= !time
anim=11200
ID=11200
sprpriority=5
postype=p1
pos=ceil((9*const(size.xscale))),-ceil((150*const(size.xscale)))
pausemovetime=60
ownpal=1
scale=.5,.5

[State 700, nowalk]
type=assertspecial
trigger1=1
flag=nowalk
[State 700, end]
type=changestate
trigger1= time = 20
value=0
ctrl=1


;---CROUCHING---
[Statedef 801, parry]
type=C
physics=C
movetype=I
anim=121
velset=0,0
ctrl=0
sprpriority=2
poweradd=78

[State 701, hb]
type=hitby
trigger1=1
value=SCA,AT
time=1
[State 701, stop]
type=posfreeze
trigger1=1
value=1

[State 701, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0
[State 701, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 701, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15

[State 701, snd]
type=playsnd
trigger1= !time
value=3,6
channel=2
[State 701, snd]
type=playsnd
trigger1= !time
value=0,700

[State 701, spark]
type=explod
trigger1= !time
anim=11200
ID=11200
sprpriority=5
postype=p1
pos=ceil((43*const(size.xscale))),-ceil((102*const(size.xscale)))
pausemovetime=60
ownpal=1
scale=.5,.5

[State 701, nowalk]
type=assertspecial
trigger1=1
flag=nowalk
[State 701, end]
type=changestate
trigger1= time = 20
value=11
ctrl=1


;---AERIAL---
[Statedef 802, parry]
type=A
physics=A
movetype=I
anim=122
ctrl=0
sprpriority=2
poweradd=78

[State 702, hb]
type=hitby
trigger1=time<15
value=SCA,AT
time=1

[State 702, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0
[State 702, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 702, sts]
type=statetypeset
trigger1= time<15
physics=N
[State 702, stop]
type=posfreeze
trigger1= time<15
value=1

[State 702, vel]
type=velset
trigger1= time=15
x=ifelse(vel x>2,2,ifelse(vel x<-2,-2,vel x))
y=ifelse(vel y<-2,vel y,-2)
[State 702, sts]
type=statetypeset
trigger1= time>=15
physics=A
[State 702, ctrl]
type=ctrlset
trigger1= time>=15
value=1

[State 702, blueflash]
type=palfx
trigger1= !time
add=0,64,255
sinadd=0,-64,-255,60
time=15

[State 702, snd]
type=playsnd
trigger1= !time
value=3,6
channel=2
[State 702, snd]
type=playsnd
trigger1= !time
value=0,700

[State 701, spark]
type=explod
trigger1= !time
anim=11200
ID=11200
sprpriority=5
postype=p1
pos=ceil((25*const(size.xscale))),-ceil((155*const(size.xscale)))
pausemovetime=60
ownpal=1
scale=.5,.5

;---------------------------------------------------------------------------
[Statedef 850, taunt]
type = S
ctrl = 1
anim = 850
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,2
volume = 100

[State 200, end]
type = ChangeState
trigger1 = time = 80
value = 851
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 851, taunt]
type = S
ctrl = 1
anim = 851
velset = 0,0

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

;---------------------------------------------------------------------------
[Statedef 900, charge start]
type = S
movetype = I
physics = S
juggle = 3
velset = 0,0
ctrl = 0
anim = 900
poweradd = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,3
volume = 200

[State 0, EnvShake]
type = EnvShake
trigger1 = time >= 9 && time%2
time = 2
freq = 60
ampl = -4
phase = 90
[State 0, Explod]
type = Explod
trigger1 = time = 9
anim = 11100
ID = 11100
bindtime = -1
removetime = -1
removeongethit = 1
[State 0, Helper]
type = Helper
trigger1 = time = 9
helpertype = normal ;player
name = "chakra"
ID = 901
stateno = 901
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time >= 9 && time%2
value = 4+time/4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S4,1
volume = 100
channel = 1

[State 191, 1]
type = ChangeState
trigger1 = (command != "holda" || command!= "holdb") && var(50)=0 && var(21) = 0
trigger2 = command != "holdx" && var(50) = 0 && var(21) = 1
trigger3 = power >= 3000
trigger4 = var(50) && p2bodydist x <= 100
trigger5 = var(50) && p2movetype = A
Value = 902

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 901, charge helper]
type = S
ctrl = 0
anim = 11110
sprpriority = 4

[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,0

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(2) = 0.1
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(2) = 0.04
[State 0, VarSet]
type = VarSet
trigger1 = fvar(2) >= 1.2
fvar(2) = 1.2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,fvar(2)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = root, stateno != 900

;---------------------------------------------------------------------------
[Statedef 902, charge end]
type = S
movetype= I
physics = S
juggle  = 3
velset = 0,0
ctrl = 1
anim = 0

[State 0, PlaySnd]
type = stopSnd
trigger1 = !time
channel = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 11100
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11101
ID = 11101
removetime = -2

[State 191, 1]
type = ChangeState
trigger1 = time = 11
Value = 0
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 950, dodge]
type = S
movetype = I
physics = S
juggle = 3
velset = 0,0
ctrl = 0
anim = 0
poweradd = 0
sprpriority = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "afterimage"
ID = 951
stateno = 951
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "afterimage"
ID = 952
stateno = 952
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 191, 1]
type = ChangeState
trigger1 = time = 20
Value = 0
ctrl = 1

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 10060, normal guard]
type = S
ctrl = 0
anim = 10060
sprpriority = 4

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = !animtime

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 10061, special/super guard]
type = S
ctrl = 0
anim = 10070
sprpriority = 4

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = !animtime

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 10080, normal hit]
type = S
ctrl = 0
anim = 10080
sprpriority = 4

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 0
range = 0,360

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = var(0)
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = !animtime

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 10081, special hit]
type = S
ctrl = 0
anim = 10081
sprpriority = 4

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 0
range = 0,360

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = var(0)
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = !animtime

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 10082, super hit]
type = S
ctrl = 0
anim = 10082
sprpriority = 4

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 0
range = 0,360

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = var(0)
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = !animtime

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 10090, normal slash]
type = S
ctrl = 0
anim = 10090
sprpriority = 4

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 0
range = 0,360

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = var(0)
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = !animtime

;------------------------------------------------------------------------
[StateDef 11600, ko fx]
type = S
movetype= I
physics = N
juggle  = 1
anim = 0
poweradd = 0
sprpriority = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = 9999
y = 9999
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11600
ID = 11600
pos = 160,120
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(6) = 1

[State 200, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,10001
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow
[State 200, end]
type = destroyself
trigger1 = Time = 50

;---RED---
[Statedef 11700, fire]
physics=N
velset=0,0
anim=11700
sprpriority=4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2,2
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 7180, assert]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1
[State 7180, flames]
type=explod
trigger1= 1
anim=11700
ID=11700
sprpriority=3
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))
random=40,60
removetime=-2
scale=0.5,0.5
ownpal=1
[State 7180, flames]
type=explod
trigger1= 1
anim=11700
ID=11700
sprpriority=3
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))
random=40,60
removetime=-2
scale=0.5,0.5
ownpal=1
[State 7180, pos]
type=posadd
trigger1= 1
x=ceil(p2dist x)
y=ceil(p2dist y)-30
[State 7180, end]
type=destroyself
trigger1= enemynear,ctrl || (enemynear,movetype!=H) || (enemynear,statetype=L)

;------------------------------------------------------------------------
[StateDef 14000, super portrait]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 14000
poweradd = 0
sprpriority = 1

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 249-ceil(screenpos Y)
[State 0, PosSet]
type = Posadd
trigger1 = !time
x = -140

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 0, VelSet]
type = VelSet
trigger1 = time < 15
x = 6
[State 0, VelSet]
type = VelSet
trigger1 = time > 30
x = 9

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarSet]
type = Varadd
trigger1 = time%2 && time >= 30
fvar(1) = 0.14

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time < 30
scale = 1,1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = time >= 30
scale = fvar(1),fvar(1)
[State 0, Trans]
type = Trans
trigger1 = time >= 30
trans = add1
alpha = ceil(256-fvar(1)*50)

[State 200, end]
type = destroyself
trigger1 = time = 50

;------------------------------------------------------------------------
[StateDef 15001, super fx lvl 1]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 15001
poweradd = 0
sprpriority = 4

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 8500, Lines]
type=explod
trigger1= time=0 || time=8 || time=16 || time=24
anim=15004
ID=ifelse(time=24, 4, ifelse(time=16, 3, ifelse(time=8, 2, 1)))
sprpriority=5
postype=p1
facing=ifelse(random<500,-1,1)
vfacing=ifelse(random<500,-1,1)
removetime=16
supermovetime=-1

[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(1)
ID=1
scale= 1-(.0625*time), 1-(.0625*time)
trans= addalpha
alpha= ifelse(time<4, 64*time, 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(2)
ID=2
scale= 1-(.0625*(time-8)), 1-(.0625*(time-8))
trans= addalpha
alpha= ifelse((time-8)<4, 64*(time-8), 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(3)
ID=3
scale= 1-(.0625*(time-16)), 1-(.0625*(time-16))
trans= addalpha
alpha= ifelse((time-16)<4, 64*(time-16), 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(4)
ID=4
scale= 1-(.0625*(time-24)), 1-(.0625*(time-24))
trans= addalpha
alpha= ifelse((time-24)<4, 64*(time-24), 256), 256

[State 0, Helper]
type = null;Helper
trigger1 = time=0 || time=8 || time=16 || time=24
helpertype = normal ;player
name = "fire"
ID = 15004
stateno = 15004
pos = 0,0
ownpal = 1
facing=ifelse(random<500,-1,1)
vfacing=ifelse(random<500,-1,1)
supermovetime = 999
pausemovetime = 999

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarSet]
type = Varadd
trigger1 = 1
fvar(1) = -0.017
[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = -6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)

[State 8500, circle]
type=explod
trigger1= !time
anim=15002
ID=15002
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(15002)
ID=15002
scale=.25+(.075*time),.25+(.075*time)
trans=addalpha
alpha=ceil(256-6.4*time),256

[State 8500, circle]
type=explod
trigger1= time=4
anim=15003
ID=150031
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=8
anim=15003
ID=150032
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=12
anim=15003
ID=150033
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=16
anim=15003
ID=150034
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=20
anim=15003
ID=150035
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=24
anim=15003
ID=150036
sprpriority=5
postype=p1
supermovetime=-1

[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150031)
ID=150031
scale=.25+((time-4)*.0313),.25+((time-4)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150032)
ID=150032
scale=.25+((time-8)*.0313),.25+((time-8)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150033)
ID=150033
scale=.25+((time-12)*.0313),.25+((time-12)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150034)
ID=150034
scale=.25+((time-16)*.0313),.25+((time-16)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150035)
ID=150035
scale=.25+((time-20)*.0313),.25+((time-20)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150036)
ID=150036
scale=.25+((time-24)*.0313),.25+((time-24)*.0313)

[State 200, end]
type = destroyself
trigger1 = time = 50;fvar(1) <= 0

;------------------------------------------------------------------------
[StateDef 15002, super fx lvl 2]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 15011
poweradd = 0
sprpriority = 4

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 8500, Lines]
type=explod
trigger1= time=0 || time=8 || time=16 || time=24
anim=15014
ID=ifelse(time=24, 4, ifelse(time=16, 3, ifelse(time=8, 2, 1)))
sprpriority=5
postype=p1
facing=ifelse(random<500,-1,1)
vfacing=ifelse(random<500,-1,1)
removetime=16
supermovetime=-1

[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(1)
ID=1
scale= 1-(.0625*time), 1-(.0625*time)
trans= addalpha
alpha= ifelse(time<4, 64*time, 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(2)
ID=2
scale= 1-(.0625*(time-8)), 1-(.0625*(time-8))
trans= addalpha
alpha= ifelse((time-8)<4, 64*(time-8), 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(3)
ID=3
scale= 1-(.0625*(time-16)), 1-(.0625*(time-16))
trans= addalpha
alpha= ifelse((time-16)<4, 64*(time-16), 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(4)
ID=4
scale= 1-(.0625*(time-24)), 1-(.0625*(time-24))
trans= addalpha
alpha= ifelse((time-24)<4, 64*(time-24), 256), 256

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarSet]
type = Varadd
trigger1 = 1
fvar(1) = -0.017
[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = -6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)

[State 8500, circle]
type=explod
trigger1= !time
anim=15012
ID=15012
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(15012)
ID=15012
scale=.25+(.075*time),.25+(.075*time)
trans=addalpha
alpha=ceil(256-6.4*time),256

[State 8500, circle]
type=explod
trigger1= time=4
anim=15013
ID=150131
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=8
anim=15013
ID=150132
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=12
anim=15013
ID=150133
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=16
anim=15013
ID=150134
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=20
anim=15013
ID=150135
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=24
anim=15013
ID=150136
sprpriority=5
postype=p1
supermovetime=-1

[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150131)
ID=150131
scale=.25+((time-4)*.0313),.25+((time-4)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150132)
ID=150132
scale=.25+((time-8)*.0313),.25+((time-8)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150133)
ID=150133
scale=.25+((time-12)*.0313),.25+((time-12)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150134)
ID=150134
scale=.25+((time-16)*.0313),.25+((time-16)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150135)
ID=150135
scale=.25+((time-20)*.0313),.25+((time-20)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150136)
ID=150136
scale=.25+((time-24)*.0313),.25+((time-24)*.0313)

[State 200, end]
type = destroyself
trigger1 = time = 50

;------------------------------------------------------------------------
[StateDef 15003, super fx lvl 3]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 15021
poweradd = 0
sprpriority = 4

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 8500, Lines]
type=explod
trigger1= time=0 || time=8 || time=16 || time=24
anim=15024
ID=ifelse(time=24, 4, ifelse(time=16, 3, ifelse(time=8, 2, 1)))
sprpriority=5
postype=p1
facing=ifelse(random<500,-1,1)
vfacing=ifelse(random<500,-1,1)
removetime=16
supermovetime=-1

[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(1)
ID=1
scale= 1-(.0625*time), 1-(.0625*time)
trans= addalpha
alpha= ifelse(time<4, 64*time, 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(2)
ID=2
scale= 1-(.0625*(time-8)), 1-(.0625*(time-8))
trans= addalpha
alpha= ifelse((time-8)<4, 64*(time-8), 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(3)
ID=3
scale= 1-(.0625*(time-16)), 1-(.0625*(time-16))
trans= addalpha
alpha= ifelse((time-16)<4, 64*(time-16), 256), 256
[State 8500, Scale]
type=modifyexplod
trigger1= numexplod(4)
ID=4
scale= 1-(.0625*(time-24)), 1-(.0625*(time-24))
trans= addalpha
alpha= ifelse((time-24)<4, 64*(time-24), 256), 256

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarSet]
type = Varadd
trigger1 = 1
fvar(1) = -0.017
[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = -6
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)

[State 8500, circle]
type=explod
trigger1= !time
anim=15022
ID=15022
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(15022)
ID=15022
scale=.25+(.075*time),.25+(.075*time)
trans=addalpha
alpha=ceil(256-6.4*time),256

[State 8500, circle]
type=explod
trigger1= time=4
anim=15023
ID=150231
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=8
anim=15023
ID=150232
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=12
anim=15023
ID=150233
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=16
anim=15023
ID=150234
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=20
anim=15023
ID=150235
sprpriority=5
postype=p1
supermovetime=-1
[State 8500, circle]
type=explod
trigger1= time=24
anim=15023
ID=150236
sprpriority=5
postype=p1
supermovetime=-1

[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150231)
ID=150231
scale=.25+((time-4)*.0313),.25+((time-4)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150232)
ID=150232
scale=.25+((time-8)*.0313),.25+((time-8)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150233)
ID=150233
scale=.25+((time-12)*.0313),.25+((time-12)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150234)
ID=150234
scale=.25+((time-16)*.0313),.25+((time-16)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150235)
ID=150235
scale=.25+((time-20)*.0313),.25+((time-20)*.0313)
[State 8500, scale]
type=modifyexplod
trigger1= numexplod(150236)
ID=150236
scale=.25+((time-24)*.0313),.25+((time-24)*.0313)

[State 200, end]
type = destroyself
trigger1 = time = 50;fvar(1) <= 0

;------------------------------------------------------------------
[statedef -2]

[State 0, ko snd]
type = PlaySnd
trigger1 = !alive && var(1)=0
trigger1 = var(1) := 1
value = S11,0
volume = 100
channel = 0
ignorehitpause = 1
persistent = 10

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno != 900
channel = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "attackmul = %f, p2bodydist x = %f, p2bodydist y = %f, AI = %d"
params = fvar(12), p2bodydist x, p2bodydist y, var(50)

[State -2, Hit Detection]
type=varset
trigger1= movecontact!=1
var(30)=2
ignorehitpause=1

[State 0, normal hit spark]
type = Helper
triggerall = movehit && numenemy && var(30) = 1
trigger1 = var(13) = 10080
helpertype = normal ;player
name = "slash spark"
ID = 10080
stateno = 10080
pos = var(14),var(15)
ownpal = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999
[State 0, special hit spark]
type = Helper
triggerall = movehit && numenemy && var(30) = 1
trigger1 = var(13) = 10081
helpertype = normal ;player
name = "slash spark"
ID = 10081
stateno = 10081
pos = var(14),var(15)
ownpal = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999
[State 0, super hit spark]
type = Helper
triggerall = movehit && numenemy && var(30) = 1
trigger1 = var(13) = 10082
helpertype = normal ;player
name = "slash spark"
ID = 10082
stateno = 10082
pos = var(14),var(15)
ownpal = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999
[State 0, normal slash spark]
type = Helper
triggerall = movehit && numenemy && var(30) = 1
trigger1 = var(13) = 10090
helpertype = normal ;player
name = "slash spark"
ID = 10090
stateno = 10090
pos = var(14),var(15)
ownpal = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999
[State 0, guard spark]
type = Helper
triggerall = moveguarded && numenemy && var(30) = 1
trigger1 = var(13) = 10090 || var(13) = 10080
helpertype = normal ;player
name = "slash spark"
ID = 10060
stateno = 10060
pos = var(14),var(15)
ownpal = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999
[State 0, guard spark]
type = Helper
triggerall = moveguarded && numenemy && var(30) = 1
trigger1 = var(13) = 10081 || var(13) = 10082
helpertype = normal ;player
name = "slash spark"
ID = 10061
stateno = 10061
pos = var(14),var(15)
ownpal = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State -2, Hit Detection]
type=varadd
trigger1= var(30)>0
var(30)=-1
ignorehitpause=1

[State 0, ko fx]
type = Helper
triggerall = winko
triggerall = numhelper(11600) = 0 && var(6) = 0
trigger1 = stateno = 1012 && movecontact
trigger1 = var(6) := 1
trigger2 = stateno = 1210 && movecontact
trigger2 = var(6) := 1
trigger3 = numhelper(1111)
trigger3 = helper(1111), var(3)
trigger3 = var(6) := 1
trigger4 = stateno = 1610 && movecontact
trigger4 = var(6) := 1
trigger5 = stateno = 2010 && movecontact
trigger5 = var(6) := 1
trigger6 = stateno = 2110 && movecontact
trigger6 = var(6) := 1
helpertype = normal ;player
name = "ko fx"
ID = 11600
stateno = 11600
pos = 0,0
ownpal = 1
ignorehitpause = 1

[State 0, air dash counter reset]
type = Varset
trigger1 = statetype != A
var(7) = 0

;----|Damage Dampener|----
[State -2, attackvarbyhits]
type=varset
trigger1= numenemy
fvar(10)= ifelse(enemynear,gethitvar(hitcount)<3, 24, ifelse(enemynear,gethitvar(hitcount)>=24, 2, 26-enemynear,gethitvar(hitcount)))/24.0
ignorehitpause=1
[State -2, attackvarbyhits]
type=varset
trigger1= numenemy && var(20)
fvar(10)= .72 * (10-ifelse(enemynear,gethitvar(hitcount)>=8, 8, enemynear,gethitvar(hitcount))) / 10.0
ignorehitpause=1
[State -2, attackvarbyhitsreset]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
fvar(10)= ifelse(var(20), .72, 1)
ignorehitpause=1
[State -2, attackvarbypower]
type=varset
trigger1= 1
fvar(11)= ifelse(var(20), 0, ifelse(power>=3000, .05, ifelse(power>=2000, .02, ifelse(power>=1000, .01, 0))))
ignorehitpause=1

[State -2, dampener var]
type=varset
trigger1=numenemy
fvar(12)= fvar(10) + fvar(11) + (fvar(13)*!var(20)) + (var(29)*.2)
ignorehitpause=1
[State -2, dampener]
type=attackmulset
trigger1= 1
value=fvar(12) + .6*(var(37)>0)
ignorehitpause=1

[State -2, attackincreasereset]
type=varset
triggerall= var(37)
trigger1= movecontact || movereversed
trigger2= (stateno=[801,849]) || (stateno=[851,899]) || (stateno=[1320,1339])
trigger3= stateno=4001 || stateno=4100
var(37)=0
ignorehitpause=1



;-------------- Generated by Fighter Factory -------------

;--------------------- Variable List ----------------------

; Var(0) - StateDef 10080, normal hit, 10081, special hit, 10082, super hit, 10090, normal slash
; Var(1) - StateDef 1111, -2
; Var(2) - StateDef 1200, blaze kick
; Var(3) - StateDef 1101, 1111
; Var(6) - StateDef 11600, ko fx, -2
; Var(7) - StateDef -2
; Var(8) - StateDef -3
; Var(12) - StateDef 10060, normal guard, 10061, special/super guard
; Var(13) - StateDef 200, a, 210, b, 220, c, 230, back b, 400, a, 410, b, 420, c, 600, a, 610, b, 620, c, 1000, fire punch, 1101, 1200, blaze kick, 1300, sky uppercut, 1400, quick attack, 2000, blaze kick, 1012, 1111, 1210, tornado blaze kick, 1610, overheat, 2010, dragon blaze kick, 2110, tornado blaze kick
; Var(14) - StateDef 200, a, 210, b, 220, c, 230, back b, 400, a, 410, b, 420, c, 600, a, 610, b, 620, c, 1000, fire punch, 1001, 1101, 1200, blaze kick, 1300, sky uppercut, 1400, quick attack, 2000, blaze kick, 1012, 1111, 1210, tornado blaze kick, 1610, overheat, 2010, dragon blaze kick, 2110, tornado blaze kick
; Var(20) - StateDef -3
; Var(30) - StateDef 1101, -2
; Var(37) - StateDef -2
; Var(50) - StateDef 191, intro

;--------------------- Float Variable List ----------------------

; fVar(1) - StateDef 1611, 14000, super portrait, 15001, super fx lvl 1, 15002, super fx lvl 2, 15003, super fx lvl 3
; fVar(2) - StateDef 901, charge helper
; fVar(10) - StateDef -2
; fVar(11) - StateDef -2
; fVar(12) - StateDef -2
