;==========================================
;Variable Record
;==========================================
;  8 - Taunt Counts for 
; 34 - Capcomish Timing Var to allow some moving through hitpause


;==========================================
; CNS File for SHIN SATAN by Balthazar and Jango and Cybaster
; System code: winpose, intro, system, etc.
;==========================================

; Lose by Time Over

[Statedef 170]
type = S
ctrl = 0
anim = 170+random%2
velset = 0,0

[State 190, 1];long winpose
type = PlaySnd
triggerall = anim = 170
trigger1 = animelemtime(2)=0
trigger1 = enemynear, name != "Buu Z2"
value = 106,0;170,random%2

[State 190, 1];long winpose
type = PlaySnd
triggerall = anim = 170
trigger1 = animelemtime(2)=0
trigger1 = enemynear, name = "Buu Z2"
value = 170,3;170,random%2

[State 190, 1];long winpose
type = PlaySnd
triggerall = anim = 171
trigger1 = animelemtime(2)=0
value = 170,2;170,random%2

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


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

;===========================================================================
; <<<<< WINPOSES >>>>>
; Winpose Decider : 180
;===========================================================================

; WIN STATE DECIDER
[Statedef 180]
type = S
anim = ifelse(prevstateno =3205,3109,anim)

[State 180, 1]
type = ChangeState
triggerall = prevstateno != 3205
trigger1 = Time = 0
value = ifelse(matchover,189,(181+floor(6*random/1000.0)))

;---------------------------------------------------------------------------
; WINPOSE 1 - I'm the best
[Statedef 181]
type = S
anim = 181
velset = 0,0
sprpriority = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 190, 1];normal winpose
type = PlaySnd
trigger1 = animelemtime(5)=0
value = 181,ifelse((random>500),5,6)

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

[state 181, 1]
type = assertspecial
trigger1 = time < 200 + 150*(var(20)=0)
flag = roundnotover

;---------------------------------------------------------------------------
; WINPOSE 2 - Helicopter winpose
[Statedef 182]
type = S
anim = 182
velset = 0,0
sprpriority = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(18200)
value = 1821
persistent = 0

[State 190, 1];normal winpose
type = PlaySnd
trigger1 = animelemtime(5)=0
value = 181,8+random%3
persistent = 0

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

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "Cape"
ID = 18203
stateno = 18203
pos = -400,0;45,-255
postype = p1   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 
ignorehitpause = 1
persistent = 0

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

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

[State 0, Helper]
type = Helper
trigger1 = time = 90
helpertype = normal ;player
name = "Helicopter"
ID = 18200
stateno = 18200
pos = 160,-255;45,-255
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
;size.xscale = 
;size.yscale = 
;size.ground.back = 
;size.ground.front = 
;size.air.back = 
;size.air.front = 
;size.height = 
;size.proj.doscale = 
;size.head.pos = , 
;size.mid.pos = , 
;size.shadowoffset = 
ignorehitpause = 1
persistent = 0



[state 181, 1]
type = assertspecial
trigger1 = time < 200 + 150*(var(20)=0)
flag = roundnotover

;---------------------------------------------------------------------------
; WINPOSE 3 - Gokule Winpose Beginning
[Statedef 183]
type = S
anim = 709
velset = 0,0
sprpriority = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

[State 0, Turn]
type = Turn
trigger1 = vel x < 0
;ignorehitpause = 
;persistent = 


[State 183, vels]
type = velset
trigger1 = !time
x = -pos x/39*facing
y = -10
persistent = 0

[State 183,veladd]
type = veladd
trigger1 = pos y <= 0
y = 0.51
persistent = 1

[State 183, stop]
type = velset
trigger1 = animelem = 11
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y >= 0
y = 0
ignorehitpause = 1
persistent = 1 

[State 0, PosSet]
type = PosSet
trigger1 = time >= 3 && pos y >= 0;animelem = 11
x = 0
ignorehitpause = 1
persistent = 1 

[state 181, 1]
type = assertspecial
trigger1 = 1
flag = roundnotover

[State 181, now for the real thing]
type = changestate
trigger1 = time >= 3 && pos y >= 0
value = 749

;---------------------------------------------------------------------------
;Gokule Winpose
[Statedef 749]
type = S
anim = 710
velset = 0,0
sprpriority = 6

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

[State 240, you're facing the wrong way]
type = turn
trigger1 = facing = -1

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 4 || animelem = 6 || animelem = 8 || animelem = 10
value = 0, 4


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 12 || animelem = 13
value = 0, 1
channel = 1

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numexplod(711)
flag = noBG
flag2 = noFG
flag3 = nobardisplay

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 14
value = 181,4
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

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


[State 0, Explod]
type = Explod
trigger1 = animelem = 16
anim = 711
ID = 711
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 = -1
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
persistent = 0
;supermove = 0
;pausemove = 0


[state 181, 1]
type = assertspecial
trigger1 = time < 310
flag = roundnotover

;---------------------------------------------------------------------------
; WINPOSE 4 -Somebody Get the Stick
[Statedef 184]
type = S
anim = 20
velset = 0,0
sprpriority = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = enemynear, pos y != 0
trigger2 = !WinKO
trigger3 = enemynear,name = "Saibamen Z2"
value = 180
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = enemynear, p2bodydist x >= 10
x = 2.4

[State 0, VelSet]
type = VelSet
trigger1 = enemynear, p2bodydist x <= 10
x = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = enemynear, p2bodydist x <= 10
value = 185
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 185 && animelem = 3
value = 185,0
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = anim = 185
anim = 18500
removetime = -1
ontop = 1
persistent = 0


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

[state 181, 1]
type = assertspecial
trigger1 = time < 200
flag = roundnotover
;---------------------------------------------------------------------------
; WINPOSE 5 - Iceman Cometh
[Statedef 185]
type = S
anim = 0
velset = 0,0
sprpriority = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = BackEdgeDist < 70
value = 180
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 25
value = 186
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 186000
ID = 186000
pos = -80,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 = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

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


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 200
flag = roundnotover
;---------------------------------------------------------------------------
; WINPOSE 6 -Prayer
[Statedef 186]
type = S
anim = 187
velset = 0,0
sprpriority = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = enemynear,name = "Saibamen Z2"
trigger2 = win && !winko
value = 180
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(23) = 0
value = 3000,2
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 200
flag = roundnotover
;---------------------------------------------------------------------------
; WINPOSE 7 -News
[Statedef 189]
type = S
velset = 0,0
sprpriority = -1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(818) >= 1
value = 819
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3205) = 1
value = 3206
ctrl = 0

