;================================
; CNS File for SHIN SATAN by Balthazar and Jango and Cybaster
; Super moves
;================================

;===========================================================================
; <<<<< HYPE MODE (ripped off from Gohan)>>>>>
; Hype Activation = 2800
;===========================================================================
[Statedef 2800]
type = S
movetype = I
physics = S
anim = 2800
ctrl = 0
velset = 0,0
sprpriority = 5


[State 0, Explod]
type = Explod
trigger1 = animelemtime(7) = 1
anim = 2875
ID = 2875
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 9999999
supermovetime = 9999999
scale = 1,1
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


[State -2, Helper]
type = Helper
triggerall = enemynear, name!="Shin Satan Z2"
trigger1 = numhelper(2850) = 0
id = 2850
name = "Crowd"
pos = 200,160
postype = left    ;p2,front,back,left,right
stateno = 2850
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 9999999999999999999999999
supermovetime = 9999999999999999999999999

[State -2, Helper]
type = Helper
triggerall = p2name="Shin Satan Z2"
triggerall = numhelper(2850) = 0
trigger1 = teamside = 1
id = 2850
name = "EX Gauge"
pos = -80,160
postype = left    ;p2,front,back,left,right
stateno = 2850
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 9999999999999999999999999
supermovetime = 9999999999999999999999999


[State -2, Helper]
type = Helper
triggerall = p2name="Shin Satan Z2"
triggerall = numhelper(2850) = 0
trigger1 = teamside = 2
id = 2850
name = "EX Gauge"
pos = -80,160
postype = left    ;p2,front,back,left,right
stateno = 2850
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 9999999999999999999999999
supermovetime = 9999999999999999999999999



[State 0, VarAdd]
type = VarAdd
trigger1 = !time
v = 58
value = 10
;ignorehitpause = 
;persistent = 

[State 200, BGPalFX]
type = BGPalFX
trigger1 = animelemtime(1)=0
time = 185
add	= -100,-100,-100
mul	= 100,100,256
invertall = 0
color = 256

[State 3000, superpause]
type = superpause
trigger1 = animelemtime(1)=0
time = 185
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 185
poweradd = -2000

[State 3000, nhb]
type = nothitby
trigger1 = animelemtime(1)>=0 && time<=189
time = 1
value = SCA

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = !time
value = 2800,0
loop = 0
pan = 1
volume = 255
channel = 0

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = animelemtime(8) = 0
value = 716,50
loop = 0
pan = 1
volume = 122
channel = -1

[State 4500, 2];long sound
type = PlaySnd
trigger1 = animelemtime(1)=0
value = 8,0
loop = 1
pan = 1
volume = 25
channel = 3
[State 4500, 2];long sound
type = PlaySnd
trigger1 = time=1
value = 8,0
loop = 1
pan = 1
volume = 25
channel = 3

[State 4500, 1];Small sound
type = PlaySnd
trigger1 = animelemtime(1)=0
value = 8,1
volume = 255

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 1
ID = 2800
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = -1

[State 901, Changestate]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;Hype Taunt Picker
;---------------------------------------------------------------------------
[Statedef 2801]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 2802+floor(3*random/1000.0)

;HYPE V.1
;===========================================================================
[Statedef 2802]
type = S
movetype = I
physics = S
anim = 2801
ctrl = 0
velset = 0,0
sprpriority = 1

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = animelemtime(5) = 0
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, VarAdd]
type = VarAdd
triggerall = var(58) <= 234
trigger1 = time%2 = 1
v =  58
value = 1
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = ifelse((command="hold_s"),2803+random%2,0)
ctrl = ifelse((command="hold_s"),0,1)
;anim =
;ignorehitpause = 
;persistent = 

;HYPE V.2
;===========================================================================
[Statedef 2803]
type = S
movetype = I
physics = S
anim = 2802
ctrl = 0
velset = 0,0
sprpriority = 1

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = animelemtime(5) = 0
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, VarAdd]
type = VarAdd
triggerall = var(58) <= 234
trigger1 = time%2 = 1
v =  58
value = 1
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 0,1
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 2800,2
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = ifelse((command="hold_s"),2801,0)
ctrl = ifelse((command="hold_s"),0,1)
;anim =
;ignorehitpause = 
;persistent = 

;HYPE V.2
;===========================================================================
[Statedef 2804]
type = S
movetype = I
physics = S
anim = 2803
ctrl = 0
velset = 0,0
sprpriority = 1

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = animelemtime(5) = 0
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, VarAdd]
type = VarAdd
triggerall = var(58) <= 234
trigger1 = time%2 = 1
v =  58
value = 1
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 0,1
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 2800,2
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = ifelse((command="hold_s"),2801,0)
ctrl = ifelse((command="hold_s"),0,1)
;anim =
;ignorehitpause = 
;persistent = 

;--------------------------------------------------------------------------
;I GOT A PRESENT FOR YOU Lv. 1
[Statedef 3000]
type = S
movetype = A
physics = N
juggle = 15
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 3000

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

[State 0, Explod]
type = Explod
triggerall = var(58) <= 78
trigger1 = !time
anim = 15999
ID = 3010
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 0, Explod]
type = Explod
triggerall = var(58) >= 79 && var(58) <= 156
trigger1 = !time
anim = 15999
ID = 3020
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 0, Explod]
type = Explod
triggerall = var(58) >= 157 && var(58) <= 233
trigger1 = !time
anim = 15999
ID = 3030
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 0, Explod]
type = Explod
triggerall = var(58) >= 234
trigger1 = !time
anim = 15999
ID = 3040
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = !time && var(58)>=1
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = 4


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3000,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(4) <= 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 1
;ignorehitpause = 
persistent = 1


[State 3000, superpause]
type = superpause
trigger1 = !time
time = 40
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 40
poweradd = ifelse((var(58)>=79),-2000,-3000)

[State 0, Super FX]
type = Explod
trigger1 = !time
anim = 2003
id = 2003
pos = -100,40   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S,HT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = M        ;HLAFD+-
guardflag =          ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 0,0
pausetime = 0 ,0
sparkno = S7030
guard.sparkno = s7000
sparkxy = 0,-50
hitsound = S1,0
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 0
ground.hittime = 0
air.hittime = 20
ground.velocity = 0,0
air.velocity = 0,0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
id = 0
chainID = -1
nochainID = -1
hitonce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 0,0

