;======================================================================
;---------------------------
;Detect life Helper (Coded by 2OS)
[Statedef 2]

[State 2OS]
type = statetypeset
trigger1 = 1
movetype = I
ignorehitpause = 1
persistent = 1

[State 2OS, Blank Animation]
type = changeanim
trigger1 = 1
value = 15999
ignorehitpause = 1
persistent = 1

[State 2OS]
type = bindtoroot
trigger1 = 1
pos = 0,0
ignorehitpause = 1
persistent = 1

[State 2OS, Damage Var Delay Reset]
type = varset
trigger1 = var(1)>1
var(1) = 0
ignorehitpause = 1
persistent = 1

[State 2OS, Damage Var Delay]
type = varadd
trigger1 = var(2) != root,life
var(1) = 1
ignorehitpause = 1
persistent = 1

[State 2OS, Damage Var]
type = varset
trigger1 = (var(1)!=[0,1])
var(2) = root,life
ignorehitpause = 1
persistent = 1

;----------------------------------------------------
;Diag Ki blast from throw
[Statedef 803]
type    = A
MoveType= A
physics = N
anim = 1035
sprpriority = 5
hitcountpersist = 1
MoveHitpersist = 1

[State 0, Projectile]
type = Projectile
trigger1 = root,NumProjID(910)<6
trigger1 = MoveHit = 1
ProjID = 910
projanim = 1
projremovetime = 60

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 0
x = 7
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1061, HitDef]
type = HitDef
trigger1 = 1
attr = S, SP
animtype  = hard
damage = 4
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 6,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
id = 802

[State 0, Projectile]
type = null;Projectile
trigger1 = NumTarget(800)
ProjID = 800
projanim = 1
projremovetime = 2

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = NumTarget(802)
trigger1 = root,Var(39)!=2
var(39) = 1
ignorehitpause = 1

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, Fade]
type = ChangeState
trigger1 = MoveContact
trigger2 = Pos Y >=0
value = 1223
ignorehitpause=1

;======================================================================
; POWER CHARGE AURA
[Statedef 905]
type = A
MoveType = I
physics = N
ctrl = 0
anim = 905
velset = 0,0
sprpriority = -4

[State 1902, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1902, BindToParent]
type = BindToParent
trigger1 = anim = 905
pos = -10,-2

[State 1902, Anim]
type = ChangeAnim
triggerall = anim = 905
trigger1 = root,stateno = 901
value = 906

[State 1902, DestroySelf]
type = DestroySelf
trigger1 = anim = 905 && (Root,StateNo != 900)
trigger2 = anim = 906 && animTime = 0
trigger3 = Root,stateno = [5000,5090]


;--------------------------------------------
;Turtle Flip After Image
[Statedef 1070]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 5
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1000,6

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

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(2) = 0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = N         ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 8
y = -9

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) >= 1
x = ifelse (vel x = 0,0,-0.10)
y = 0.25

[State 0, VelAdd]
type = VelAdd
trigger1 = Time>=20
y = 0.65

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >10
trigger1 = Pos Y >=0

;--------------------------------------------
;recovery after images up
[Statedef 1071]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1000,6

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

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 5210, 1] 
type = VelMul
trigger1 = !Time
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = !Time
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = !Time
trigger1 = root,Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -2
y = -1

[State 5210, 2] ;Go up
type = VelAdd
trigger1 = Time <= 2
y = 2

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = 1
y = .35

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >10
trigger1 = Pos Y >=0

;--------------------------------------------
;recovery after images down
[Statedef 1072]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1000,6

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

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 5210, 1] 
type = VelMul
trigger1 = !Time
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = !Time
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = !Time
trigger1 = root,Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -2
y = -1

[State 5210, 2] ;Go down
type = VelAdd
trigger1 = Time = [0,4]
y = -1.5

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = 1
y = .35

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >10
trigger1 = Pos Y >=0

;--------------------------------------------
;recovery after images fwd
[Statedef 1073]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1000,6

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

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 5210, 1] 
type = VelMul
trigger1 = !Time
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = !Time
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = !Time
trigger1 = root,Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -2
y = -1

[State 5210, 2] ;Go fwd
type = VelAdd
trigger1 = Time = [0,4]
x = -1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = 1
y = .35

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >10
trigger1 = Pos Y >=0

;--------------------------------------------
;recovery after images back
[Statedef 1074]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 1000,6

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

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 5210, 1] 
type = VelMul
trigger1 = !Time
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = !Time
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = !Time
trigger1 = root,Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = !Time
trigger1 = root,Vel Y > -2
y = -1

[State 5210, 2] ;Go back
type = VelAdd
trigger1 = Time = [0,4]
x = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = 1
y = .35

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >10
trigger1 = Pos Y >=0

;--------------------------------------------
;Normal Turtle Afterimage
[Statedef 1080]
type    = A
movetype= I
physics = N
anim = 1001
ctrl = 0

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

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

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=60

;======================================================================
; Beam Take Off
[Statedef 1110]
type = A
MoveType = A
physics = N
ctrl = 0
sprpriority = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = Cond(root,Var(9)=0, 1111, Cond(root,Var(9)=1,1112, 1113))
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
trigger1 = root,StateNo = 1106
value = 1113

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,MoveContact
value = Anim
elem = 5
persistent = 0

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

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

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1200, 2]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = !Time
attr = A, SP
animtype  = Hard
pausetime = 0,10
damage = ceil(ifElse(fvar(11) * 43 < 7, 7, fvar(11) * 43)),0
sparkno = s7030
guard.sparkno = s7000
priority  = 5
guardflag = MA
sparkxy = -8,-69
hitsound = s5, 2
guardsound = S6,0
ground.type = Low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -8, -3
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = 0
air.velocity = -12, -2
airguard.velocity = -3.5,-4.5
p2facing = 1
getpower = 100, 35
givepower = 35, 35
persistent = 0
fall.recover = 0
fall = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = root,StateNo != 1101 && root,StateNo != 1106

;======================================================================
; Jet
[Statedef 1140]
type = A
MoveType = A
physics = N
ctrl = 0
sprpriority = 5
Anim = 1140

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

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,StateNo = 1106
time = 1
pos = 50,60

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,StateNo != 1106
time = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = root,StateNo != 1106
value = -90

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,StateNo != 1130 && root,StateNo != 1135 && root,StateNo != 1106

;======================================================================
; HAND!
[Statedef 1141]
type = A
MoveType = A
physics = N
ctrl = 0
sprpriority = 5
Anim = 1141

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -90

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,StateNo != 1130 && root,StateNo != 1135

;=====================================
; Run Dust FX
;=====================================
[Statedef 10000]
type = S
movetype = I
physics = N
anim = 10000
sprpriority = 5
velset = 0,0

[state 1061, turn]
type = turn
triggerall = root, stateno = 105
trigger1 = !time 

[State 1061, Bind]
type = BindToRoot
trigger1 = root, stateno != 105
time = 1
pos = -40,4+ceil(-root,pos Y)

[State 1061, Bind]
type = BindToRoot
trigger1 = root, stateno = 105
time = 1
pos = 25,4+ceil(-root,pos Y)

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0

;----------------------------------------------------
;Ki blast
[Statedef 1220]
type    = S
MoveType= A
physics = N
anim = 1235
sprpriority = 5
hitcountpersist = 1
MoveHitpersist = 1

[State 1050, Button Detect]
type = VarSet
trigger1= !Time && !PrevStateNo
var(9) = Root, var(9)

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 1061, gethit gut ?]
type = VarSet
trigger1 = !Time
var(14) = Root, Var(14)

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 0
x = Cond(Var(9)=0,4,7);cond(var(9) = 2, 7, cond(var(9) = 1, 5.5, 4)) 
y = Cond(Var(9)=2,-2,0)

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
Time = 1
stateno = 1223
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = var(14)=0
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = IfElse(p2MoveType=H,40,140), 10
givepower = 35,35

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = var(14)=1
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = IfElse(p2MoveType=H,40,140), 10
givepower = 35,35

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, Fade]
type = ChangeState
trigger1 = MoveContact
trigger2 = Pos Y >=0
value = 1223
ignorehitpause=1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (pos x!=[-240,240])

;----------------------------------------------------
;Ki blast vanishes
[Statedef 1223]
type    = A
MoveType= I
physics = N
anim = 1236
sprpriority = 5
velset = 0,0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = PrevStateNo = 803
trigger1 = !NumTarget(802)
var(39) = 2

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 1271
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 1272
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
trigger1 = PrevStateNo = 1270 || PrevStateNo = 1275
value = 2512

[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 803
value = -45
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 1271
ignorehitpause = 1

[State 0, AngleDraw]
type = null;AngleDraw
trigger1 = PrevStateNo = 1270 || PrevStateNo = 1275
scale = 1.5,1.5

[State 0, AngleDraw]
type = AngleDraw
triggerall = PrevStateNo != 1270 && PrevStateNo != 1275
trigger1 = Pos Y>=-10
trigger2 = Var(3) = 1
value = -90

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

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1061, NoJuggle Safety]
type = ParentVarSet
trigger1 = !Time
v = 18
value = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  Pos Y >= -10 && AnimElemTime(1) = 1
value = 1001,0
channel = -1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, End]
type = DestroySelf
triggerall = P2MoveType!=H
trigger1 = Time>=12
trigger1 = Anim = 1236
trigger2 = Time>=24
trigger2 = Anim = 2512

;----------------------------------------------------
;Ki blast Upwards
[Statedef 1225]
type    = S
MoveType= A
physics = N
anim = 1235
sprpriority = 5
hitcountpersist = 1
MoveHitpersist = 1

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-70,70]) && (P2BodyDist Y = [-70,70])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1050, Button Detect]
type = VarSet
trigger1= !Time && !PrevStateNo
var(9) = Root, var(9)

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = Vel X >0
var(1) = 1
persistent = 3

[State 0, VarSet]
type = VarSet
trigger1 = Vel Y >0
var(3) = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time 
x = cond(var(9) = 2, 7, cond(var(9) = 1, 5.5, 4)) 
y = 0 

[State 0, VelAdd]
type = VelAdd
trigger1 = Time >=3
trigger1 = Vel X >0
trigger1 = Vel Y <=0
x = cond(var(9) = 2, -.3, cond(var(9) = 1, -.2, -.1)) 
y = cond(var(9) = 2, -.6, cond(var(9) = 1, -.4, -.2)) 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Vel X >0
value = cond(var(9) = 2, 10+time*3.5, cond(var(9) = 1, 10+time*3, 10+time*2)) 

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Vel X =0
trigger1 = Vel Y <=0
value = 90

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Vel X =0
trigger1 = Vel Y >0
value = -90

[State 1061, Velocity]
type = VelSet
trigger1 = Vel X <=0
x = 0

[State 0, PosSet]
type = PosSet
trigger1 = Time>60
y = -300
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Time>60
x = cond(var(9) = 2, 100, cond(var(9) = 1, 0, -100))
persistent = 0

[State 1033, VelSet]
type = VelSet
trigger1 = Time>60
x = 0
y = cond(var(9) = 2, 7, cond(var(9) = 1, 5.5, 4)) 

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
Time = 1
stateno = 1223
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = (P2BodyDist X = [-70,70]) && (P2BodyDist Y = [-70,70])
value = 70

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = 1
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
guard.dist = 0
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,Cond(Time>50,1,10)
sparkno = s7010
guard.sparkno = -1
sparkxy = Cond(Var(1)=2,0,-20),Cond(Var(1)=2,30,0)
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 10+Var(1)
ground.hittime  = 10+Var(1)
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3+(root, Var(28))
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
fall.recovertime = 15
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = IfElse(p2MoveType=H,40,140), 10
givepower = 35,35

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, End]
type = DestroySelf
trigger1 = (pos x!=[-240,240])

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit= 1
var(28) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Fade]
type = ChangeState
trigger1 = MoveContact
trigger2 = Pos Y >=-10
value = 1223
ignorehitpause=1

;----------------------------------------------------
;EX Ki blast
[Statedef 1270]
type    = S
MoveType= A
physics = N
anim = 1270
sprpriority = 5
hitcountpersist = 1

[State 2011, Varset]
type = varset
trigger1 = time = 0
var(0) = parent,id

[State 3005, hitvar]
type=varadd
trigger1= !time
var(2)=1

[State 1050, Button Detect]
type = VarSet
trigger1= !Time && !PrevStateNo
var(9) = Root, var(9)

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 1061, gethit gut ?]
type = VarSet
trigger1 = !Time
var(14) = Root, Var(14)

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = !Time
trigger1 = Anim = 1270
anim = 1271
ID = 1271
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 6
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = !Time
trigger1 = Anim = 1270
anim = 1272
ID = 1271
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 6
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !playerIDExist(var(0))
trigger2 = (pos x!=[-240,240])
id = 1271
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 0
x = Cond(Var(9)=0,4,7);cond(var(9) = 2, 7, cond(var(9) = 1, 5.5, 4)) 
y = Cond(Var(9)=2,-2,0)

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = ifelse(var(2)<2,1270,1223)  
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = var(14)=0
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 5,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 15,15

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = var(14)=1
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 5,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 15,15

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 3005, end]
type = changestate
trigger1 = movecontact
trigger2 = Pos Y >=0
value = ifelse(var(2)<2,1270,1223)

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (pos x!=[-240,240])

;----------------------------------------------------
;EX Ki blast Upwards
[Statedef 1275]
type    = S
MoveType= A
physics = N
anim = 1270
sprpriority = 5
hitcountpersist = 1

[State 2011, Varset]
type = varset
trigger1 = time = 0
var(0) = parent,id

