;===========================================================================
;Kienzan

[Statedef 3000]
type = S
movetype = A
physics = S
anim = 3000
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -1000

;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,48]
flag = noBG
flag2 = noFG

[State 1000, shake]
type = EnvShake
trigger1 = Time >=5 && Time <=48
trigger1 = !(time%4)
time=4
freq=80
ampl=1.5+0.02*time

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

[State 0, Super FX]
type = Explod
trigger1 = time = 5
anim = 10200
id = 10200
pos = 5,-110
postype = p1
supermovetime = 9999
pausemovetime = 9999
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0
;--------------------------------

;fix position after sSP
[State 0, PosAdd]
type = PosAdd
trigger1 = PrevStateNo = 220
trigger1 = P2MoveType = H
x = 68
ignorehitpause = 1
persistent = 0

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 3
value = 3000,10+random%2
channel = 0
persistent = 0

[State 0, Helper]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElemTime(4) = 1
name = "Disc"
ID = 3010
stateno = 3010
pos = 0,0
postype = p1    ;p2,front,back,left,right
supermovetime = 40
pausemovetime = 40
persistent = 0

[State 0, ChangeState]
type = ChangeState
triggerall = !AILevel					 
triggerall = NumHelper(3010)<2
triggerall = Time>=48
trigger1 = Command != "holdx" && Command != "holdy" && Command != "holdz"
trigger2 = RoundState>2
trigger3 = helper(3010),Var(2) >= 4
value = Cond(var(51)>0 && Var(53) = 0,3002,3001)
ctrl = 0

[State 0, AI ChangeState]
type = ChangeState
triggerall = AILevel
triggerall = NumHelper(3010)<2
triggerall = Time>=48
trigger1 = p2bodydist x<=110 ;enemy too close
trigger2 = enemynear,movetype=A ;Enemy attacking
trigger3 = helper(3010),Var(2) >= 4
value = Cond(var(51)>0 && Var(53) = 0,3002,3001)
ctrl = 0


;===========================================================================
;Kienzan Throw
[Statedef 3001]
type = S
movetype = A
physics = S
anim = 3001
ctrl = 0
velset = 0,0
sprpriority = 1

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 2
value = 3000,20+random%3
channel = 0
persistent = 0

[State 0, VarAdd]
type = VarAdd
trigger1 = !Time
trigger1 = Var(12) = 1
var(12) = 1

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

;===========================================================================
;Emo Kienzan Throw
[Statedef 3002]
type = S
movetype = A
physics = S
anim = 3002
ctrl = 0
velset = 0,0
sprpriority = 1

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3000,20+random%3
channel = 0
persistent = 0

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

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(2)>=0 && AnimElemTime(5)<0
trigger1 = command = "x" || command = "y" || command = "z"
var(9) = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = RoundState = 2
trigger1 = Var(9) = 1
trigger1 = AnimElemTime(4)>=12
value = 3003
ctrl = 0

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

;===========================================================================
;Emo Kienzan Throw 2
[Statedef 3003]
type = S
movetype = A
physics = S
anim = 3003
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(51)>0
trigger1 = !Time
var(51) = -100

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3000,20+random%3
channel = 0
persistent = 0
[State 0, Helper]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElemTime(2) = 1
name = "Disc"
ID = 3011
stateno = 3010
pos = 0,0
postype = p1    ;p2,front,back,left,right
supermovetime = 40
pausemovetime = 40
persistent = 0

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

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(2)>=0 && AnimElemTime(5)<0
trigger1 = command = "x" || command = "y" || command = "z"
var(9) = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = RoundState = 2
trigger1 = Var(9) = 1
trigger1 = AnimElemTime(4)>=12
value = 3004
ctrl = 0

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

;===========================================================================
;Emo Kienzan Throw 3
[Statedef 3004]
type = S
movetype = A
physics = S
anim = 3004
ctrl = 0
velset = 0,0
sprpriority = 1

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3000,20+random%3
channel = 0
persistent = 0

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(51)>0
trigger1 = !Time
var(51) = -50

[State 0, Helper]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElemTime(1) = 1
name = "Disc"
ID = 3012
stateno = 3010
pos = 0,0
postype = p1    ;p2,front,back,left,right
supermovetime = 40
pausemovetime = 40
persistent = 0

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


;===========================================================================
;Orin Combo
[Statedef 3100]
type = S
movetype = A
physics = S
anim = 3100
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -1000

;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,48]
flag = noBG
flag2 = noFG

[State 1000, shake]
type = EnvShake
trigger1 = Time >=5 && Time <=48
trigger1 = !(time%4)
time=4
freq=80
ampl=1.5+0.02*time

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

[State 0, Super FX]
type = Explod
trigger1 = time = 5
anim = 10200
id = 10200
pos = -35,0
postype = p1
supermovetime = 9999
pausemovetime = 9999
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0
;--------------------------------

;fix position after sSP
[State 0, PosAdd]
type = PosAdd
trigger1 = PrevStateNo = 220
trigger1 = P2MoveType = H
x = 68
ignorehitpause = 1
persistent = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(16)<0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
statetype = A       ;S,A,C,L
physics = N         ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 9
x = 2
y = -3

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3100,10+random%3
channel = 0
persistent = 0

[State 221, 1]
type = PlaySnd
trigger1 = animelem = 11
trigger2 = animelem = 15
trigger3 = animelem = 19
trigger4 = animelem = 24
value = 0, 5
channel = 1

[State 221, 1]
type = PlaySnd
trigger1 = animelem = 30
value = 0, 2
channel = 1

[State 0, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 13
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = ceil(ifElse(fvar(11) * 20 < 10, 10, fvar(11) * 20)), 5
pausetime = 6 ,6
sparkno = S7020
guard.sparkno = S7000
sparkxy = -20,-90
hitsound = S5,5
guardsound = S6,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
ground.hittime = 15
air.hittime = 20
ground.velocity = -2,-13
guard.velocity = -8
air.velocity = -2,-7
airguard.velocity = -2,-1
fall = 1
yaccel = 0.5
fall.recover = 0
getpower = 0,0
givepower	= 5,5
p2facing = 1
envshake.time = 20
envshake.freq = 60
envshake.ampl = 10
envshake.phase = 4


[State 0, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 17
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = ceil(ifElse(fvar(11) * 20 < 10, 10, fvar(11) * 20)), 5
pausetime = 6 ,6
sparkno = S7020
guard.sparkno = S7000
sparkxy = -20,-90
hitsound = S5,4
guardsound = S6,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
ground.hittime = 15
air.hittime = 20
ground.velocity = -2,-13
guard.velocity = -8
air.velocity = -1,-7
airguard.velocity = -2,-1
fall = 1
yaccel = 0.5
fall.recover = 0
getpower = 0,0
givepower	= 5,5
p2facing = 1

[State 0, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 21
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = ceil(ifElse(fvar(11) * 20 < 10, 10, fvar(11) * 20)), 5
pausetime = 6 ,6
sparkno = S7020
guard.sparkno = S7000
sparkxy = -20,-90
hitsound = S5,4
guardsound = S6,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
ground.hittime = 15
air.hittime = 20
ground.velocity = -2,-13
guard.velocity = -8
air.velocity = -1,-7
airguard.velocity = -2,-1
fall = 1
yaccel = 0.5
fall.recover = 0
getpower = 0,0
givepower	= 5,5
p2facing = 1

[State 0, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 26
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = ceil(ifElse(fvar(11) * 20 < 10, 10, fvar(11) * 20)), 5
pausetime = 6 ,6
sparkno = S7030
guard.sparkno = S7000
sparkxy = -20,-90
hitsound = S5,5
guardsound = S6,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
ground.hittime = 15
air.hittime = 20
ground.velocity = -2,-13
guard.velocity = -8
air.velocity = -1,-7
airguard.velocity = -2,-1
fall = 1
yaccel = 0.5
fall.recover = 0
getpower = 0,0
givepower	= 5,5
p2facing = 1

[State 0, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 32
attr = A,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = ceil(ifElse(fvar(11) * 35 < 17, 17, fvar(11) * 35)), 5
pausetime = 12 ,12
sparkno = S7030
guard.sparkno = S7000
sparkxy = -20,-70
hitsound = S3100,0
guardsound = S7000,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 12
ground.hittime = 15
air.hittime = 20
ground.velocity = -3,0
guard.velocity = -4
air.velocity = 0,18
airguard.velocity = -2,-1
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
getpower = 0,0
givepower	= 15,15
p2facing = 1
envshake.time = 20
envshake.freq = 60
envshake.ampl = 10
envshake.phase = 4
id= 3100

[State 2300, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3001    ;Physical attack
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, Helper]
type = Helper
trigger1 = NumTarget(3100)
name = "fx"
ID = 3101
stateno = 3101
pos = 0,0
postype = p2    ;p2,front,back,left,right
ownpal = 1
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = NumTarget(3100)
trigger1 = AnimElem = 33
value = Anim
elem = 33
persistent = 10



[State -2, P2 Hit Ground Spark (front)]
type		= Explod
trigger1 = NumTarget(3100)
trigger1		= MoveHit=1
persistent	= 0
ID		= 8400
anim		= 8400
postype		= p2
pos		= 0, -8
velocity		= 0, 0
accel		= 0, 0
removetime	= -2
sprpriority	= 3
ignorehitpause	= 1
persistent = 0
[State -2, P2 Hit Ground Spark (back)]
type		= Explod
trigger1 = NumTarget(3100)
trigger1		= MoveHit=1
persistent	= 0
ID		= 8401
anim		= 8401
postype		= p2
pos		= 0, -8
velocity		= 0, 0
accel		= 0, 0
removetime	= -2
sprpriority	= -3
ignorehitpause	= 1
persistent = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 29
statetype = A       ;S,A,C,L
physics = A         ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 33
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = NumTarget(3100)
trigger1 = AnimElem = 33
x = 0
y = 0

[State 1000, 7]
type = changestate
trigger1 = !AnimTime
value = 50
ctrl = 0

;===========================================================================
;Tsuihidan
[Statedef 3200]
type = S
movetype = A
physics = S
anim = 3200
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -1000

;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,48]
flag = noBG
flag2 = noFG

[State 1000, shake]
type = EnvShake
trigger1 = Time >=5 && Time <=48
trigger1 = !(time%4)
time=4
freq=80
ampl=1.5+0.02*time

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

[State 0, Super FX]
type = Explod
trigger1 = time = 5
anim = 10200
id = 10200
pos = -20,-38
postype = p1
supermovetime = 9999
pausemovetime = 9999
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, Super FX]
type = Explod
trigger1 = time = 5
anim = 10200
id = 10200
pos = 20,-38
postype = p1
supermovetime = 9999
pausemovetime = 9999
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

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

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3200,10+random%4
channel = 0
persistent = 0

;fix position after sSP
[State 0, PosAdd]
type = PosAdd
trigger1 = PrevStateNo = 220
trigger1 = P2MoveType = H
x = 68
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElem = 7
name = "tsu"
ID = 3210
stateno = 3210
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElem = 7
name = "tsu"
ID = 3211
stateno = 3210
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

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

;===========================================================================
;Scatter Shot
[Statedef 3300]
type = S
movetype = A
physics = S
anim = 3300
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -2000

;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,53]
flag = noBG
flag2 = noFG

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4)
time=4
freq=85
ampl=1.5+0.02*time

[State 3000, superpause]
type = superpause
trigger1 = time=5
time = 45
p2defmul = 1
unhittable = 1
anim = -1
;sound = s5,100
darken = 0
movetime = 40

[State 200, Superpause charge sound]
type = PlaySnd
trigger1 = time = 5
value = 2350,0

[State 0, Hyper Charge FX]
type = Explod
trigger1 = time = 5
anim = 10201
id = 10201
pos = 5,-80
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 5
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = time = 5
time = 50
color=0
mul=0,0,0
;--------------------------------

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3300,10+random%2
channel = 0
persistent = 0

;fix position after sSP
[State 0, PosAdd]
type = PosAdd
trigger1 = PrevStateNo = 220
trigger1 = P2MoveType = H
x = 68
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 3300
trigger1 = AnimElem=10
anim = 3310
ID = 3310
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 33
pausemovetime = 33
supermovetime = 33
sprpriority = 5
removeongethit = 1

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 27
name = "scatter"
ID = 3311
stateno = 3311
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 3300
trigger1 = NumHelper(3311)
trigger1 = helper(3311), Anim = 3311
trigger1 = helper(3311), AnimElemTime(7)=0
trigger2 = time >=100
value = 3301
persistent = 0

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = Anim = 3301
value = 3302,10+random%6
channel = 0
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 3301
trigger1 = NumHelper(3311)
trigger1 = helper(3311), Anim = 3315
trigger2 = time >=120
value = 3302
persistent = 0


[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 3302
trigger1 = !AnimTime
value = 0
ctrl = 1


;===========================================================================
;KHH
[Statedef 2400]
type = A
physics = N
movetype = A
anim = 2400
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -2000

[State 0, remove Kmh Flash FX]
type = RemoveExplod
trigger1 = !time
ID = 2005
[State 0, remove Kmh Flash FX]
type = RemoveExplod
trigger1 = !time
ID = 2105

[State 3000, width]
type=width
trigger1 = 1
value = 25,0




[State 200, 1];Voice (Kamehame)
type = PlaySnd
triggerall = anim = 2400
trigger1 = time = 0
value = 2400,0
channel = 0

[State 200, 1];charge power-up sound
type = PlaySnd
trigger1 = time = 5
value = 2400,20
channel = 5



;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,53]
flag = noBG
flag2 = noFG

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4)
time=4
freq=85
ampl=1.5+0.02*time