[State -3, Landing Sound]
type = PlaySnd
trigger1 = animelemtime(10) = 1
trigger2 = animelemtime(14) = 1
trigger3 = animelemtime(18) = 1
trigger4 = animelemtime(22) = 1
value = 40, 0


[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(7) = 1
x = 2
ignorehitpause = 1
;persistent = 


[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 40
color=0
mul=0,0,0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3010) = 1;
trigger1 = movehit
value = 3010
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3020) = 1;var(58) >= 79 && var(58) <= 156
trigger1 = movehit
value = 3020
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3030) = 1;var(58) >= 157 && var(58) <= 233
trigger1 = movehit
value = 3030
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3040) = 1;var(58) = 234
trigger1 = movehit
value = 3040
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = time = 3
var(58) = 0
ignorehitpause = 1
persistent = 1


[State 0, Failure]
type = changestate
trigger1 = animtime = 0
value = 3045
ctrl = 0
ignorehitpause = 1
persistent = 0
;--------------------------------------------------------------------------
;I GOT A PRESENT FOR YOU Lv. 1
[Statedef 3001]
type = S
movetype = A
physics = N
juggle = 15
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 3000

[State 0, Explod]
type = Explod
triggerall = var(58) <= 78
trigger1 = !time
anim = 15999
ID = 3010
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 0, Explod]
type = Explod
triggerall = var(58) >= 79 && var(58) <= 156
trigger1 = !time
anim = 15999
ID = 3020
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 0, Explod]
type = Explod
triggerall = var(58) >= 157 && var(58) <= 233
trigger1 = !time
anim = 15999
ID = 3030
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 0, Explod]
type = Explod
triggerall = var(58) >= 234
trigger1 = !time
anim = 15999
ID = 3040
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 999999999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
trigger1 = !time && var(58)>=1
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = 4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3000,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(4) <= 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 1
;ignorehitpause = 
persistent = 1


[State 3000, superpause]
type = superpause
trigger1 = !time
time = 40
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 40
poweradd = ifelse((var(58)>=79),-2000,-3000)

[State 0, Super FX]
type = Explod
trigger1 = !time
anim = 2003
id = 2003
pos = -100,40   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S,HT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = M        ;HLAFD+-
guardflag =          ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 0,0
pausetime = 0 ,0
sparkno = S7030
guard.sparkno = s7000
sparkxy = 0,-50
hitsound = S1,0
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 0
ground.hittime = 0
air.hittime = 20
ground.velocity = 0,0
air.velocity = 0,0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
id = 0
chainID = -1
nochainID = -1
hitonce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 0,0

[State -3, Landing Sound]
type = PlaySnd
trigger1 = animelemtime(10) = 1
trigger2 = animelemtime(14) = 1
trigger3 = animelemtime(18) = 1
trigger4 = animelemtime(22) = 1
value = 40, 0


[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(7) = 1
x = 1.5
ignorehitpause = 1
;persistent = 


[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 40
color=0
mul=0,0,0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3010) = 1;
trigger1 = movehit
value = 3010
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3020) = 1;var(58) >= 79 && var(58) <= 156
trigger1 = movehit
value = 3020
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3030) = 1;var(58) >= 157 && var(58) <= 233
trigger1 = movehit
value = 3030
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, Failure]
type = ChangeState
triggerall = NumExplod(3040) = 1;var(58) = 234
trigger1 = movehit
value = 3040
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = time = 3
var(58) = 0
;ignorehitpause = 
;persistent = 

[State 0, Failure]
type = changestate
trigger1 = animtime = 0
value = 3045
ctrl = 0
ignorehitpause = 1
persistent = 0
;-----------------------------------------------------------------------------
[Statedef 3010]
type = S
movetype = A
physics = N
anim = 3010
ctrl = 0
velset = 0,0
facep2 = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3010

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 58
value = 0 

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3015
ID = 3015
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = ifelse(facing=1,1,-1)
vfacing = 1
bindtime = -1
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 0
ignorehitpause = 1
persistent = 0


[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = !time
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 207
value = 3010,0
volumescale = 255
channel = -1
loop = 0
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 237
value = 2511,0
volumescale = 255
channel = -1
loop = 0
persistent = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 180
flag = timerfreeze
flag2 = nobardisplay

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 149
time = 1
color=0
mul=0,0,0

[State 0, Turn]
type = Turn
trigger1 = facing = -1 && animelem = 2


[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = !time
value = 3050
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 2310,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 2
x = -100
y = 0
;ignorehitpause = 
;persistent = 

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2) = 1
anim = 3075
ID = 3075
pos = 30,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
shadow = -1
ownpal = 0
removeongethit = 0
ignorehitpause = 1
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, HitAdd]
type = HitAdd
trigger1 = animelemtime(3) = 1
value = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 

;Dynamite Finisher
;-----------------------------------------------------------------------------
[Statedef 3020]
type = S
movetype = A
physics = N
anim = 3020
ctrl = 0
velset = 0,0
facep2 = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3020

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 2850

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 58
value = 0 

[State 0, HitAdd]
type = HitAdd
trigger1 = animelemtime(8) = 1
value = 1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = !time
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 190
;ignorehitpause = 
;persistent = 


[state 3250, speedlines1 WIN]
type = explod
trigger1 = numexplod(2923)<6
trigger1 = animelemtime(11) = 1
anim = 2923
ID = 2923
postype = back
pos = 0,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1

scale = 0.5,0.5
[state 3250, speedlines2 WIN]
type = explod
trigger1 = animelemtime(11) = 1 && time%16 = 1
anim = 2923
ID = 2923
postype = back
pos = 149,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 1
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = 3020,2
volumescale = 255
channel = -1
loop = 0
ignorehitpause = 1
persistent = 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 3020,3
volumescale = 255
channel = -1
loop = 0
persistent = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 258
flag = timerfreeze
flag2 = nobardisplay

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 149
time = 1
color=0
mul=0,0,0

[State 0, Turn]
type = Turn
trigger1 = facing = -1 && animelem = 2