[State 3005, hitvar]
type=varadd
trigger1= !time
var(2)=1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(31) = 1

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-150,150]) && (P2BodyDist Y = [-150,150])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1050, Button Detect]
type = VarSet
trigger1= !Time && !PrevStateNo
var(9) = Root, var(9)

[State 1050, Been hit yet?]
type = VarSet
trigger1= Var(31) >70
var(5) = 1

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = Vel X >0
var(1) = 1
persistent = 3

[State 0, VarSet]
type = VarSet
trigger1 = Vel Y >0
var(3) = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 0, Explod]
type = Explod
trigger1 = !NumExplod(1271)
trigger1 = Anim = 1270
anim = 1271
ID = 1271
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 6
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = !NumExplod(1272)
trigger1 = Anim = 1270
anim = 1272
ID = 1272
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 6
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !playerIDExist(var(0))
trigger2 = (pos x!=[-240,240])
trigger3 = Anim != 1270
id = 1271
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !playerIDExist(var(0))
trigger2 = (pos x!=[-240,240])
trigger3 = Anim != 1270
id = 1272
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = Var(5)=0
trigger1 = !Time 
trigger1 = Pos Y < 50
x = cond(var(9) = 2, 7, cond(var(9) = 1, 5.5, 4)) 
y = 0 

[State 0, VelAdd]
type = VelAdd
triggerall = Var(5)=0
trigger1 = (Var(31) >=3 && !PrevStateNo) || PrevStateNo
trigger1 = Vel X >0
trigger1 = Vel Y <=0
x = cond(var(9) = 2, -.3, cond(var(9) = 1, -.2, -.1)) 
y = cond(var(9) = 2, -.6, cond(var(9) = 1, -.4, -.2)) 

[State 0, AngleDraw]
type = AngleDraw
triggerall = Var(5)=0
trigger1 = Vel X >0
value = cond(var(9) = 2, 10+time*3.5, cond(var(9) = 1, 10+time*3, 10+time*2)) 

[State 0, AngleDraw]
type = AngleDraw
triggerall = Var(5)=0
trigger1 = Vel X =0
trigger1 = Vel Y <=0
value = 90

[State 0, AngleDraw]
type = AngleDraw
triggerall = Var(5)=0
trigger1 = Vel X =0
trigger1 = Vel Y >0
value = -90

[State 1061, Velocity]
type = VelSet
triggerall = Var(5)=0
trigger1 = Vel X <=0
x = 0

[State 1033, VelSet]
type = VelSet
trigger1 = Var(5)=0
trigger1 = Var(31)>60
trigger2 = PrevStateNo
trigger2 = Var(5)=1
x = 0
y = cond(var(9) = 2, 7, cond(var(9) = 1, 5.5, 4)) 

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = Var(31)=60
y = -300
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Var(31)=60
trigger1 = Pos Y <-260
x = cond(var(9) = 2, 100, cond(var(9) = 1, 0, -100))
persistent = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
Time = 1
stateno = ifelse(var(2)<2,1275,1223)
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = (P2BodyDist X = [-150,150]) && (P2BodyDist Y = [-150,150])
value = 150

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = 1
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
guard.dist = 0
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = -30,Cond(Var(1)=2,30,0)
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 10+Var(1)
ground.hittime  = 10+Var(1)
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = Cond(root, Var(28) >= 5,7,-3),Cond(root, Var(28) >= 5,-6,-3)
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
fall.recovertime = 15
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit= 1
var(28) = 1
ignorehitpause = 1
persistent = 0

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, End]
type = DestroySelf
trigger1 = (pos x!=[-240,240])

[State 1061, Fade]
type = ChangeState
trigger1 = MoveContact
trigger2 = Pos Y >=-10
value = ifelse(var(2)<2,1275,1223)


;======================================================================
; Repel helper : 1305
; Destroyed : 1306
; Reflect with random projectile : 1308
; Reflected projectile : 1315
; Reflected projectile explods : 1316
;======================================================================

; REPEL HELPER FOR Focus Attack
[Statedef 1305]
type = S
physics = N
movetype = A
ctrl = 0
sprpriority = 4

[State 1305, nothitby]
type = nothitby
trigger1 = 1
time = -1
value = SCA
ignorehitpause = 1

[State 1305, HB]
type = hitby
trigger1 = 1
time = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 1305, HitOverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA, AA, AP, AT
stateno = 1306
ignorehitpause = 1

[State 1305, HitOverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA, NP, SP,HP
stateno = 1308
ignorehitpause = 1

[State 1305, Anim]
type = changeanim
trigger1 = anim != 1305
value = 1305

[State 1305, timevar]
type = varadd
trigger1 = 1
var(4) = 1

[State 1305, Shadows]
type = afterimage
trigger1 = !time && !prevstateno
time = 999
timegap = 1
framegap = 4
length = 12
palcontrast = 30, 60, 120
trans = add

[State 1305, Type]
type = statetypeset
trigger1 = movecontact
movetype = I

[State 1305, End]
type = changestate
trigger1 = var(4) >= 13
value = 1306

;-----------------------------------------
; Destroyed
[Statedef 1306]
type = A
physics = N
movetype = I
velset = 0, 0
ctrl = 0
sprpriority = 1
anim = 15998

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

[State 1306, End]
type = destroyself
trigger1 = !animtime

;-----------------------------------------
; Reflect with projectile
[Statedef 1308]
type = A
physics = N
movetype = I
ctrl = 0
anim = 15998

[State 1308, nothitby]
type = nothitby
trigger1 = 1
time = 1
value = SCA
ignorehitpause = 1

[State 1308, reflected]
type = helper
trigger1 = !time
stateno = 1315
ID = 1315
name = "Reflected"
postype = p1
pos = 25, -20
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 1308, End]
type = changestate
trigger1 = 1
value = 1306   ;1305

;-----------------------------------------
; Reflected projectile Kamehameha
[Statedef 1315]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=4
poweradd = 100

[state 1315, assertspecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 200, Ki goes SFX]
type = PlaySnd
trigger1 = !time
value = 10,0
channel = 1

[State -2, Explod];P1 Side.
type = Explod
trigger1 = !time && numexplod(13300)=0 && teamside = 1
anim = 13300
pos = 10,80
postype = left  ;p2,front,back,left,right
removetime = -2
;scale = 0.5,0.5
sprpriority = 0
id = 13300
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1
persistent = 0

[State -2, Explod];P2 Side.
type = Explod
trigger1 = !time && numexplod(13300)=0 && teamside = 2
anim = 13301
pos = -169,80
postype = right
removetime = -2
;scale = 0.5,0.5
sprpriority = 0
id = 13300
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1
persistent = 0

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoShadow]
type = Trans
trigger1 = root,var(2)=0
trans = none
ignorehitpause = 1

[State 1315, HitOverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1316
ignorehitpause=1

[State 1315, HB]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[state 1315]
type = varset
triggerall = numenemy
triggerall = enemy,authorname = "Balthazar & Cybaster"
trigger1 = enemy,name = "Goku Z2"
trigger2 = enemy,name = "SSJ Goku Z2"
trigger3 = enemy,name = "Vegeta Z2"
trigger4 = enemy,name = "Gohan Z2"
var(11) = 1

[State 1315, Anim];normal kamehameha FX (yellow/blue)
type=changeanim
trigger1= !time && !prevstateno && var(11)=0 && root,var(44)=0
value=1311
[State 1315, Anim];normal kamehameha FX (old purple)
type=changeanim
trigger1= !time && !prevstateno && var(11)=0 && root,var(44)>=1
value=1310
[State 1315, Anim];Vegeta kamehameha FX
type=changeanim
trigger1= !time && !prevstateno && var(11)=1
value=1010

[State 1315, Vel]
type=velset
trigger1= 1
x = 8

[State 1315, image]
type=afterimage
trigger1= !time && !prevstateno
time=999
timegap=1
framegap=2
length=5
palcontrast=50,50,200
trans=add

[State 1315, Hit]
type=hitdef
trigger1= 1
priority=4,Hit
attr = S,SP
damage = ceil(61*root,fvar(12)), ceil(6*root,fvar(12))
animtype = Hard
hitflag = MAF
guardflag=MA
pausetime=0,10
sparkno = -1
guard.sparkno = -1
sparkxy = -10,0
hitsound  = S1000,0
guardsound = S6,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=-10,0
ground.cornerpush.veloff=0
air.velocity=-4,-2
getpower= 0, 0
givepower = 35,35
envshake.time=14
envshake.freq=120
envshake.ampl=4
air.fall=1
fall.recover=1
fall.recovertime=16
yaccel=.5
airguard.ctrltime= 16
airguard.velocity= -8, -1.5
forcestand=1
p1sprpriority = 5

[State 1315, Sparks]
type=explod
trigger1= movehit && numtarget
trigger1= (target,movetype=H) && !(target,time)
anim=7020
sprpriority=3
postype=p2
pos=(target,const(size.ground.front)-10),-floor(p2dist y)
removetime=-2
ownpal=1
facing=-1
ignorehitpause=1
persistent=0
pausemovetime=100
supermovetime=100

[State 1315, End]
type=changestate
trigger1= movecontact
value=1316
ignorehitpause=1

[State 1315, End]
type=destroyself
trigger1=pos x!=[-200,200]

;-----------------------------------------
; Kamehameha Explod/vanish
[Statedef 1316]
type=A
physics=N
MoveType=I
velset=0,0
ctrl=0
sprpriority=4

[State 1308, NotHitBy]
type = NotHitBy
trigger1 = 1
Time = 1
value = SCA
ignorehitpause = 1

[State 3005, anim];VS Z2 chars
type = ChangeAnim
trigger1 = !Time && var(11)=1
value = 1013
[State 3005, anim];Repel (purple)
type = ChangeAnim
trigger1 = !Time && var(11)=0 && PrevStateNo=1315 && Root, Var(44)>=1
value = 1316
[State 3005, anim];Repel (yellow/blue)
type = ChangeAnim
trigger1 = !Time && var(11)=0 && PrevStateNo=1315 && Root, Var(44)=0
value = 1311

[State 3005, anim];Chou Kmh
type = ChangeAnim
trigger1 = !Time && PrevStateNo=2402
trigger2 = !Time && PrevStateNo=2602
trigger3 = !Time && PrevStateNo = 1510
value = 15998

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1316, End]
type=DestroySelf
trigger1 = Time >= 2
trigger1 = PrevStateNo!=2402
trigger2 = Time >= 2
trigger2 = PrevStateNo=2402
trigger2 = P2MoveType != H

;----------------------------------------------------
;Chaser Ki blast
[Statedef 1409]
type    = A
MoveType= A
physics = N
anim = 1235
sprpriority = 5
hitcountpersist = 1
MoveHitpersist = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Pos Y <=-40
value = -35
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Pos Y >-40
trigger1 = Vel Y =0
value = 0

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 0
trigger1 = Pos Y <=-40
x = Cond(P2Dist x <= 20,2,7)
y = 6

[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 0
trigger1 = Pos Y >-40
x = 7
y = 0

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
Time = 1
stateno = 1223
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = 1
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,15
guard.pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 26
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
guard.ctrltime = 14
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = IfElse(p2MoveType=H,40,140), 10
givepower = 35,35

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, Fade]
type = ChangeState
trigger1 = MoveContact
trigger2 = Pos Y >=0
value = 1223
ignorehitpause=1

;----------------------------------------
;Push P2
[Statedef 1410]
type = S
physics = S
movetype = I
anim = 1410

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

[State 0, PosSet]
type = PosSet
trigger1 = enemy,BackEdgeBodyDist <=10
x = Cond(enemy, Facing = -1,enemy, Pos X +60,enemy, Pos X -60)
y = enemy, Pos Y

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

[State 0, Width]
type = Width
trigger1 = Time < 2
player = 100,100

[State 0, PlayerPush]
type = PlayerPush
trigger1 = Time < 6
value = 1

[State 1500]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = enemy,BackEdgeBodyDist >80


;----------------------------------------------------
;Diag Ki blast
[Statedef 1420]
type    = A
MoveType= A
physics = N
anim = 1235
sprpriority = 5
hitcountpersist = 1
MoveHitpersist = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = root, StateNo = 752
var(0) = 1

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -35
ignorehitpause = 1

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 0
x = 7
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
Time = 1
stateno = 1223
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = var(14)=0
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = IfElse(p2MoveType=H,40,140), 10
givepower = 35,35
kill = Var(0) = 0

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = var(14)=1
attr = S, SP
animtype  = hard
damage = Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23)), 3
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1000,0
guardsound = S6,0
ground.type = low
air.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.8,0
guard.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -2.9, -4
EnvShake.Time = 5
EnvShake.ampl = 4
EnvShake.freq = 176
fall.EnvShake.Time = 10
fall.EnvShake.ampl = 4
fall.EnvShake.freq = 176
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = IfElse(p2MoveType=H,40,140), 10
givepower = 35,35
kill = Var(0) = 0

[State 3001, Guardshake]
type = EnvShake
trigger1 = moveguarded
Time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, Fade]
type = ChangeState
trigger1 = MoveContact
trigger2 = Pos Y >=0
value = 1223
ignorehitpause=1

;---------------------------------------------------------------------------
; Mirage
[Statedef 1441]
type    = S
movetype= I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
anim = 1440
poweradd = 0
sprpriority = 3