[State 3000, superpause]
type = superpause
trigger1 = time=5
time = 45
p2defmul = 1
unhittable = 1
anim = -1
;sound = s5,100
darken = 0
movetime = 40

[State 200, Superpause charge sound]
type = PlaySnd
trigger1 = time = 5
value = 2350,0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = !time
time = 50
color=0
mul=0,0,0
;--------------------------------

[State 0, mouth LOL]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 24000
id = 24000
pos = 0,0
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -1
sprpriority = 2
ownpal = 0
bindtime = -1
scale = 1,1
persistent = 0

[State 0, Hyper Charge FX]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 2440
id = 2440
pos = -25,-70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 6
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, Charge Ball FX]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 2420+10000*(var(2)=0)
id = 2420
pos = -20,-75
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -1
sprpriority = 5
ownpal = 1
bindtime = -1
scale = 0.6,0.6
persistent = 0

[state 17100, scale charge FX]
type = ModifyExplod
trigger1 = numexplod(2420)
scale = 0.6+0.002*(time-20),0.6+0.002*(time-20)
id = 2420

[State 0, Charge lightning FX]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 2430
id = 2430
pos = -25,-70
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -1
sprpriority = 5
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 1211, BGPalFX]
type = BGPalFX
triggerall = anim = 2400 && time>=45
trigger1 = gametime%(40-var(26)/5) = 0
time = 3
color = 0
invertall = 1

[State 800, VarSet]
type = VarAdd
triggerall = Anim=2400 && time>200
trigger1 = !AILevel && ((command = "holdx") || (command = "holdy") || (command = "holdz"))
trigger2 = AILevel
var(26) = 1

;Throw Kmh
[State 901, ChangeAnim]
type = ChangeState
trigger1 = Anim=2400 && time>=52
value = 2401
ctrl = 0

;-----------------------------
;Chou Kame- throwing
[Statedef 2401]
type = A
physics = N
movetype = A
anim = 2401
ctrl = 0
velset = 0,0
sprpriority = 5

[state -2, remove charge ball FX Chou Kmh]
type = removeexplod
trigger1 = !time
id = 2420

[State 3000, nhb]
type = NotHitBy
trigger1 = var(26)=0 && time<6
time = 1
value = SCA

[State 800, VarSet];Charging time
type = VarSet
trigger1 = !time
var(25) = floor(var(26)/7.5)

[State 3000, width]
type=width
trigger1 = 1
value = 25,0

[State 200, 1];Voice (Haaa)
type = PlaySnd
trigger1 = time = 0
value = 2401,0
channel = 0

[State 200, 1];Launching SFX
type = PlaySnd
trigger1 = time=4
value = 2401,1

[State 3000, Kamehameha]
type = helper
trigger1 = anim=2401 && animelem=3
helpertype = normal
stateno = 2402
ID = 2402
name = "ckameha"
postype = p1
pos = 40,-70
ownpal = 1

[State -2, Explod];On hands explod
type = Explod
triggerall = !numexplod(2403)
trigger1 = anim=2401 && animelem=3
anim = 2403
removetime = -1
sprpriority = 4
id = 2403
ownpal = 1
pos = 53,-70
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
bindtime = -1
;scale = 0.5,1

[State -2, Explod];On hands explod
type = ModifyExplod
trigger1 = anim=2401
trigger1 = WinKO && MatchOver
pos = 30,-70
scale = .6,1.5
ID = 2403

[State 3000, Kamehameha FX beam]
type = helper
trigger1 = anim=2401 && animelem=3
helpertype = normal
stateno = 2464
ID = 2464
name = "ckamehaFX_scale_beam"
postype = p1
pos = 47,-70
ownpal = 1

[State 200, 1];Dramatic SFX
type = PlaySnd
trigger1 = WinKO && (p2stateno=5941 || p2stateno=5943)
value = 5941,0
volume = 255
persistent = 0

;Stop
[State 901, ChangeAnim]
type = ChangeState
trigger1 = numhelper(2402)
trigger1 = helper(2402),var(2)=20+var(25)
trigger1 = Anim=2401
trigger2 = time>91 && !MatchOver
trigger3 = time>120 && WinKO && MatchOver
value = 2403
ctrl = 0

;-----------------------------
;Chou Kame- stop
[Statedef 2403]
type = A
physics = N
movetype = A
anim = 2410
ctrl = 0
velset = 0,0
sprpriority = 1

[state 17100,remove FX]
type = removeexplod
trigger1 = !time
id = 2405
[state 17100,remove overlay FX]
type = removeexplod
trigger1 = !time
id = 2908

[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2403)
scale = 1, IfElse(1-0.05*time<0, 0, 1-0.05*time)
id = 2403
[state 17100,remove FX]
type = removeexplod
trigger1 = !animtime
id = 2403

[State 3000, end]
type = changestate
trigger1 = !animtime
value = 50
ctrl = 1

;--------------------------------------------------
; - shaking from hit
[Statedef 1233]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = -9
y = Cond(enemy, Pos Y < Pos Y-10, -7,7)
ignorehitpause = 1