[State 0, ChangeState]
type = Changestate
triggerall = !time
trigger1 = random >= 200
trigger2 = teammode = simul
value = 181+random%6
ctrl = 0
ignorehitpause = 1
persistent = 0


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 60
value = 184
;elem = 1
;ignorehitpause = 
;persistent = 


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 2850

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time >= 60
flag = nomusic
flag2 = nobardisplay
flag3 = nofg

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=60
value = 18488,0
volumescale = 65
channel = -1
freqmul = 1.0
loop = 0
pan = 0


[State 0, PosSet]
type = PosSet
trigger1 = time= 60
x = -42
y = 0
;ignorehitpause = 
;persistent = 

[State 0, Explod]
type = Explod
trigger1 = time=60;!time
anim = 184000
ID = 184000
pos = 0,0
postype = left  ;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 = 0.5,0.5
sprpriority = 5
ontop = 1
shadow = 0,0,0

[State 0, Explod]
type = Explod
trigger1 = time=60;!time
anim = 184001
ID = 184001
pos = 0,0
postype = left  ;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 = 0.5,0.5
sprpriority = 5
ontop = 1
shadow = 0,0,0

[State 0, Helper]
type = Helper
trigger1 = time=240;time = 180
helpertype = normal ;player
name = "The News"
ID = 18400
stateno = 18400
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0 
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = time = 240;time = 180
helpertype = normal ;player
name = "Reporter's Mouth"
ID = 18475
stateno = 18475
pos = 0,-195
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999999
pausemovetime = 9999999

[state 181, 1]
type = assertspecial
trigger1 = time < 600
flag = roundnotover



;===========================================================================
; <<<<< INTRODUCTIONS >>>>>
; Intro Decider : 190
; Intro 1 - Cape : 191
;===========================================================================

[Statedef 190]
type = S
ctrl = 0

[State 180, 1];Normal
type = ChangeState
triggerall = enemynear,name != "Cell Z2"
trigger1 = Time = 0
value = ifelse(random<=500,714+floor(4*random/1000.0),191+floor(4*random/1000.0))

[State 180, 1];Normal
type = ChangeState
triggerall = enemynear,name = "Cell Z2"
trigger1 = Time = 0
value = 720
;---------------------------------------------------------------------------
; INTRO 1 - Cape
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

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

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

[State 190, 1];Voice
type = Null
triggerall = Animelemtime(2)=0
trigger1 = enemy,name!="Cell" && enemy,name!="Insect Cell" && enemy,name!="Imperfect Cell"
trigger1 = enemy,name!="Cell por Ssonic" && enemy,name!="Cell Imperfecto"
trigger1 = enemy,name!="PunchCell! Bonus Game"
trigger1 = enemy,name!="Cell UB22"
trigger1 = enemy,name!="cell_2nd_Form"
trigger1 = enemy,name!="[Necromancer's] Cell"
value = 191,random%10
channel = 8

[State 190, 1];Voice VS Cell
type = Null
triggerall = !time
triggerall = numenemy
trigger1 = enemy,name="Cell" || enemy,name="Insect Cell" || enemy,name="Imperfect Cell"
trigger2 = enemy,name="Cell por Ssonic" || enemy,name="Cell Imperfecto"
trigger3 = enemy,name="PunchCell! Bonus Game"
trigger4 = enemy,name="Cell UB22"
trigger5 = enemy,name="cell_2nd_Form"
trigger6 = enemy,name="[Necromancer's] Cell"
value = 192,0
channel = 8

[State 190, 1];Voice VS Adult Gohan
type = Null
triggerall = Animelemtime(2)=0
triggerall = numenemy
trigger1 = enemy,name="Gohan"
trigger2 = enemy,name="SSJ Gohan by Ryon"
trigger3 = enemy,name="Mystic Gohan" || enemy,name="Mystic_Gohan"
trigger4 = enemy,name="Mystic Gohan by Zero_X"
trigger5 = enemy,name="GohanZ"
trigger6 = enemy,name="Mystic Gohan Hyper Demension"
trigger7 = enemy,name="||>(Zerberus-:-Dante)<|| Gohan Sword`s User"
trigger8 = enemy,name="great saiyaman by Franciynaldo"
trigger9 = enemy,name="Mistico gohan by franciynaldo"
trigger10 = enemy,name="Gohan Z2"
value = 192,1
channel = 8

[state 52,cape]
type = helper
trigger1 = AnimElem = 5
name = "cape"
helpertype = normal
stateno = 19100
id = 19100
postype = p1
pos = 0,0
ownpal = 0
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Poster Rip
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !time
trigger1 = random >= 499
value = 193
elem = 1
ignorehitpause = 1
persistent = 0


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

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 1];Voice
type = PlaySnd
triggerall = Animelemtime(2)=0
trigger1 = enemy,name!="Cell" && enemy,name!="Insect Cell" && enemy,name!="Imperfect Cell"
trigger1 = enemy,name!="Cell por Ssonic" && enemy,name!="Cell Imperfecto"
trigger1 = enemy,name!="PunchCell! Bonus Game"
trigger1 = enemy,name!="Cell UB22"
trigger1 = enemy,name!="cell_2nd_Form"
trigger1 = enemy,name!="[Necromancer's] Cell"
value = 191,random%10
channel = 8

[State 190, 1];Voice VS Cell
type = PlaySnd
triggerall = !time
triggerall = numenemy
trigger1 = enemy,name="Cell" || enemy,name="Insect Cell" || enemy,name="Imperfect Cell"
trigger2 = enemy,name="Cell por Ssonic" || enemy,name="Cell Imperfecto"
trigger3 = enemy,name="PunchCell! Bonus Game"
trigger4 = enemy,name="Cell UB22"
trigger5 = enemy,name="cell_2nd_Form"
trigger6 = enemy,name="[Necromancer's] Cell"
value = 192,0
channel = 8

[State 190, 1];Voice VS Adult Gohan
type = PlaySnd
triggerall = Animelemtime(2)=0
triggerall = numenemy
trigger1 = enemy,name="Gohan"
trigger2 = enemy,name="SSJ Gohan by Ryon"
trigger3 = enemy,name="Mystic Gohan" || enemy,name="Mystic_Gohan"
trigger4 = enemy,name="Mystic Gohan by Zero_X"
trigger5 = enemy,name="GohanZ"
trigger6 = enemy,name="Mystic Gohan Hyper Demension"
trigger7 = enemy,name="||>(Zerberus-:-Dante)<|| Gohan Sword`s User"
trigger8 = enemy,name="great saiyaman by Franciynaldo"
trigger9 = enemy,name="Mistico gohan by franciynaldo"
trigger10 = enemy,name="Gohan Z2"
value = 192,1
channel = 8