[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=0
value = 3
[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=1
value = 0
[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=2
value = 3

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = AnimElemTime(22)<0
flag = invisible

[State 0, VarSet]
type = VarSet
trigger1 = 1
var(59)=root,Var(9)

[State 0, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1441)
time = 1
pos = Cond(Var(59)=0,51,Cond(Var(59)=1,-49,-49)),0
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1442)
time = 1
pos = Cond(Var(59)=0,102,Cond(Var(59)=1,51,-98)),0
ignorehitpause = 1

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, MoveType = H

;---------------------------------------------------------------------------
; Mirage 2
[Statedef 1442]
type    = S
movetype= I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
poweradd = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=0
value = 3
[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=1
value = 0
[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=2
value = 3

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

[State 0, Turn]
type = Turn
trigger1 = Facing !=root, Facing
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1441)
time = 1
pos = Cond(Var(59)=0,51,Cond(Var(59)=1,-49,-49)),0
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1442)
time = 1
pos = Cond(Var(59)=0,102,Cond(Var(59)=1,51,-98)),0
ignorehitpause = 1

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
trigger1 = IsHelper(1441) || IsHelper(1442)
trigger1 = !SelfAnimExist(root,Anim) ;prevent debug error on custom anims
value = 1
ignorehitpause = 1

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
triggerall = IsHelper(1441) || IsHelper(1442)
triggerall = SelfAnimExist(root,Anim) ;prevent debug error on custom anims
trigger1 = Anim != (root, anim)
trigger2 = AnimElemNo(0) > (root, AnimElemNo(0))
value = root, anim
elem = root,AnimElemNo(0)
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Time >180
trigger2 = root, MoveType = H
value = 1443
ctrl = 0

;---------------------------------------------------------------------------
; Mirage 3
[Statedef 1443]
type    = S
movetype= I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
poweradd = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=0
value = 3
[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=1
value = 0
[State 0, SprPriority]
type = SprPriority
trigger1 = Var(59)=2
value = 3

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

[State 0, Turn]
type = Turn
trigger1 = Facing !=root, Facing
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1441)
time = 1
pos = Cond(Var(59)=0,51,Cond(Var(59)=1,-49,-49)),0
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = IsHelper(1442)
time = 1
pos = Cond(Var(59)=0,102,Cond(Var(59)=1,51,-98)),0
ignorehitpause = 1

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
trigger1 = IsHelper(1441) || IsHelper(1442)
trigger1 = !SelfAnimExist(root,Anim) ;prevent debug error on custom anims
trigger1 = root,MoveType != H
value = 1
ignorehitpause = 1

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
triggerall = IsHelper(1441) || IsHelper(1442)
triggerall = SelfAnimExist(root,Anim) ;prevent debug error on custom anims
triggerall = root,MoveType != H
trigger1 = Anim != (root, anim)
trigger2 = AnimElemNo(0) > (root, AnimElemNo(0))
value = root, anim
elem = root,AnimElemNo(0)
ignorehitpause = 1

[State 0, Trans]
type = Trans
trigger1 = 1; >= 10 
trans = addalpha
alpha = 256-time*4, 0+time*4

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >70
trigger2 = root,MoveType = H
ignorehitpause = 1



;---------------------------------------------------------------------------
; Taiyoken - 1
[Statedef 1451]
type    = A
movetype= A;I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
anim = 1451
poweradd = 0
sprpriority = -3

[State 0, Projectile]
type = Projectile
trigger1 = AnimElemTime(5)<0
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 0		;no hit, it's not a "physical" hit, it only blinds the enemy.
ignorehitpause = 1

[State 1701, snd]
type = PlaySnd
trigger1 = !Time
value = 1450,0;1
volumescale = 75
[State 1701, snd]
type = PlaySnd
trigger1 = !Time
value = 1450,1;1
volumescale = 100

[State 1701, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1701, SprPriority];Fixed sprite priority
type = SprPriority
trigger1 = 1
value = -3
ignorehitpause = 1

[State 1701, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,-55		;-7,-55
ignorehitpause = 1
;persistent = 

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

[State 1701, Hitdef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = AnimElem = 2
attr = A, SP
damage = Ceil(IfElse(root, fvar(11) * 0 < 0, 0, root, fvar(11) * 0)), 0
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
guard.pausetime = 0,8
sparkno = -1; s7010
guard.sparkno = s7000
sparkxy = 0,0;-12,-34
hitsound = s8,1;s5, 0
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = 1;8
ground.velocity = -8   ;-3
guard.velocity = -8
airguard.velocity = -2,-1.1
air.type = High	
air.velocity = -8,-6
Ground.cornerpush.veloff=0
Air.cornerpush.veloff=0
air.hittime = 12
air.animtype = back
getpower = 150,35
givepower = 35,35
yaccel = 0.5
kill = 0
p1sprpriority = -3	;not p1 sprite priority, but the helper's...
id = 1700

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1700
projanim = 1
projremovetime = 1

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

[State 1701, TargetState]
type = TargetState
trigger1 = Var(9) = 1
trigger1 = MoveHit
trigger1 = numtarget
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = IfElse(Enemy, StateType = A,1457,1455)
ignorehitpause = 1
persistent = 0
id = 1700

[State 1701, TargetState]
type = TargetState
trigger1 = Var(9) = 2
trigger1 = MoveHit
trigger1 = numtarget
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = IfElse(Enemy, StateType = A,1467,1465)
ignorehitpause = 1
persistent = 0
id = 1700

[State 1701, TargetState]
type = TargetState
trigger1 = Var(9) = 3
trigger1 = MoveHit
trigger1 = numtarget
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = IfElse(Enemy, StateType = A,1477,1475)
ignorehitpause = 1
persistent = 0
id = 1700

[State 1701, ChangeState]
type = ChangeState
trigger1 = Time >= 100
value = 1452
ctrl = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
; Taiyoken - 2
[Statedef 1452]
type    = A
movetype= I
physics = N
VelSet = 0,0
ctrl = 0
poweradd = 0
sprpriority = -3

[State 1702, SprPriority];Fixed sprite priority
type = SprPriority
trigger1 = 1
value = -3
ignorehitpause = 1 

[State 1702, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = -7,-28		;-7,-55
;ignorehitpause = 
;persistent = 

[State 1702, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

[State 1702, End]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = NumTarget
trigger2 = Target, MoveType != H

;---------------------------------------------------------------------------
; Taiyoken - effect
[Statedef 1453]
type    = A
movetype= A;I
physics = N
VelSet = 0,0
ctrl = 0
anim = 1453
poweradd = 0
sprpriority = -3

[State 1703, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1703, SprPriority];Fixed sprite priority
type = SprPriority
trigger1 = 1
value = 3
ignorehitpause = 1 

[State 1703, BindToParent]
type = BindToParent
trigger1 = !Time
time = 1
pos = 0,-55;-7,-55		;-7,-55
ignorehitpause = 1
;persistent = 

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

[State 1703, ChangeState]
type = DestroySelf
trigger1 = AnimTime = 0;NumHelper(1701)
;trigger1 = Helper(1701), StateNo != 1701
ignorehitpause = 1

;======================================================================
; ROCKET Take Off 
[Statedef 1510]
type = A
physics = N
MoveType = A
ctrl = 0
sprpriority = 5

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
;time = 1
;facing = 0
;pos = 0,0
ignorehitpause = 1

[State 0, Projectile]
type = Projectile
trigger1 = AnimElemTime(6)<0
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact = 1
var(0) = 1

[State 0, VarSet]
type = VarSet
trigger1 = root, PrevStateNo = 1504
var(3)=1

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit = 1
fvar(13) = 1
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 2100, HitCount add (only for supermoves)]
type		= ParentVarAdd
trigger1		= MoveHit
var(39)		= 1
persistent	= 0
ignorehitpause	= 1


[State -2, Explod];var for scaling CLSNs
type = VarSet
trigger1 = !PrevStateNo && !Time
var(1) = 0
[State -2, Explod];var for scaling CLSNs
type = VarAdd
trigger1 = !PrevStateNo
var(1) = 1

[State 800, VarSet];Charging Time
type = VarSet
trigger1 = !Time
var(25) = Root, Var(25)

[State 8000, Assert]
type=assertspecial
trigger1= 1
flag=NoShadow
ignorehitpause = 1

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 2011, NotHitBy]
type		= NotHitBy
trigger1		= Time >= 0
Time		= 1
value		= SCA, NA, SA, HA, NT, ST, HT
ignorehitpause	= 1

[State 2011, HitBy]
type		= HitBy
trigger1		= Time >= 0
value		= SCA, NP, SP, HP
Time		= 1
ignorehitpause	= 1

[State 2011, HitOverride]
type		= HitOverride
trigger1		= Time >= 0
slot		= 1
Time		= 1
stateno		= 1510
attr		= SCA, NP, SP, HP
ignorehitpause	= 1

[State 3005, anim]
type = ChangeAnim
trigger1 = !Time && !PrevStateNo && !MoveContact
value = 1512

[State 3005, hit]
type = HitDef
triggerall = !parent,IsHelper
triggerall = P2BodyDist Y <150
triggerall = Var(0)<3
trigger1 = !MoveHit && !Var(3)
trigger2 = Var(3)
attr = A,SP
hitflag = MAF
guardflag = MA
priority = 7,Hit
damage = IfElse(var(3)=1,Ceil(IfElse(root,fvar(11) * 18 < 3, 3, root,fvar(11) * 18)),Ceil(IfElse(root,fvar(11) * 38 < 7, 7, root,fvar(11) * 38))), 2
getpower = Cond(Var(3)=1,0,10),Cond(Var(3)=1,0,10)
givepower = 20,20
pausetime = 1,Cond(Var(3)=0,16,6)
guard.pausetime = 1,Cond(Var(3)=0,1,6)
animtype = Back
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 29
ground.slidetime = 20
guard.hittime = 26
air.hittime = 20
;guard.ctrlTime = 16
ground.velocity= IfElse(var(2)<20+var(25), -2, -10), IfElse(var(2)<20+var(25), 0, -3)
guard.velocity = 0
air.velocity = -5.5,-3.9
airguard.velocity = -5.5, 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall = Cond((Var(3)>0 || root, StateNo = 1500),0,1)
fall.recover = 0
sparkno = s7030
sparkxy = 0-(random%20),20-(random%40)
hitsound   = s1510,0
guardsound = S6,0
EnvShake.Time = 16
EnvShake.ampl = 3
EnvShake.freq = 50
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.Time=32
p1sprpriority = 5
id = 1512

[State 3005, hit]
type = HitDef
triggerall = !parent,IsHelper
triggerall = P2BodyDist Y >=150
triggerall = Var(0)<3
trigger1 = !MoveHit && !Var(3)
trigger2 = Var(3)
attr = A,SP
hitflag = MAF
guardflag = MA
priority = 7,Hit
damage = IfElse(var(3)=1,Ceil(IfElse(root,fvar(11) * 18 < 3, 3, root,fvar(11) * 18)),Ceil(IfElse(root,fvar(11) * 38 < 7, 7, root,fvar(11) * 38))), 2
getpower = Cond(Var(3)=1,0,10),Cond(Var(3)=1,0,10)
givepower = 20,20
pausetime = 1,Cond(Var(3)=0,16,6)
guard.pausetime = 1,Cond(Var(3)=0,1,6)
animtype = Back
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 26
ground.slidetime = 20
guard.hittime = 26
air.hittime = 20
;guard.ctrlTime = 16
ground.velocity= IfElse(var(2)<20+var(25), -2, -10), IfElse(var(2)<20+var(25), 0, -3)
guard.velocity = 0
air.velocity = -5.5,-3.9
airguard.velocity = -5.5, 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall = Cond((Var(3)>0 || root, StateNo = 1500),0,1)
fall.recover = 0
sparkno = s7030
sparkxy = 0-(random%20),180-(random%40)
hitsound   = s1510,0
guardsound = S6,0
EnvShake.Time = 16
EnvShake.ampl = 3
EnvShake.freq = 50
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.Time=32
p1sprpriority = 5
id = 1512

[State 0, Projectile]
type = Projectile
trigger1 = root,StateNo != 1500
trigger1 = Var(3) = 0
trigger1 = MoveGuarded=1
ProjID = 1510
projanim = 1
projremovetime = 20
ignorehitpause = 1
persistent = 0

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 1061, End]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = root,MoveType = H

;===================================================
; Rocket FX Helper - SCALED BEAM
[Statedef 1511]
type = A
physics = N
MoveType = A
ctrl = 0
sprpriority = 3
anim = 1511

[State 8000, Assert]
type=assertspecial
trigger1= 1
flag=NoShadow
ignorehitpause = 1

[State 1061, End]
type = null;bindtoroot
trigger1 =  1
pos = 0,0
ignorehitpause = 1

[State 1061, save var]
type = VarSet
trigger1 = NumHelper(1510)
fvar(1) = Helper(1510),pos y
ignorehitpause = 1

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

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = root,pos X

[State 0, Scale Tracker Y]
type = VarSet
trigger1 = 1
fvar(2) = (time/2.0)
ignorehitpause = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 0
scale = 1,ParentDist Y
ignorehitpause = 0
;persistent =

[State 1061, End]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = root,MoveType = H

;===================================================
; Rocket FX Helper - Hits Ground
[Statedef 1515]
type = A
physics = N
MoveType = A
ctrl = 0
sprpriority = 8
anim = 1515

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

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = root,pos X



[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,MoveType = H
id = 1514
ignorehitpause = 1

[State 1061, End]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = root,MoveType = H

;-------------------------------------------------------------------
;Oolong Helper
[statedef 18000]
type = A
physics = N
anim = 18000


[state 18000, heheh]
type = playsnd
trigger1 = !time
value = 18000,0+random%5

[state 1800, velset]
type = velset
trigger1 = 1
x = 6

[state 1800, turn]
type = turn
trigger1 = ifelse(facing = 1,pos X > 300,pos X < -300)

;===================================================
; CHOU KAMEHAMEHA
[Statedef 2402]
type = A
physics = N
MoveType = A
ctrl = 0
sprpriority = 5

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = Time = 0
v = 18
value = 1

[State 2100, HitCount add (only for supermoves)]
type		= ParentVarAdd
trigger1		= MoveHit
var(39)		= 1
persistent	= 0
ignorehitpause	= 1

[State -2, Explod];var for scaling CLSNs
type = VarSet
trigger1 = !PrevStateNo && !Time
var(1) = 0
[State -2, Explod];var for scaling CLSNs
type = VarAdd
trigger1 = !PrevStateNo
var(1) = 1

[State -2, Explod];Tip of Kmh FX
type = Explod
trigger1 = !numExplod(2404) && !Time
anim = 2404
removeTime = -1
sprpriority = 5
id = 2404
ownpal = 1
pos = 10,0
ignorehitpause = 1
pausemoveTime = 99999
supermoveTime = 99999
bindTime = -1
scale = 1,1+.3*(root,stateno = 3015)

[State -2, Explod];On hands Explod
type = ModifyExplod
trigger1 = WinKO && MatchOver
scale = 1.5,1.5
ID = 2404

[State -2, Explod];Tip of Kmh FX
type = RemoveExplod
trigger1 = root,stateno != 2401
id = 2404

[State 800, VarSet];Charging Time
type = VarSet
trigger1 = !Time
var(25) = Root, Var(25)

[State 8000, Assert]
type=assertspecial
trigger1= 1
flag=NoShadow
ignorehitpause = 1

[State 3005, hitvar]
type=VarAdd
trigger1= !Time
var(2)=1

[State 1061, NoShadow]
type = Trans
trigger1 = 1
trans = none
ignorehitpause = 1

[State 2011, NotHitBy]
type		= NotHitBy
trigger1		= Time >= 0
Time		= 1
value		= SCA, NA, SA, HA, NT, ST, HT
ignorehitpause	= 1

[State 2011, HitBy]
type		= HitBy
trigger1		= Time >= 0
value		= SCA, NP, SP, HP
Time		= 1
ignorehitpause	= 1

[State 2011, HitOverride]
type		= HitOverride
trigger1		= Time >= 0
slot		= 1
Time		= 1
stateno		= 2402
attr		= SCA, NP, SP, HP
ignorehitpause	= 1

[State 3005, anim]
type = ChangeAnim
trigger1 = !Time && !PrevStateNo && !MoveContact
value = 2405

[State 3005, anim]
type = ChangeAnim
trigger1 = MoveContact
value = 2405
elem = var(1)
ignorehitpause = 1

[State 1061, Velocity]
type = VelSet
trigger1 = time <47
x = IfElse((Time<2 && var(2)>1),1,16)

[State 1061, Velocity]
type = VelSet
trigger1 = time >=47
x = 0

[State 0, Projectile]
type = Projectile
trigger1 = root,stateno = 2401
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,HP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 3005, hit]
type = HitDef
triggerall = root,stateno = 2401
triggerall = !root,NumExplod(801)
triggerall = var(25)<20
triggerall = enemy, Pos Y < root, Pos Y -20
trigger1 = facing=1 && (root,pos X - enemy,pos X)<0 
trigger2 = facing=-1 && (root,pos X - enemy,pos X)>0 
attr = A,HP
hitflag = MAF
guardflag = MA
priority = 7,Hit
damage = IfElse(var(2)>=20,8,Ceil(IfElse(root,fvar(11) * 23 < 8, 8, root,fvar(11) * 23))), 2
p2facing = 1
getpower = 0,0
givepower = 20,20
pausetime = 1*(var(2)<20+var(25)),6
animtype = Back
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 13
airguard.ctrlTime = 16
ground.velocity= -12,0
guard.velocity = -9
air.velocity = -12,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall=(var(2)>=20+var(25))
air.fall = 1
fall.recover = 0
fall.recovertime = 13
sparkno = s7030
guard.sparkno = s7000
sparkxy = 20-(random%40),20-(random%40)
hitsound   = s1000,0
guardsound = S6,0
EnvShake.Time = 16
EnvShake.ampl = 6
EnvShake.freq = 100
forcestand = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.Time=32
p1sprpriority = 5
id = 2402

[State 3005, hit]
type = HitDef
triggerall = root,stateno = 2401
triggerall = !root,NumExplod(801)
triggerall = var(25)<20
triggerall = enemy, Pos Y >= root, Pos Y -20
trigger1 = facing=1 && (root,pos X - enemy,pos X)<0 
trigger2 = facing=-1 && (root,pos X - enemy,pos X)>0 
attr = A,HP
hitflag = MAF
guardflag = MA
priority = 7,Hit
damage = IfElse(var(2)>=20,8,Ceil(IfElse(root,fvar(11) * 23 < 8, 8, root,fvar(11) * 23))), 2
p2facing = 1
getpower = 0,0
givepower = 20,20
pausetime = 1*(var(2)<20+var(25)),6
animtype = Back
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 13
airguard.ctrlTime = 16
ground.velocity= -12,0
guard.velocity = -9
air.velocity = -12,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall=(var(2)>=20+var(25))
air.fall = 1
fall.recover = 0
fall.recovertime = 13
sparkno = s7030
guard.sparkno = s7000
sparkxy = 20-(random%40),20-(random%40)
hitsound   = s1000,0
guardsound = S6,0
EnvShake.Time = 16
EnvShake.ampl = 6
EnvShake.freq = 100
forcestand = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.Time=32
p1sprpriority = 5
id = 2402

[State 3005, hit]
type = HitDef
triggerall = root,stateno = 2401
triggerall = !root,NumExplod(801)
triggerall = var(25)>=20
trigger1 = facing=1 && (root,pos X - enemy,pos X)<0 
trigger2 = facing=-1 && (root,pos X - enemy,pos X)>0 
attr = A,HP
hitflag = MAF
guardflag = 
priority = 7,Hit
damage = IfElse(var(2)>=20,8,Ceil(IfElse(root,fvar(11) * 23 < 8, 8, root,fvar(11) * 23))), 2
;IfElse(var(2)>=20,8,Ceil(IfElse(root,fvar(11) * 23 < 7, 7, root,fvar(11) * 23))), 2
;IfElse(var(2)>=20,8,ceil(23*root,fvar(15))), 2
getpower = 0,0
givepower = 20,20
pausetime = 1*(var(2)<20+var(25)),6
animtype = Back
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 13
airguard.ctrlTime = 16
ground.velocity= -12,0
guard.velocity = -9
air.velocity = -12,0
airguard.velocity = -5.5, -1.5 
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel = .5
fall=(var(2)>=20+var(25))
air.fall = 1
fall.recover = 0
fall.recovertime = 13
sparkno = s7030
guard.sparkno = s7000
sparkxy = 20-(random%40),20-(random%40)
hitsound   = s1000,0
guardsound = S6,0
EnvShake.Time = 16
EnvShake.ampl = 6
EnvShake.freq = 100
forcestand = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.Time=32
p1sprpriority = 5
id = 2402

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 1061, NoJuggle]
type = ParentVarSet
trigger1 = MoveContact 
v = 18
value = 0

[State 0, TargetState]
type = TargetState
triggerall = NumTarget(2402)
trigger1 = MoveHit 
value = 1233
ignorehitpause = 1
persistent = 1

[State 3005, end]
type = ChangeState
trigger1 = MoveContact = 1 ;this, remember this "= 1" part to make the hitsparks work.
value = IfElse(var(2)<20+var(25),2402,1316)

[State 1061, End]
type = DestroySelf
trigger1 = root,stateno != 2401
trigger1 = P2MoveType != H
trigger2 = MoveType = H

;===================================================
; CHOU KAMEHAMEHA FX Helper - SCALED BEAM
[Statedef 2464]
type = A
physics = N
MoveType = A
ctrl = 0
sprpriority = 3
anim = 2464

[State 1061, End]
type = VarAdd
trigger1 = root,stateno = 2401
var(0) = 1
ignorehitpause = 1

[State 8000, Assert]
type=assertspecial
trigger1= 1
flag=NoShadow
ignorehitpause = 1

[State 1061, End]
type = bindtoroot
trigger1 = root,stateno = 2401
trigger2 = root,stateno = 2403
pos = 72,-70
ignorehitpause = 1

[State 1061, End]
type = AngleDraw
trigger1 = root,stateno = 2401
trigger1 = !MatchOver
scale = (50.0 + abs(pos X - (Helper(2402),pos X)))/58.0 , 1    ;60+...
value = 0
ignorehitpause = 1

;Scale Up when Killing the Opponent
[State 1061, End]
type = AngleDraw
trigger1 = root,stateno = 2401
trigger1 = WinKO && MatchOver
scale = (70.0 + abs(pos X - (Helper(2402),pos X)))/60.0 , 1.5
value = 0
ignorehitpause = 1

[State 1061, End]
type = AngleDraw
trigger1 = root,stateno = 2403
scale = 10 , IfElse(1-0.05*(Time-var(0))<0, 0, 1-0.05*(Time-var(0)))
value = 0
ignorehitpause = 1

[State 1061, End]
type = DestroySelf
trigger1 = root,stateno != 2401
trigger1 = root,stateno != 2403


;==========================================================
; EMOTION GAUGE HELPER P1
[Statedef 2750]
physics = N
velset = 0, 0
sprpriority = 7
anim = 15999

[State 3033, Assert]
type = assertspecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

[State -2, Explod];Lvl 0
type = Explod
triggerall = root,Var(52) < 700
trigger1 = !NumExplod(2780) 
anim = 2780
pos = 35+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2780
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 195, removeexplod]
type = removeexplod
trigger1 = root,Var(52) >=700
trigger2 = root,var(51)=0
id = 2780
ignorehitpause = 1

[State -2, Explod];Lvl 1
type = Explod
triggerall = root,Var(52) >=700 && root,Var(52) < 1400
trigger1 = !NumExplod(2781) 
anim = 2781
pos = 35+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2781
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999


[State 195, removeexplod]
type = removeexplod
trigger1 = root,Var(52) >= 1400 || root,Var(52) < 700
trigger2 = root,var(51)=0
id = 2781
ignorehitpause = 1

[State -2, Explod];Lvl 2
type = Explod
triggerall = root,Var(52) >= 1400  && root,Var(52) < 2100
trigger1 = !NumExplod(2782) 
anim = 2782
pos = 35+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2782
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 195, removeexplod]
type = removeexplod
trigger1 = root,Var(52) >= 2100 || root,Var(52) < 1400
trigger2 = root,var(51)=0
id = 2782
ignorehitpause = 1