[State 1223, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1223

[State 1223, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1234

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

;------------------
;  - flying through the air
[Statedef 1234]
type    = A
movetype= H
physics = N

[State VelSet]
type = velset
trigger1 = Time = 0
x = gethitvar(xvel)* facing
;y = gethitvar(yvel) 

[State 0, VelSet]
type = VelSet
trigger1 = !Time
y = Cond(enemy, Pos Y < Pos Y, -7,1)
ignorehitpause = 1

[State 1224, Gravity]
type = VelAdd
trigger1 = Time >= 6
trigger1 = Alive
y = .45

[State 1224, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1224, Hit wall]
type = ChangeState
triggerall = Alive
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1235

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

[State 1224, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

[State 0, ChangeState]
type = ChangeState
trigger1 = !Alive
trigger1 = P2BodyDist X >300
value = 1237

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1

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

[State 0, SelfState]
type = SelfState
trigger1 = Time = 100
value = 5150

;------------------
; - hit wall
[Statedef 1235]
type    = A
movetype= H
physics = N

[State 1225, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1225, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1225, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1225, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1225, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1224

[State 1225, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1236


;------------------
; - bounce off wall
[Statedef 1236]
type    = A
movetype= H
physics = N


[State 1226, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -7

[State 1226, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1226, Gravity]
type = VelAdd
trigger1 = 1
y = .25

[State 1226, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1226, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1226, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1226, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1226, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

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

[Statedef 2480];Beam counter - Big Portraits
type = S
physics = S
movetype = A
anim = 2400
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -2000

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[state 1215, big portrait P1]
type = explod
trigger1 = !time && facing=1
anim = 2480
id = 2480
pos = 0,0
postype = Left
sprpriority = -5
;ontop = 1
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
scale = 0.71875,0.71875
vel = -.7,0
supermovetime = 99999
pausemovetime = 99999

[state 1215, big portrait P1 flash]
type = explod
trigger1 = !time && facing=1
anim = 2481
id = 2480
pos = 0,0
postype = Left
sprpriority = -4
;ontop = 1
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
scale = 0.71875,0.71875
vel = -.7,0
supermovetime = 99999
pausemovetime = 99999

[state 1215, big portrait mouth P1]
type = explod
trigger1 = !time && facing=1
anim = 2482
id = 2480
pos = 0,0
postype = Left
sprpriority = -3
;ontop = 1
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
scale = 0.71875,0.71875
vel = -.7,0
supermovetime = 99999
pausemovetime = 99999

[state 1215, big portrait P2]
type = explod
trigger1 = !time && facing=-1
anim = 2480
id = 2480
pos = 320,0
postype = Left
sprpriority = -5
;ontop = 1
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
facing = -1
scale = 0.71875,0.71875
vel = .7,0
supermovetime = 99999
pausemovetime = 99999

[state 1215, big portrait P2 flash]
type = explod
trigger1 = !time && facing=-1
anim = 2481
id = 2480
pos = 320,0
postype = Left
sprpriority = -4
;ontop = 1
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
facing = -1
scale = 0.71875,0.71875
vel = .7,0
supermovetime = 99999
pausemovetime = 99999

[state 1215, big portrait mouth P2]
type = explod
trigger1 = !time && facing=-1
anim = 2482
id = 2480
pos = 320,0
postype = Left
sprpriority = -3
;ontop = 1
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
facing = -1
scale = 0.71875,0.71875
vel = .7,0
supermovetime = 99999
pausemovetime = 99999

[State 3000, width]
type=width
trigger1 = 1
value = 25,0

[State 800, VarSet];Charging time
type = VarSet
trigger1 = !time
var(26) = 0

[State 3000, nhb]
type = NotHitBy
trigger1 = anim = 2400 && var(26) = 0
time = 1
value = SCA

[State 200, 1];Voice (Kamehame)
type = PlaySnd
triggerall = var(55)=0		;Voice=Japan
triggerall = anim = 2400
trigger1 = time = 0
value = 2400,0
channel = 0
volume = 255

[State 200, 1];Voice (Kamehame)
type = PlaySnd
triggerall = var(55)=1		;Voice=English
triggerall = anim = 2400
trigger1 = time = 0
value = 2400,5
channel = 0
volume = 255

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=2		;Voice=Custom Corey Holland
triggerall = anim = 2400
trigger1 = time = 0
value = 2400,6+random%2
channel = 0
volume = 255

[State 200, Kmh charge long]
type = PlaySnd
triggerall = anim = 2400
trigger1 = time = 60
value = 2400,1

[State 200, electricity]
type = PlaySnd
trigger1 = time > 60
trigger1 = (GameTime%40) = 20
value = 2400,2
volume = 10

[State 2500, bgpalfx1]
type = bgpalfx
triggerall = anim = 2400
trigger1 = time = [1,200]
time = 1
color=0
mul=0,0,0

[State 200, BGPalFX]
type = BGPalFX
trigger1 = time>=200
time = 1
add	= ceil(-256+1.7*Var(26)),ceil(-256+1.7*Var(26)),ceil(-256+1.7*Var(26))
mul	= 256,256,256
invertall = 0
color = 256

[State 200, SuperPause sound]
type = PlaySnd
trigger1 = time=5
value = 2350,0

[State 0, mouth LOL]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 24000
id = 24000
pos = 0,0
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -1
sprpriority = 2
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, Hyper Charge FX]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 2440
id = 2440
pos = -22,-55
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 6
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0, Charge Ball FX]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 2420+10000*(var(2)=0)
id = 2420
pos = -22,-55
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -1
sprpriority = 5
ownpal = 1
bindtime = -1
scale = 0.6,0.6
persistent = 0

[state 17100, scale charge FX]
type = ModifyExplod
trigger1 = numexplod(2420)
scale = 0.6+0.002*(time-20),0.6+0.002*(time-20)
id = 2420

[State 0, Charge lightning FX]
type = Explod
triggerall = anim = 2400
trigger1 = time = 5
anim = 2430
id = 2430
pos = -22,-55
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -1
sprpriority = 5
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 0,from sky lightning]
type = explod
triggerall = anim = 2400 && time>=45
trigger1 = gametime%(40-var(26)/5) = 0
anim = 2450+random%6
sprpriority = 7
postype = p1
pos = 0,ceil(pos y)
facing = IfElse(random<500,-1,1)
random = 160,0
scale = 1,2
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 0, lightning sound]
type = PlaySnd
triggerall = anim = 2400 && time>=45
trigger1 = gametime%(40-var(26)/5) = 0
value = 2400,3
;channel=1
volume = -170-(32*numexplod)
freqmul = .9 + (random/5000.0)

[State 1211, BGPalFX]
type = BGPalFX
triggerall = anim = 2400 && time>=45
trigger1 = gametime%(40-var(26)/5) = 0
time = 3
color = 0
invertall = 1

[State 1000, Fade to Black]
type = Helper
trigger1 = time=100
helpertype = Normal
name = "fade"
id = 2771
pos = 0,0
postype = p1
facing = 1
stateno = 2771
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999

;Throw Kmh
[State 901, ChangeAnim]
type = ChangeState
trigger1 = enemy,name = "Goku Z2" || enemy,name = "Yellow Suika" || enemy,name = "Combo Stickman" || enemy,name="Vegeta Z2" || enemy,name = "SSJ Goku Z2" || enemy,name = "Gohan Z2"
trigger1 = Anim=2400 && time>=200
value = 2481
ctrl = 0

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

[Statedef 2481];Throwing Chou Kamehameha as Beam Counter
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 4

;Proportionality variable
[State 800, count]
type = VarSet
trigger1 = !time
fvar(20) = 0.5

[State -2, notification]
type = helper
trigger1 = !time && numhelper(13250)=0 && teamside = 1
helpertype=normal
stateno=13250
ID=13250
name="notif-col"
ownpal=1
pausemovetime=65535
supermovetime=65535
ignorehitpause=1

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = timerfreeze
ignorehitpause = 1

[state 0, 1 tick fix]
type = ChangeAnim
trigger1 = enemy,stateno = 2481 && anim!=2401
value = 2401

[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2480
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2420
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2430
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2440
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 24000

[State 13100, shake]
type = envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 3

[State 0, Scale]
type = AngleDraw
trigger1 = 1
scale = .5,.5
[State 0, Position]
type = PosSet
trigger1 = 1
X = IfElse(facing=1, -130, 130)
Y = -20

[State -2];Counter variable from state -2
type = VarSet
trigger1 = !time
var(31) = 0

[State 200, 1];Voice (Haaa)
type = PlaySnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = time = 0
value = 2401,0
channel = 0
volume = 355
[State 200, 1];Voice (Haaa)
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = time = 0
value = 2401,5
channel = 0
volume = 355
[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=2		;Voice=Custom Corey Holland
trigger1 = time = 0
value = 2401,6+random%2
channel = 0
volume = 255

[State 200, 1];Launching SFX
type = PlaySnd
trigger1 = time=4
value = 2401,1
[State 200, 1];Beam clash
type = PlaySnd
trigger1 = time=4
value = 2480,0
loop = 1
channel = 5
[State 200, 1];Beam colision voice tatatatata
type = PlaySnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = time>40 && fvar(20)<=0.2
value = 2480,1
channel = 5
persistent = 0

[state 1215, Smoke FX]
type = explod
trigger1 = anim=2401 && animelem=2
anim = 1206+(var(2)=0)
id = 1206
pos = -12,2
postype = P1
sprpriority = 5
ownpal = 1
removetime = -1
persistent = 0
ignorehitpause = 1
scale = .5,.5

[State -2, Explod];On hands explod
type = Explod
triggerall = !numexplod(2403)
trigger1 = anim=2401 && animelem=2
anim = 2403
removetime = -1
supermove = 1
sprpriority = 3
id = 2481
ownpal = 1
pos = 28,-27
ignorehitpause = 1
pausemovetime = -1
bindtime = -1
scale = 0.5,.5

[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2481)
scale = 0.5+0.1*(fvar(20)-0.5) ,0.5+0.3*(fvar(20)-0.5)
id = 2481
ignorehitpause = 1

[State -2, Explod];Scaling part
type = Explod
triggerall = !numexplod(2464)
trigger1 = anim=2401 && animelem=2
anim = 2464
removetime = -1
supermove = 1
sprpriority = 2
id = 2464
pos = 36,-27
scale = .5,.5
bindtime = -1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2464)
scale = fvar(20)*2. ,0.5+0.3*(fvar(20)-0.5)
id = 2464
ignorehitpause = 1

[State 3000, Center Ball]
type = helper
triggerall = !numhelper(2483)
trigger1 = anim=2401 && animelem=2 ;&& facing=1
helpertype = normal
stateno = 2483
ID = 2483
name = "centerball"
postype = left
pos = 0,0
ownpal = 1

[state 3250, speedlines1 WIN]
type = explod
trigger1 = numexplod(2923)<6 && teamside = 1
trigger1 = fvar(20)>0.5
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 = fvar(20)>0.5
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 = fvar(20)>0.5
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 = fvar(20)>0.5
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 = fvar(20)>0.5
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 = fvar(20)>0.5
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 800, trans speedlines WIN]
type = ModifyExplod
trigger1 = fvar(20) > 0.5
trans = addalpha
alpha = ceil(512*(fvar(20)-0.5)), ceil(256-512*(fvar(20)-0.5))
ID = 2923
[State 800, remove speedlines WIN]
type = RemoveExplod
trigger1 = fvar(20) <= 0.5
ID = 2923

[state 3250, speedlines1 LOSE]
type = explod
trigger1 = numexplod(2922)<6 && teamside = 1
trigger1 = fvar(20)<0.5
anim = 2922
ID = 2922
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 LOSE]
type = explod
trigger1 = numexplod(2922)<6 && teamside = 1
trigger1 = fvar(20)<0.5
anim = 2922
ID = 2922
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 LOSE]
type = explod
trigger1 = numexplod(2922)<6 && teamside = 1
trigger1 = fvar(20)<0.5
anim = 2922
ID = 2922
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 LOSE]
type = explod
trigger1 = numexplod(2922)<6 && teamside = 1
trigger1 = fvar(20)<0.5
anim = 2922
ID = 2922
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 LOSE]
type = explod
trigger1 = numexplod(2922)<6 && teamside = 1
trigger1 = fvar(20)<0.5
anim = 2922
ID = 2922
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 LOSE]
type = explod
trigger1 = numexplod(2922)<6 && teamside = 1
trigger1 = fvar(20)<0.5
anim = 2922
ID = 2922
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 800, trans speedlines LOSE]
type = ModifyExplod
trigger1 = fvar(20) < 0.5
trans = addalpha
alpha = ceil(-512*(fvar(20)-0.5)), ceil(256+512*(fvar(20)-0.5))
ID = 2922
[State 800, remove speedlines LOSE]
type = RemoveExplod
trigger1 = fvar(20) >= 0.5
ID = 2922

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

[State 800, count];Dump power
type = VarAdd
triggerall = power>0
trigger1 = command="start" || command="holdstart"
trigger1 = time%5 = 0
var(30) = 1
[State 800, count];Dump power
type = PowerAdd
triggerall = power>0
trigger1 = command="start" || command="holdstart"
trigger1 = time%5 = 0
value = -20
[State 800, count];Dump power
type = PalFX
triggerall = power>0
trigger1 = command="start" || command="holdstart"
trigger1 = time%5 = 0
time = 5
add = 150,0,0
mul = 200,200,200
;sin = 50,50,50

;Proportionality variable for scaling : =1 when beating the opponent by 20, =0 when beaten by 20.
[State 800, count]
type = VarSet
trigger1 = 1
fvar(20) = 0.5+(var(30)-enemy,var(30))/40.0

[State 800, WIN]
type = ChangeState
triggerall = time>10
trigger1 = fvar(20)>=.9
value = 2485

[State 800, no winner, both take damage]
type = ChangeState
trigger1 = time>=300
value = 2489

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

[Statedef 2485];WIN Chou Kamehameha Beam Counter
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 2485

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[State 800, hit]
type = hitdef
trigger1 = !MoveHit
attr = S,HA
hitflag = MAF
priority = 7,Hit
damage  = 0,0
sparkno = -1

[State 3025, p2state - killed]
type = targetstate
trigger1 = MoveHit && NumTarget
value = IfElse(target,life > 350,2486,2487)
ignorehitpause = 1

[state 0, remove explod];center ball
type = RemoveExplod
trigger1 = !time
ID = 2483

[State 200, 1];Beam clash stop
type = StopSnd
trigger1 = !time
channel = 5

[State 13100, shake]
type = envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 3

[State 0, Scale]
type = AngleDraw
trigger1 = 1
scale = .5,.5
[State 0, Position]
type = PosSet
trigger1 = 1
X = IfElse(facing=1, -130, 130)
Y = -20

[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2481)
scale = 0.25+0.1*(fvar(20)-0.5) ,0.5+0.3*(fvar(20)-0.5)
id = 2481
ignorehitpause = 1

[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2464)
scale = fvar(20)*2. ,0.5+0.3*(fvar(20)-0.5)
id = 2464
ignorehitpause = 1

;Proportionality variable for scaling
[State 800, count]
type = VarSet
trigger1 = 1
fvar(20) = 2.0

[State 1315, Sparks]
type=explod
trigger1= time<60 && !(time%3)
anim=7030
sprpriority=6
postype=p2
pos=(random%20), -floor(P2Dist y)+(random%20)-30
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
pausemovetime=100
supermovetime=100
scale = .5,.5

[State 3000, hitsound]
type = PlaySnd
trigger1= time<60 && !(time%3)
value = 1000,0
volume = -100

[State 3000, hitadd]
type = HitAdd
trigger1= time<60 && !(time%3)
value = 20

[State 800, WIN]
type = ChangeState
trigger1 = time=120
value = 2488
ctrl = 0

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

[Statedef 2486];LOSE Chou Kamehameha Beam Counter (normal)
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 5
anim = 5017

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[state 0, remove explod];center ball
type = RemoveExplod
trigger1 = !time
ID = 2483
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 1206
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2403
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2464
[state 0, remove explod];on hands
type = RemoveExplod
trigger1 = !time
ID = 2481
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2922
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2923

[State 200, 1];Beam clash stop
type = StopSnd
trigger1 = !time
channel = 5

[State 13100, shake]
type = envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 3

[State 0, Scale]
type = AngleDraw
trigger1 = 1
scale = .5,.5
[State 0, Position]
type = PosSet
trigger1 = 1
X = IfElse(facing=1, -230, 230)
Y = -20

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 20
anim = 2763
id = 19875
pos =  160,120
postype = left
sprpriority = 7
bindtime = -1
ownpal = 1
removetime = -2
pausemovetime = 999999
supermovetime = 999999
supermove = 1
scale = 1.50,1.50
ignorehitpause = 1
persistent = 0

[State 3000, shaking]
type = PosAdd
trigger1 = time<30
X = IfElse(time%4=0,-2,IfElse(time%4=2,2,0))
ignorehitpause = 1

[State 3000, Killed sound]
type = PlaySnd
trigger1 = time=20
value = 11,0
volume = 255

[State 3000, nhb]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA
ignorehitpause = 1

[State 13100, Hurt]
type = LifeAdd
trigger1 = !time
value = -350