;Poster
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 19300
ID = 19300
pos = 33,222
postype = back  ;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 = -1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;front of poster
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 19301
ID = 19301
pos = 33,222
postype = back  ;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 = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;face on poster
[State 0, Explod]
type = Explod
trigger1 =!time
anim = 19302
ID = 19302
pos = 33,222
postype = back  ;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 = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;PIPE
[State 0, Explod]
type = Explod
trigger1 =!time
anim = 19303
ID = 19303
pos = 30,239
postype = back  ;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
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

;It's not a party without streamers
[State 0, It's not a party without streamers]
type = Explod
trigger1 = time = 83
anim = 19304
ID = 19304
pos = 30,239
postype = back  ;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
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

[State 0, EnvColor]
type = EnvColor
trigger1 = time = 84
value = 255,255,255
time = 2
under = 0
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = time = 86
helpertype = normal ;player
name = "confetti"
ID = 19305
stateno = 19305
pos = 30,15
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

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

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



[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;INTRO 3 - Yelling
[Statedef 193]
type = S
ctrl = 0
anim = 194
velset = 0,0
sprpriority = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = enemy,name="Shin Satan Z2"
trigger1 = enemy, stateno = 193
value = 190
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = enemy,name="Gohan Z2"
trigger1 = enemy, stateno = 700 || enemy, stateno = 192
value = ifelse((random >= 666),194,191+random%2)
ctrl = 0

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

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

[State 0, ChangeState]
type = Changeanim
trigger1 = time >= 13 && !numhelper(19400)
value = 1941
persistent = 0

[State 0, Changestate]
type = changestate
trigger1 = anim = 1941 && animelemtime(3) = 5
value = 0
ctrl = 0

;SSJ Dream intro
;-------------------------------------------------------------------------
[Statedef 194]
type = S
ctrl = 0
anim = 700
velset = 0,0
sprpriority = 1

[State 0]
type = assertspecial
trigger1 = time <= 119
flag = noshadow
flag2 = invisible

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

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

[State 0, Helper]
type = Helper
trigger1 = !time && !numhelper(701)
helpertype = normal ;player
name = "SSJ Satan"
ID = 701
stateno = 701
pos = -43,-1
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !time && !numhelper(702)
helpertype = normal ;player
name = "SSJ Satan Hair"
ID = 702
stateno = 702
pos = -43,-1
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !time && !numhelper(703)
helpertype = normal ;player
name = "Dream Bubble"
ID = 703
stateno = 703
pos = -43,-1
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = time = 3
anim = 705
ID = 705
pos = -43,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 13
anim = 706
ID = 706
pos = -43,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 8
anim = 707
ID = 707
pos = -43,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 18
anim = 708
ID = 708
pos = -43,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 120
id = 705

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 120
id = 706

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 120
id = 707

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 120
id = 708

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

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

;---------------------------------------------------------------------------
; INTRO 5 - Car
[Statedef 714]
type = S
ctrl = 0
anim = 714
velset = 0,0
sprpriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 14
value = 181,4
volumescale = 255
channel = 0
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

[State 180, 1];Normal
type = changestate
triggerall = enemynear,name = "Shin Satan Z2" & enemynear,stateno = 714
trigger1 = Time = 0
value = 191+floor(4*random/1000.0)

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 714,0
channel = 4
volumescale = 255
loop = 1

[State 240, 1]
type = StopSND
trigger1 = animelemtime(17)=0
channel = 4

[State 240, 1]
type = PlaySnd
trigger1 = animelemtime(17)=1
value = 714,1
volumescale = 255
channel = 4

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 4 || animelem = 6 || animelem = 8 || animelem = 10
value = 0, 4


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 12 || animelem = 13
value = 0, 1
channel = 1

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

[State 0, StopSnd]
type = StopSnd
trigger1 = animelemtime(16) = 1
channel = 0
ignorehitpause = 1

[State 200, 1]
type = PlaySnd
trigger1 = animelemtime(16) = 2
value = 5000, 10
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(20)=1
value = 15000,0
volumescale = 255
channel = -1

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

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 1] ;Freeze animation until PreIntro is over
type = Null
trigger1 = RoundState = 0
value =714

[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(754) = 0
helpertype = normal ;player
name = "car"
ID = 754
stateno = 754 
pos = -75,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999
pausemovetime = 99999
ignorehitpause = 1
persistent = !time

[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(755) = 0
helpertype = normal ;player
name = "tires"
ID = 755
stateno = 755 
pos = -75,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999
pausemovetime = 99999
ignorehitpause = 1
persistent = !time

[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(756) = 0
helpertype = normal ;player
name = "driver"
ID = 756
stateno = 756 
pos = -75,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999
pausemovetime = 99999
ignorehitpause = 1
persistent = !time

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; INTRO 6 Tiles
[Statedef 715]
type = S
ctrl = 0
anim = 715
velset = 0,0
sprpriority = 0

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 77715
ID = 77715
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 = 1
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

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

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

[State 0, Explod]
type = Explod
trigger1 = animelemtime(11) = 0
anim = 77717
ID = 77717
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
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

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


 

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;INTRO 7 Wrastling and Going Grink
[Statedef 716]
type = S
ctrl = 0
anim = 716
velset = 0,0
sprpriority = 0

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

[State 0, Explod]
type = modifyexplod
trigger1 = animelemtime(10) = 0
id = 777718
vel = 0,1.25
pos = -240,240
postype = right  ;p2,front,back,left,right


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



[State 200, BGPalFX]
type = BGPalFX
trigger1 = animelemtime(1) >= 0 && animelemtime(9) <= 120
time = 1
add	= -20,-20,-20
mul	= 100,100,100
invertall = 0
color = 256

[State 0, ChangeState]
type = ChangeState
triggerall= enemynear,name = "Shin Satan Z2" && enemynear,stateno = 716
trigger1 = !time
value = 190
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

[State 0, EnvColor]
type = EnvColor
trigger1 = animelemtime(9) = 30
trigger2 = animelemtime(9) = 50
trigger3 = animelemtime(9) = 60
trigger4 = animelemtime(9) = 90
trigger5 = animelemtime(9) = 120
trigger6 = animelemtime(1) = 110
trigger7 = animelemtime(1) = 159
trigger8 = animelemtime(1) = 184
trigger9 = animelemtime(1) = 232
trigger10 = animelemtime(4) = 10
trigger11 = animelemtime(6) = 2
value = 255,255,255
time = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(9) = 30
trigger2 = animelemtime(9) = 50
trigger3 = animelemtime(9) = 60
trigger4 = animelemtime(9) = 90
trigger5 = animelemtime(9) = 120
trigger6 = animelemtime(1) = 110
trigger7 = animelemtime(1) = 159
trigger8 = animelemtime(1) = 184
trigger9 = animelemtime(1) = 232
trigger10 = animelemtime(4) = 10
trigger11 = animelemtime(6) = 2
value = 716,51
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 



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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 716,0+floor(6*random/1000.0)
volumescale = 255
channel = 4
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
;persistent = 

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


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

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 0
;---------------------------------------------------------------------------
; INTRO 8 I AM AKUMA AND I WISH YOU A MERRY CHRISTMAS
[Statedef 717]
type = S
ctrl = 0
anim = 719
velset = 0,0
sprpriority = 0

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 777719
ID = 777719
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 = 1
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = !time && random<=500
anim = 777720
ID = 777720
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 = 2
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = !time && numexplod(777720) = 0 && random >=500
anim = 777721
ID = 777721
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 = 2
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = !time && numexplod(777720) = 0
trigger1 = !time && numexplod(777721) = 0
anim = 777722
ID = 777722
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 = 2
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(777720) = 1
trigger1 = !time
value = 719,0+floor(4*random/1000)
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(777721) = 1
trigger1 = time = 15
value = 719,4+floor(2*random/1000)
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(777722) = 1
trigger1 = time = 15
value = 719,6+floor(3*random/1000)
volumescale = 255
channel = 4
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = animelemtime(11) = 0 
channel = 4

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(777720) = 1
trigger1 = time = 160
value = 719,50
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(777721) = 1
trigger1 = time = 190
value = 719,51
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(777722) = 1
trigger1 = time = 150
value = 719,52
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, Explod]
type = Explod
trigger1 = numexplod(777722) = 1
trigger1 = time = 21
anim = 7777221
ID = 777221
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 = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0



[State 0, Helper]
type = Helper
trigger1 = time = 224
helpertype = normal ;player
name = "Cell Explosion"
ID = 777719
stateno = 777719
pos = 0,-40
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Intro VS Cell
[Statedef 720]
type = S
anim = 720
velset = 0,0
sprpriority = 1

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

[state 181, 1]
type = assertspecial
trigger1 = 1
flag = intro
flag2 = nobardisplay

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "Satan Helper"
ID = 721
stateno = 721
pos = 75,0
postype = p2    ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 0
supermovetime = 9999999999999999
pausemovetime = 99999999999999999
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;Taunt
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 196
value = 181,7
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 197
value = 191,9
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 198
value = 191,3
volumescale = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan = 
;ignorehitpause = 
persistent = 0


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 195 && animtime = 0
value = 196+(3*random/1000)
elem = 1
ignorehitpause = 1
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 196 && animtime = 0
trigger2 = anim = 197 && animtime = 0
trigger3 = anim = 198 && animtime = 0
value = 199
elem = 1
ignorehitpause = 1
persistent = 0


[State 195]
type = PlaySnd
trigger1 = Time = 0
value = 195,0
channel = 0

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

[State 195, 2]
type = ChangeState
trigger1 = numhelper(2850) = 1
trigger2 = numhelper(2853) = 1
trigger3 = numhelper(2855) = 1
value = 2801
ctrl = 0

;===========================================================================
;POWER CHARGE
;===========================================================================
[StateDef 900]
type = S
movetype = I
physics = S
anim = 900
velset = 0,0
ctrl = 0

[State 1000, Power]
type = PowerAdd
triggerall = (Anim = 900) && (power < 3000)
trigger1 = (command = "hold_b") && (command = "hold_y")
value = 3 + (time/20)

[State 4500, 1];Scream
type = PlaySnd
trigger1 = animelem = 3
value = 900,0
volume = 255
channel = 0

[State 1900, Aura helper]
type = Helper
trigger1 = animelemtime(4)=0
id = 905
name = "Charge"
pos = 0,0
postype = P1
stateno = 905
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 1000, PC-End]
type = ChangeState
triggerall = anim = 900
trigger1 = (command != "hold_b") || (command != "hold_y")
trigger2 = Power >= const(data.power) || Power >= PowerMax || RoundState != 2
value = 901
Ctrl = 1

;====================================================================================================
; End of Power Charge
[StateDef 901] 
type = S
movetype = I
physics = S
ctrl = 0
anim = 901

[State 1001, full power]
type = playsnd
trigger1 = anim = 901 && power >= 3000
value = 8,3
channel = 1
persistent = 0

[State 1001, full power voice]
type = playsnd
trigger1 = anim = 901 && power >= 3000
value = 900,1
channel = 0
persistent = 0


[State 1001, EndByPowMax]
type = PalFX
trigger1 = Power = 3000
time = 1
add = 255-(20*Time), 255-(20*Time), 255-(20*Time)

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

;===========================================================================
; DASH COLLISION
;===========================================================================

[Statedef 950]
type = S
physics = S  ;N
movetype = A
anim = 990
ctrl = 0
velset = 0,0
sprpriority = 2

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


[State -2, Explod]; Smoke FX
type = Explod
trigger1 = time=5 && numexplod(956)=0 && teamside = 1
anim = 956
pos = 45,0
postype = p1
removetime = -2
supermove = 1
scale = 1,1
sprpriority = 0
id = 956
bindtime = -1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[State -2, Explod]; Collision FX
type = null;Explod
triggerall = var(2) = 0 ;solid
trigger1 = time=5 && numexplod(955)=0 && teamside = 1
anim = 955
pos = 45,-56
postype = p1
removetime = 80
supermove = 1
sprpriority = 0
id = 955
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[State -2, Explod]; Collision FX
type = null; Explod
triggerall = var(2) = 1 ;transparent
trigger1 = time=5 && numexplod(955)=0 && teamside = 1
anim = 958
pos = 45,-56
postype = p1
removetime = 80
supermove = 1
sprpriority = 0
id = 955
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[state 17100,scale FX]
type = modifyexplod
trigger1 = numexplod(955)
scale = 0.9+0.1*sin(0.1*time),0.9+0.1*sin(0.1*time)
id = 955

[State -2, Explod]; White FG
type = Explod
trigger1 = time=5 && numexplod(957)=0 && teamside = 1
anim = 957
pos = 0,0
postype = left
removetime = 3
supermove = 1
scale = 1,1
sprpriority = 7
id = 957
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[State -2, notification]
type = helper
trigger1 = time=5 && numhelper(13200)=0 && teamside = 1
helpertype=normal
stateno=13200
ID=13200
name="notif-col"
postype=p1
pos= 45,-57
ownpal=1
pausemovetime=65535
supermovetime=65535
ignorehitpause=1
facing = -1

[State 800, ABORT]
type = Changestate
trigger1 = p2stateno != 950 && p2stateno != 951 && time >= 4 && time<50
value = 952
ctrl = 1

[State 1000]
type = PosAdd
trigger1 = P2bodydist X < 10
X = -8
[State 1000]
type = PosAdd
trigger1 = P2bodydist X < 25
X = -5
[State 1000]
type = PosAdd
trigger1 = P2bodydist X < 35
X = -2
[State 1000]
type = PosAdd
trigger1 = P2bodydist X < 40
X = -1

[State 1000]
type = width
trigger1 = 1
edge = 50,40

[State 800, Grab SND]
type = PlaySnd
trigger1 = time=5
value = 800,1

[State 800, Explosion SND]
type = PlaySnd
trigger1 = time=5 && teamside = 1
value = 950,0

[State 220, snd];scream
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = time=5
value = 3,20+(random%3)

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4)
time = 8
freq = 20
ampl = 1+0.1*time

[State 800, count]
type = VarSet
trigger1 = !time
var(30) = 0
[State 800, count]
type = VarAdd
triggerall = time<75
trigger1 = command="x" || command="y" || command="z" || command="a" || command="b" || command="c" || command="s"
trigger2 = command = "up" || command = "down" || command = "back" || command = "fwd"
var(30) = 1

[State 800, count]
type = Changestate
triggerall = time = 80
trigger1 = var(30) > enemy,var(30)
value = 951

[State 800, count]
type = Changestate
triggerall = time = 80
trigger1 = var(30) < enemy,var(30)
value = 0
ctrl = 0

[State 800, count]
type = Changestate
triggerall = time = 80
trigger1 = var(30) = enemy,var(30)
value = 105
ctrl = 0

;-----------------------------------------
;Grabbing

[Statedef 951]
type = S
movetype = A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
anim = 951
sprpriority = 1
facep2 = 1
poweradd = 20

[State 800, Don't Guard]
type = attackdist
trigger1 = 1
value = 0

[State 800, hit]
type = hitdef
trigger1 = animelem=1
attr = S,NT
hitflag = M- 
priority = 1,Miss 
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 801
guard.dist = 0
fall = 1
fall.recover = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = !time
value = 250
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


[State 951, Abort]
type = ChangeState
trigger1 = time=5;2
value =  952
ctrl = 0
ignorehitpause = 1

;-------------------------
;Abort Dash Collision to avoid bugs
[Statedef 952]
type = S
physics = N
movetype = A
ctrl = 1
velset = 0,0
sprpriority = 2

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 955

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 956

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 957

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

;===========================================================================
;AIR DASH
;===========================================================================

[Statedef 110]
type = A
physics = N
anim = 110
velset = 0,0
ctrl = 0

[State 0, varset]
type = Varset
trigger1 = !time
var(25) = 1

[State 0, CtrlSet]
type = CtrlSet
trigger1 = time >= 3
value = 1
ignorehitpause = 1
persistent = 1

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 1
y = 0.25

[State 0, VelSet]
type = VelSet
trigger1 = command != "holdfwd"
y = 0

[State 100, snd];over here voice
type = playsnd
trigger1 = !time
value = 105,1
channel = -1

[State 100, snd];over here voice
type = playsnd
trigger1 = !time
value = 105,2
channel = 0

[State 111, 1]
type = ChangeState
triggerall = time > 7
trigger1 = command != "holdfwd" || animtime = 0
value = 50

;------------------------------------------
; DASH FORWARD

[Statedef 111]
type = A
physics = N
anim = 111
ctrl = 0
velset = 0,0

[State 41, Train]
type = AfterImage
trigger1 = Time = 0
time= 30
timegap= 1
framegap= 3
length= 12
palbright= 0,0,0
paladd= 0,0,0
palmul= .9,.9,.9
palcontrast= 120,120,120
palpostbright= 0,0,0
trans= add1

[State 100, 7]
type = Explod
trigger1 = Time = 0
Anim = 8050
postype = P1
pos = -10,-20
scale = 1,.8
bindtime = 15
sprpriority = 2
ownpal = 1
removetime = -2
removeongethit = 1

[State 111, 1]
type = VelSet
trigger1 = time=0
x = 9

[State 115, dash Sound]
type = PlaySnd
trigger1 = time=0
value = 100,0

[State 111, 1]
type = VelAdd
trigger1 = time>=5 && vel X>=0
x = -0.3

[State 111, 1]
type = StateTypeSet
trigger1 = time >= 5
physics = A


[State 0, CtrlSet]
type = CtrlSet
trigger1 = !NumExplod(110)
value = 1
 
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "x"
anim = 15999
ID = 90000200
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "y"
anim = 15999
ID = 90000210
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "z"
anim = 15999
ID = 90000220
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "a"
anim = 15999
ID = 90000230
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "b"
anim = 15999
ID = 90000240
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "c"
anim = 15999
ID = 90000250
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "s"
anim = 15999
ID = 90000195
removetime = 3
pausemovetime = 3
supermovetime = 3


[State 111, 1]
type = ChangeState
triggerall = time > 7
trigger1 = command != "holdfwd" || time = 15
value = 50

[State 111, end]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 112

;------------------------------------------
;LAND FROM AERIAL DASH FORWARD
[Statedef 112]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 112

[State 115, 1]
type = VelSet
trigger1 = Time = 0
x = 15
y = 0

[State 115, 3]
type = VelAdd
trigger1 = Time > 0
x = .15

[state 115, 2]
type = posset
trigger1 = time = 0
y = 0

[State 115, Landing Sound]
type = PlaySnd
trigger1 = animelem = 2
value = 52,0

[State 115, e]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------------------
;AIR DASH BACK
[Statedef 115]
type = A
movetype = I
physics = N
anim = 115
ctrl = 0
velset = 0,0

[State 110, var]
type = VarSet
trigger1 = time=0
var(10)=1

[State 41, Train]
type = AfterImage
trigger1 = Time = 0
time= 30
timegap= 1
framegap= 3
length= 12
palbright= 0,0,0
paladd= 0,0,0
palmul= .9,.9,.9
palcontrast= 120,120,120
palpostbright= 0,0,0
trans= add1

[State 100, 7]
type = Explod
trigger1 = Time = 0
Anim = 8050
postype = P1
pos = 0,-20
scale = 1,.8
bindtime = 15
sprpriority = 2
ownpal = 1
removetime = -2
removeongethit = 1
facing = -1

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

[State 115, dash Sound]
type = PlaySnd
trigger1 = time=0
value = 100,0

[State 111, 1]
type = VelAdd
trigger1 = time>=5 && vel X<=0
x = 0.2

[State 111, 1]
type = StateTypeSet
trigger1 = time >= 5
physics = A

[State 0, CtrlSet]
type = CtrlSet
trigger1 = !NumExplod(110)
value = 1
 
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "x"
anim = 15999
ID = 90000200
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "y"
anim = 15999
ID = 90000210
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "z"
anim = 15999
ID = 90000220
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "a"
anim = 15999
ID = 90000230
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "b"
anim = 15999
ID = 90000240
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "c"
anim = 15999
ID = 90000250
removetime = 3
pausemovetime = 3
supermovetime = 3
[State 0, Explod]
type = Explod
trigger1 = NumExplod(110)
trigger1 = command = "s"
anim = 15999
ID = 90000195
removetime = 3
pausemovetime = 3
supermovetime = 3

[State 111, 1]
type = ChangeState
triggerall = time > 7
trigger1 = command != "holdback" || time = 15
value = 116

[State 112, end]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; SUPER JUMP STRAIGHT UP

[Statedef 10231]
type    = S
physics = S
anim = 40
ctrl = 0
velset = 0,0
facep2 = 1

[State 10230, Superjump Var]
type = varset
trigger1 = Time = 0
var(22) = 1

[State 890, 2]
type = Explod
trigger1 = !time
Anim = 8051
postype = P1
pos = 0,-20
bindtime = 15
sprpriority = 2
ownpal = 1
removetime = -2
removeongethit = 1

[State 10231, Superjump Sound]
type = playsnd
trigger1 = Time = 0
value = 0,24

[State 10231, Give Player control]
type = ctrlset
trigger1 = Time = 20
value = 1

[State 41, Train]
type = AfterImage
trigger1 = Time = 0
time= 30
timegap= 1
framegap= 3
length= 12
palbright= 0,0,0
paladd= 0,0,0
palmul= .9,.9,.9
palcontrast= 120,120,120
palpostbright= 0,0,0
trans= add1

[State 10231, 11]
type = VelSet
trigger1 = AnimTime = 0
x = Const(velocity.jump.neu.x)
y = Const(velocity.jump.y) - 3.5

[State 10231, 13]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; SUPER JUMP FORWARD

[Statedef 10232]
type    = S
physics = S
anim = 40
ctrl = 0
velset = 0,0
facep2 = 1

[State 890, 2]
type = Explod
trigger1 = !time
Anim = 8051
postype = P1
pos = 0,-20
bindtime = 15
sprpriority = 2
ownpal = 1
removetime = -2
removeongethit = 1

[State 10230, Superjump Var]
type = varset
trigger1 = Time = 0
var(22) = 1

[State 10232, Superjump Sound]
type = playsnd
trigger1 = Time = 0
value = 0,24

[State 10232, Give Player control]
type = ctrlset
trigger1 = Time = 20
value = 1

[State 41, Train]
type = AfterImage
trigger1 = Time = 0
time= 30
timegap= 1
framegap= 3
length= 12
palbright= 0,0,0
paladd= 0,0,0
palmul= .9,.9,.9
palcontrast= 120,120,120
palpostbright= 0,0,0
trans= add1

[State 10232, 11]
type = VelSet
trigger1 = AnimTime = 0
x = Const(velocity.jump.fwd.x)
y = Const(velocity.jump.y) - 3.2

[State 10232, 13]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; SUPER JUMP BACKWARD

[Statedef 10233]
type    = S
physics = S
anim = 40
ctrl = 0
velset = 0,0
facep2 = 1

[State 890, 2]
type = Explod
trigger1 = !time
Anim = 8051
postype = P1
pos = 0,-20
bindtime = 15
sprpriority = 2
ownpal = 1
removetime = -2
removeongethit = 1

[State 10230, Superjump Var]
type = varset
trigger1 = Time = 0
var(22) = 1

[State 10233, Superjump Sound]
type = playsnd
trigger1 = Time = 0
value = 0,24

[State 10233, Give Player control]
type = ctrlset
trigger1 = Time = 20
value = 1

[State 41, Train]
type = AfterImage
trigger1 = Time = 0
time= 30
timegap= 1
framegap= 3
length= 12
palbright= 0,0,0
paladd= 0,0,0
palmul= .9,.9,.9
palcontrast= 120,120,120
palpostbright= 0,0,0
trans= add1

[State 10233, 11]
type = VelSet
trigger1 = AnimTime = 0
x = Const(velocity.jump.back.x)
y = Const(velocity.jump.y) - 3.2

[State 10233, 13]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;===========================================================================
; CHEAP KO
;===========================================================================

[Statedef 5950]
physics = S
movetype = H
ctrl = 0
velset = 0,0

[State 5950, 1]
type = HitVelSet
trigger1 = Time = 0
x = 2

[State 5950, 4]
type = VelSet
trigger1 = !time;HitOver
x = 0

[State 5950, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 5950, 4]
type = Null;ChangeAnim
trigger1 = !HitOver
value = ifElse(FVar(1)=0,5000,5020)

[State 190, 4]
type = ChangeAnim
trigger1 = !time;HitOver
value = 5950
persistent = 0
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
triggerall = anim =5950
trigger1 = animelemtime(1) = 0
x = -5
y = -4

[State 0, VelAdd]
type = VelAdd
triggerall = anim =5950
triggerall = pos y < 0
trigger1 = animelemtime(1)>=1
trigger1 = animelemtime(5)<=0
x = 0.5
y = 0.4

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(5)=1
y = 0

[State 5950, 4]
type = PosAdd
trigger1 = AnimElemTime(5) = 0 && anim=5950
X = -30

[State 1100, ChangeState]
type = ChangeState
trigger1 = !Animtime
value = 5150
;===========================================================================
;SHOCKED BY MASENKO (code by POTS)
;===========================================================================
[Statedef 7696]
type = U
physics = N
movetype = H
ctrl = 0
velset = 0, 0

[State 7696, sts]
type = null;statetypeset
trigger1 = !time
trigger1 = pos y < 0
statetype = A
[State 7696, sts]
type = null;statetypeset
trigger1 = !time
trigger1 = pos y >= 0
statetype = S

[State 7696, Pos]
type = posset
trigger1 = pos y >= 0
y = 0

[State 7696, Anim]
type = changeanim
trigger1 = !time
trigger1 = anim != 7696 && selfanimexist(7696)
value = 7696
[State 7696, Anim]
type = changeanim
trigger1 = !time
trigger1 = anim != 9010 && !selfanimexist(7696) && selfanimexist(9010)
value = 9010
[State 7696, Anim]
type = changeanim
trigger1 = !time
trigger1 = !selfanimexist(7696) && !selfanimexist(9010)
value = IfElse(statetype != A, 5002, 5030)

[State 7696, Var]
type = varset
trigger1 = !time
;trigger1 = gethitvar(hitcount) <=1
sysfvar(4) = 0
ignorehitpause = 1
[State 7696, Var]
type = varadd
trigger1 = !time
sysfvar(4) = 20+ceil(enemy,var(26)/1.2)+ 90*(enemy,var(19))
ignorehitpause = 1

[State 7696, Var if Gohan performed Finisher 1]
type = varset
trigger1 = (enemy,stateno=[3020,3030])
sysfvar(4) = 0
ignorehitpause = 1

[State 7696, nopalfx]
type = palfx
trigger1 = !time
trigger1 = (anim = 7696 || anim = 9010)
add = 0, 0, 0
time = 1

[State 7696, End]
type = changestate
trigger1 = alive && (anim = 7696 || anim = 9010) && hitshakeover
trigger2 = alive && (anim != 7696 && anim != 9010) && hitshakeover
value = IfElse(statetype = A, 1115020, 5300)
[State 7696, End]
type = selfstate
trigger1 = !alive && (anim != 7696 || anim != 9010) && hitshakeover
value = 5030

;--------------------------------------------
;===========================================================================
; ZERO COUNTER
; counter state : 750
; Rising Knee (f+2p) : 751
; Rising Knee - rising : 752
; Sliding Kick (f+2k) : 755
; Lightning anim : 753
; hit by Punch Zero Counter: 757
;===========================================================================
[Statedef 750]
type = S
physics = S
movetype = I
anim = 750
ctrl = 0
velset = 0,0
poweradd = -1000
sprpriority = 2
facep2 = 1

[State 750, strengthvar]
type = varset
trigger1 = !time && AILevel<=0
var(17) = ifelse(command="f2p",1,2)
ignorehitpause = 1

[State 750, snd];Voice
type = playsnd
trigger1 = !time
value = 107,1
channel = 0
volumescale = 255

[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 750, ECreset]
type = palfx
trigger1 = !time
time = 1

[State 900, 2]
type = EnvColor
trigger1 = !Time
value = 240,240,240 
time = 1

[State 900, 3] ;Counter Lightning
type = Explod
trigger1 = !Time
anim = 753
sprpriority = 10
pos = 40, Floor(-ScreenPos Y)
postype = P1
persistent = 0
pausemovetime = -1
supermove = 1
ownpal = 1

[State 750, superpause]
type = superpause
trigger1 = !time
time = 20
movetime = 20
anim = -1
sound = s750,0
p2defmul = 1
darken = 0

[State 750, end]
type = changestate
trigger1 = !animtime ;time>=20
value = ifElse(var(17)=1,751,752)
;----------------------------------------
;Zero Counter One: Bat
[Statedef 751]
type = S
movetype = A
physics = S
juggle = 10
anim = 751
ctrl = 0
velset = 0,0

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

;PalFX sctrls; the first removes any earlier stuff, and the second the white flash that appears if you have maxed out focus
[state 901, cancel earlier fx flash]
type = PalFx
trigger1 = time = 0
add = 0,0,0
time = 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 1215, Smoke FX]
type = explod
trigger1 = animelemtime(2)=1
anim = 1206+(var(2)=0)
id = 1206
pos = 30,0
postype = P1
sprpriority = -3
ownpal = 1
removetime = -2
persistent = 0
ignorehitpause = 0

[State 902, max-charge]
type = HitDef
trigger1 = !time
attr = S, NA
damage = 50,0
animtype = Hard
hitflag = MAFD
priority = 6, Hit
pausetime = 14, 14
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-65
hitsound   = s5, 6
guardsound = S6,0
ground.type = Low
ground.slidetime = 20  ;14
ground.hittime  = 20   ;14
ground.velocity = -7.95
guard.slidetime = 18
guard.hittime = 18
guard.ctrltime = 12
airguard.velocity = -3.5,-4
air.type = High
air.velocity = -7.5,-6
air.hittime = 9
getpower = 0
givepower = 35,35
ground.cornerpush.veloff = -7.25
air.cornerpush.veloff = 0
yaccel = .55
air.fall = 1
air.juggle = 15
fall.recover = 0
kill = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 10
anim = 1650
ID = 1650
pos = -57,-43
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 = -1
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0

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

;Zero Counter Two: Dynamite Kick
;--------------------------------------------------------------
[Statedef 752]
type = S
movetype = A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
anim = 1000
sprpriority = 1
facep2 = 1
poweradd = 20

[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 6000, voice dyanmite kick]
type = playsnd
triggerall = var(58)=0
trigger1 = Time = 0
value = 1097,8
channel = 0

[State 6000, woosh]
type = playsnd
trigger1 = Animelemtime(6) = 1
value = 1000,1
channel = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Animelemtime(3)>=1 && Animelemtime(9) <=1
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N         ;A,C,S,N
ignorehitpause = 1
persistent = 0

[State 1040, Velset]
type = Velset
trigger1 = Animelemtime(3) = 1
y = -3.5

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(3)> 1
y = 0.4

[State 0, PosSet]
type = PosSet
trigger1= vel y > 0
trigger1= pos y > -vel y
y = 0
;ignorehitpause = 
;persistent = 

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

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(5)>=1 && Animelemtime(8)>=2 && vel x > 0
x = -0.25

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

[State 240, 2]
type = HitDef
triggerall = !movecontact
trigger1 = Animelem = 7 || Animelem = 8
attr = S, NA
animtype  = Medium
damage    = 50
guardflag = 
pausetime = 16,16
sparkno = S7030
guard.sparkno = s7000
sparkxy = -10,-60
hitsound   = S1000, 0
guardsound = S850,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 26
ground.velocity = -7.5,0
fall = 1
air.velocity = -7.5,-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 = 1
nochainid = 3000
fall.recover = 0
kill = 0


[State -3, Landing Sound]
type = PlaySnd
trigger1 = Animtime = 0
value = 40, 0

[State 1000]
type = changestate
trigger1 = Animtime = 0
value = 1050
ctrl = 0
;===========================================================================
; AERIAL ZERO COUNTER
; counter state : 760
; Smash Punch : 761
; Zero Counter Kick - Boomerang Kick : 762
; Lightning anim : 753
;===========================================================================

[Statedef 760]
type = A
physics = N
movetype = I
anim = 760
ctrl = 0
;velset = 0,0
poweradd = -1000
sprpriority = 2
facep2 = 1

[State 2302, pause]
type = pause
trigger1 = !time
time = 7
movetime = 7
ignorehitpause = 1

[State 750, strengthvar]
type = varset
trigger1 = !time && var(59)<=0
var(17) = ifelse(command="f2p",1,2)
ignorehitpause = 1

[State 750, snd];Voice
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = !time
value = 3,11
channel = 0
[State 750, snd];Voice
type = playsnd
triggerall = var(55)=1		;Voice=English
trigger1 = !time
value = 3,111
channel = 0

[State 750, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 750, ECreset]
type = palfx
trigger1 = !time
time = 1

[State 900, 2]
type = EnvColor
trigger1 = !Time
value = 240,240,240 
time = 1

[State 900, 3] ;Counter Lightning
type = Explod
trigger1 = !Time
anim = 753
sprpriority = 10
pos = 40, Floor(-ScreenPos Y)
postype = P1
persistent = 0
pausemovetime = -1
supermove = 1
ownpal = 1

[State 750, superpause]
type = superpause
trigger1 = !time
time = 20
movetime = 20
anim = -1
sound = s750,0
p2defmul = 1
darken = 0

[State 750, end]
type = changestate
trigger1 = !animtime
value = ifelse(var(17)=1,761,762)

;---------------------------------------------------------------------------
; JUMP STRONG PUNCH [NORMAL]
[Statedef 761]
type = A
movetype = A
physics = N
anim = 620
ctrl = 0
poweradd = 20
sprpriority = 2
juggle = ifelse(p2statetype=A,3,15)

[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, ChangeAnim]
type = ChangeAnim
trigger1 = (prevstateno = 600) || (prevstateno = 610)
trigger2 = (prevstateno = 630) || (prevstateno = 640)
value = 620
elem = 2
ignorehitpause = 1
persistent = 0


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

[State 620, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 620, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * floor(34*(1+((power/1000)*0.05))) < 7, 7, fvar(11) * floor(34*(1+((power/1000)*0.05)))));,0
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 4, Hit
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -25,-40
hitsound   = s5,2
guardsound = S6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7,8
air.velocity = -7,8.5
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= 0
givepower = 35,35
yaccel = 0.5
fall = ifelse (enemynear,statetype = A, 1, 0)
air.fall = 1
fall.recover = 0