[State -2, Explod];Lv3 MAX
type = Explod
triggerall = root,Var(52) >= 2100  
trigger1 = !NumExplod(2783) 
anim = 2783
pos = 35+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2783
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999


[State 195, removeexplod]
type = removeexplod
trigger1 = root,var(51)=0|| root,Var(52) < 2100
id = 2783
ignorehitpause = 1

[State -2, Explod];Face
type = Explod
trigger1 = root,Var(53)=0
trigger1 = !NumExplod(2756) && (root,var(51))>0
anim = 2756
pos = 12+(root,var(45)),220-(root,var(46))
postype = left
removetime = -1
;scale = 0.5,0.5
sprpriority = 5
id = 2756
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Face
type = Explod
trigger1 = root,Var(53)=1
trigger1 = !NumExplod(2757) && (root,var(51))>0
anim = 2752
pos = 12+(root,var(45)),220-(root,var(46))
postype = left
removetime = -1
;scale = 0.5,0.5
sprpriority = 5
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Finisher (red)
type = Explod
trigger1 = root, Var(53) = 0
trigger1 = !NumExplod(2751) && (root,var(52))>0
anim = 27510
pos = 76+(root,var(45)),234-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 3
id = 2751
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Finisher (green)
type = Explod
trigger1 = root, Var(53) = 1
trigger1 = !NumExplod(2755) && (root,var(52))>0
anim = 2755
pos = 76+(root,var(45)),234-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 3
id = 2755
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];buffer bar
type = Explod
trigger1 = !NumExplod(27510) && (root,var(51))>0
anim = 2751
pos = 60+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 27510
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale buffer bar
type = ModifyExplod
trigger1 = NumExplod(27510) && (root,var(51))>0 && (root,var(51))<=1000
scale = 0.5*(root,var(51))/1000.0,0.5
id = 27510

[State -2, Explod];Scale Finisher Bar
type = ModifyExplod
trigger1 = NumExplod(2751) && (root,var(52))>0 && (root,var(52))<=2100
scale = 0.5*ifelse(root,Var(52)<700, (root,Var(52))/700.0, ifelse(root,Var(52)>=1400, (root,Var(52)-1400)/700.0, (root,Var(52)-700)/700.0)),0.5
id = 2751
ignorehitpause = 1
[State -2, Explod];Scale Finisher Bar
type = ModifyExplod
trigger1 = NumExplod(2755) && (root,var(52))>0 && (root,var(52))<=2100
scale = 0.5*ifelse(root,Var(52)<700, (root,Var(52))/700.0, ifelse(root,Var(52)>=1400, (root,Var(52)-1400)/700.0, (root,Var(52)-700)/700.0)),0.5
id = 2755
ignorehitpause = 1

[State -2, Explod];Buffer Frame
type = Explod
trigger1 = !NumExplod(2750) && (root,var(51))>0
anim = 2750
pos = 60+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -1
id = 2750
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Finisher Frame
type = Explod
trigger1 = !NumExplod(2754) && (root,var(51))>0
anim = 2754
pos = 77+(root,var(45)),234-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -1
id = 2754
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;Remove Finisher Gauge
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 2750
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 27510
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
trigger2 = root, var(53) = 1
id = 2751
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 2755
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0 
trigger2 = root, var(53) = 1
id = 2756
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0 
id = 2757
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 2754