[State 800, hitground]
type = SelfState
trigger1 = time=120
value = 5110
;ctrl = 0

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

[Statedef 2487];LOSE Chou Kamehameha Beam Counter (Fatality)
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 15999

[State 10500, snd]
type = PlaySnd
trigger1 = time=60
value = 9,0

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[state 0, remove explod];center ball
type = RemoveExplod
trigger1 = !time
ID = 2483
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 1206
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2403
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2464
[state 0, remove explod];on hands
type = RemoveExplod
trigger1 = !time
ID = 2481
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2922
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2923

[State 200, 1];Beam clash stop
type = StopSnd
trigger1 = !time
channel = 5

[State 13100, shake]
type = envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 3

[State 0, Scale]
type = AngleDraw
trigger1 = 1
scale = .5,.5
[State 0, Position]
type = PosSet
trigger1 = 1
X = IfElse(facing=1, -130, 130)
Y = -20

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 20
anim = 2763
id = 19875
pos =  160,120
postype = left
sprpriority = 7
bindtime = -1
ownpal = 1
removetime = -2
pausemovetime = 999999
supermovetime = 999999
supermove = 1
scale = 1.50,1.50
ignorehitpause = 1
persistent = 0

[State 10000, Explod]; White BG front holes
type = Explod
triggerall = !SelfAnimExist(5941)
trigger1 = time=30
anim = 5944
id = 5944
postype = p1
pos =  0, -20
sprpriority = 10
bindtime = -1
ownpal = 1
removetime = -2
pausemovetime = 999999
supermovetime = 999999
supermove = 1
ignorehitpause = 1
persistent = 0
facing = -1
ontop = 1
scale = .5,.5

[State 3000, shaking]
type = PosAdd
trigger1 = time<30
X = IfElse(time%4=0,-2,IfElse(time%4=2,2,0))
ignorehitpause = 1

[State 1315, Goku]
type = explod
triggerall = !SelfAnimExist(5941)
trigger1 = !time
anim = 5943
ID = 5943
sprpriority=7
postype = p1
pos = 0,-7
removetime=-2
ownpal=0
ignorehitpause=1
bindtime = -1
ontop = 1
scale = 0.5,0.5
[State 1315, Goku]
type = explod
triggerall = SelfAnimExist(5941)
trigger1 = !time
anim = 5941
ID = 5941
sprpriority=7
postype = p1
pos = 0,-7
removetime=-2
ownpal=0
ignorehitpause=1
bindtime = -1
ontop = 1
scale = 0.5,0.5
[State 1315, Goku]
type = explod
triggerall = SelfAnimExist(5942)
trigger1 = !time
anim = 5942
ID = 5942
sprpriority=7
postype = p1
pos = 0,-7
removetime=-2
ownpal=0
ignorehitpause=1
bindtime = -1
ontop = 1
scale = 0.5,0.5

[State 13300, Fadeout]
type = PalFX
trigger1 = Time = [0,30]
time = 1
add = -8*(Time),-8*(Time),-8*(Time)

[State 13300, Fadeout]
type = PalFX
trigger1 = Time >= 30
time = 1
add = -256,-256,-256

[State 182, 1]
type = screenbound
trigger1 = 1
movecamera = 0,0
value = 1

[State 3000, nhb]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA
ignorehitpause = 1

;This prevent freeze game
[State 49999, 5]
type = ChangeState
trigger1 = time = 120
value = 5942

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

[Statedef 2488];WIN Beam collision, remove explods, posset
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 0

[state 0, put on ground]
type = PosSet
trigger1 = !time
Y = 0

[state 0, remove explod];center ball
type = RemoveExplod
trigger1 = !time
ID = 2483
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 1206
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2403
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2464
[state 0, remove explod];on hands
type = RemoveExplod
trigger1 = !time
ID = 2481
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2922
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2923

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

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

[Statedef 2489];NO WINNER Chou Kamehameha Beam Counter
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 2485

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[State 200, 1];Beam clash stop
type = StopSnd
trigger1 = !time
channel = 5

[State 13100, shake]
type = envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 3

[State 0, Scale]
type = AngleDraw
trigger1 = time>0
scale = .5,.5
[State 0, Position]
type = PosSet
trigger1 = 1
X = IfElse(facing=1, -130, 130)
Y = -20

[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2481)
scale = 0.25+0.1*(fvar(20)-0.5) ,0.5+0.3*(fvar(20)-0.5)
id = 2481
ignorehitpause = 1
[state 17100,scale FX]
type = ModifyExplod
trigger1 = numexplod(2464)
scale = fvar(20)*2. ,0.5+0.3*(fvar(20)-0.5)
id = 2464
ignorehitpause = 1

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 10
anim = 2489   ;2763
id = 19875
pos =  160,120
postype = left
sprpriority = 7
bindtime = -1
ownpal = 1
removetime = -2
pausemovetime = 999999
supermovetime = 999999
supermove = 1
scale = 1.50,1.50
ignorehitpause = 1
persistent = 0

[State 3000, Killed sound]
type = PlaySnd
trigger1 = time=40
value = 11,0
volume = 255

[State 800, WIN]
type = ChangeState
trigger1 = time=130
value = 2490
ctrl = 0

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

[Statedef 2490];HitState NO WINNER Chou Kamehameha Beam Counter
type = S
physics = S
movetype = A
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 5017

[State 2260, bg]
type = assertspecial
trigger1 = 1
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[state 0, remove explod];center ball
type = RemoveExplod
trigger1 = !time
ID = 2483
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 1206
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2403
[state 0, remove explod]
type = RemoveExplod
trigger1 = !time
ID = 2464
[state 0, remove explod];on hands
type = RemoveExplod
trigger1 = !time
ID = 2481
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2922
[state 0, remove explod];speed lines
type = RemoveExplod
trigger1 = !time
ID = 2923

[State 13100, shake]
type = envshake
trigger1 = !time
time = 12
freq = 130
ampl = 3

[State 0, Scale]
type = AngleDraw
trigger1 = 1
scale = .5,.5
[State 0, Position]
type = PosSet
trigger1 = 1
X = IfElse(facing=1, -130, 130)
Y = -20

[State 3000, nhb]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA
ignorehitpause = 1

[State 13100, Hurt];remove life depending on smashing variable
type = LifeAdd
trigger1 = !time
;value = floor(-350*(enemy,var(30))/(var(30)+(enemy,var(30))+.001))
value = floor(-350.0*(1.0-fvar(20)))

[State 800, hitground]
type = SelfState
trigger1 = time=10
value = 5110

;--------------------------------------------
;Man Up
[Statedef 2700]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= -2000
velset = 0,0
anim = 910
ctrl = 0

[State 200, BGPalFX]
type = BGPalFX
trigger1 = time=[0,97]
time = 1
add	= -100,-100,-100
mul	= 256,100,100
invertall = 0
color = 256

[State 3000, superpause]
type = superpause
trigger1 = time=0
time = 97
p2defmul = 1
unhittable = 1
anim = -1
sound = s2700,0
darken = 0
movetime = 97

[State 3000, nhb]
type = null;nothitby
trigger1 = 1
time = 1
value = SCA

[State 13100, shake]
type = null;envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 5


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(4)=1
trigger2 = AnimElemTime(8)=1
value = 5,0

[State 0, StopSnd]
type = StopSnd
trigger1 = !Time
trigger1 = PrevStateNo = 15
channel = 2

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 2700,10+random%2
channel = 0
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(51)=1000
[State 0, VarSet]
type = null;VarSet
trigger1 = !AnimTime
var(52)=3000

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

;===========================================================================
; <<<<< LVL3 HYPER >>>>>
;===========================================================================

;Solar Flare x 100
[Statedef 3400]
type = S
movetype = A
physics = S
anim = 3400
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = Cond(Var(51)>1,-2000,-3000)

;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,40]
flag = noBG
flag2 = noFG

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

[State 3000, superpause]
type = superpause
trigger1 = time=5
time = 40
p2defmul = 1
unhittable = 1
anim = -1
;sound = s5,100
darken = 0
movetime = 40

[State 200, Superpause charge sound]
type = PlaySnd
trigger1 = time = 5
value = 3400,0

[State 0, Hyper Charge FX]
type = Explod
trigger1 = time = 5
anim = 10201
id = 10201
pos = 10,-60
postype = p1
supermovetime = 9999
pausemovetime = 9999
supermove = 1
removetime = -2
sprpriority = 5
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0

[State 2500, bgpalfx1]
type = bgpalfx
trigger1 = Time = 5
time = 40
color=0
mul=0,0,0
;--------------------------------

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = AnimElem = 1
value = 3400,10+random%3
channel = 0
persistent = 0

[State 0, AttackDist]
type = AttackDist
trigger1 = Time < 60
value = 999999

[State 0, AttackDist]
type = AttackDist
trigger1 = Time >= 60
value = 0

[State 0, Helper]
type = Helper
trigger1 = Time = 55
name = "Flare x100"
ID = 3401
stateno = 3401
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 1900, SSJ white circle]
type = explod
trigger1 = !NumExplod(9020011)
trigger1 = time = 55
anim = 90201
id = 9020011
pos = 0,-40
sprpriority = 7
ontop = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .005,.005
supermovetime = 9999

[State 1900, SSJ white circle]
type = modifyexplod
trigger1 =  time<65
scale = .32*(time-55),.32*(time-55)
supermovetime = 9999
ID = 9020011

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time = 50
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 10

[State 1700, Helper - effect]
type = Helper
trigger1 = Time = 53
name = "Solar Flare - effect"
ID = 1453
stateno = 1453
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
triggerall = Var(52) < 700 || Var(53) = 1
trigger1 = NumHelper(3401)
trigger1 = helper(3401),MoveHit
trigger1 = NumProjID(3401)
value = 3500
ignorehitpause = 1
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = Var(53) = 0
triggerall = (Var(52) >= 700 && Var(52) < 1400)  
trigger1 = NumHelper(3401)
trigger1 = helper(3401),MoveHit
trigger1 = NumProjID(3401)
value = 3510
ignorehitpause = 1
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = Var(53) = 0
triggerall = (Var(52) >= 1400 && Var(52) < 2100) 
trigger1 = NumHelper(3401)
trigger1 = helper(3401),MoveHit
trigger1 = NumProjID(3401)
value = 3600
ignorehitpause = 1
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = Var(53) = 0
triggerall = Var(52) >=2100 
trigger1 = NumHelper(3401)
trigger1 = helper(3401),MoveHit
trigger1 = NumProjID(3401)
value = 3650
ignorehitpause = 1
ctrl = 0

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

;---------------------------------------------------------------
;Activate LVL0
[Statedef 3500]
type = A
movetype = I
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 8
anim = 3500

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 90200

[State 0, Turn]
type = Turn
trigger1 = Time<3
trigger1 = Facing = enemy, Facing

[State 1900, SSJ white circle]
type = explod
trigger1 = !time 
anim = 90201
id = 90201
pos = 0,-40
sprpriority = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .1,.1

[State 1900, SSJ white circle]
type = modifyexplod
trigger1 = numexplod(90201) ;&& time<65
scale = .32*(time+10),.32*(time+10)
ID = 90201

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 15
id = 90201

[State 1900, SSJ white circle]
type = explod
trigger1 = time = 20
trigger2 = time = 40
trigger3 = time = 60
trigger4 = time = 80
trigger5 = time = 100
trigger6 = time = 120
trigger7 = time = 140
trigger8 = time = 160
trigger9 = time = 180
anim = 90201
id = 90203
pos = 0,-40
sprpriority = -3
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = 150,150

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noFG
flag3 = timerfreeze

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