[State 205, Time Offset]
type = VarSet
trigger1 = moveContact = 1
var(34) = Time
ignorehitpause = 1
persistent = 0

[State 205, Play Anim]
type = ChangeAnim
triggerall = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
trigger1 = hitPauseTime = [1,16 - (10 - Var(34))]
value = anim
elem = 4
ignorehitpause = 1

[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 0

;NEO Air Dynamite Kick (light)
;--------------------------------------------------------------
[Statedef 762]
type = A
movetype = A
physics = N
juggle = 15
velset = 0,0
ctrl = 0
anim = 1060
sprpriority = 1
poweradd = 20

[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 1000]
type = changestate
trigger1 = movehit && var(58) >= 2
value = 2000
ctrl = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = !time && prevstateno = 250
y = -12
ignorehitpause =1 
persistent = 0


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

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

[State 6000, voice dyanmite kick]
type = playsnd
triggerall = var(58)=0
trigger1 = Animelemtime(2) = 1
value = 221,0+random%2
channel = 0

[State 6000, woosh]
type = playsnd
trigger1 = Animelemtime(3) = 1
value = 1000,1
channel = 3
persistent = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Animelemtime(3)>=1 && Animelemtime(11) <=1
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N         ;A,C,S,N
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(3)> 1
y = 0.9

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

[State 0, VelSet]
type = VelAdd
trigger1 = Animelemtime(3)>=1 && vel x > 0
x = -0.25

[State 0, PosSet]
type = PosSet
trigger1= vel y > 0
trigger1= pos y > -vel y
y = 0
;ignorehitpause = 
;persistent = 

[State 240, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage    = ceil(ifElse(fvar(11) * ifelse((var(58)>=2),33,55) < 7, 7, fvar(11) * ifelse((var(58)>=2),33,55))),10
guardflag = H
pausetime = ifelse((var(58)>=2),4,12),ifelse((var(58)>=2),12,12)
sparkno = S7030
guard.sparkno = s7000
sparkxy = -10,-60
hitsound   =  S1000, 0
guardsound = S850,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 26
ground.velocity = -1,0
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 = 1
nochainid = 3000
fall.recover = 0

[State 0, Width]
type = Width
trigger1 = 1
edge = 55,0
player = 55,30
;value = 0,0
;ignorehitpause = 
;persistent = 

[State 1000]
type = changestate
trigger1= movecontact
value = 1098
ctrl = 0

[State 1000]
type = changestate
trigger1= vel y > 0
trigger1= pos y > -vel y
value = 1050
ctrl = 0

;========================< THROW ESCAPE >=============================
;Throw Escape
[Statedef 5940]
type = S
movetype = H
physics = S
velset = 0, 0
 
[State 0, SelfState]
type = SelfState
trigger1 = !Time
value = Cond(Var(0)=1,950,5949)
ignorehitpause = 1
 
[Statedef 5949]
type = S
movetype = H
physics = S
velset = 0, 0
anim = 5940
 
 
[State 950, PosAdd 1]
type		= PosAdd
trigger1            = Time <=10
trigger1		= P2bodydist X < 10
X		= -8
[State 950, PosAdd 2]
type		= PosAdd
trigger1            = Time <=10
trigger1		= P2bodydist X < 25
X		= -5
[State 950, PosAdd 3]
type		= PosAdd
trigger1            = Time <=10
trigger1		= P2bodydist X < 35
X		= -2
[State 950, PosAdd 4]
type		= PosAdd
trigger1            = Time <=10
trigger1		= P2bodydist X < 40
X		= -1
 
[State 950, Width]
type		= Width
trigger1            = Time <=10
edge		= 50,40
 
[State 41, Train]
type = AfterImage
trigger1 = Time = 10
time= 30
timegap= 1
framegap= 3
length= 12
palbright= 0,0,0
paladd= 0,0,0
palmul= .9,.9,.9
palcontrast= 120,120,120
palpostbright= 0,0,0
trans= add1
 
[State 100, snd];over here voice
type = playsnd
trigger1 = !time
value = 105,1
channel = -1
 
[State 111, 1]
type = VelSet
trigger1 = time>=11 
x = -7
 
[State 111, 1]
type = StateTypeSet
trigger1 = time > 20
movetype = I
 
[State 111, 1]
type = SelfState
trigger1 = time =20
value = 0
ctrl = 1