[State -2, Explod];Finisher fades
type = Explod
trigger1 = !NumExplod(2754) && (root,var(51))<=0
anim = 2759
pos = 86+(root,var(45)),234-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 7
id = 2759
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Buffer fades
type = Explod
trigger1 = !NumExplod(2750) && (root,var(51))<=0
anim = 2758
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 8
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Face fades
type = Explod
trigger1 = !NumExplod(2756) && (root,var(51))<=0
anim = 2757
pos = 12+(root,var(45)),220-(root,var(46))
postype = left
removetime = 14
supermove = 1
;scale = 0.5,0.5
sprpriority = 8
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State 3033, End]
type = destroyself
trigger1 = (root,var(51))<=0 && !numexplod(2759)


;==========================================================
; EMOTION GAUGE HELPER P2
[Statedef 2760]
physics = N
velset = 0, 0
sprpriority = 7
anim = 15999

[State 3033, Assert]
type = assertspecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

[State -2, Explod];Lvl 0
type = Explod
triggerall = root,Var(52) < 700
trigger1 = !NumExplod(2780) 
anim = 2780
pos = 285+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2780
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 195, removeexplod]
type = removeexplod
trigger1 = root,Var(52) >=700
trigger2 = root,var(51)=0
id = 2780
ignorehitpause = 1

[State -2, Explod];Lvl 1
type = Explod
triggerall = root,Var(52) >=700 && root,Var(52) < 1400
trigger1 = !NumExplod(2781) 
anim = 2781
pos = 285+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2781
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999


[State 195, removeexplod]
type = removeexplod
trigger1 = root,Var(52) >= 1400 || root,Var(52) < 700
trigger2 = root,var(51)=0
id = 2781
ignorehitpause = 1

[State -2, Explod];Lvl 2
type = Explod
triggerall = root,Var(52) >= 1400  && root,Var(52) < 2100
trigger1 = !NumExplod(2782) 
anim = 2782
pos = 285+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2782
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 195, removeexplod]
type = removeexplod
trigger1 = root,Var(52) >= 2100 || root,Var(52) < 1400
trigger2 = root,var(51)=0
id = 2782
ignorehitpause = 1

[State -2, Explod];Lv3 MAX
type = Explod
triggerall = root,Var(52) >= 2100  
trigger1 = !NumExplod(2783) 
anim = 2783
pos = 285+(root,var(45)),227-(root,var(46))
postype = left
removetime = -1
scale = .5,.5
sprpriority = 5
id = 2783
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999


[State 195, removeexplod]
type = removeexplod
trigger1 = root,var(51)=0|| root,Var(52) < 2100
id = 2783
ignorehitpause = 1

[State -2, Explod];Face
type = Explod
trigger1 = root,Var(53)=0
trigger1 = !NumExplod(2756) && (root,var(51))>0
anim = 2756
pos = 308+(root,var(45)),220-(root,var(46))
postype = left
removetime = -1
;scale = 0.5,0.5
sprpriority = 5
id = 2756
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Face
type = Explod
trigger1 = root,Var(53)=1
trigger1 = !NumExplod(2757) && (root,var(51))>0
anim = 2752
pos = 308+(root,var(45)),220-(root,var(46))
postype = left
removetime = -1
;scale = 0.5,0.5
sprpriority = 5
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Finisher (red)
type = Explod
trigger1 = root, Var(53) = 0
trigger1 = !NumExplod(2751) && (root,var(52))>0
anim = 27610
pos = 244+(root,var(45)),234-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 3
id = 2751
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Finisher (green)
type = Explod
trigger1 = root, Var(53) = 1
trigger1 = !NumExplod(2755) && (root,var(52))>0
anim = 2765
pos = 244+(root,var(45)),234-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 3
id = 2755
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];buffer bar
type = Explod
trigger1 = !NumExplod(27510) && (root,var(51))>0
anim = 2761
pos = 260+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 27510
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale buffer bar
type = ModifyExplod
trigger1 = NumExplod(27510) && (root,var(51))>0 && (root,var(51))<=1000
scale = 0.5*(root,var(51))/1000.0,0.5
id = 27510

[State -2, Explod];Scale Finisher Bar
type = ModifyExplod
trigger1 = NumExplod(2751) && (root,var(52))>0 && (root,var(52))<=2100
scale = 0.5*ifelse(root,Var(52)<700, (root,Var(52))/700.0, ifelse(root,Var(52)>=1400, (root,Var(52)-1400)/700.0, (root,Var(52)-700)/700.0)),0.5
id = 2751
ignorehitpause = 1
[State -2, Explod];Scale Finisher Bar
type = ModifyExplod
trigger1 = NumExplod(2755) && (root,var(52))>0 && (root,var(52))<=2100
scale = 0.5*ifelse(root,Var(52)<700, (root,Var(52))/700.0, ifelse(root,Var(52)>=1400, (root,Var(52)-1400)/700.0, (root,Var(52)-700)/700.0)),0.5
id = 2755
ignorehitpause = 1

[State -2, Explod];Buffer Frame
type = Explod
trigger1 = !NumExplod(2750) && (root,var(51))>0
anim = 2760
pos = 260+(root,var(45)),230-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -1
id = 2750
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Finisher Frame
type = Explod
trigger1 = !NumExplod(2754) && (root,var(51))>0
anim = 2764
pos = 243+(root,var(45)),234-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -1
id = 2754
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;Remove Finisher Gauge
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 2750
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 27510
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
trigger2 = root, var(53) = 1
id = 2751
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 2755
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0 
trigger2 = root, var(53) = 1
id = 2756
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0 
id = 2757
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,var(51))<=0
id = 2754

[State -2, Explod];Finisher fades
type = Explod
trigger1 = !NumExplod(2754) && (root,var(51))<=0
anim = 2769
pos = 233+(root,var(45)),234-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 7
id = 2759
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Buffer fades
type = Explod
trigger1 = !NumExplod(2750) && (root,var(51))<=0
anim = 2768
pos = 243+(root,var(45)),230-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 8
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];Face fades
type = Explod
trigger1 = !NumExplod(2756) && (root,var(51))<=0
anim = 2767
pos = 308+(root,var(45)),220-(root,var(46))
postype = left
removetime = 14
supermove = 1
;scale = 0.5,0.5
sprpriority = 8
id = 2757
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State 3033, End]
type = destroyself
trigger1 = (root,var(51))<=0 && !numexplod(2759)


;---------------------------
;Destructo Disc Projectile
[Statedef 3010]
type    = A
movetype= A
physics = N
anim = 3010
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-70,70]) && (P2BodyDist Y = [-70,70])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,HP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3000,0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time 
value = 3000,1
channel = 15
loop = 1
ignorehitpause = 1

[State 1510, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = MoveHit = 1
var(20)=5
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = NumTarget(3010)
var(20)=-1

[State 0, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(3010)
trigger1 = Var(20)<=0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveContact
var(12) = 1
persistent = 0
ignorehitpause = 1

[State 1510, Hitdef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = Time>40
trigger1 = !NumTarget(3010)
trigger1 = root,Var(12)<2
attr = A, HP 
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 30 < 7, 7, root,fvar(11) * 30)), 30
guardflag = MA
hitflag = MAF
pausetime = 3,0
guard.pausetime = 6,0
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -4,-9
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
fall = 1
fall.recover = 0
p2facing = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
id = 3010
persistent = 10

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = 1
value = 70

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

[State 0, VarAdd]
type = VarAdd
trigger1 = MoveContact = 1
var(2)=1

[State 1510, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = RoundState = 2 || !root, Alive
trigger1 = root,StateNo != 3000 
trigger2 = RoundState != 2 
value = 3011

;---------------------------
;Destructo Disc Projectile
[Statedef 3011]
type    = A
movetype= A
physics = N
anim = 3011
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo != 3010
trigger1 = !Time
value = Anim
elem = 8
ignorehitpause = 1

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

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
Time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
Time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
Time = 1
stateno = Cond(Var(0)>4,3012,3011)
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, StopSnd]
type = StopSnd
trigger1 = 1
channel = 15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3000,2
channel = -1

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = PrevStateNo != 3011
trigger1 = AnimElemTime(5)<0
time = 1
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AnimElemTime(2)<0
trigger1 = root, MoveType = H
trigger2 = roundstate != 2
value = 3012
ignorehitpause = 1
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3011
trigger1 = AnimElemTime(5)>=0 && AnimElemTime(7)<0
y = 5

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

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(7)<0
trigger1 = root, MoveType != H
trigger1 = root, command = "holdfwd"
var(9) = 1
[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(7)<0
trigger1 = root, MoveType != H
trigger1 = root, command = "holdup"
var(15) = 1
[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(7)<0
trigger1 = root, MoveType != H
trigger1 = root, command = "holdback"
var(9) = 2
[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(7)<0
trigger1 = root, MoveType != H
trigger1 = root, command = "holddown"
var(15) = 2

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(7)>=0
trigger1 = Var(9)=1
x = 18
[State 0, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(7)>=0
trigger1 = Var(9)=2
x = -1
[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(7)=0
trigger1 = Var(15)=1
y = -5 
[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(7)=0
trigger1 = Var(15)=2
y = 5
[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >=75
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3012
trigger1 = AnimElemTime(7)=0
y = -2

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

[State 1510, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = Pos Y = 75
var(10)=1

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = IsHelper(3010)
trigger1 = Var(10)=0
attr = S, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 100 < 50, 50, root,fvar(11) * 100)), 30
guardflag = MA
hitflag = MAF
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -6,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
fall.recover = 0
ID = 3011
persistent = 0
fall = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = IsHelper(3010)
trigger1 = !NumTarget(3011)
trigger1 = Var(10)=1
attr = S, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 100 < 50, 50, root,fvar(11) * 100)), 30
guardflag = MA
hitflag = MAFD
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -6,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
fall.recover = 0
ID = 3011
persistent = 0
fall = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = IsHelper(3011)
trigger1 = Var(10)=0
attr = S, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 50 < 25, 25, root,fvar(11) * 50)), 15
guardflag = MA
hitflag = MAF
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -6,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
fall.recover = 0
ID = 3011
persistent = 0
fall = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = IsHelper(3011)
trigger1 = !NumTarget(3011)
trigger1 = Var(10)=1
attr = S, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 50 < 25, 25, root,fvar(11) * 50)), 15
guardflag = MA
hitflag = MAFD
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -6,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
fall.recover = 0
ID = 3011
persistent = 0
fall = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = IsHelper(3012)
trigger1 = Var(10)=0
attr = S, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 25 < 12, 12, root,fvar(11) * 25)), 7
guardflag = MA
hitflag = MAF
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -6,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
fall.recover = 0
ID = 3011
persistent = 0
fall = 1

[State 1061, HitDef]
type = HitDef
triggerall = !parent,IsHelper
trigger1 = IsHelper(3012)
trigger1 = !NumTarget(3011)
trigger1 = Var(10)=1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 25 < 12, 12, root,fvar(11) * 25)), 7
guardflag = MA
hitflag = MAFD
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3000,3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -6,0
guard.velocity = -7.5
guard.hittime = 26
air.velocity = -6,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = 35,35
fall.recover = 0
ID = 3011
persistent = 0
fall = 1

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 1510, Guardshake]
type = envshake
trigger1 = moveguarded=1
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
triggerall = P2MoveType != H
trigger1 = (pos x!=[-240,240])
trigger2 = Time>180

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Anim = 3012
trigger1 = !AnimTime

;----------------------------------------------------
;Destructo explosion
[Statedef 3012]
type    = A
MoveType= I
physics = N
anim = 2845;2512
sprpriority = 4
velset = 0,0

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

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 2512
ID = 3013
pos = 0,-10
postype = p1  ;p2,front,back,left,right
bindtime = -1
scale = 1.5,1
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,.25

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1061, End]
type = DestroySelf
trigger1 = P2MoveType!=H
trigger1 = Time>=54

;---------------------------
;Orin FX
[Statedef 3101]
type    = A
movetype= I
physics = N
ctrl = 0
Anim = 1

[State 3101, Hitting ground sound effect];Strong sound effect, first bounce.
type		= PlaySnd
trigger1		= enemynear, Pos Y >=0
value		= 15000, 2
ignorehitpause	= 1
channel		= 20
persistent = 0

[State -2, P2 Hit Ground Spark (front)]
type		= Explod
trigger1		= enemynear, Pos Y >=0
persistent	= 0
ID		= 8400
anim		= 8400
postype		= p2
pos		= -4, -3
velocity		= 0, 0
accel		= 0, 0
removetime	= -2
sprpriority	= 3
ignorehitpause	= 1
persistent = 0
[State -2, P2 Hit Ground Spark (back)]
type		= Explod
trigger1		= enemynear, Pos Y >=0
persistent	= 0
ID		= 8401
anim		= 8401
postype		= p2
pos		= -4, -3
velocity		= 0, 0
accel		= 0, 0
removetime	= -2
sprpriority	= -3
ignorehitpause	= 1
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time >=50

;---------------------------
;Tsu Projectile
[Statedef 3210]
type    = A
movetype= A
physics = N
anim = 3250
ctrl = 0
hitcountpersist = 1
movehitpersist = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = IsHelper(3210)
value = 6
[State 0, SprPriority]
type = SprPriority
trigger1 = IsHelper(3211)
value = -6

[State 0, Projectile]
type = Projectile
;trigger1 = 1
trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = S,HP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AP,AA,AT
time = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250 
trigger1 = AnimElem = 1
x = 45
y = -46
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250
trigger1 = AnimElem = 2
x = 38
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250
trigger1 = AnimElem = 3
x = 25;104
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250
trigger1 = AnimElem = 4
x = 29;108
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250
trigger1 = AnimElem = 5
x = 25;-133
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250
trigger1 = AnimElem = 6
x = 10;-143
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3210)
trigger1 = Anim = 3250
trigger1 = AnimElem = 7
x = 12;-155