[State 0, HitAdd]
type = HitAdd
trigger1 = AnimElem = 18
trigger2 = AnimElem = 23
trigger3 = AnimElem = 26
trigger4 = AnimElem = 29
trigger5 = AnimElem = 32
trigger6 = AnimElem = 36
trigger7 = AnimElem = 37
trigger8 = AnimElem = 38
trigger9 = AnimElem = 39
trigger10 = AnimElem = 40
trigger11 = AnimElem = 41
trigger12 = AnimElem = 42
trigger13 = AnimElem = 47
trigger14 = AnimElem = 55
trigger15 = AnimElem = 63
value = 1

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18
trigger2 = AnimElem = 47
trigger3 = AnimElem = 55
value = 5,5
;weak punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 23
trigger2 = AnimElem = 29
value = 5,0
;medium punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 26
trigger2 = AnimElem = 32
value = 5,1
;weak kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 36
trigger2 = AnimElem = 38
trigger3 = AnimElem = 40
trigger4 = AnimElem = 42
value = 5,3
;medium kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 37
trigger2 = AnimElem = 39
trigger3 = AnimElem = 41
value = 5,4
;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 63
value = 5,2

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 17
trigger2 = AnimElem = 46
trigger3 = AnimElem = 54
value = 0,5
;weak punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 22
trigger2 = AnimElem = 28
value = 0,0
;medium punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 25
trigger2 = AnimElem = 31
value = 0,1
;weak kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 35
trigger2 = AnimElem = 37
trigger3 = AnimElem = 39
trigger4 = AnimElem = 41
value = 0,3
;medium kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 36
trigger2 = AnimElem = 38
trigger3 = AnimElem = 40
value = 0,4
;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 62
value = 0,2

[State 0, PosSet]
type = PosSet
trigger1 = AnimElem = 15
x = enemy, Pos X
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 66
x = 117

[State 0, Offset]
type = Offset
trigger1 = enemy,const(size.head.pos.y) < 71
trigger1 = AnimElemTime(34)>=0 && AnimElemTime(47)<0
y = 10

[State 0, Offset]
type = Offset
trigger1 = const(size.ground.back)<26
trigger1 = AnimElemTime(34)>=0 && AnimElemTime(47)<0
x = Cond(Facing = 1,-30,30)

[State 0, Turn]
type = Turn
trigger1 = AnimElem = 66

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 63
time = 40
freq = 80
ampl = -4
phase = 190

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 66
anim = 3501
ID = 3501
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = 9