[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = !time
value = 3052
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3020,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 3020,1
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 2
x = -100
y = 0
;ignorehitpause = 
;persistent = 

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2) = 1
anim = 3025
ID = 3025
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
shadow = -1
ownpal = 0
removeongethit = 0
ignorehitpause = 1
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2) = 1
anim = 3076
ID = 3076
pos = 30,0
postype = p2  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
shadow = -1
ownpal = 0
removeongethit = 0
ignorehitpause = 1
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, Helper]
type = Helper
trigger1 = animelemtime(8)=1
helpertype = normal ;player
name = "Dust Overlay"
ID = 777716
stateno = 777719
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 

;-----------------------------------------------------------------------------
;Tank Finisher
[Statedef 3030]
type = S
movetype = A
physics = N
anim = 3030
ctrl = 0
velset = 0,0
facep2 = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3030

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 2850

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = !time
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1



[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 190
;ignorehitpause = 
;persistent = 

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


[state 3250, speedlines1 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = animelemtime(11) >= 1 && animelemtime(11) <= 120
anim = 2923
ID = 2923
postype = back
pos = 0,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5
[state 3250, speedlines2 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = animelemtime(11) >= 1 && animelemtime(11) <= 120
anim = 2923
ID = 2923
postype = back
pos = 149,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5
[state 3250, speedlines3 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = animelemtime(11) >= 1 && animelemtime(11) <= 120
anim = 2923
ID = 2923
postype = back
pos = 298,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5
[state 3250, speedlines4 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = animelemtime(11) >= 1 && animelemtime(11) <= 120
anim = 2923
ID = 2923
postype = back
pos = 0,120
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5
[state 3250, speedlines5 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = animelemtime(11) >= 1 && animelemtime(11) <= 120
anim = 2923
ID = 2923
postype = back
pos = 149,120
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5
[state 3250, speedlines6 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = animelemtime(11) >= 1 && animelemtime(11) <= 120
anim = 2923
ID = 2923
postype = back
pos = 298,120
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
removetime = -1
scale = 0.5,0.5

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelemtime(12) = 1
id = 2923
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(6) = 20
value = 3030,4
volumescale = 255
channel = -1
loop = 0
persistent = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 367
flag = timerfreeze
flag2 = nobardisplay

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = animelemtime(1) >= 2 && animelemtime(11) <= 120
time = 1
color=0
mul=0,0,0

[State 0, Turn]
type = Turn
trigger1 = facing = -1 && animelem = 2


[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = !time
value = 3054
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3030,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 3030,3
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 2
x = 0
y = 0
;ignorehitpause = 
;persistent = 

[State 0, Helper]
type = Helper
trigger1 = animelemtime(2) = 1
helpertype = normal ;player
name = "Tank Satan, Bold Nature, 252HP, 252D, 4 SpD"
ID = 3031
stateno = 3031 
pos = -50,250
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, Helper]
type = Helper
trigger1 = animelemtime(2) = 1
helpertype = normal ;player
name = "The Actual Tank"
ID = 3035
stateno = 3035 
pos = -50,255
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, Helper]
type = Helper
trigger1 = animelemtime(2) = 1
helpertype = normal ;player
name = "All rise in the presence of Dark Helmet"
ID = 3036
stateno = 3036 
pos = -50,250
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(11) = 1
value = 3030,2
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 


;Shell One
[State 0, Explod]
type = Explod
trigger1 = animelemtime(11) = 1
anim = 3037
ID = 3037
pos = 0,-90
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 120
pausemovetime = 0
scale = 1,1
sprpriority = 4
shadow = -1
ownpal = 0
removeongethit = 0
ignorehitpause = 1
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numexplod(3037) = 1
flag = nofg

[State 0, Helper]
type = Helper
trigger1 = animelemtime(12) = 1
helpertype = normal ;player
name = "HIDDEN MISSILE"
ID = 3037
stateno = 3037 
pos = -400,(Target, const(size.mid.pos.y))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(7) = 1
anim = 14577
ID = 14577
pos = 90,-69
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
shadow = -1
ownpal = 0
removeongethit = 0
ignorehitpause = 1
ontop = 1
persistent = 0
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelemtime(11) = 1
id = 14577
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(12) = 1
x = -400
y = 0

[State 105, 1]
type = VelSet
trigger1 = AnimelemTime(13) = 1
x = const(velocity.run.fwd.x)+2

[State 105, 1]
type = VelMul
trigger1 = Animelemtime(13) >= 1
x = 0.95

[State 0, VelSet]
type = VelSet
trigger1 = Animelemtime(22) = 1
x = 0

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 58
value = 0 

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 

;-----------------------------------------------------------------------------
;Heihachi Finisher
[Statedef 3040]
type = S
movetype = A
physics = N
anim = 3040
ctrl = 0
velset = 0,0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3040

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 2850

[State 0, HitAdd]
type = HitAdd
trigger1 = animelemtime(4) = 1
value = 1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = !time
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[state 3250, speedlines]
type = explod
trigger1 = animelemtime(2) = 120
anim = 2273
ID = 2273
postype = back
pos = 10,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
;pausemovetime = 145
removetime = -1

[state 3250, speedlines2]
type = explod
trigger1 = animelemtime(2) = 120
anim = 2273
ID = 2273
postype = back
pos = 240,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 0
ownpal = 1
facing = 1
ignorehitpause = 1
;pausemovetime = 145
removetime = -1

[state 3250, speedlines2]
type = explod
trigger1 = animelemtime(2) = 120
anim = 3048
ID = 3048
postype = back
pos = 0,0
bindtime = -1
supermove = 0
sprpriority = -1
ontop = 1
ownpal = 1
facing = 1
ignorehitpause = 1
;pausemovetime = 145
removetime = -1

[State 3040, White Screen]
type = explod
trigger1 = animelemtime(4) = 1 && numexplod(3049) = 0
anim = 3049
ID = 3049
postype = p1
pos = 0,0
bindtime = -1
sprpriority = 5
ontop = 1
ownpal = 1
removetime = -2
ignorehitpause = 1
persistent = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelemtime(2) = 240
id = 2273
;ignorehitpause = 
persistent = 1 

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelemtime(2) = 240
id = 3048
;ignorehitpause = 
persistent = 1 


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

facep2 = 1

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2) = 120
anim = 3041
ID = 3041
pos = 0,-50
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 120
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2) = 120
anim = 3042
ID = 3042
pos = 0,(Target, const(size.mid.pos.y))
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 120
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3040,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 2
x = 0
y = 0
;ignorehitpause = 
;persistent = 

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 190
;ignorehitpause = 
;persistent = 

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

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = animelemtime(1) >= 2 && animelemtime(2) <= 120
time = 1
color=0
mul=0,0,0

[State 0, Turn]
type = Turn
trigger1 = facing = -1 && animelem = 2

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4
time = 24
freq = 120
ampl = -20
phase = 120
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 124
value = 3030,2
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 3040,1
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 5000,10
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 3030,1
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = !time
value = 3056
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 675
flag = timerfreeze
flag2 = nobardisplay

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = animelemtime(1) >= 2 && animelemtime(2) <= 238
time = 1
color=0
mul=0,0,0

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 58
value = 0 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(23) = 0 && enemynear, alive = 1
value = 5000,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = enemynear, alive = 0 && animelemtime(22) = 4
value = 3040
elem = 24
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 
value = 0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 

;-----------------------------------------------------------------------------
;Present Failure
[Statedef 3045]
type = S
movetype = A
physics = N
juggle = 15
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 3001

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3010

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3020

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3030

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time 
id = 3040

[State 0, PlaySnd]
type = PlaySnd
triggerall = !time
trigger1 = numhelper(2850) = 1
value = 2800,50
volumescale = 200
channel = 3
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 

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


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------------
[Statedef 3050]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0
facep2 = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible

[State 0, Turn]
type = Turn
trigger1 = !time && facing = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3050
ignorehitpause = 1
persistent = 0

[State 0, PosSet]
type = PosSet
trigger1 = time = 150
x = 100
y = 0
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 3051
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;=====================================================================================================================
;Grab Success
[Statedef 3051]
type = S
movetype = H
physics = N
ctrl = 0
velset = -2,-8
facep2 = 1

[State 0, LifeAdd]
type = LifeAdd
trigger1 = !time
value = ceil(ifElse(enemy,fvar(11) * -350 > -230, -230, enemy,fvar(11) * -350))
kill = 1
absolute = 0
;ignorehitpause = 
;persistent = 


[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 30
add = 40,-70,-200 
sinadd   = 40,30,0,10 
mul = 256,256,256
invertall = 1
color     = 0 

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 15
freq = 60
ampl = -4
phase = 90
ignorehitpause = 1
persistent = 0
  

[state 861]
type = selfstate
trigger1 = !time
value = 5050

;--------------------------------------------------------------------------
[Statedef 3052]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible


[State 0, Turn]
type = Turn
trigger1 = facing = 1 && animelemtime(2) = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3052
ignorehitpause = 1
persistent = 0

[State 0, PosSet]
type = PosSet
trigger1 = time = 150
x = 100
y = 0
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 3053
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;=====================================================================================================================
;Grab Success
[Statedef 3053]
type = S
movetype = H
physics = N
ctrl = 0
velset = -0.5,-15

[State 0, LifeAdd]
type = LifeAdd
trigger1 = !time
value = ceil(ifElse(enemy,fvar(11) * -450 > -250, -250, enemy,fvar(11) * -450))
kill = 1
absolute = 0
;ignorehitpause = 
;persistent = 


[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 30
add = 40,-70,-200 
sinadd   = 40,30,0,10 
mul = 256,256,256
invertall = 1
color     = 0 

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 15
freq = 90
ampl = -7
phase = 90
ignorehitpause = 1
persistent = 0
  

[state 861]
type = selfstate
trigger1 = !time
value = 5050

;--------------------------------------------------------------------------
[Statedef 3054]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 150
flag = invisible


[State 0, Turn]
type = Turn
trigger1 = facing = 1 && animelem = 2

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3054
ignorehitpause = 1
persistent = 0

[State 0, PosSet]
type = PosSet
trigger1 = time = 150
x = 100
y = 0
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = Selfstate
trigger1 = anim = 3054 && animtime = 0
value = 5050
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = Null
trigger1 = animtime = 0
value = 3055
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;=====================================================================================================================
;Grab Success
[Statedef 3055]
type = S
movetype = H
physics = N
ctrl = 0
velset = -3,-15

[State 0, LifeAdd]
type = LifeAdd
trigger1 = !time
value = ceil(ifElse(enemy,fvar(11) * -550 > -300, -300, enemy,fvar(11) * -550))
kill = 1
absolute = 0
;ignorehitpause = 
;persistent = 


[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 30
add = 40,-70,-200 
sinadd   = 40,30,0,10 
mul = 256,256,256
invertall = 1
color     = 0 

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 15
freq = 90
ampl = -7
phase = 90
ignorehitpause = 1
persistent = 0
  

[state 861]
type = selfstate
trigger1 = !time
value = 5050

;--------------------------------------------------------------------------
[Statedef 3056]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0
facep2 = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) >= 2 && animelemtime(1) <= 120
flag = invisible

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


[State 0, Turn]
type = Turn
trigger1 = facing = 1 && animelem = 2

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3056
ignorehitpause = 1
persistent = 0


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

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 0
y = -0.75
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = Changestate
trigger1 = time = 243
value = 3057
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = Null
trigger1 = animtime = 0
value = 3055
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;--------------------------------------------------------------------------
[Statedef 3057]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0
facep2 = 1

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


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3057
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, LifeAdd]
type = LifeAdd
trigger1 = time = 120
value = ceil(ifElse(enemy,fvar(11) * -600 > -432, -432, enemy,fvar(11) * -600))
kill = 1
absolute = 0
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = !alive
y = 2000
;ignorehitpause = 
;persistent = 


[State 0, SelfState]
type = SelfState
trigger1 = !alive
value = 5150
;anim =
;ctrl =
;ignorehitpause = 0
;persistent = 1


[State 0, ChangeAnim2]
type = Changestate
trigger1 = animtime = 0 && alive
value = 3058
ignorehitpause = 1
persistent = 0

;--------------------------------------------------------------------------
[Statedef 3058]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,15
facep2 = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time 
value = 3058
;elem = 1
;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
trigger1 = !time
x = 140
y = ifelse(alive,-180,-2000)
;ignorehitpause = 
;persistent = 

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !alive
flag =  invisible

[State 0, ChangeAnim2]
type = Selfstate
trigger1 = !time
value = 5050
ignorehitpause = 1
persistent = 0

;--------------------------------------------------------------------------
;Megaton Punch
[Statedef 3200]
type    = S
movetype= A
physics = N
juggle  = 15
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3105
sprpriority = 1
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movehit
value = 3105,5
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
ignorehitpause = 1
persistent = 0

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
triggerall = var(58) >= 1
trigger1 = !time
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3105,0
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 3105,2
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(4) <= 0
trigger2 = movehit
trigger3 = enemynear,name = "Saibamen Z2"
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 1
;ignorehitpause = 
persistent = 1


[State 3000, superpause]
type = superpause
trigger1 = !time
time = 40
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 0
poweradd = -1000

[State 0, Super FX]
type = Explod
trigger1 = !time
anim = 2003
id = 2003
pos = -157,11   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 48
color=0
mul=0,0,0

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 10
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(1) >= 2 && Animelemtime(7) <= 2
x = -0.33
ignorehitpause = 1

[State 0, AssertSpecial]
type = Null
trigger1 = 1;enemynear, life <= 10
flag = unguardable
persistent = 1

[State 240, 2]
type = HitDef
trigger1 = !movecontact && Animelem = 4
attr = S, HA
animtype  = Medium
damage = ifelse(enemynear,name="Saibamen Z2",999,ceil(IfElse(fvar(11) * 210 < 100, 100, fvar(11) * 210))), 10
guardflag = H
pausetime = ifelse((enemynear,name="Saibamen Z2"),0,12),12
sparkno = S7030
guard.sparkno = s7000
sparkxy = -50,-80
hitsound   = S3105, 3
guardsound = S6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 26
ground.velocity = -6.5,-6
down.bounce = 1
fall = ifelse(enemy,alive=1,0,1)
air.velocity = -2,-4
air.hittime = 16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0
getpower = 0
givepower = 42
hitonce = 0
nochainid = 3000
fall.recover = 0
yaccel = 0.33

[State 240, 2]
type = HitDef
trigger1 = movehit && enemynear,movetype != H
attr = S, HA
animtype  = Medium
damage    = 0,0
guardflag = H
pausetime = 12,12
sparkno = -1
guard.sparkno = -1
sparkxy = -50,-80
hitsound   =-1
guardsound = -1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 26
ground.velocity = -6.5,-6
down.bounce = 1
fall = 1
air.velocity = -2,-4
air.hittime = 16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0
getpower = 0
givepower = 42
hitonce = 0
nochainid = 3000
fall.recover = 0
yaccel = 0.33
ignorehitpause = 1

[State 195, 2]
type = ChangeState
triggerall = movehit && Enemy,Movetype = H 
triggerall = enemynear, name != "Saibamen Z2"
trigger1 = animelem >= 6
value = 3201
ctrl = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = enemynear, name = "Saibamen Z"
trigger1 = animelemtime(4) >= 2
value = 3105
elem = 5
ignorehitpause =1
persistent = 0

[State 195, 2]
type = ChangeState
triggerall = !NumTarget(3200)
trigger1 = animelem >= 6 && !movehit
trigger2 = animelem >= 6 && moveguarded
trigger3 = animelem >= 5 && movehit && enemynear,name = "Saibamen Z2"
trigger4 = movehit && Enemy,Movetype != H 
value = 3203
ctrl = 0

[State 195, 2]
type = ChangeState
trigger1 = animelem >= 6 && roundstate = 3
value = 3205
ctrl = 0

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

[State 0, TargetState]
type = TargetState
triggerall = enemynear,name!="Saibamen Z2"
triggerall = NumTarget;()
triggerall = target, pos y = 0
trigger1 = movehit && target,alive = 1
value = 3209
ID = -1
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
triggerall = enemynear,name!="Saibamen Z2"
triggerall = NumTarget;()
triggerall = target, pos y <= -1
trigger1 = movehit && target,alive = 1
value = 3212
ID = -1


;Megaton Punch Success
;-------------------------------------------------------------------------------------------------------
[Statedef 3201]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3106
sprpriority = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = P2StateNo != [3209,3299]
value = 0
ctrl = 1
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeState
trigger1 = enemynear,alive = 0 && !time
value = 3205
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = !time
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
id = 991901

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1 
value = 0
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(2)=1
value = 3105,4
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
persistent = 1


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

[State 240, 2]
type = HitDef
trigger1 = Animelem >= 10 && !movecontact
attr = S, SP
hitflag = MA
animtype  = Medium
damage    = 0
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-60
hitsound   = -1
guardsound = -1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 26
ground.velocity = 0,0
down.bounce = 1
fall = 1
air.velocity = 0,0
air.hittime = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0
hitonce = 0
fall.recover = 0
getpower = 0
numhits = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 10
trigger1 = numhelper(3207)<=4
helpertype = normal ;player
name = "hit the other fools"
ID = 3207
stateno = 3207
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999
pausemovetime = 99999

[State 0, LifeAdd]
type = Null;LifeAdd
trigger1 = animelem = 2
value = -30
kill = 0
absolute = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(9)=1
value = 3105,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
triggerall = animelem >= 2
trigger1 = movehit
id = -1
value = 3210
ignorehitpause = 1 
persistent = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 && enemynear,alive=1
value = 12
ctrl = 1
ignorehitpause = 1
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 && enemynear,alive=0
value = 3205
ctrl = 1
ignorehitpause = 1
persistent = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = enemynear,alive =0  
flag = roundnotover
persistent = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
id = 991901

;Megaton Punch Blocked
;-------------------------------------------------------------------------------------------------------
[Statedef 3202]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3106
sprpriority = 1
facep2 = 1

[State 0, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(2)=1
value = 3105,4
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

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

[State 0, LifeAdd]
type = LifeAdd
trigger1 = animelem = 2
value = -30
kill = 0
absolute = 0
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(9)=1
value = 3105,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 12
ctrl = 1
ignorehitpause = 1
persistent = 0

;Megaton Missed
;-------------------------------------------------------------------------------------------------------
[Statedef 3203]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 4,0
anim = 3105
sprpriority = 1
facep2 = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 1101,0
volumescale = 255
channel = -1
freqmul = 1.0
ignorehitpause = 1
persistent = 0

[State 450, 3]
type = HitDef
trigger1 = !movecontact && AnimElem = 7
trigger2 = enemynear, name = "Saibamen Z2" && animelem = 6 && movecontact
attr = C, HA
animtype = Back
priority = 4, Hit
damage    = ifelse((enemynear,name="Saibamen Z2"),999,floor(34*(1+((power/1000)*0.33)))),10
hitflag = MAFD
guardflag = L
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-15
hitsound   = s5,5
guardsound = s6,1
ground.type = Trip
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -2,-3
guard.velocity = -9
air.velocity = -3,-1
guard.velocity = -2
givepower = 35,35
yaccel = 0.5
fall.recover = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3105
elem = 6
ignorehitpause = 1
persistent = 0


[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 6
x = 50
ignorehitpause = 1
persistent = 0


[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(8) = 1
x = 0
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(9) = 1
x = 6
ignorehitpause = 1

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(9) >= 2 && Animelemtime(10) <= 2
x = -0.5
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(11) = 1
x = 0
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(12) = 1
x = 6
ignorehitpause = 1

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(12) >= 2 && Animelemtime(13) <= 2
x = -0.5
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(14) = 1
x = 0
ignorehitpause = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(17) >= 1 && animelemtime(22) <= 2
statetype = C       ;S,A,C,L
movetype = I        ;I,A,H
physics = N         ;A,C,S,N
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(17) = 1
x = -4
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(22) = 1
x = 0
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
ignorehitpause = 1
persistent = 0

;Megaton Punch Success
;-------------------------------------------------------------------------------------------------------
[Statedef 3205]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3108
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3205)
trigger1 = !time
anim = 5939
ID = 3205
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(2)=1
value = 3105,4
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
persistent = 1


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(9)=1
value = 3105,1
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(71)=1
value = 3110,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
id = 991901

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 
value = 180
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 


;---------------------------------------------------------------------------
; Things I do
[Statedef 3206]
type = S
anim = 3109
velset = 0,0
sprpriority = 1

[State 190, 1];normal winpose
type = PlaySnd
trigger1 = !time
value = 3110,0
channel = 0
volumescale = 255
persistent = 0

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

;More custom states
;-----------------------------------------------------------------------------------------------------
[Statedef 3209]
type = S
movetype = H
physics = N
velset = 0,0
anim = 0
sprpriority = 1
facep2 = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3180
elem = 1
ignorehitpause = 1
persistent = 0

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 1 && vel x <= -0.25
x = 0.25 

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value =3210
ctrl = 0

;Custom State for Megaton Punch
;-------------------------------------------------------------------------------------------------------
[Statedef 3210]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 1
facep2 = 1

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


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = name != "SSJ Goku Z2"
triggerall = name != "Goku Z2" 
triggerall = name != "Gotenks Z2" 
triggerall = name != "Freeza Z2" 
triggerall = name != "Gohan Z2"
triggerall = name != "Piccolo Z2"
triggerall = name != "Normal Vegeta Z2"
triggerall = name != "Majin Vegeta Z2"
triggerall = name != "Babidi Z2"
triggerall = name != "Shin Satan Z2"
trigger1 = !time
value = ifelse(selfanimexist(170)=1,170,0)
elem = 1
ignorehitpause = 1 
persistent = 0;1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = name = "Shin Satan Z2"
trigger1 = selfanimexist(7600)=1 && !time
value = 7600
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Freeza Z2"
value = 3112
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Gohan Z2"
value = 3113
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Gotenks Z2"
value = 3114
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Piccolo Z2"
value = 3115
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Normal Vegeta Z2" || name = "Vegeta Z2"
value = 3116
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Majin Vegeta Z2"
value = 3117
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Babidi Z2"
value = 3118
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Goku Z2"
value = 3119
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "SSJ Goku Z2"
value = 3120
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Saibamen Z2"  && ishelper
value = 3121
ignorehitpause = 1 
persistent = 0

[State 0, hah]
type = posset
trigger1 = !time
y = 0
ignorehitpause = 1
persistent = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
persistent = 1

[State 0,blah]
type = changestate
trigger1 = enemynear, stateno != 3201
value = 3211
ctrl = 0

;Custom State for Megaton Punch
;-------------------------------------------------------------------------------------------------------
[Statedef 3211]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 1
facep2 = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = name != "SSJ Goku Z2"
triggerall = name != "Goku Z2" 
triggerall = name != "Gotenks Z2" 
triggerall = name != "Freeza Z2" 
triggerall = name != "Gohan Z2"
triggerall = name != "Piccolo Z2"
triggerall = name != "Normal Vegeta Z2"
triggerall = name != "Majin Vegeta Z2"
triggerall = name != "Babidi Z2"
triggerall = name != "Saibamen Z2"
triggerall = name != "Shin Satan Z2"
trigger1 = enemynear,authorname != "Team Z2"
value = 0
elem = 1
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = name = "Shin Satan Z2"
trigger1 = selfanimexist(7600)=1 && !time
value = 7601
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = name = "SSJ Goku Z2"
triggerall = name = "Goku Z2" 
triggerall = name = "Gotenks Z2" 
triggerall = name = "Freeza Z2" 
triggerall = name = "Gohan Z2"
triggerall = name = "Piccolo Z2"
triggerall = name = "Normal Vegeta Z2"
triggerall = name = "Majin Vegeta Z2"
triggerall = name = "Babidi Z2"
triggerall = name ="Saibamen Z2"
trigger1 = !time
value = anim+40
ignorehitpause = 1 
persistent = 0


[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Freeza Z2"
value = 3152
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Gohan Z2"
value = 3153
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Gotenks Z2"
value = 3154
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Piccolo Z2"
value = 3155
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Normal Vegeta Z2"
value = 3156
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Majin Vegeta Z2"
value = 3157
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type =ChangeAnim2
trigger1 = name = "Babidi Z2"
value = 3158
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Goku Z2"
value = 3159
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "SSJ Goku Z2"
value = 3160
ignorehitpause = 1 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = name = "Saibamen Z2" && ishelper
value = 3161
ignorehitpause = 1 
persistent = 0

[State 0, hah]
type = posset
trigger1 = !time
y = 0
ignorehitpause = 1
persistent = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
persistent = 1

[State 0,blah]
type = selfstate
trigger1 = anim = 3151 && animtime = 0
trigger2 = anim = 3152 && animtime = 0
trigger3 = anim = 3153 && animtime = 0
trigger4 = anim = 3154 && animtime = 0
trigger5 = anim = 3155 && animtime = 0
trigger6 = anim = 3156 && animtime = 0
trigger7 = anim = 3157 && animtime = 0
trigger8 = anim = 3158 && animtime = 0
trigger9 = anim = 3159 && animtime = 0
trigger10 = anim = 3160 && animtime = 0
trigger11 = anim = 3161 && animtime = 0
trigger12 = anim = 170 && enemynear, ctrl = 1
trigger13 = anim = 7601 && animtime = 0
value = 0
ctrl = 1

;More custom states
;-----------------------------------------------------------------------------------------------------
[Statedef 3212]
type = A
movetype = H
physics = N
velset = 0,0
anim = 0
sprpriority = 1
facep2 = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3181
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -7
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 1 && vel x <= -0.25
x = 0.25 
y = 0.5

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value =3213
ctrl = 0
;More custom states
;-----------------------------------------------------------------------------------------------------
[Statedef 3213]
type = S
movetype = H
physics = N
velset = 0,0
anim = 0
sprpriority = 1
facep2 = 1

[State 0, Make Dust]
type = MakeDust
trigger1 = vel x <= -0.25

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 1 && vel x <= -0.25
x = 0.125

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3182
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value =3210
ctrl = 0
;------------------------------------------------------------------------
;Gay Old Time
[Statedef 3300]
type    = S
movetype= A
physics = N
juggle  = 15
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3300
sprpriority = 1
facep2 = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
id = 190
;ignorehitpause = 
;persistent = 


[State 3000, superpause]
type = superpause
trigger1 = !time
time = 120
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 120
poweradd = 0

[State 3000, superpause]
type = null
trigger1 = time = 2
time = 40
p2defmul = 1
unhittable = 1
anim = -1
sound = -1
darken = 0
movetime = 40


[State 0, Super FX]
type = Explod
trigger1 = !time
anim = 2441		
id = 2441
pos = -4,-58   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 120
color=0
mul=0,0,0

[State 0, VelSet]
type = VelSet
trigger1 = time = 60
x = -11
y = 0
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = facing = 1 && pos X <= -230
trigger2 = facing = -1 && pos X >= 230
x = 0
y = 0
ignorehitpause = 1

[State 0, VelSet]
type = posset 
trigger1 = time =110
x = ifelse((facing = 1),-110,110)
y = 0
ignorehitpause = 1

[State 0, Assertspecial]
type = Assertspecial
trigger1 = time >= 86 && anim = 3300
flag = invisible

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 210
value = 1252
persistent = 0 

[State 0, ScreenBound]
type = Screenbound
trigger1 = time >= 1
value = 0
movecamera = 0,0
ignorehitpause = 1
persistent = 1

[State 0, Helper]
type = Helper
triggerall = var(58) >= 78 && var(58) <= 155
trigger1 = !time
helpertype = normal ;player
name = "Grand Fan"
ID = 3350
stateno = 3350
pos = 300,0
postype = front    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
triggerall = var(58) >= 156 && var(58) < 234
trigger1 = !time
helpertype = normal ;player
name = "Grand Fan"
ID = 3350
stateno = 3351
pos = 300,0
postype = front    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
triggerall = var(58) >= 234
trigger1 = !time
helpertype = normal ;player
name = "Grand Fan"
ID = 3350
stateno = 3352
pos = 300,0
postype = front    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, lose hype]
type = varset
trigger1 = anim = 1252
v = 58
value = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 1252 && !animtime
value = 0
ctrl = 1
ignorehitpause = 1
persistent = 0
;=======================================================================================
;Jetpack
[Statedef 3400]
type    = S
movetype= I
physics = N
juggle  = 15
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3400
sprpriority = 1
facep2 = 1

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
triggerall = var(58) >= 1
trigger1 = !time
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = movehit
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3400,3
volumescale = 255
channel = -1
persistent = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = numhelper(3450) = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 200
ignorehitpause = 1
persistent = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(19) = 0
value = 3400,2
volumescale = 255
channel = -1
persistent = 0



[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(19) >= 1
x = ifelse(enemynear,name="Saibamen Z2", 0,(enemynear, pos x))
persistent = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3400,0
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 46
value = 3400,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 


[State 3000, superpause]
type = superpause
trigger1 = !time
time = 68
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 68
poweradd = -1000

[State 0, Super FX]
type = Explod
trigger1 = !time
anim = 2003
id = 2003
pos = -100,40   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, Helper]
type = Helper
triggerall = numhelper(3450) = 0
trigger1 = animelemtime(19) = 0
helpertype = normal ;player
name = "Jetpack Mode"
ID = 3450
stateno = 3450
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 68
pausemovetime = 68
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
triggerall = numhelper(3470) = 0
trigger1 = !time
helpertype = normal ;player
name = "Jetpack"
ID = 3470
stateno = 3470
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 68
pausemovetime = 68
ignorehitpause = 1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 68
color=0
mul=0,0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1;enemynear, life <= 10
flag = unguardable
persistent = 1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = time >= 68
value = 1
movecamera = 0,0
ignorehitpause = 1
persistent = 1

[State 0, Turn]
type = Turn
trigger1 = time = 70

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(19)>=0
flag = invisible
flag = noshadow
persistent = 1

[State 195, 2]
type = ChangeState
trigger1 = animelemtime(19) >= 0 && numhelper(3450) =0
value = 3405
ctrl = 0
;=======================================================================================
;Jetpack getup
[Statedef 3405]
type    = S
movetype= I
physics = N
juggle  = 15
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3405
sprpriority = 1

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = 0;helper(3450), pos x
y = 0
ignorehitpause = 1
persistent = 0


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
id = 991901

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 2511,0
volumescale = 255
channel = -1
loop = 0


[State 0, Explod]
type = Explod
trigger1 = !time
anim = 14577
ID = 14577
pos = 0,-30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


[State 0, Turn]
type = Turn
trigger1 = !time
ignorehitpause = 1
persistent = 0


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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 7 
x = -0


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value =0
ctrl = 1
;=======================================================================================
;Jetpack
[Statedef 3410]
type    = S
movetype= A
physics = N
juggle  = 15
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3400
sprpriority = 1
facep2 = 1

[State 0, Helper]
type = Helper
triggerall = numhelper(3465) = 0
trigger1 = !time
helpertype = normal ;player
name = "Jetpack"
ID = 3465
stateno = 3465
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 68
pausemovetime = 68
ignorehitpause = 1
persistent = 0

[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
triggerall = var(58) >= 1
trigger1 = !time
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(991901)
trigger1 = movehit
anim = 5939
ID = 991901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3400,3
volumescale = 255
channel = -1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(19) = 0
value = 3400,2
volumescale = 255
channel = -1
persistent = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(19) >= 1
x = enemynear, pos x
persistent = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3400,0
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 46
value = 3400,1
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 


[State 3000, superpause]
type = superpause
trigger1 = !time
time = 68
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 68
poweradd = -2000

[State 0, Super FX]
type = Explod
trigger1 = !time
anim = 2440
id = 2440
pos = 10,-70   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 68
color=0
mul=0,0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1;enemynear, life <= 10
flag = unguardable
persistent = 1

[State 0, Turn]
type = Turn
trigger1 = time = 70

[State 195, 2]
type = ChangeState
trigger1 = animelemtime(19) >= 0
value = 3415
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 3415]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = -3,-10

[State 0, Turn]
type = Turn
trigger1 = 1
;ignorehitpause = 
;persistent = 


[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 40
add = 40,-70,-200
mul = 256,256,256
sinadd   = 40,30,0,10 
invertall = 1
color = 0

[state 861]
type = selfstate
trigger1 = time = 1
value = 5050
;---------------------------------------------------------------------------
[Statedef 3480]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 1
facep2 = 1

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = !time && authorname = "Team Z2" && name != "Saibamen Z2"
value = 5397
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = !time && authorname != "Team Z2"
trigger2 = !time && authorname = "Team Z2" && name = "Saibamen Z2"
value = 3480
elem = 1
ignorehitpause = 1
persistent = 0


[State 183, vels]
type = velset
trigger1 = 1
x = -pos x/10*facing
y = ((GameHeight/2)+30)-ScreenPos Y

[State 0, ChangeState]
type = SelfState
trigger1 = !movehit && time >= 60
value = 5030
ctrl = 0
;------------------------------------------------------------------------
;Golden Capsule
[Statedef 3500]
type    = S
movetype= A
physics = N
juggle  = 15
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3500
sprpriority = 1
facep2 = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno = [200,440]
value = 3500
elem = 5
ignorehitpause = 1
persistent =  0


[State 4500, 2];HALF TIME'S OVER. BRACE YOURSELF!
type = PlaySnd
triggerall = var(58) >= 1
trigger1 = !time
value = 2800,4+random%2
loop = 0
pan = 1
volume = 122
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 3500,0
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 


[State 3000, superpause]
type = superpause
trigger1 = animelemtime(5) = 1
time = 40
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 0
poweradd = -1000

[State 0, Super FX]
type = Explod
trigger1 = animelemtime(5) = 1
anim = 2003
id = 2003
pos = -157,40   ;-102,70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = animelemtime(5) = 1
time = 48
color=0
mul=0,0,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 8
helpertype = normal ;player
name = "Capsule"
ID = 3550
stateno = 3550
pos = 102,-86
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 

;Custom State for Golden Capsule Crush
;----------------------------------------------------------------------------------------------------------
[Statedef 3575]
type = L
movetype = H
velset = 0,0
sprpriority = -2

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3575
elem = 1
ignorehitpause = 1
persistent = 0

[State 850, huh]
type = selfstate
trigger1 = animtime = 0
value = ifelse((alive=0),5150,5120)

;================================================================================
[Statedef 3576]
type = S
movetype = H
physics = N
velset = 0,0

[State 0, Turn]
type = Turn
trigger1 = !time

[State 850, huh]
type = selfstate
trigger1 = animtime = 0
value = 5000


;Custom State for Grand fan
;----------------------------------------------------------------------------------------------------------
[Statedef 35760]
type = L
movetype = H
physics = N
velset = 0,0

[State 0, PowerAdd]
type = velset
trigger1 = 1
x = -3
ignorehitpause = 1
persistent = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 0, Turn]
type = Turn
trigger1 = !time
ignorehitpause = 1
persistent = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3576
elem = 1
ignorehitpause = 1
persistent = 0

[State 850, huh]
type = changestate
trigger1 = anim = 3576 && animtime = 0
value = 3577
;----------------------------------------------------------------------------------------------------------
[Statedef 3577]
type = L
movetype = H
velset = 0,0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3577
elem = 1
ignorehitpause = 1
persistent = 0

[State 850, huh]
type = selfstate
trigger1 = animtime = 0
value = ifelse((alive=0),5150,5120)
;================================================================================
[Statedef 3420]
type = A
movetype = H
physics = N
velset = 0,0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 3420
elem = 1
ignorehitpause = 1
persistent = 0


[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 0
y = -8
ignorehitpause = 1
persistent = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 1
y = 0.5
ignorehitpause = 1
persistent = 1

[State 0, ChangeState]
type = ChangeState
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 3421
ctrl = 0
;================================================================================
[Statedef 3421]
type = A
movetype = H
physics = N
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 5170
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = anim = 5170 && animtime = 0
value = 3421
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, ChangeState]
type = selfstate
trigger1= anim = 3421 && animtime = 0
value = 5120
ctrl = 0