[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 1
x = 85
y = -51
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 2
x = 38
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 3
x = 25;104
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 4
x = 29;108
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 5
x = 25;-133
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 6
x = 10;-143
[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3211)
trigger1 = Anim = 3250
trigger1 = AnimElem = 7
x = 12;-155

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3250
trigger1 = !AnimTime
value = 3251

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3200,0
channel = -1

[State 1010, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit=1
fvar(13) = 1
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = Anim=3251
x = 12
;persistent = 0

[State 0, changeanim]
type = ChangeAnim
triggerall = Anim = 3250
triggerall = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [-40,40]
value = 3252
persistent = 0
[State 0, changeanim]
type = ChangeAnim
triggerall = Anim = 3250
triggerall = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [10,50]
trigger1 = enemy, Vel X >0
trigger2 = P2BodyDist X = [-30,30]
trigger2 = enemy, Vel X =0
trigger3 = P2BodyDist X = [-50,-10]
trigger3 = enemy, Vel X <0
value = 3253
persistent = 0
[State 0, changeanim]
type = ChangeAnim
triggerall = Anim = 3250
triggerall = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [10,50]
trigger1 = enemy, Vel X >0
trigger2 = P2BodyDist X = [-30,30]
trigger2 = enemy, Vel X =0
trigger3 = P2BodyDist X = [-50,-10]
trigger3 = enemy, Vel X <0
value = 3254
persistent = 0
[State 0, changeanim]
type = ChangeAnim
triggerall = Anim = 3250
triggerall = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [10,50]
trigger1 = enemy, Vel X >0
trigger2 = P2BodyDist X = [-30,30]
trigger2 = enemy, Vel X =0
trigger3 = P2BodyDist X = [-50,-10]
trigger3 = enemy, Vel X <0
value = 3255
persistent = 0
[State 0, changeanim]
type = ChangeAnim
triggerall = Anim = 3250
triggerall = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [10,50]
trigger1 = enemy, Vel X >0
trigger2 = P2BodyDist X = [-30,30]
trigger2 = enemy, Vel X =0
trigger3 = P2BodyDist X = [-50,-10]
trigger3 = enemy, Vel X <0
value = 3256
persistent = 0
[State 0, changeanim]
type = ChangeAnim
triggerall = Anim = 3250
triggerall = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [10,50]
trigger1 = enemy, Vel X >0
trigger2 = P2BodyDist X = [-30,30]
trigger2 = enemy, Vel X =0
trigger3 = P2BodyDist X = [-50,-10]
trigger3 = enemy, Vel X <0
value = 3257
persistent = 0
[State 0, changeanim]
type = ChangeAnim
triggerall = (Anim = 3250 && AnimElemTime(7) >= 0 && AnimElemTime(8) < 0) || Anim = 3251
triggerall = P2Dist Y < 20
trigger1 = P2BodyDist X = [10,50]
trigger1 = enemy, Vel X >0
trigger2 = P2BodyDist X = [-10,10]
trigger2 = enemy, Vel X =0
trigger3 = P2BodyDist X = [-50,-10]
trigger3 = enemy, Vel X <0
value = 3258
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3252
trigger1 = AnimElem = 1
x = 40
y = -2
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3252
trigger1 = AnimElem = 2
y = -7
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3252
trigger1 = AnimElem = 3
y = -24
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3252
trigger1 = AnimElem = 4
y = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3252
trigger1 = AnimElem = 5
y = -30
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3252
trigger1 = AnimElem = 6
y = -8

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3253
trigger1 = AnimElem = 1
x = 0
y = -7
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3253
trigger1 = AnimElem = 2
y = -7
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3253
trigger1 = AnimElem = 3
y = -14
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3253
trigger1 = AnimElem = 4
y = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3253
trigger1 = AnimElem = 5
y = -33
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3253
trigger1 = AnimElem = 6
y = -8

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3254
trigger1 = AnimElem = 1
x = 0
y = -7
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3254
trigger1 = AnimElem = 2
y = 0
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3254
trigger1 = AnimElem = 3
y = -23
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3254
trigger1 = AnimElem = 4
y = -9
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3254
trigger1 = AnimElem = 5
y = -31
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3254
trigger1 = AnimElem = 6
y = -8

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3255
trigger1 = AnimElem = 1
x = 0
y = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3255
trigger1 = AnimElem = 2
y = -7
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3255
trigger1 = AnimElem = 3
y = -24
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3255
trigger1 = AnimElem = 4
y = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3255
trigger1 = AnimElem = 5
y = -32
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3255
trigger1 = AnimElem = 6
y = -8

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3256
trigger1 = AnimElem = 1
x = 0
y = 1
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3256
trigger1 = AnimElem = 2
y = -15
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3256
trigger1 = AnimElem = 3
y = -16
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3256
trigger1 = AnimElem = 4
y = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3256
trigger1 = AnimElem = 5
y = -31
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3256
trigger1 = AnimElem = 6
y = -8

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3257
trigger1 = AnimElem = 1
x = -10
y = -5
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3257
trigger1 = AnimElem = 2
y = 1
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3257
trigger1 = AnimElem = 3
y = -22
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3257
trigger1 = AnimElem = 4
y = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3257
trigger1 = AnimElem = 5
y = -30
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3257
trigger1 = AnimElem = 6
y = -8

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3258
trigger1 = AnimElem = 1
x = 0
y = 0
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3258
trigger1 = AnimElem = 2
y = -7
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3258
trigger1 = AnimElem = 3
y = -22
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3258
trigger1 = AnimElem = 4
y = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3258
trigger1 = AnimElem = 5
y = -32
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3258
trigger1 = AnimElem = 6
y = -8

[State 0, VelSet]
type = VelSet
trigger1 = Anim = [3252,3258]
y = 0
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = [3252,3258]
trigger1 = AnimElemTime(7)>=0
x = 0
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = [3252,3258]
trigger1 = AnimElemTime(7)>=0
y = -12

[State 0, VarSet]
type = VarSet
trigger1 = Pos Y <=-400
var(1)=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(1)=1
trigger1 = Anim != 3251
value = 3251

[State 0, PosSet]
type = PosSet
trigger1 = Pos Y <=-400
x = Cond(Facing = 1,Cond(IsHelper(3210),445,485),Cond(IsHelper(3210),-445,-485))
y = Cond(IsHelper(3210),-45,-50)

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
x = 12
y = 0

[State 0, VarSet]
type = VarSet
trigger1 = (pos x!=[-440,440])
trigger2 = Vel Y !=0
var(0)=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (pos x!=[-440,440])
persistent = 0
value = 3200,1

[State 0, Turn]
type = Turn
trigger1 = (pos x!=[-440,440])
persistent = 0

[State 1510, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, HitDef]
type = HitDef
triggerall = !MoveHit
trigger1 = Var(0)=0
;trigger1 = P2StateNo=[120,155]
trigger2 = Var(0)=1
attr = S, HA
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 45 < 23, 23, root,fvar(11) * 45)), Cond(Var(0)=1,5,0)
guardflag = MA
hitflag = MAF
pausetime = 0,10
guard.pausetime = 0,Cond(Var(0)=1,10,0)
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1030,1
guardsound = -1
ground.type = high
air.type = low
ground.slidetime = 20 ;20
ground.hittime  = 26 ;20
ground.velocity = -1,-10
guard.velocity = Cond(Var(0)=1,-7.5,0)
guard.hittime = Cond(Var(0)=1,26,0)
air.velocity = -1,-10
airguard.velocity = -5, -6
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0,0
givepower = Cond(Var(0)=1,35,0),Cond(Var(0)=1,35,0)
fall.recover = 0
fall = 1

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 2512
x = 0
y = 0
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = MoveHit = 1
trigger2 = Var(0)=1
trigger2 = MoveContact=1
value = 2512
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 2512
trigger1 = AnimElem = 1
value = 2485,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (pos x!=[-500,500])
trigger2 = Anim = 2512
trigger2 = AnimTime >=24
trigger2 = P2MoveType !=H
trigger3 = Pos Y <=-500

;---------------------------
;Scatter Beam
[Statedef 3311]
type    = A
movetype= A
physics = N
anim = 3311
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3311,0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = 1
var(19) = Var(19)

[State 0, Projectile]
type = Projectile
trigger1 = 1
;trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,HP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AT
time = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AP
time = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(1) = 0
x = Cond(FrontEdgeBodyDist >0,24,0)
y = -49
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(2) = 0
x = Cond(FrontEdgeBodyDist >0,49,0)
y = 2;-47
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(3) = 0
x = Cond(FrontEdgeBodyDist >0,32,0)
y = 0;-47
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(4) = 0
x = Cond(FrontEdgeBodyDist >0,15,0)
y = 2;-45
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(5) = 0
x = Cond(FrontEdgeBodyDist >0,5,0)
y = -1;-46
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(6) = 0
x = Cond(FrontEdgeBodyDist >0,7,0)
y = 0;-46
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(7) = 0
x = Cond(FrontEdgeBodyDist >0,17,0)
y = 14;-32
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(8) = 0
x = Cond(FrontEdgeBodyDist >0,2,0)
y = -12;-44
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(9) = 0
x = Cond(FrontEdgeBodyDist >0,22,0)
y = -52;-96
[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3311
trigger1 = AnimElemTime(10) = 0
x = Cond(FrontEdgeBodyDist >0,1,0)
y = -51;-147

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3311
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(10) < 0
trigger1 =  FrontEdgeBodyDist >0
x = 2

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3311
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
y = 2

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3311
trigger1 = AnimElem = 10
x = 0
y = -9

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3311
trigger1 = !AnimTime
value = 3312

[State 1061, Hitdef]
type = HitDef
trigger1 = Anim = 3311
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 7 < 1, 1, root,fvar(11) *7)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,10+random%2
guardsound = S6,0
ground.type = low
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -4,0
guard.velocity = -7.5
air.velocity = -2,-1
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5
persistent = 2

[State 1061, Hitdef]
type = HitDef
trigger1 = Anim = 3312
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 7 < 1, 1, root,fvar(11) *7)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,10+random%2
guardsound = S6,0
ground.type = low
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,-7
guard.velocity = -1
air.velocity = 0,-7
airguard.velocity = 0, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 1
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5
persistent = 2

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 3312
trigger1 = Time >28
value = 3315

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 3315
value = 3311,1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 3315
anim = 3316
ID = 3316
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 84
sprpriority = 4
removeongethit = 1
persistent = 0


[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3315
x = 0
y = 0


[State 0, Helper]
type = Helper
triggerall = Anim = 3315
triggerall = !(NumHelper(3320))
triggerall = Var(5) = 0
trigger1 = Time = 44
trigger2 = Time >50
name = "scatter0"
ID = 3320
stateno = 3320
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3321))
triggerall = Var(5) = 0
trigger1 = Time = 45
trigger2 = Time >59
name = "scatter1"
ID = 3321
stateno = 3321
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3322))
triggerall = Var(5) = 0
trigger1 = Time = 64
trigger2 = Time >70
name = "scatter2"
ID = 3322
stateno = 3322
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3323))
triggerall = Var(5) = 0
trigger1 = Time = 47
trigger2 = Time >65
name = "scatter3"
ID = 3323
stateno = 3323
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3324))
triggerall = Var(5) = 0
trigger1 = Time = 66
trigger2 = Time >75
name = "scatter4"
ID = 3324
stateno = 3324
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3325))
triggerall = Var(5) = 0
trigger1 = Time = 49
trigger2 = Time >62
name = "scatter5"
ID = 3325
stateno = 3325
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3326))
triggerall = Var(5) = 0
trigger1 = Time = 56
trigger2 = Time >67
name = "scatter6"
ID = 3326
stateno = 3326
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3327))
triggerall = Var(5) = 0
trigger1 = Time = 51
trigger2 = Time >81
name = "scatter7"
ID = 3327
stateno = 3327
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3328))
triggerall = Var(5) = 0
trigger1 = Time = 62
trigger2 = Time >71
name = "scatter8"
ID = 3328
stateno = 3328
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3329))
triggerall = Var(5) = 0
trigger1 = Time = 60
trigger2 = Time >70
name = "scatter9"
ID = 3329
stateno = 3329
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3330))
triggerall = Var(5) = 0
trigger1 = Time = 54
trigger2 = Time >77
name = "scatter10"
ID = 3330
stateno = 3330
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3331))
triggerall = Var(5) = 0
trigger1 = Time = 55
trigger2 = Time >68
name = "scatter11"
ID = 3331
stateno = 3331
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Helper]
type = Helper
triggerall = !(NumHelper(3332))
triggerall = Var(5) = 0
trigger1 = Time = 56
trigger2 = Time >84
name = "scatter12"
ID = 3332
stateno = 3332
pos = 0,0
postype = p1    ;p2,front,back,left,right

[State 0, Explod]
type = Explod
trigger1 = Anim = 3315
trigger1 = AnimElemTime(2)=1
trigger1 = Var(5) = 0
anim = 3315
ID = 3315
pos = -30,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3315
trigger1 = AnimElemTime(2)=1
trigger1 = Var(5) = 0
anim = 3315
ID = 3315
pos = 30,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = -5
[State 0, Explod]
type = Explod
trigger1 = Anim = 3315
trigger1 = AnimElemTime(2)=1
trigger1 = Var(5) = 0
anim = 3316
ID = 3315
pos = -30,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = 4
[State 0, Explod]
type = Explod
trigger1 = Anim = 3315
trigger1 = AnimElemTime(2)=1
trigger1 = Var(5) = 0
anim = 3316
ID = 3315
pos = 30,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
sprpriority = -5