[State 2300, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = AnimElemTime(66)>=0
ProjID = 3001    ;Physical attack
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 = Time = 30
trigger1 = Var(51)>1
var(51) = 0

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

;---------------------------------------------------------------
;Hit by LVL0
[Statedef 3505]
type = A
movetype = H
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 3505

[State 0, PalFX]
type = PalFX
trigger1 = AnimElemTime(65)<2
time = 1
add = 0,0,0
mul = 0,0,0
invertall = 0
color = 0

[State 0, PosAdd]
type = PosAdd
triggerall = BackEdgeBodyDist <90
trigger1 =  AnimElemTime(14)>=0 && AnimElemTime(30)<0
x = 90
[State 0, PosAdd]
type = PosAdd
triggerall = FrontEdgeBodyDist <90
trigger1 =  AnimElemTime(14)>=0 && AnimElemTime(30)<0
x = -90

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

[State 0, Turn]
type = Turn
trigger1 = AnimElem = 54

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(67)>0
x = -11;Cond(Facing = -1,-11,11)
y = -3

[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElemTime(65) = 2
time = 3
add = 0,0,0
mul = 000,000,000
sinadd = 0,0,0,1
invertall = 0
color = 256
[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElemTime(67) = 1
time = 3
add = 0,0,0
mul = 050,050,050
sinadd = 0,0,0,1
invertall = 0
color = 256
[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElemTime(68) = 1
time = 4
add = 0,0,0
mul = 100,100,100
sinadd = 0,0,0,1
invertall = 0
color = 256
[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElemTime(68) = 5
time = 3
add = 0,0,0
mul = 150,150,150
sinadd = 0,0,0,1
invertall = 0
color = 256
[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElemTime(68) = 8
time = 3
add = 0,0,0
mul = 200,200,200
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 68
value = ceil(ifElse(enemy, fvar(11) * -240 > -120, -120, enemy, fvar(11) * -240))
kill = 1

[State 0, SelfState]
type = SelfState
trigger1 = AnimElemTime(69)>0
value = 5050
ctrl = 0

;---------------------------------------------------------------
;Activate LVL1
[Statedef 3510]
type = A
movetype = I
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 2
anim = 3500

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 90200

[State 1900, SSJ white circle]
type = explod
trigger1 = !time 
anim = 90201
id = 90201
pos = 0,-40
sprpriority = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .1,.1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 1
value = 3510,0
persistent = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 6
value = 3510,1
persistent = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 19
value = 3510,2
persistent = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3521
;trigger1 = AnimElem = 1
value = 3510,3
persistent = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 45
value = 3510,4
persistent = 0

[State 1900, SSJ white circle]
type = modifyexplod
trigger1 = numexplod(90201) ;&& time<65
scale = .32*(time+10),.32*(time+10)
ID = 90201

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 15
id = 90201

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !NumProjID(3529)
flag = nobardisplay
flag2 = noFG
flag3 = timerfreeze

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !NumProjID(3529)
flag = noBG

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3500
trigger1 = AnimElemTime(15)>=0
value = 3510

[State 0, ScreenBound]
type = ScreenBound
trigger1 = Anim != 3500
value = 0
movecamera = 0,0

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

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3510
x = -400
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3511)
trigger1 = Anim = 3510
anim = 3512
ID = 3511
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = -1
removetime = -1
sprpriority = -5

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim = 3520
trigger2 = enemy, Anim = 3527
trigger2 = enemy, AnimElemTime(1)>=30
id = 3511

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3510
x = 14
persistent = 0

[State 0, VelSet]
type = VelSet
triggerall = Anim = 3510
trigger1 = P2BodyDist X <0
x = 0
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3510
trigger1 = enemy, Anim = 3527
x = -10
persistent = 0

[state 3250, speedlines]
type = explod
triggerall = !NumExplod(2923)
trigger1 = Anim = 3510
trigger1 = enemy, Anim = 3527
trigger1 = enemy, AnimElemTime(2) <10
trigger2 = Anim = 3520
trigger2 = AnimElem = 22
anim = 2923
ID = 2923
postype = back
pos = 0,10
bindtime = -1
sprpriority = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
removetime = -1

[state 3250, speedlines2]
type = explod
triggerall = !NumExplod(2923)
trigger1 = Anim = 3521
trigger1 = AnimElemTime(1) = 23
anim = 2923
ID = 2923
facing = -1
postype = front
pos = Cond(facing=1,0,80),10
bindtime = -1
sprpriority = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
removetime = -1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim = 3520
trigger1 = AnimElem = 6
trigger2 = Anim = 3521
trigger2 = AnimElemTime(1) = 14
trigger3 = Anim = 3522
trigger3 = AnimElem = 6
trigger4 = Anim = 3522
trigger4 = AnimElem = 46
id = 2923

[state 3250, speedlines2]
type = explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 14
anim = 2773
ID = 2923
facing = -1
postype = front
pos = -80,10
bindtime = -1
sprpriority = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
removetime = -1
[state 3250, speedlines2]
type = explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 14
anim = 2773
ID = 2923
facing = -1
postype = front
pos = 80,10
bindtime = -1
sprpriority = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
removetime = -1
[state 3250, speedlines2]
type = explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 14
anim = 2773
ID = 2923
facing = -1
postype = front
pos = 180,10
bindtime = -1
sprpriority = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
removetime = -1
[state 3250, speedlines2]
type = explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 14
anim = 2773
ID = 2923
facing = -1
postype = front
pos = 290,10
bindtime = -1
sprpriority = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
removetime = -1


;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <50
value = 3600,1
persistent = 0
[State 200, 1];swoosh
type = PlaySnd
trigger1 = Anim = 3510
value = 3600,0
persistent = 0


[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
value = 1
persistent = 0

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
value = 5,2
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
anim = 7030
ID = 7000
pos = 10,-30
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3520
x = 0
persistent = 0

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 4
value = 0,5

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 6
value = 5,5

[State 0, Explod]
type = Explod
trigger1 = Anim = 3520
trigger1 = AnimElem = 6
anim = 7030
ID = 7000
pos = 10,-15
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5

[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3520
trigger1 = AnimElem = 6
value = 1
persistent = 0

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 12
value = 0,5

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 14
value = 5,5

[State 0, Explod]
type = Explod
trigger1 = Anim = 3520
trigger1 = AnimElem = 14
anim = 7030
ID = 7000
pos = 30,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
sprpriority = 5
[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3520
trigger1 = AnimElem = 14
value = 1
persistent = 0

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 19
value = 0,2

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3520
trigger1 = AnimElem = 21
value = 5,2

[State 0, Explod]
type = Explod
trigger1 = Anim = 3520
trigger1 = AnimElem = 21
anim = 7030
ID = 7000
pos = 50,-90
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3520
trigger1 = AnimElem = 21
value = 1
persistent = 0

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=13
value = 0,5

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=15
value = 5,5
;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=17
value = 5,5
;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=19
value = 5,5

[State 0, Explod]
type = Explod
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=15
anim = 7030
ID = 7000
pos = 0,-30
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
sprpriority = 5
[State 0, Explod]
type = Explod
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=16
anim = 7030
ID = 7000
pos = 30,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
sprpriority = 5
[State 0, Explod]
type = Explod
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=15
anim = 7030
ID = 7000
pos = 0,30
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
sprpriority = 5
[State 0, HitAdd]
type = HitAdd
triggerall = Anim = 3521
trigger1 = AnimElemTime(1)=16
value = 3
persistent = 0


;medium punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 4
value = 0,1

;medium punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 6
value = 5,1

[State 0, Explod]
type = Explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 6
anim = 7020
ID = 7000
pos = 20,-10
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3522
trigger1 = AnimElem = 6
value = 1
persistent = 0

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 11
value = 0,2

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 13
value = 5,2

[State 0, Explod]
type = Explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 13
anim = 7030
ID = 7000
pos = 40,-50
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3522
trigger1 = AnimElem = 13
value = 1
persistent = 0

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 50
value = 0,2

;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 52
value = 5,2

[State 0, Explod]
type = Explod
trigger1 = Anim = 3522
trigger1 = AnimElem = 52
anim = 7030
ID = 7000
pos = 60,40
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3522
trigger1 = AnimElem = 52
value = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 20
value = 1000,4
channel = 3
loop = 1

[State 0, StopSnd]
type = StopSnd
trigger1 = Anim = 3522
trigger1 = AnimElem = 46
channel = 3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = enemy, Anim = 3527
trigger1 = enemy, AnimElemTime(1)=50
trigger1 = Anim = 3510
value = 3520
persistent = 0

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 3520
trigger1 = AnimElemTime(2)<0
x = Cond(Facing=1,(enemy, Pos X-30),(enemy, Pos X+30))
y = enemy, Pos Y-56

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3520
trigger1 = enemy, Anim = 3527
trigger1 = AnimElemTime(26)>=0 
x = -10

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 3520
trigger1 = !AnimTime
x = Cond(Facing=1,(enemy, Pos X+230),(enemy, Pos X-230))
y = enemy, Pos Y-40

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3520
trigger1 = !AnimTime
value = 3521
persistent = 0

[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 3521
trigger1 = enemy, Anim = 3527
x = -18

[State 0, Offset]
type = Offset
triggerall = Anim = 3521
triggerall = enemy, Anim = 3528
trigger1 = AnimElemTime(1)=16
trigger2 = AnimElemTime(1)=17
trigger3 = AnimElemTime(1)=20
trigger4 = AnimElemTime(1)=21
trigger5 = AnimElemTime(1)=24
trigger6 = AnimElemTime(1)=25
x = -13

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3521
trigger1 = enemy, Anim = 3529
x = 14

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 3521
trigger1 = enemy, Anim = 3529
trigger1 = enemy, AnimElemTime(1)=15
x = Cond(Facing=1,(enemy, Pos X-250),(enemy, Pos X+250))
y = enemy, Pos Y-30

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3521
trigger1 = enemy, Anim = 3529
trigger1 = enemy, AnimElemTime(1)=15
value = 3522
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3522
trigger1 = AnimElemTime(6) <0
x = 14

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3522
trigger1 = AnimElem = 6
x = 30

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3522
trigger1 =  AnimElemTime(6) >=0 && AnimElemTime(13) <0
y = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3522
trigger1 =  AnimElemTime(15) >=0 && AnimElemTime(46) <0
y = -1.5

[State 0, Projectile]
type = Projectile
trigger1 = Anim = 3522
trigger1 = AnimElemTime(46)>=0
ProjID = 3529
projanim = 1
projremovetime = 2

[State 2300, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = Anim = 3522
trigger1 = AnimElemTime(40)>=0
ProjID = 3001    ;Physical attack
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3522
trigger1 = AnimElem = 59
x = 44
y = 44

[State 0, VarSet]
type = VarSet
trigger1 = Time = 30
trigger1 = Var(51)>1
var(51) = 0

[State 0, Explod]
type = Explod
trigger1 = P2StateNo = 855
anim = 3523
ID = 3523
pos = 0,0
postype = p2  ;p2,front,back,left,right
ownpal = 1
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 3522
trigger1 = !AnimTime
value = 50
ctrl = 0

;---------------------------------------------------------------
;Hit by LVL1
[Statedef 3525]
type = A
movetype = H
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 3525

[State 0, PosAdd]
type = PosAdd
triggerall = BackEdgeBodyDist <90
trigger1 =  !Time
x = 90
[State 0, PosAdd]
type = PosAdd
triggerall = FrontEdgeBodyDist <90
trigger1 =  !Time
x = -90

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

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

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = Time >30
triggerall = Anim = 3525
trigger1 = P2BodyDist X <=0
trigger1 = enemy, Anim = 3510
value = 3526

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Anim = 3526
trigger1 = !AnimTime
value = 3527

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3527
trigger1 = AnimElemTime(2)<0
y = -.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3527
trigger1 = AnimElemTime(11)>=0 && AnimElemTime(14)<0
y = 4

[State 0, Turn]
type = Turn
trigger1 = Anim = 3527
trigger1 = AnimElemTime(14)=0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3527
trigger1 = AnimElemTime(15)>=0 && AnimElemTime(21)<0
y = -10

[State 0, Turn]
type = Turn
trigger1 = Anim = 3527
trigger1 = AnimElemTime(21)=0

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = Anim = 3527
triggerall = enemy, Anim = 3521
trigger1 = P2BodyDist X >=0
value = 3528
persistent = 0

[State 0, Turn]
type = Turn
trigger1 = Anim = 3528
trigger1 = AnimElemTime(1)=0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3529
trigger1 = AnimElemTime(1)>=0 && AnimElemTime(2)<0
x = -2

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Anim = 3528
trigger1 = !AnimTime
value = 3529

[State 0, Turn]
type = Turn
trigger1 = Anim = 3529
trigger1 = AnimElemTime(5)=0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3529
trigger1 = AnimElemTime(17)>=0 && AnimElemTime(25)<0
x = -6

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3529
trigger1 = AnimElemTime(41)>=0 && AnimElemTime(76)<0
y = -.5

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3529
trigger1 = AnimElem = 86
y = 10

[State 0, LifeAdd]
type = LifeAdd
trigger1 = Anim = 3529
trigger1 = AnimElem = 30
value = ceil(ifElse(enemy, fvar(11) * -240 > -120, -120, enemy, fvar(11) * -240))
kill = 0

[State 0, LifeAdd]
type = LifeAdd
trigger1 = Anim = 3529
trigger1 = AnimElem = 76
value = ceil(ifElse(enemy, fvar(11) * -75 > -35, -35, enemy, fvar(11) * -50))
kill = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 3529
trigger1 = AnimElemTime(85)>= 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 855

;----------------------------
;P2 Hit by Ground Throw
[Statedef 855]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 1
velset = 0,0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 855

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(5)>=0 && AnimElemTime(7)<0
y = -3
[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(5)>=0
x = -4

[State 0, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(7)>=0
y = 1

[State 21, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------
;Activate LVL2
[Statedef 3600]
type = A
movetype = I
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 2
anim = 3500

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 90200

[State 1900, SSJ white circle]
type = explod
trigger1 = !time 
anim = 90201
id = 90201
pos = 0,-40
sprpriority = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .1,.1

[State 1900, SSJ white circle]
type = modifyexplod
trigger1 = numexplod(90201) ;&& time<65
scale = .32*(time+10),.32*(time+10)
ID = 90201

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 15
id = 90201

[State 0, VarSet]
type = VarSet
trigger1 = Time = 30
trigger1 = Var(51)>1
var(51) = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noFG
flag3 = timerfreeze

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3500
trigger1 = AnimElemTime(15)>=0
value = 3510

[State 0, ScreenBound]
type = ScreenBound
trigger1 = Anim != 3500
value = 0
movecamera = 0,0

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

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 3510
x = cond(Facing = 1,enemy, Pos X-400,enemy, Pos X+400)
y = -10
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3511)
trigger1 = Anim = 3510
anim = 3512
ID = 3511
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = -1
removetime = -1
sprpriority = -5

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim != 3510
id = 3511

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3510
x = 14
persistent = 0

[State 0, VelSet]
type = VelSet
triggerall = Anim = 3510
trigger1 = P2BodyDist X <0
x = 0
persistent = 0

[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
value = 1
persistent = 0

[State 200, 1];swoosh
type = PlaySnd
trigger1 = Anim = 3510
value = 3600,0
persistent = 0
;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
value = 3600,1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
anim = 7030
ID = 7000
pos = 10,-30
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3510
trigger1 = enemy, Anim = 3610
value = 3600
persistent = 0

[State 200, 1];charge power-up sound
type = PlaySnd
trigger1 = Anim = 3600
trigger1 = AnimElem = 6
value = 3600,2
[State 200, 1];fire
type = PlaySnd
trigger1 = Anim = 3600
trigger1 = AnimElem = 8
value = 3600,3

[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 6
anim = 2001
ID = 2002
pos = -66,-55
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 63
scale = 1,1
sprpriority = -4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 6
anim = 2440
ID = 2002
pos = -66,-55
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = -5
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 6
anim = 2430
ID = 2002
pos = -66,-55
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 63
scale = 1,1
sprpriority = -5
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 6
anim = 2002
ID = 2002
pos = -66,-55
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 63
scale = 1,1
sprpriority = -5
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 6
anim = 2420
ID = 2002
pos = -66,-55
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 63
scale = 1,1
sprpriority = -5

;beam
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 11
anim = 3602
ID = 3602
pos = 210,-27
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 5
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim = 3600
trigger1 = !AnimTime
id = 3602

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3600
trigger1 = !AnimTime
value = 1

;beam
[State 0, Explod]
type = Explod
trigger1 = Anim = 1
anim = 3609
ID = 3602
pos = -500,-27
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 14,0
removetime = -2
sprpriority = -4
persistent = 0
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 266
ID = 3602
pos = -280,-27
postype = p1  ;p2,front,back,left,right
vel = 14,0
accel = 2,0
scale = 3,1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 279
ID = 3602
pos = -80,-27
postype = p1  ;p2,front,back,left,right
vel = 0,0
scale = 3,1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3601)
trigger1 = Anim = 1
anim = 3601
ID = 3601
pos = -350,-57
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 14,0
removetime = 60
sprpriority = -2
persistent = 0
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 266
ID = 3601
pos = 130,-57
postype = p1  ;p2,front,back,left,right
vel = 14,0
accel = 2,0

;air tech
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 240
value = 5120,0
;land
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 258
trigger2 = Time = 307
trigger3 = Time = 426
value = 40,0
[state 17100, Landing Effect]
type=explod
trigger1 = Time = 258
trigger2 = Time = 307
anim=17100
id=17100
pos=0,0
postype=P2
sprpriority=-3
ownpal=1
supermovetime=-1
[state 17100, Landing Effect]
type=explod
trigger1 = Time = 426
anim=17100
id=17100
pos=0,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 258
value = 40,1

[State 200, 1];curve
type = PlaySnd
trigger1 = Time = 275
trigger2 = Time = 295
value = 3600,4

;curved1
[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3605)
trigger1 = Time = 280
anim = 3605
ID = 3605
pos = 150,-77
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -1
sprpriority = -3
persistent = 0
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 333
ID = 3605
pos = 150,-77
postype = p1  ;p2,front,back,left,right
vel = 24,0

;curved2
[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3604)
trigger1 = Time = 300
anim = 3604
ID = 3604
pos = -60,-57
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -1
sprpriority = -2
persistent = 0
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 333
ID = 3604
pos = -60,-57
postype = p1  ;p2,front,back,left,right
vel = 24,0

[State 200, 1];straight
type = PlaySnd
trigger1 = Time = 334
value = 3600,5

;beam 
[State 0, Explod]
type = Explod
trigger1 = Time = 334
anim = 3608
ID = 3608
pos = 150,-57
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 24,0
removetime = 20
sprpriority = -5
persistent = 0
scale = 3,1

;beam dissipates
[State 0, Explod]
type = Explod
trigger1 = Time = 354
anim = 3603
ID = 3603
pos = 100,-57
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
sprpriority = -5
scale = 5,1


[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3609)
trigger1 = Time = 325
anim = 3601
ID = 3609
pos = 150,-58
postype = p1  ;p2,front,back,left,right
bindtime = 1
facing = -1
vel = -20,0
sprpriority = -1
persistent = 0
removetime = -1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 333
ID = 3609
pos = 0,-58
postype = p1  ;p2,front,back,left,right
accel = 1,0
facing = -1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 424
ID = 3609
pos = 300,-58
postype = p1  ;p2,front,back,left,right
vel = -20,0
facing = -1

;beam
[State 0, Explod]
type = Explod
trigger1 = Time = 325
anim = 3602
ID = 3602
pos = 340,-28
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -24,0
removetime = -1
sprpriority = -1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 333
ID = 3602
pos = 170,-28
postype = p1  ;p2,front,back,left,right
accel = 1,0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 424
id = 3602

[State 0, Explod]
type = Explod
trigger1 = Time = 424
anim = 3609
ID = 3610
pos = 720,-28
postype = p1  ;p2,front,back,left,right
bindtime = 1
postype = p1  ;p2,front,back,left,right
vel = -20,0
removetime = -2
sprpriority = -1
scale = 3,1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = 448
ID = 3610
pos = 170,-28
postype = p1  ;p2,front,back,left,right
vel = 0,0
scale = 3,1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 504
id = 3604
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 504
id = 3605
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 504
id = 3609

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 370
x = -160
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 370
value = 3606

[State 0, VelSet]
type = VelSet
trigger1 = Time = 370
x = 6

[State 0, VelSet]
type = VelSet
trigger1 = Time = 376
x = 2

[State 0, HitAdd]
type = HitAdd
trigger1 = Time = 392
value = 1
persistent = 0

;surprise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 369
value = 3600,6

;strong kick sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 392
value = 3600,7
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Time = 392
anim = 7030
ID = 7000
pos = 50,-45
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time = 392
x = 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3606
trigger1 = AnimElemTime(6) >=0 && AnimElemTime(12) <0
x = 6

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3606
trigger1 = AnimElem = 12
x = 0

[State 0, Explod]
type = Explod
trigger1 = Time = 431
anim = 7030
ID = 7000
pos = -10,-75
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = Time = 435
anim = 7030
ID = 7000
pos = 0,-55
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = Time = 439
anim = 7030
ID = 7000
pos = -15,-100
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = Time = 443
anim = 7030
ID = 7000
pos = 5,-34
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 431
trigger2 = Time = 435
trigger3 = Time = 439
trigger4 = Time = 443
value = 1000,0

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

[State 0, VarAdd]
type = VarAdd
trigger1 = Time >= 439
var(9) = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time >= 447
value = 1000,0
volumescale = 100-Var(9)
persistent = 4

[State 0, HitAdd]
type = HitAdd
trigger1 = Time = 431
trigger2 = Time = 435
trigger3 = Time = 439
trigger4 = Time = 443
value = 1

[State 0, HitAdd]
type = HitAdd
trigger1 = Time >= 447 && Time <= 520
value = 1
persistent = 4

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3611)
trigger1 = Anim = 3606
name = "Assert"
ID = 3611
stateno = 3611
pos = 0,0
postype = p1    ;p2,front,back,left,right
supermovetime = 999
pausemovetime = 999

[State 0, Pause]
type = Pause
trigger1 = Anim = 3606
trigger1 = AnimElemTime(3)<0
time = 2
movetime = 0
persistent = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 500
value = 3607

[State 1302, voice]
type = PlaySnd
;trigger1 = Anim = 18
trigger1 = Time = 500
value = 3600,10+random%3
channel = 0
persistent = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !enemy, Alive
trigger1 = Time >= 534
flag = invisible

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 540
value = 3601
ctrl = 0

;---------------------------------------------------------------
;Back on screen
[Statedef 3601]
type = A
movetype = I
physics = N
velset = 0,0
sprpriority = 2
anim = 110

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

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

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

[State 41, Train]
type = AfterImage
trigger1 = Time = 46
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 = 46
Anim = 8050
postype = P1
pos = -10,-20
scale = 1,.8
bindtime = 15
sprpriority = 2
ownpal = 1
removetime = -2
removeongethit = 1

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

[State 0, VelSet]
type = VelSet
trigger1 = Time = 32
x = 10

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = -309
y = -60

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Time >39
physics = A         ;A,C,S,N


;---------------------------------------------------------------
;Hit by LVL2
[Statedef 3610]
type = A
movetype = H
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 3525

[State 0, PosAdd]
type = PosAdd
triggerall = BackEdgeBodyDist <130
trigger1 =  Time = [4,17]
x = 10
[State 0, PosAdd]
type = PosAdd
triggerall = FrontEdgeBodyDist <130
trigger1 =  Time = [4,17]
x = -10

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

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 85
value = 3526

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Anim = 3526
trigger1 = !AnimTime
value = 3610

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3610
x = -9
y = 0

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

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 3610
trigger1 = enemy, Anim = 1
x = Cond(Facing = 1,enemy, Pos X +150,enemy, Pos X -150)
y = -30
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3610
trigger1 = enemy, Anim = 1
x = 9
y = 0
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 248
value = 5040

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = 247
trigger2 = Time = 286
trigger3 = Time = 302
trigger4 = Time = 330
time = 1
add = 255,255,255
color = 256

[State 0, VelAdd]
type = VelAdd
trigger1 = Anim = 5040
trigger1 = Vel X !=0
trigger1 = Pos Y <0
x = .1
y = .5

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 5040
trigger1 = Pos Y >=0
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 5040
trigger1 = Pos Y >=0
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 5040
trigger1 = Pos Y =0
value = 40

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 260
value = 41

[State 0, VelSet]
type = VelSet
trigger1 = Time = 260
y = -11

[State 0, VelSet]
type = VelSet
trigger1 = Time = 266;203
y = 0

[State 0, Turn]
type = Turn
trigger1 = Time = 287

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 288
value = 43

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 288
x = -75
y = -10

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 304
x = 20
y = 40

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 305
x = 20
y = 40

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 306
value = 11

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

[State 0, PosAdd]
type = null;PosAdd
trigger1 = Time = 306
x = 40

[State 0, Turn]
type = Turn
trigger1 = Time = 332

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 332
value = 100

[State 0, VelSet]
type = VelSet
trigger1 = Time = 365
x = .5

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 393
value = 3611

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 393
x = 10

[State 0, VelSet]
type = VelSet
trigger1 = Time = 393
x = 0
y = 0

[State 0, Offset]
type = Offset
trigger1 = Time = [395,407]
x = -10
y = 0
persistent = 3

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 432
value = 3612

[State 0, VelSet]
type = VelSet
trigger1 = Time = 433
x = 20

[State 0, LifeAdd]
type = LifeAdd
trigger1 = Time = 530
value = ceil(ifElse(enemy, fvar(11) * -370 > -210, -210, enemy, fvar(11) * -370))
kill = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Alive
trigger1 = Time = 542
value = 5110

[State 0, ChangeState]
type = ChangeState
trigger1 = !Alive
trigger1 = Time >= 542
value = 1237

[State 0, Turn]
type = Turn
trigger1 = Alive
trigger1 = Time = 542

[State 0, PosSet]
type = PosSet
trigger1 = Alive
trigger1 = Time = 542
x = Cond(Facing = 1, enemy, Pos X -360,enemy, Pos X +360)
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Alive
trigger1 = Time = 542
x = 0

[State 0, SelfState]
type = SelfState
trigger1 = Alive
trigger1 = Time = 590
value = 5120

;---------------------------------------------------------------
;Activate LVL3
[Statedef 3650]
type = A
movetype = I
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 2
anim = 3500

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 90200

[State 1900, SSJ white circle]
type = explod
trigger1 = !time 
anim = 90201
id = 90201
pos = 0,-40
sprpriority = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .1,.1

[State 1900, SSJ white circle]
type = modifyexplod
trigger1 = numexplod(90201) ;&& time<65
scale = .32*(time+10),.32*(time+10)
ID = 90201

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 15
id = 90201

[State 0, VarSet]
type = VarSet
trigger1 = Time = 30
trigger1 = Var(51)>1
var(51) = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noFG
flag3 = timerfreeze

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3500
trigger1 = AnimElemTime(15)>=0
value = 3510

[State 0, ScreenBound]
type = ScreenBound
trigger1 = Anim != 3500
trigger1 = Time < 1000
value = 0
movecamera = 0,0

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

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 3510
x = cond(Facing = 1,enemy, Pos X-400,enemy, Pos X+400)
y = -10
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(3511)
trigger1 = Anim = 3510
anim = 3512
ID = 3511
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = -1
removetime = -1
sprpriority = -5

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim != 3510
id = 3511

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3510
x = 14
persistent = 0

[State 0, VelSet]
type = VelSet
triggerall = Anim = 3510
trigger1 = P2BodyDist X <0
x = 0
persistent = 0

[State 0, HitAdd]
type = HitAdd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
value = 1
persistent = 0

[State 200, 1];swoosh
type = PlaySnd
trigger1 = Anim = 3510
value = 3600,0
persistent = 0
;strong punch sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
value = 3600,1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 3510
trigger1 = P2BodyDist X <0
anim = 7030
ID = 7000
pos = 10,-30
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0

;aura
[State 0, Explod]
type = Explod
trigger1 = Anim = 3650
trigger1 = AnimElem = 7
anim = 905
ID = 905
pos = -10,0
postype = p1  ;p2,front,back,left,right
removetime = -1
scale = .75,.75
sprpriority = -4
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim = 3650
trigger1 = AnimElem = 25
id = 905
;aura disperse
[State 0, Explod]
type = Explod
trigger1 = Anim = 3650
trigger1 = AnimElem = 25
anim = 906
ID = 906
pos = -10,0
postype = p1  ;p2,front,back,left,right
removetime = -2
scale = .75,.75
sprpriority = -4

[state 1215, Smoke FX]
type = explod
trigger1 = Anim = 3650
trigger1 = AnimElem =47
anim = 3656
id = 1206
pos = 90,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 3650
trigger1 = AnimElem =50
id = 1206
pos = 80,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 3650
trigger1 = AnimElem =51
id = 1206
pos = 70,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 3650
trigger1 = AnimElem =52
id = 1206
pos = 60,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 3650
trigger1 = AnimElem =53
id = 1206
pos = 50,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 3650
trigger1 = AnimElem =54
id = 1206
pos = 40,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 3650
trigger1 = AnimElem =55
id = 1206
pos = 30,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = -4
removetime = -2

[state 1215, Smoke FX]
type = explod
trigger1 = Anim = 3650
trigger1 = AnimElem =124
anim = 1208
id = 1206
pos = 120,0  ;30,0
postype = P1
scale = .75,.75
sprpriority = 3
removetime = -2

[state 1215, Smoke FX]
type = explod
trigger1 = Time = 744
anim = 1216
id = 1206
pos = 40,0  ;30,0
postype = P2
scale = .75,.75
sprpriority = 3
removetime = -2
[state 1215, Smoke FX]
type = explod
trigger1 = Time = 744
anim = 1216
id = 1206
pos = -40,0  ;30,0
postype = P2
scale = .75,.75
sprpriority = 3
removetime = -2
facing = -1

[State 0, VelSet]
type = VelSet
trigger1 = enemy, Anim = 3610
x = -9
persistent = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [177,178]
scale = .97,.97
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [179,180]
scale = .96,.96
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [181,182]
scale = .95,.95
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [183,184]
scale = .94,.94
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [185,186]
scale = .93,.93
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [187,188]
scale = .92,.92
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [189,190]
scale = .91,.91
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [191,192]
scale = .90,.90
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [193,194]
scale = .89,.89
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [195,196]
scale = .88,.88
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [197,198]
scale = .87,.87
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [199,200]
scale = .86,.86
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [201,202]
scale = .85,.85
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [203,204]
scale = .84,.84
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [205,206]
scale = .83,.83
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [207,208]
scale = .82,.82
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [209,210]
scale = .81,.81
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [211,212]
scale = .80,.80
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [213,214]
scale = .79,.79
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [215,216]
scale = .78,.78
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [217,218]
scale = .77,.77
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time = [219,220]
scale = .76,.76
value = 0
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 221
scale = .75,.75
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 137
value = 3650
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = BackEdgeBodyDist <20
trigger1 = Time = 137
x = 20

[State 0, VelSet]
type = VelSet
trigger1 = Time = 137
x = 4

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3650
trigger1 = AnimElem = 2
x = 0
y = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = Time >=682 && Time <= 700
value = 5

[State -2, Hitting ground sound effect];Medium sound effect, first bounce
type		= PlaySnd
trigger1		= Time = 466
value		= 15000, 1
ignorehitpause	= 1
channel		= 21
[State -2, Hitting ground sound effect];Weak sound effect, second bounce
type		= PlaySnd
trigger1		= Time = 479
value		= 15000, 0
ignorehitpause	= 1
channel		= 22

[State -2, P2 Hit Ground Spark (front)]
type		= Explod
triggerall = !NumExplod(8400)
trigger1		= Time = 466
ID		= 8400
anim		= 8400
postype		= p2
pos		= -4, -3
velocity		= 0, 0
accel		= 0, 0
removetime	= -2
sprpriority	= 3
ignorehitpause	= 1
[State -2, P2 Hit Ground Spark (back)]
type		= Explod
triggerall = !NumExplod(8400)
trigger1		= Time = 466
ID		= 8401
anim		= 8401
postype		= p2
pos		= -4, -3
velocity		= 0, 0
accel		= 0, 0
removetime	= -2
sprpriority	= -3
ignorehitpause	= 1

[State 0, HitAdd]
type = HitAdd
trigger1 = Time = 439
trigger2 = Time = 441
trigger3 = Time = 442
trigger4 = Time = 663
trigger5 = Time = 681
trigger6 = Time = 693
trigger7 = Time = 702
trigger8 = Time = 726
value = 1
[State 0, HitAdd]
type = HitAdd
trigger1 = Time = 866;[853,913]
value = 1
persistent = 0;4

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = Time = [853,913]
value = 1000,0
persistent = 4

;Keinzan sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 439
trigger2 = Time = 441
trigger3 = Time = 442
trigger4 = Time = 663
trigger5 = Time = 681
trigger6 = Time = 693
trigger7 = Time = 702
trigger8 = Time = 726
value = 3000,3

[State 0, Explod]
type = Explod
trigger1 = Time = 439
anim = 7030
ID = 7000
pos = 160,-125
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 441
anim = 7030
ID = 7000
pos = 140,-115
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 442
anim = 7030
ID = 7000
pos = 180,-105
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 663
anim = 7030
ID = 7000
pos = 0,-40
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 681
anim = 7030
ID = 7000
pos = 0,-30
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 693
anim = 7030
ID = 7000
pos = 0,-60
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 702
anim = 7030
ID = 7000
pos = -30,0
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75
[State 0, Explod]
type = Explod
trigger1 = Time = 726
anim = 7030
ID = 7000
pos = 10,-60
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
sprpriority = 5
persistent = 0
scale = .75,.75

;hole
[State 0, Explod]
type = Explod
trigger1 = Time = 696
anim = 3651
ID = 3651
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1
scale = .75,.75
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Time = 702
anim = 3652
ID = 3651
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1
scale = .75,.75
sprpriority = -5
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 920
id = 3651

[State 0, Explod]
type = Explod
trigger1 = Time = 741
anim = 3654
ID = 3651
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1
scale = .75,.75
ownpal = 1


[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 786
x = -100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 786
value = 3653

[State 0, VelSet]
type = VelSet
trigger1 = Time = 787
x = 8
y = -10

[State 0, PosSet]
type = PosSet
trigger1 = Time = 797
x = Cond(Facing = 1,enemy, Pos X-60,enemy, Pos X+60)
y = -150

[State 0, VelSet]
type = VelSet
trigger1 = Time = 797
x = 0
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 797
value = 2400
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 850
value = 2401

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

[State 200, 1];charge power-up sound
type = PlaySnd
trigger1 = Anim = 2400
trigger1 = AnimElem = 3
persistent = 0
value = 3600,2
[State 200, 1];fire
type = null;PlaySnd
trigger1 = Anim = 2401
trigger1 = AnimElem = 2
value = 3600,3

[State 0, Explod]
type = Explod
trigger1 = Anim = 2400
trigger1 = AnimElem = 3
persistent = 0
anim = 2001
ID = 2002
pos = 56,-15
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 48
scale = .75,.75
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 3
persistent = 0
anim = 2440
ID = 2002
pos = 56,-15
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 48
scale = .75,.75
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 3
persistent = 0
anim = 2430
ID = 2002
pos = 56,-15
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 48
scale = .75,.75
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 3
persistent = 0
anim = 2002
ID = 2002
pos = 56,-15
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 48
scale = .75,.75
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3600
trigger1 = AnimElem = 3
persistent = 0
anim = 2420
ID = 2002
pos = 56,-15
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 48
scale = .75,.75
sprpriority = 4



[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = [2400,2401]
value = -90

;beam
[State 0, Explod]
type = Explod
trigger1 = Time = 853
anim = 3655
ID = 3655
pos = -10,110
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = .75,.75
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 920
id = 3655

[State 0, SprPriority]
type = SprPriority
trigger1 = Time >=701
value = 1

;whiteout
[State 0, Explod]
type = Explod
trigger1 = Time = 860
trigger2 = Time = 955
anim = 19882
ID = 19882
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = 11,11
sprpriority = 5
ownpal = 1

;whiteout2
[State 0, Explod]
type = Explod
trigger1 = Time = 915
anim = 19881
ID = 19890
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = 11,11
sprpriority = 3
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 990
id = 19890

[State 0, PalFX]
type = PalFX
trigger1 = Time >= 918 && Time < 990
time = 1
add = 0,0,256
mul = 0,0,256

[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19890
ID = 19890
pos = -40,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-4
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19891
ID = 19890
pos = 70,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-4
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19892
ID = 19890
pos = 20,130
postype = p2  ;p2,front,back,left,right
facing = -1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-3
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19892
ID = 19890
pos = 64,130
postype = p2  ;p2,front,back,left,right
facing = -1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-6
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19892
ID = 19890
pos = 200,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-6.4
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19892
ID = 19890
pos = -50,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-6.9
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19893
ID = 19890
pos = -30,130
postype = p2  ;p2,front,back,left,right
facing = -1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-8
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19893
ID = 19890
pos = 50,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-8.6
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19893
ID = 19890
pos = 82,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-7
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19893
ID = 19890
pos = -134,130
postype = p2  ;p2,front,back,left,right
facing = -1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-5.1
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19894
ID = 19890
pos = -84,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-11
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19894
ID = 19890
pos = -33,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-11.6
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19894
ID = 19890
pos = 10,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-10
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19894
ID = 19890
pos = 206,130
postype = p2  ;p2,front,back,left,right
facing = -1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-9.5
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19894
ID = 19890
pos = 99,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-11.8
[State 0, Explod]
type = Explod
trigger1 = Time = 930
anim = 19895
ID = 19890
pos = 223,130
postype = p2  ;p2,front,back,left,right
facing = 1
removetime = -1
scale = .75,.75
sprpriority = 4
ownpal = 0
vel = 0,-7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 227
value = 3650,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 281
value = 3650,1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 344
trigger2 = Time = 439
value = 3650,2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 400
value = 3650,3
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 537
value = 3650,4
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 557
value = 3650,5
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 568
trigger2 = Time = 568
trigger3 = Time = 575
trigger4 = Time = 584
value = 3650,6
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 696
value = 3650,7
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 759
value = 3650,8
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 853
value = 3650,9
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 866
value = 3650,10


[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 590
volumescale = 80
value = 3650,6
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 596
volumescale = 60
value = 3650,6
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 602
volumescale = 40
value = 3650,6
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 608
volumescale = 20
value = 3650,6

[State 0, Helper]
type = Helper
trigger1 = !enemy, Alive
name = "kill!"
ID = 3657
stateno = 3657
pos = 0,0
postype = p2    ;p2,front,back,left,right
ownpal = 1
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 955
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 1009
x = 80
y = -150

[State 0, Turn]
type = Turn
trigger1 = Time = 1010

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 1015
value = 50
ctrl = 0



;---------------------------------------------------------------
;Hit by LVL3
[Statedef 3670]
type = A
movetype = H
physics = N
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 3525

[State 0, PosAdd]
type = PosAdd
triggerall = BackEdgeBodyDist <130
trigger1 =  Time = [4,17]
x = 10
[State 0, PosAdd]
type = PosAdd
triggerall = FrontEdgeBodyDist <130
trigger1 =  Time = [4,17]
x = -10

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

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 85
value = 3526

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Anim = 3526
trigger1 = !AnimTime
value = 3610

[State 0, VelSet]
type = VelSet
trigger1 = Time = 127
x = -10
y = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 418
value = 43

[State 0, PosSet]
type = PosSet
trigger1 = Time = 420
x = Cond(Facing = -1,enemy, Pos X + 266,enemy, Pos X - 266)
y = -10

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 420 && Time <= 920
scale = .75,.75

[State 0, VelSet]
type = VelSet
trigger1 = Time = 420
x = 5
y = -4

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 440
value = 3528

[State 0, VelSet]
type = VelSet
trigger1 = Time = 440
x = 0
y = 0

[State 0, Turn]
type = Turn
trigger1 = Time = 440

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Anim = 3528
trigger1 = !AnimTime
value = 3670

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3670
x = -5
y = 6

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Anim = 3670
trigger1 = Pos Y >=0
value = 3671

[State 0, VelSet]
type = VelSet
trigger1 = Anim = [3670,3671]
trigger1 = Pos Y >=0
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = Anim = [3670,3671]
trigger1 = Pos Y >=0
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3671
trigger1 = AnimElemTime(3)>=0 && AnimElemTime(5)<0
x = -6

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 490 && Time <= 515
x = 8

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >= 600 && Time <= 625
x = -8

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 630
value = 5120
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 5120
trigger1 = !AnimTime
value = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 664
value = 3672

[State 0, Turn]
type = Turn
trigger1 = Anim = 3672
trigger1 = AnimElem = 4
trigger2 = Time = 703

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5886)
trigger1 = Time = 703
value = 5886

[State 0, ChangeAnim2] 
type = ChangeAnim2
trigger1 = !SelfAnimExist(5886)
trigger1 = Time = 703
value = 3673

[State 0, ChangeAnim2] 
type = ChangeAnim2
trigger1 = Time = 727
value = 3674

[State 0, ChangeAnim] 
type = ChangeAnim
trigger1 = Anim = 3674
trigger1 = !AnimTime
value = 5070

[State 0, VelSet]
type = VelSet
trigger1 = Time = 760
y = 4

[State 0, ChangeAnim2] 
type = ChangeAnim2
trigger1 = SelfAnimExist(5946)
trigger1 = Time = 926
value = 5946

[State 0, ChangeAnim2] 
type = ChangeAnim2
trigger1 = Time = 920
value = 3675

[State 0, Explod]
type = Explod
trigger1 = SelfAnimExist(5947)
trigger1 = Time = 930
anim = 5947
ID = 5947
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 61
;scale = .75,.75
sprpriority = 4
persistent = 0

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

[State 0, VelSet]
type = VelSet
trigger1 = Time = 920
x = 0
y = -1

[State 0, SprPriority]
type = SprPriority
trigger1 = Time = 920
value = 4

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 3675
trigger1 = AnimElemTime(3)>=0 && AnimElemTime(5)<0
value = 90

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 3675
trigger1 = AnimElemTime(5)>=0 
value = 0

[State 0, PalFX]
type = PalFX
trigger1 = Time >= 890 && Time < 990
time = 1
add = 0,0,256
mul = 0,0,256

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 990
value = 5110

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

[State 0, ChangeState]
type = ChangeState
trigger1 = !Alive
trigger1 = Time >= 990
value = 1237

[State 0, PosSet]
type = PosSet
trigger1 = Time = 990
x = Cond(Facing = 1, enemy, Pos X -30,enemy, Pos X +30)
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 5110
x = 0

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 5110
y = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Anim = 5110
statetype = S       ;S,A,C,L
movetype = H        ;I,A,H
physics = S


[State 0, LifeAdd]
type = LifeAdd
trigger1 = Time = 945
value = ceil(ifElse(enemy, fvar(11) * -470 > -280, -280, enemy, fvar(11) * -470))
kill = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Time >= 1050
value = 3671
ctrl = 0

;---------------------------------------------------------------
;Get up from LVL3
[Statedef 3671]
type = S
movetype = I
physics = S
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, SelfState]
type = SelfState
trigger1 = 1
value = Cond(Alive =1, 5120, 5150)

;===========================================================================
;Senzu
[Statedef 3900]
type = S
movetype = I
physics = S
anim = 3900
ctrl = 0
velset = 0,0
sprpriority = 1

;----Common Superpause Effects ------------
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [5,48]
flag = noBG
flag2 = noFG

[State 1000, shake]
type = EnvShake
trigger1 = Time >=5 && Time <=48
trigger1 = !(time%4)
time=4
freq=80
ampl=1.5+0.02*time

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

[State 0, Super FX]
type = Explod
trigger1 = time = 5
anim = 10200
id = 10200
pos = -5,-50
postype = p1
supermovetime = 9999
pausemovetime = 9999
removetime = -2
sprpriority = 8
ownpal = 1
bindtime = -1
scale = 1,1
persistent = 0
;--------------------------------

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3900,10+random%2
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 16
value = 3900,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 25
value = 3900,1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 25
value = 3900,2

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 3901
ID = 3901
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = 1
removeongethit = 1
supermovetime = 40
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 25
anim = 3902
ID = 3902
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = 1
removeongethit = 1
supermovetime =40

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 25
name = "Ronald Regen"
ID = 3910
stateno = 3910

[State 0, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 25
trigger1 = Var(52) = [0,699]
value = 10 
[State 0, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 25
trigger1 = Var(52) = [700,1400]
value = 30 
[State 0, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 25
trigger1 = Var(52) = [1400,2099]
value = 60 
[State 0, LifeAdd]
type = LifeAdd
trigger1 = AnimElem = 25
trigger1 = Var(52) = 2100
value = 90 

[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElem = 25
time = 40
add = 0,100,50
mul = 20,220,24
sinadd = 85,110,55,20
invertall = 0
color = 0


[State 0, VarSet]
type = VarSet
trigger1 = AnimElem = 25
var(51) = 1

[State 0, VarSet]
type = VarSet
trigger1 = AnimElem = 25
var(53) = 1

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