[State 0, VarSet]
type = VarSet
trigger1 = Anim = 3315
trigger1 = !AnimTime
var(5) = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Var(5) = 1
flag = invisible


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Var(5) = 1
trigger1 = !NumHelper(3320)
trigger1 = !NumHelper(3321)
trigger1 = !NumHelper(3322)
trigger1 = !NumHelper(3323)
trigger1 = !NumHelper(3324)
trigger1 = !NumHelper(3325)
trigger1 = !NumHelper(3326)
trigger1 = !NumHelper(3327)
trigger1 = !NumHelper(3328)
trigger1 = !NumHelper(3329)
trigger1 = !NumHelper(3330)
trigger1 = !NumHelper(3331)
trigger1 = !NumHelper(3332)

;------------------------------------------
;Scatter7
[Statedef 3326]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 0
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = time = 6
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1	

;------------------------------------------
;Scatter6
[Statedef 3325]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 15
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 1
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = time = 4
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,1
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1

			;------------------------------------------
;Scatter5
[Statedef 3324]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 25
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 2
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1

;------------------------------------------
;Scatter4
[Statedef 3323]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 30
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 3
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,1
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1	

;------------------------------------------
;Scatter3
[Statedef 3322]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 35
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 4
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1	

;------------------------------------------
;Scatter2
[Statedef 3321]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 40
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 5
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,1
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1

;------------------------------------------
;Scatter1
[Statedef 3320]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 45
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = 6
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = -2.4,-3
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1



;------------------------------------------
;Scatter8
[Statedef 3327]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -15
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = -1
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = 2.4,1
airguard.velocity = 5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1			


;------------------------------------------
;Scatter9
[Statedef 3328]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -25
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = -2
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = 2.4,-3
airguard.velocity = 5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1		

				;------------------------------------------
;Scatter10
[Statedef 3329]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -30
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = -3
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = 2.4,1
airguard.velocity = 5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1		

;------------------------------------------
;Scatter11
[Statedef 3330]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -35
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = -4
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = 7.5
air.velocity = -2.4,-3
airguard.velocity = 5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1	

;------------------------------------------
;Scatter12
[Statedef 3331]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -40
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = -4
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = 2.4,1
airguard.velocity = 5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1034

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movecontact 
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1034,2

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1	

;------------------------------------------
;Scatter13
[Statedef 3332]
type = A
physics = N
moveType = A
anim = 3320
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1



[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 1		
ignorehitpause = 1

[State 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = time = 0
v = 18
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 0
y = 30

[State 2103, Super BG Proj]
type = Projectile
triggerall = RoundState = 2
trigger1 = MoveHit = 1
ProjID = 3000    ;Ki attack
projAnim = 15999
projremoveTime = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = -45
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = !Time
x = -5
y = 6

[State 1061, Velocity]
type = VelSet
trigger1 = Movehit
x = 0
y = 0

[State 1061, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1061, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1061, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1034
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = NumTarget
trigger1 = !target,IsHelper
var(1) = 1
ignorehitpause = 1
persistent = 0

[State 1061, Hitdef]
type = HitDef
trigger1 = parent, Var(1)<=12
trigger1 = Time = 9
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 1, 1, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,1
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s3311,20+random%3
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = -7.8,0
guard.velocity = -7.5
air.velocity = 2.4,-3
airguard.velocity = 5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
fall.envshake.time = 10
fall.envshake.ampl = 4
fall.envshake.freq = 176
yaccel = 0.5
air.fall = 1
fall = 0
fall.recover = 0
kill = 1
guard.kill = 1
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = 0, 0
givepower = 5,5

[State 3001, Guardshake]
type = envshake
trigger1 = moveguarded
time = 4
ampl = 6
freq = 176
ignorehitpause = 1

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 18
value = 0

[State 1061, Projectile 1st hit]
type = parentvarset
trigger1 = movehit
v = 19
value = 1
 
[State 1061, End]
type = destroyself
trigger1 = (pos x!=[-240,240])
trigger2 = time>180

[State ]
type=selfstate
trigger1=movehit=1
value=1034+(parent,var(19)=1)

[State 1061, Fade]
type = changestate
trigger1 = moveguarded
value = 1035
ignorehitpause=1

[State 1061, Fade]
type = changestate
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1035
ignorehitpause=1	

;---------------------------------------------------------------------------
; Flare x100
[Statedef 3401]
type    = A
movetype= A;I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
anim = 3401
poweradd = 0
sprpriority = -3

[State 0, Projectile]
type = Projectile
trigger1 = 1
;trigger1 = (P2BodyDist X = [-90,90]) && (P2BodyDist Y = [-90,90])
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,SP        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 1701, ParentVarAdd - for 'dmg dampening']
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = P2MoveType = H
fvar(13) = 0		;no hit, it's not a "physical" hit, it only blinds the enemy.
ignorehitpause = 1

[State 1701, snd]
type = PlaySnd
trigger1 = !Time
value = 1450,0;1
volumescale = 75
[State 1701, snd]
type = PlaySnd
trigger1 = !Time
value = 1450,1;1
volumescale = 100

[State 1701, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1701, SprPriority];Fixed sprite priority
type = SprPriority
trigger1 = 1
value = -3
ignorehitpause = 1

[State 1701, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,-55		;-7,-55
ignorehitpause = 1
;persistent = 

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

[State 1701, Hitdef]
type = HitDef
triggerall = RoundState = 2
triggerall = !parent,IsHelper
trigger1 = root, Var(52)<1400
attr = A, HA
damage = Ceil(IfElse(root, fvar(11) * 0 < 0, 0, root, fvar(11) * 0)), 0
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
guard.pausetime = 0,8
sparkno = -1; s7010
guard.sparkno = s7000
sparkxy = 0,0;-12,-34
hitsound = s8,1;s5, 0
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = 12;8
ground.velocity = -8   ;-3
guard.velocity = 0
airguard.velocity = 0,0
air.type = High	
air.velocity = -8,-6
Ground.cornerpush.veloff=0
Air.cornerpush.veloff=0
air.hittime = 12
air.animtype = back
getpower = 35,35
givepower = 35,135
yaccel = 0.5
kill = 0
fall = 1
fall.recover = 0
P2Facing = 1
p1sprpriority = -3	;not p1 sprite priority, but the helper's...
id = Cond((root, Var(52) < 700), 3505, 3506)

[State 1701, Hitdef]
type = HitDef
triggerall = RoundState = 2
triggerall = !parent,IsHelper
trigger1 = root, Var(52)>=1400
attr = A, HA
damage = Ceil(IfElse(root, fvar(11) * 0 < 0, 0, root, fvar(11) * 0)), 0
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
guard.pausetime = 11,11
sparkno = -1; s7010
guard.sparkno = s7000
sparkxy = 0,0;-12,-34
hitsound = s8,1;s5, 0
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = 12;8
ground.velocity = -8   ;-3
guard.velocity = -8
airguard.velocity = -2,-1.1
air.type = High	
air.velocity = -8,-6
Ground.cornerpush.veloff=0
Air.cornerpush.veloff=0
air.hittime = 12
air.animtype = back
getpower = 35,35
givepower = 35,135
yaccel = 0.5
kill = 0
fall = 1
fall.recover = 0
P2Facing = 1
p1sprpriority = -3	;not p1 sprite priority, but the helper's...
id = Cond((root, Var(52) >= 2100), 3508, 3507)

[State 0, Projectile]
type = Projectile
trigger1 = NumTarget
trigger1 = MoveHit
trigger1 = !target, IsHelper
ProjID = 3401
projanim = 1
projremovetime = 1
persistent = 0
ignorehitpause = 1

[State 0, Projectile]
type = Projectile
trigger1 = 1
ProjID = 93999999999
projanim = 1
projremovetime = 2
offset = -400,0
postype = p1
attr = A,HA        ;change this to whatever your projectile is set
ignorehitpause = 1
guardflag = A
guard.dist = 1999
projedgebound = 1600
projstagebound = 1600

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = MoveGuarded
var(51) = 0

[State 1701, TargetState]
type = TargetState
trigger1 = root, Var(52) < 700
trigger1 = MoveHit
trigger1 = numtarget(3505)
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = 3505
ignorehitpause = 1
persistent = 0
id = 3505

[State 1701, TargetState]
type = TargetState
trigger1 = root, Var(52) >= 700 && Var(52) < 1400
trigger1 = MoveHit
trigger1 = numtarget(3506)
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = Cond(root,Var(53)=0,3525,3505)
ignorehitpause = 1
persistent = 0
id = 3506

[State 1701, TargetState]
type = TargetState
trigger1 = root, Var(52) >= 1400 && Var(52) < 2100
trigger1 = MoveHit
trigger1 = numtarget(3507)
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = Cond(root,Var(53)=0,3610,3505)
ignorehitpause = 1
persistent = 0
id = 3507

[State 1701, TargetState]
type = TargetState
trigger1 = root, Var(52) >= 2100
trigger1 = MoveHit
trigger1 = numtarget(3508)
trigger1 = !(target, ishelper)
;triggerall = Target, MoveType != H
value = Cond(root,Var(53)=0,3670,3505)
ignorehitpause = 1
persistent = 0
id = 3508

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root, StateNo != [3500,3699]
trigger1 = Time = 10
trigger2 = root, MoveType = H
var(51) = 0

[State 1702, End]
type = DestroySelf
triggerall = P2MoveType!=H
trigger1 = Time >= 10

;---------------------------------------------------------------------------
; Assert
[Statedef 3611]
type    = A
movetype= I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
anim = 1
poweradd = 0
sprpriority = 5

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, Anim != 3606




;---------------------------------------------------------------------------
; KILL!
[Statedef 3657]
type    = A
movetype= I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
anim = 3657
poweradd = 0
sprpriority = 5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2.5,1
value = 90

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;---------------------------------------------------------------------------
; Regen Helper
[Statedef 3910]
type    = A
movetype= I
physics = N
juggle = 0
VelSet = 0,0
ctrl = 0
anim = 1
poweradd = 0
sprpriority = 5

[State 0, Projectile]
type = Projectile
trigger1 = root,Anim != 3900
trigger1 = root, MoveType != H
ProjID = 3901
projanim =1
projremovetime = 1
persistent = 2

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root,Var(52)=0
var(51) = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,StateNo != 3900
trigger1 = root,Var(52)=0


;----------------------------------------------------
;Miracle Blast PROJECTILE CONNECTS
[Statedef 1034]
type    = A
movetype= A
physics = N
anim = 1034
sprpriority = 5
velset = 0,0

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, PlaySnd]
type = PlaySnd
trigger1 = PrevStateNo = [3320,3340]
value = 3311,30+random%3
;volumescale = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3320
trigger1 = Anim = 1034
value = -60
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3321
trigger1 = Anim = 1034
value = -65
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3322
trigger1 = Anim = 1034
value = -70
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3323
trigger1 = Anim = 1034
value = -75
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3324
trigger1 = Anim = 1034
value = -80
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3325
trigger1 = Anim = 1034
value = -85
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3326
trigger1 = Anim = 1034
value = -90
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3327
trigger1 = Anim = 1034
value = -95
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3328
trigger1 = Anim = 1034
value = -100
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3329
trigger1 = Anim = 1034
value = -105
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3330
trigger1 = Anim = 1034
value = -110
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3331
trigger1 = Anim = 1034
value = -115
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3332
trigger1 = Anim = 1034
value = -120
ignorehitpause = 1

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Miracle Blast PROJECTILE CONNECTS 2
[Statedef 1035]
type    = A
movetype= A
physics = N
anim = 1034
sprpriority = 5
velset = 0,0

[State 1061, NoJuggle Safety]
type = parentvarset
trigger1 = !time
v = 18
value = 0

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3320
trigger1 = Anim = 1034
value = -60
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3321
trigger1 = Anim = 1034
value = -65
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3322
trigger1 = Anim = 1034
value = -70
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3323
trigger1 = Anim = 1034
value = -75
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3324
trigger1 = Anim = 1034
value = -80
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3325
trigger1 = Anim = 1034
value = -85
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3326
trigger1 = Anim = 1034
value = -90
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3327
trigger1 = Anim = 1034
value = -95
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3328
trigger1 = Anim = 1034
value = -100
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3329
trigger1 = Anim = 1034
value = -105
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3330
trigger1 = Anim = 1034
value = -110
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3331
trigger1 = Anim = 1034
value = -115
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = PrevStateNo = 3332
trigger1 = Anim = 1034
value = -120
ignorehitpause = 1

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=12

;----------------------------------------------------
;Miracle Blast PROJECTILE HITS GROUND
[Statedef 1037]
type    = A
movetype= A
physics = N
anim = 1036
sprpriority = 5
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  Pos Y >= 0 && AnimElemTime(1) = 1
value = 1034,1
channel = -1

[State 1002, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1061, End]
type = destroyself
trigger1 = animtime = 0


;---------------------------------------------------
;Intro helper
[Statedef 19100]
type = S
movetype = I
physics = N
velset = 0,0
anim = 190
sprpriority = 3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;===================================================
; Kinton Cloud intro
[Statedef 70400]
type    = S
movetype= A
physics = N
anim = 70300
sprpriority = 2-4*((random%3)=0)

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,anim = 703
time = 1
pos = -5,0
ignorehitpause =  1

[State 0, velset]
type = SprPriority
trigger1 = time = 270
value = -4

[State 181, cloud leaves]
type = PlaySnd
trigger1 = root,anim = 0
trigger2 = root,stateno = 70403
value = 704, 2
persistent = 0

[State 0, velset]
type = VelAdd
trigger1 = root,anim = 0
X = 1

[State 0, velset]
type = VelAdd
trigger1 = root,stateno = [70403,70405]
X = 3

[State 2260, destroy]
type = DestroySelf
trigger1 = time = 500

;===================================================
;DASH COLLISION NOTIFICATION
[Statedef 13200]
type=A
physics=N
MoveType=I
anim = 15999
velset=0,0
sprpriority=6

[State 8000, Assert]
type=assertspecial
trigger1= 1
flag=NoShadow
ignorehitpause = 1

;[State -2, Explod]; Notification
;type = Explod
;trigger1 = !Time
;anim = 13200
;removeTime = -2
;supermove = 1
;sprpriority = 1
;id = 13200
;bindTime = -1
;ontop = 1
;ownpal = 1
;ignorehitpause = 1
;pausemoveTime = -1
;facing = facing
;scale = 0.5,0.5
;
;[state 17100,scale FX]
;type = modifyExplod
;trigger1 = numExplod(13200)
;trigger1 = Time>=10
;scale = 0.5+0.02(Time-10),0.5+0.02(Time-10)
;id = 13200

[State 8000, End]
type=DestroySelf
trigger1= Time>=40

;===================================================
; Limit basics comboability
[Statedef 15999]
type    = S
movetype= A
physics = N
anim = 15999
sprpriority = -5

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = numenemy
trigger1 = enemynear, movetype != H || (enemynear, stateno = [120,155]) || enemynear, ctrl
trigger2 = time = 24


;Clones Helper
[Statedef 17000]
type = A
physics = N
anim = 17000
velset = 14,0

[state 17000, whoosh]
type = playsnd
trigger1 = Pos X = [-240,240]
value = 100,0
persistent = 0
;======================================================================
;LAND FX
[Statedef 17100]
type=A
movetype=I
physics=N
anim=15999
sprpriority=1
velset=0,0



[state 17100,bind]
type = bindtoparent
trigger1 = !time
pos = -11,0

[state 17100, Landing Effect]
type=explod
trigger1=!time
anim=17100
id=17100
pos=0,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1

[state 17100]
type=removeexplod
trigger1=time>10

[State 17100]
type=destroyself
trigger1=time>10

;===================================================
;Pulse Effect during fall recovery (taken from Possessed Heita by The_None)
[Statedef 52100]
type    = S
movetype = I
physics = S
sprpriority = 4
anim = 15999
ctrl = 0

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT

[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = ifelse(root,stateno=5201,ceil(parentdist x/3.0),parentdist x)
y = parentdist y

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

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time
value = var(0)
elem = var(1)

[State 0, VarSet]
type = VarAdd
trigger1 = time
fvar(0) = 11.2

[State 0, VarSet]
type = VarAdd
trigger1 = time
fvar(1) = 0.015

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1+fvar(1),1+fvar(1)

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

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = floor(0-fvar(0)),floor(0-fvar(0)),floor(0-fvar(0))

[State 0, ]
type = DestroySelf
trigger1 = root,stateno != 5201
trigger1 = root,stateno != 5210

;==========================================================
; SUPER BG - Street Fighter 3
[Statedef 19875]
type = S
velset = 0,0
sprpriority = 0
anim = 15999
ctrl = 0

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 55
flag = noFG

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 0
anim = 19877
id = 19875
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 99999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999

scale = 1.20,1.20
ignorehitpause = 1
persistent = 0

[State 10000, Explod SF3]
type = Explod
trigger1 = time = 0
anim = 19875
id = 10000
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999

scale = 1.20*0.9,1.20*1.05
ignorehitpause = 1
persistent = 0

[State 10000, pause]
type = Pause
trigger1 = Time = 0
time = 40
movetime = 40

[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = time = 44
id = 10000

[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = time = 55
id = 10500

;==========================================================
; SUPER BG - Super DBZ (Physics)
[Statedef 19885]
type = S
velset = 0,0
sprpriority = 0
anim = 15999
ctrl = 0

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4) && time<150
time=4
freq=80
ampl=7

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noFG
flag2 = nokoslow
ignorehitpause = 1

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
ignorehitpause = 1

[State 10000, Explod]; White BG
type = Explod
trigger1 = time = 0
anim = 19884
id = 19884
pos =  160,120
postype = left
sprpriority = -4
facing = 1
bindtime = -1
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.20,1.20
ignorehitpause = 1
persistent = 0
removetime = -2

[State 10000, Explod Krak]
type = Explod
trigger1 = time = 0
anim = 19885
id = 19885
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1,1
ignorehitpause = 1
persistent = 0

[State 10000, Scale Explod]
type = ModifyExplod
trigger1 = time>6
scale = 1+.01*time, 1+.01*time
id = 19885

[State 10000, RemoveExplod Krak]
type = RemoveExplod
trigger1 = time = 22
id = 19885

[State 10000, Explod Space BG]
type = Explod
trigger1 = time = 23
anim = 19886
id = 19886
pos =  160,120
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.3,1.3
ignorehitpause = 1
persistent = 0

[State 10000, Explod planet left]
type = Explod
trigger1 = time = 23
anim = 19887
id = 19886
pos =  0,240
postype = left
sprpriority = -6
facing = 1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.2,1.2
ignorehitpause = 1
persistent = 0
;vel = -.2,0
bindtime = -1

[State 10000, Explod planet right]
type = Explod
trigger1 = time = 23
anim = 19888
id = 19886
pos =  320,240
postype = left
sprpriority = -6
facing = 1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.2,1.2
ignorehitpause = 1
persistent = 0
;vel = .2,0
bindtime = -1

[State 1000, Helper]
type = Helper
trigger1 = time>=23 && time<70 && !(time%5) && numhelper(19890)<80 && numhelper(19891)<80

name = "rocks"
id = 19890
pos = 160,20
postype = left
facing = 1
stateno = 19890
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999

[State 13300, black screen fade]
type = Explod
trigger1 = Time = 60
anim = 19883   ;2771
ID = 2771
postype = left
pos = 0,-50
bindtime = -1
removetime = 91
pausemovetime = 91
ontop = 1
scale = 2,3

[State 10000, RemoveExplod Krak]
type = RemoveExplod
trigger1 = time = 150
id = 19886

;------------------------------------------------------
;Rocks going up
[Statedef 19890]
type = A
movetype = I
physics = N
anim = 15999

[State 1003, Helper]
type = Helper
trigger1 = !time

name = "rocks"
id = 19891
pos = ((random%320)),10*(random%13)
postype = left
facing = 1
stateno = 19891
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = .5
size.yscale = .5

[State 1003, Helper]
type = Helper
trigger1 = !time

name = "rocks"
id = 19891
pos = ((random%320)+320),10*(random%13)
postype = left
facing = 1
stateno = 19891
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = .5
size.yscale = .5

[State 1003, Helper]
type = Helper
trigger1 = !time

name = "rocks"
id = 19891
pos = ((random%320)-320),10*(random%13)
postype = left
facing = 1
stateno = 19891
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = .5
size.yscale = .5

[State 1003, DestroySelf]
type = DestroySelf
trigger1 = time=2

;-----------------
[Statedef 19891]
type = A
movetype = I
physics = N
anim = 19890 + random%6
sprpriority = -5

[State 1004, assert]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1004, vel]
type = velset
trigger1 = !time
y = -3-random%7

[State 1004, vel]
type = varset
trigger1 = !time
var(10) = random%2

[State 1004, assert]
type = angledraw
trigger1 = 1
value = ifelse(var(10)=0,5*time,-5*time)

[State 1004, DestroySelf]
type = DestroySelf
trigger1 = time > 300
trigger2 = pos Y < -340
trigger3 = root,stateno = 180

;==========================================================
; SUPER BG - Super DBZ (Ki attacks)
[Statedef 19892]
type = S
velset = 0,0
sprpriority = 0
anim = 15999
ctrl = 0

[State 3001, screen]
type = PosSet
trigger1 = !time
x = 0
y = -ceil(screenpos Y)
ignorehitpause = 1

[State 3001, screen]
type = PosSet
trigger1 = 1
x = 0
ignorehitpause = 1

[State 1000, shake]
type = EnvShake
trigger1 = !(time%4) && time<150
time=4
freq=80
ampl=7

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noFG
flag2 = nokoslow
ignorehitpause = 1

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
ignorehitpause = 1

[State 10000, Explod]; White BG
type = Explod
trigger1 = !time
anim = 957
id = 11111
pos =  0,-30
postype = left
sprpriority = -7
facing = 1
bindtime = -1
ownpal = 1
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1
scale = 2,2

[State 10000, Explod Zwang]
type = Explod
trigger1 = time = 0
anim = 19896
id = 19896
pos =  160,120
postype = left
sprpriority = -5
facing = 1
bindtime = -1
ownpal = 1
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
ignorehitpause = 1
scale = .9,1.2

[State 10000, Scale Explod]
type = ModifyExplod
trigger1 = time>50
scale = .9+.005*(time-50), 1.2+.005*(time-50)
id = 19896

[State 1003, Helper]
type = Helper
trigger1 = !time

name = "yellow_BG"
id = 19897
pos = 0,0
postype = left
facing = 1
stateno = 19897
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
persistent = 0

[State 13300, white screen fade]
type = Explod
trigger1 = Time = 60
anim = 19883
ID = 2771
postype = left
pos = 0,-50
bindtime = -1
removetime = 91
pausemovetime = 91
ontop = 1
scale = 2,3
ignorehitpause = 1

[State 10000, RemoveExplod zwang]
type = RemoveExplod
trigger1 = time = 140
id = 19896
[State 10000, RemoveExplod yellow BG]
type = RemoveExplod
trigger1 = time = 140
trigger2 = Roundstate = 4
id = 19897
[State 10000, RemoveExplod white BG]
type = RemoveExplod
trigger1 = time = 140
id = 11111

[State 10000, pause]
type = Pause
trigger1 = !time
time = 20
movetime = 20
ignorehitpause = 1

;--------------------------------------
;Yellow Super BG Helper
[Statedef 19897]
type = S
movetype = I
physics = N
anim = 19897
sprpriority = -6

[State 1004, assert]
type = bindtoparent
trigger1 = 1
pos = 0,120
ignorehitpause = 1

[State 1004, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
flag2 = noFG
ignorehitpause = 1

[State 1004, assert]
type = angledraw
trigger1 = time < 50
value = 10*time
scale = .7,.7
ignorehitpause = 1

[State 1004, assert]
type = angledraw
trigger1 = time >= 50
value = 10*time
scale = .7+.01*(time-50),.7+.01*(time-50)
ignorehitpause = 1

;==========================================================
; SUPER BG - Jojo's Bizarre Adventure
[Statedef 19900]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 15999
sprpriority = -21

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19910
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19911
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19912
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19913
id = 8001
pos = 0,-10
postype = back
sprpriority = -21
bindtime = -1
scale = 0.83333333333333333333333333333333,1.0810810810810810810810810810811
removetime = -1
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1

[State 1211, Exclamation]
type = Explod
trigger1 = Time = 0
anim = 19900
id = 19900
pos = 0,0
postype = back
sprpriority = 5
bindtime = -1
scale = .84, 1.07
supermovetime = -1
pausemovetime = -1
ignorehitpause = 1
persistent = 0
ontop = 1

[State 10500, snd]
type = playsnd
trigger1 = !time
value = 9,0

[state haha]
type = varset
trigger1 = time = 0
var(3) = 0

[state haha]
type = varadd
trigger1 = time >= 5
trigger1 = var(3) < 220
var(3) = 5

[State that starts the inverted effect]
type           = PalFX
trigger1       = time >= 5
add            = var(3),var(3),var(3)
time           = 1
ignorehitpause = 1

[State 2030, 0]
type = AssertSpecial
Trigger1 = Time < ifelse(matchover, 120, 50)
flag = nofg
flag2 = nobardisplay
ignorehitpause = 1

[State haha]
type = RemoveExplod
trigger1 = Time = ifelse(matchover, 120, 50)
id = 8001

[State ChangeState!]
type = DestroySelf
trigger1 = RoundState = 0

;====================================
; Broken Back - BG Arms + legs
[Statedef 245947]
type = S
movetype = H
physics = N
velset = 0,0
anim = 5947

[State 2260, bind]
type = bindtoroot
trigger1 = 1
pos = 0,0

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = time = 126

;====================================
; RE Broken Back - BG Arms + legs
[Statedef 355947]
type = S
movetype = H
physics = N
velset = 0,0
anim = 5947

[State 2260, bind]
type = bindtoroot
trigger1 = 1
pos = 0,0

[State 2260, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2260, destroy]
type = DestroySelf
trigger1 = time = 19

;========================<EXPLODSIVE BUFFERING HELPER>=============================
[StateDef 90000005]
type = A
physics = N
moveType = I
anim = 1
velSet = 0,0
ctrl = 0

[State 90000005, Turn]
type = Turn
trigger1 = (enemy, NumExplod(94646464) || enemy, NumExplod(92468246)) && !var(0)
trigger2 = !enemy, NumExplod(94646464) && !enemy, NumExplod(92468246) && var(0)
ignoreHitPause = 1

[State 90000005, Reverse Left/Right]
type = VarSet
trigger1 = (enemy, NumExplod(94646464) || enemy, NumExplod(92468246)) && !var(0)
var(0) = 1
ignoreHitPause = 1

[State 90000005, Reset Turn Variable]
type = VarSet
trigger1 = !enemy, NumExplod(94646464) && !enemy, NumExplod(92468246) && var(0)
var(0) = 0
ignoreHitPause = 1

;training mode detection set for entire match
 [State 0, VarSet]
type = VarSet
trigger1 = root, Time >1 && root, time <3
var(23) = root,Var(23)
persistent = 0

[State 90000005, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "by JustMorphPointman"
ignoreHitPause = 1