;======================================================================
;---------------------------
;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

;---------------------------
;Uppercut AfterImages
[Statedef 213]
type = S
physics = N
moveType = A
anim = 213

[State 0, VelSet]
type = VelSet
trigger1 = RootDist x <= 0 
x = 1

[State 0, VelSet]
type = VelSet
trigger1 = RootDist Y < 0
Y = -10

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

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


;---------------------------
;Lightening Uppercut
[Statedef 217]
type = S
physics = N
moveType = A
anim = 217
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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 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, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 217,0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Movehit = 10
value = 217,1
channel = -1

[State 1061, Hitdef]
type = HitDef
trigger1 = !NumTarget(226)
trigger1 = AnimElem = 3
attr = S, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 27 < 3, 3, root,fvar(11) * 27)), 0
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 15,15
guard.pausetime = 15,15
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-65
hitsound   = s217, 1
guardsound = S6,1
animtype = Up
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -1,-11
guard.velocity = -9
air.velocity = ifelse(p2movetype=H,-3,-1),ifelse(p2movetype=H,-5,-10)
fall = 1
fall.recover = 0
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.45
palfx.time = 40
Palfx.add = 100,100,100 
Palfx.sinadd = -80,-80,-80,10
Palfx.color = 0 
Palfx.invertall = 1
p2facing = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveHit = 1
var(51) = Cond(P2MoveType = H,40,210)
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveGuarded = 1
var(51) = 35

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) >= 3
x = 2
y = -2

[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 = !AnimTime

;---------------------------
;EX Lightening Uppercut
[Statedef 218]
type = S
physics = N
moveType = A
anim = 217
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 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 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, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 217,0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Movehit = 10
value = 217,1
channel = -1


[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 47 < 3, 3, root,fvar(11) * 47)), 0
priority  = 4,Hit
hitflag = MAF
pausetime = 15,15
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-65
hitsound   = s217, 1
guardsound = S6,1
animtype = Up
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -1,-11.5
guard.velocity = -9
air.velocity = ifelse(p2movetype=H,-3,-1),ifelse(p2movetype=H,-5,-10)
fall = 1
fall.recover = 0
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.45
palfx.time = 40
Palfx.add = 100,100,100 
Palfx.sinadd = -80,-80,-80,10
Palfx.color = 0 
Palfx.invertall = 1
p2facing = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveHit = 1
var(51) = Cond(P2MoveType = H,40,210)
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveGuarded = 1
var(51) = 35

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


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

[State 1061, End]
type = destroyself
trigger1 = !AnimTime

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

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(29)=0
trigger1 = root,Var(50)=0
source = 1,1
dest = 1,root,Var(58)

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(29)=1
trigger2 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

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

[State 905, BindToParent]
type = BindToParent
trigger1 = anim = 905 
trigger2 = Anim = 192 || Anim = 193
trigger3 = Anim = 902
trigger4 = Anim = 2700
pos = -10,3

[State 905, Anim]
type = ChangeAnim
triggerall = anim = 905 
trigger1 = root,stateno = 901 
trigger2 = root,stateno = 903
trigger3 = root,stateno = 3601
trigger3 = root, Time>=294
value = 906

[State 905, DestroySelf]
type = DestroySelf
triggerall = (Root,StateNo != 702) && (Root,StateNo != 900) && (Root,StateNo != 52) && (Root,StateNo != 902) && (Root,StateNo != 2700) && (Root,StateNo != 3601)
trigger1 = (anim = 905) 
trigger2 = (anim = 906) && animtime = 0
trigger3 = Root,MoveType = H
trigger4 = root, Anim != 3900

; SSJ3 SHIELD
[Statedef 916]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
sprpriority = -1
facep2 = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = A
statetype = A       ;S,A,C,L
persistent = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = S
statetype = S       ;S,A,C,L
persistent = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = C
statetype = C       ;S,A,C,L
persistent = 1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !time
var(28)= 0
ignorehitpause = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = Var(1)<0
var(1)=0
ignorehitpause = 1
persistent = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>0
trigger1 = GameTime%3 = 0
var(1)=-1
ignorehitpause = 1

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !time
var(28)= gethitvar(damage)
ignorehitpause = 1
persistent = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = time=1
var(28)= 0
ignorehitpause = 1
persistent = 0

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "damage=%d hitime=%d v1=%d"
params = gethitvar(damage),GetHitVar(hittime), var(1)
ignorehitpause = 1

[State 905, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
flag2 = Invisible
ignorehitpause = 1

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

[State 0, HitOverride Normal]
type = HitOverride
trigger1 = time>=0
trigger1 = Var(1)<=29
attr = SCA,AA,AP
slot = 0
stateno = 917
time = 1
forceair = 0
ignorehitpause = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = time>=0    ;root cause?
trigger1 = Var(1)>=30
attr = SCA,AA,AP
slot = 3
stateno = 920 ;cooldown
time = 1
forceair = 0
ignorehitpause = 1
;persistent =

[State 905, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0
ignorehitpause = 1

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

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
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 = root,StateNo=3657
trigger2 = root,StateNo=3667
trigger3 = root,StateNo=[3620,3623]
trigger4 = root,StateNo=[3682,3685]
value = 920
ctrl = 0
ignorehitpause = 1

[State 905, DestroySelf]
type = DestroySelf
trigger1 = root,var(29)<=0;root,var(33)<23
ignorehitpause = 1

; SSJ3 SHIELD NORMAL
[Statedef 917]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
sprpriority = -1
facep2 = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = A
statetype = A       ;S,A,C,L
persistent = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = S
statetype = S       ;S,A,C,L
persistent = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = C
statetype = C       ;S,A,C,L
persistent = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "damage=%d hitshaketime=%d hitpausetime=%d hitime=%d var(1)=%d movehit=%d"
params = gethitvar(damage),GetHitVar(hitshaketime),GetHitVar(hitshaketime), GetHitVar(hittime), Var(1), (enemynear,movehit) ;GetHitVar(hitshaketime)
ignorehitpause = 1
;persistent =

[State 0, parentVarSet]
type = ParentVarSet
trigger1 = root, Life = 1
fvar(17) = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>0
var(1)=-1
ignorehitpause = 1
persistent = 1

[State 905, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
flag2 = Invisible
ignorehitpause = 1

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

[State 905, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0
ignorehitpause = 1

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

[State 0, VarAdd] ;Counter
type = VarAdd
trigger1 = !time
var(1) = 10   ;Normal 1 hit
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(2) = GetHitVar(animtype)

[State 0, VarAdd] ;Counter
type = VarAdd
trigger1 = !Time
trigger1 = Var(2)>=3
var(1) = 5   ;Normal 1 hit
ignorehitpause = 1

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !time
var(28)= gethitvar(damage)
ignorehitpause = 1
persistent = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = time=1
var(28)= 0
ignorehitpause = 1
persistent = 0

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

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
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
;persistent =
[State 0, ChangeState]
type = ChangeState
;trigger1 = time=20 ;(GetHitVar(hittime)-enemynear,movehit)=0;enemynear,movehit>8 ;time=20 ;GetHitVar(hittime)<0 && GetHitVar(hitshaketime)=0 && HitShakeOver=1;&& enemynear,HitPauseTime = 0 ;0 ;time=14 ;10 ;5
trigger1 = time>=1
value = 916
ctrl = 0
;anim =
;ignorehitpause = 1
;persistent =

[State 0, ChangeState] ;prevent lockup
type = ChangeState
triggerall = time>0
trigger1 = var(1)>=30
trigger2 = root,StateNo=3657
trigger3 = root,StateNo=3667
trigger4 = root,StateNo=[3620,3623]
trigger5 = root,StateNo=[3682,3685]
value = 920
ctrl = 0
ignorehitpause = 1

; SSJ3 SHIELD COOLDOWN
[Statedef 920]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
sprpriority = -1
facep2 = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = A
statetype = A       ;S,A,C,L
persistent = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = S
statetype = S       ;S,A,C,L
persistent = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root, StateType = C
statetype = C       ;S,A,C,L
persistent = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "damage=%d hitshaketime=%d hitpausetime=%d hitime=%d movehit=%d"
params = gethitvar(damage),GetHitVar(hitshaketime),GetHitVar(hitshaketime), GetHitVar(hittime), (enemynear,movehit) ;GetHitVar(hitshaketime)
ignorehitpause = 1
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = 1
var(1)= root,var(26)
ignorehitpause = 1
persistent = 1

[State 905, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
flag2 = Invisible
ignorehitpause = 1

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

[State 905, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0
ignorehitpause = 1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = time=1
var(28)= 0
ignorehitpause = 1
persistent = 0

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

[State 6666, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
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 = root,StateNo!=[3610,3619]
trigger1 = root,Var(26)<30
trigger1 = root,StateNo!=3657
trigger1 = root,StateNo!=3667
trigger1 = root,StateNo!=[3620,3623]
trigger1 = root,StateNo!=[3682,3685]
value = 916
ctrl = 0

[State 0, DestroySelf]
type = null;DestroySelf
trigger1 = time=360 ;600   ;temp
ignorehitpause = 1
;persistent =

;----------------------------------------------------
;Whirlwind Kick Projectile Destroying Helper
[Statedef 1025]
type    = S
movetype= I
physics = N
anim = 1025
sprpriority = 1
velset = 0,0

[State 960, ReversalDef]
type = ReversalDef
trigger1 = 1 
reversal.attr = SCA,SP,NP;,HP;,NA,SA,HA,NT,ST;,AA,AT 
sparkno = S1319
sparkxy = 0, 0
p1stateno = 1025
p2stateno = 1026

[State 0, ChangeState]
type = ChangeState
trigger1 = root, MoveType = H
trigger2 = !AnimTime
value = 1026
ignorehitpause = 1

;----------------------------------------------------
; Destroy Whirlwind Kick Projectile Destroying Helper
[Statedef 1026]
type    = S
movetype= I
physics = N
sprpriority = 1
velset = 0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1

;---------------------------
;Air Miracle Blast Ki shot
[Statedef 1033]
type = S
physics = N
moveType = A
anim = 1033
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

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

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

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

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

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

[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 1061, Hitdef]
type = HitDef
triggerall = root,Var(1) <= 20 && root,Var(18) = 0 || root,Var(18) = 1
trigger1 = 1
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 15 < 3, 3, root,fvar(11) *15)), 0
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 0
fall.recover = 10
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = cond(p2movetype=H,40,210), 35
givepower = 35,35
fall = root,NumExplod(1000)

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit=1
ProjID = 1033
projanim = 1
projremovetime = 1
supermovetime = 999999
pausemovetime = 999999

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
value = 1

;juggle limit LVL2
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveHit = 1
var(51) = Cond(P2MoveType = H,40,210)
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveGuarded = 1
var(51) = 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])
trigger2 = time>180

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

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

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

;----------------------------------------------------
;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, AngleDraw]
type = AngleDraw
trigger1 = Anim = 1034
value = -45
ignorehitpause = 1

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=12

;----------------------------------------------------
;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 = Anim = 1034
value = -45
ignorehitpause = 1

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;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

;---------------------------
;EX Air Miracle Blast Ki shot
[Statedef 1039]
type = S
physics = N
moveType = A
anim = 1033
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

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

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

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

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

[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 1061, Hitdef]
type = HitDef
trigger1 = 1
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 15 < 3, 3, root,fvar(11) * 15)), 1
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 0
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
givepower = 35,35
fall = root,NumExplod(1000)

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 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, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
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(16)=1)

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

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

;---------------------------
; SuperMan AURA
[Statedef 1062]
type = A
movetype = I
physics = N
ctrl = 0
anim = 735
velset = 0,0
sprpriority = -1

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

[State 905, BindToParent]
type = BindToParent
trigger1 = anim = 735 
pos = 10,-70

[State 905, Anim]
type = ChangeAnim
trigger1 = anim = 735
trigger1 = root,stateno = 1061
value = 736

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

[State 905, DestroySelf]
type = DestroySelf
triggerall = (Root,StateNo != 1060) && (Root,StateNo != 751) && (Root,StateNo != 185)
trigger1 = (anim = 735) 
trigger2 = (anim = 736) && animtime = 0

;---------------------------
;Slash
[Statedef 1081]
type = S
physics = N
moveType = A
anim = 1083
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 5

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

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 10 < 3, 3, root,fvar(11) * 20)), 0
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-60
hitsound = s5, 9
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = 7.8,0
guard.velocity = 3
air.velocity = 2,3
airguard.velocity = 1, -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
getpower = 0,0
givepower = 5,5

[State 0, Trans]
type = Trans
trigger1 = Time >= 10 
trans = addalpha
alpha = 256-time*9, 0+time*9

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

;---------------------------
;Diagonal Slash
[Statedef 1082]
type = S
physics = N
moveType = A
anim = 1084
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

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

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 10 < 3, 3, root,fvar(11) * 20)), 0
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-60
hitsound = s5, 0
guardsound = S6,0
ground.type = high
air.type = low
ground.slidetime = 16 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.velocity = 0
air.velocity = 0,3
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
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 = 5,5

[State 0, Trans]
type = Trans
trigger1 = Time >= 10 
trans = addalpha
alpha = 256-time*9, 0+time*9

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

;---------------------------
;Wolf
[Statedef 1083]
type = S
physics = N
moveType = A
anim = 1081
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

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

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 10 < 3, 3, root,fvar(11) * 20)), 0
priority  = 4,Hit
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-60
hitsound = s5, 0
guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 24
ground.velocity = -6,-6
guard.velocity = -9
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -6,-4
air.hittime = 12
air.animtype = back
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
getpower = 0,0
givepower = 5,5

[State 0, Trans]
type = Trans
trigger1 = Time >= 10 
trans = addalpha
alpha = 256-time*7, 0+time*7

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 30
;---------------------------
;Insult Projectile
[Statedef 1110]
type    = A
movetype= A
physics = N
anim = 1110
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1
[State 1510, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1510, Button Detect]
type = VarSet
trigger1= !Time && !PrevStateNo
var(9) = Root, var(9) ;sets the helper var to be the same as the root's var

[State 1510, VelSet]
type = VelSet
trigger1 = Time >= 0
x = cond(var(9) = 2, 3, cond(var(9) = 1, 2, 1)) 
y = 0

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = MoveContact = 1
ProjID = 30000
projanim = 1606
projremovetime = 90
supermovetime = 0
pausemovetime = 0

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT ; The helper can't be hit by anything except Projectiles
ignorehitpause = 1

[State 1510, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP ; Only Projectiles will hit. This allows other projectiles to destroy this one
time = 1
ignorehitpause = 1

[State 1510, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1111   ; when hit the Projectile will go to this state. It's destroyed state
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1510, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP ; VERY IMPORTANT always remember to set your attr to NP, SP, or HP (Normal, Special, Hyper Projectile)
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 7 < 1, 1, root,fvar(11) * 7)), 0
guardflag = MA
hitflag = MAF
P2Facing = 1
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-50
hitsound   = s1101,0
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.velocity = -7.5
guard.hittime = 16
air.velocity = 0,0
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 = 0
fall.recover = 10
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
getpower = cond(p2movetype=H,40,210), 35 
givepower = 35,35
id = 1110

[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveHit = 1
var(51) = Cond(P2MoveType = H,40,210)
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveGuarded = 1
var(51) = 35

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 1114
ID = 1114
pos = -100,0
postype = p1  ;p2,front,back,left,right
BindTime = -1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = MoveHit = 1
value = Cond(Var(9)=0,1113,Cond(Var(9)=1,1114,1115))
ignorehitpause = 1
;persistent = 

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

[State 1510, Fade]
type = changestate
trigger1 = movecontact ;destroyed state
value = 1111
ignorehitpause=1

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

;---------------------------------------------------------------------------
; DESTROY Projectile Helper
[Statedef 1111]
type    = A
movetype= A
physics = N
anim = 1111
ctrl = 0
sprpriority = 1

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

[State 1511, DestroySelf]
type = DestroySelf
triggerall = time >= 6
trigger1 = p2movetype != H
trigger2 = NumHelper(3410)

;---------------------------
;EX Insult Projectile
[Statedef 1116]
type    = A
movetype= A
physics = N
anim = 1116
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

[State 1510, VelSet]
type = VelSet
trigger1 = Time >= 0
x = 4
y = 0

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT ; The helper can't be hit by anything except Projectiles
ignorehitpause = 1

[State 1510, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP ; Only Projectiles will hit. This allows other projectiles to destroy this one
time = 1
ignorehitpause = 1

[State 1510, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1111   ; when hit the Projectile will go to this state. It's destroyed state
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 2,2

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = MoveContact = 1
ProjID = 30000
projanim = 1606
projremovetime = 150
supermovetime = 0
pausemovetime = 0

[State 1510, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SP ; VERY IMPORTANT always remember to set your attr to NP, SP, or HP (Normal, Special, Hyper Projectile)
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 7 < 1, 1, root,fvar(11) * 7)), 0
guardflag = MA
hitflag = MAF
P2Facing = 1
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s1101,0
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.velocity = -7.5
guard.hittime = 16
air.velocity = 0,0
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 = 0
fall.recover = 10
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 = 1110

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 1114
ID = 1114
pos = -100,-50
postype = p1  ;p2,front,back,left,right
BindTime = -1

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

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

[State 1510, Fade]
type = changestate
trigger1 = movecontact ;destroyed state
value = 1117
ignorehitpause=1

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

;---------------------------------------------------------------------------
; DESTROY Projectile Helper
[Statedef 1117]
type    = A
movetype= A
physics = N
anim = 1111
ctrl = 0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time>=1
scale = 2,2

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

[State 1511, DestroySelf]
type = DestroySelf
triggerall = time >= 6
trigger1 = p2movetype != H
trigger2 = NumHelper(3410)

;---------------------------------------------------------------------------
; Hit by Light Scream
[Statedef 1113]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 1

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

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

[State 0, VelSet]
type = VelSet
trigger1 = Time = 2
x = -.5
y = -.3

[State 0, ChangeState]
type = SelfState
trigger1 = Time >= 45
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
; Hit by Medium Scream
[Statedef 1114]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 1

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

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

[State 0, VelSet]
type = VelSet
trigger1 = Time = 2
x = -.5
y = -.3

[State 0, ChangeState]
type = SelfState
trigger1 = Time >= 65
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
; Hit by Strong Scream
[Statedef 1115]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 5

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

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

[State 0, VelSet]
type = VelSet
trigger1 = Time = 2
x = -.5
y = -.3

[State 0, ChangeState]
type = SelfState
trigger1 = Time >= 85
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
; Hit by EX Scream
[Statedef 1118]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 5

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

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

[State 0, VelSet]
type = VelSet
trigger1 = Time = 2
x = -.5
y = -.3

[State 0, ChangeState]
type = SelfState
trigger1 = Time >= 120
value = 5050
ctrl = 0


;======================================================================
; 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
helpertype = normal
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 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
supermove = 1
;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
supermove = 1
;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 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 = 61,6
animtype = Hard
hitflag = MAF
guardflag=MA
pausetime=0,10
sparkno = -1
guard.sparkno = -1
sparkxy = -10,0
hitsound  = S999,0
guardsound = S6,1
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=-10,0
ground.cornerpush.veloff=0
air.velocity=-4,-2
getpower= ifelse(p2movetype=H,40,210), 35
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 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveHit = 1
var(51) = Cond(P2MoveType = H,40,210)
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = root,Power>=3000
trigger1 = root,Var(50)>0
trigger1 = MoveGuarded = 1
var(51) = 35

[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 (old)
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 1061, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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

;----------------------------------------------------
; This is an EX as long as I LIIIIIIVVVVVE
[Statedef 1606]
type    = S
movetype= I
physics = N
anim = 1606
sprpriority = 1
velset = 0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, MoveType != A
trigger2 = root, StateNo = 1038

;---------------------------
;Die Die Missile Mid
[Statedef 3113]
type = S
physics = N
moveType = A
anim = 3111
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

[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 = 3123
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 7, 7, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,20
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,0
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 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 = 35,35
id = 3111

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
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 = 3125

[State 1061, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
value = 1
 
[State ]
type=selfstate
trigger1=movehit
value=3125+(parent,var(16)=1)
 ignorehitpause = 0

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

;---------------------------
;Die Die Missile Highest
[Statedef 3112]
type = S
physics = N
moveType = A
anim = 3112
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(5)>=0
value = -45
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = AnimElemTime(5)>=0
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 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
slot = 1
time = 1
stateno = 3125
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
slot = 1
time = 1
stateno = 3131
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
slot = 1
time = 1
stateno = 3133
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<=0
slot = 1
time = 1
stateno = 3135
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(5)>=0
slot = 1
time = 1
stateno = 3121
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 7, 7, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,20
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,50
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 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 = 35,35
id = 3111

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
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, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
value = 1

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = moveguarded
value = 3125
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = moveguarded
value = 3131
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = moveguarded
value = 3133
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<=0
trigger1 = moveguarded
value = 3135
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(5)>=0
trigger1 = moveguarded
value = 3121
 
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = movehit
value = 3125+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = movehit
value = 3131+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = movehit
value = 3133+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<=0
trigger1 = movehit
value = 3135+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(5)>=0
trigger1 = movehit
value = 3121+(parent,var(16)=1)
ignorehitpause = 0

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(5)>=0
trigger1 = Pos Y >= -60
value = 3121
ignorehitpause=1

;---------------------------
;Die Die Missile High
[Statedef 3111]
type = S
physics = N
moveType = A
anim = 3113
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(4)>=0
value = -45
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = AnimElemTime(4)>=0
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 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
slot = 1
time = 1
stateno = 3137
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
slot = 1
time = 1
stateno = 3139
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
slot = 1
time = 1
stateno = 3141
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(4)>=0
slot = 1
time = 1
stateno = 3123
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 7, 7, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,20
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,40
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 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 = 35,35
id = 3111

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
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, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
value = 1

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = moveguarded
value = 3137
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = moveguarded
value = 3139
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = moveguarded
value = 3141
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0
trigger1 = moveguarded
value = 3123
 
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = movehit
value = 3137+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = movehit
value = 3139+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = movehit
value = 3141+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0
trigger1 = movehit
value = 3123+(parent,var(16)=1)
ignorehitpause = 0

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0
trigger1 = Pos Y >= -50
value = 3123
ignorehitpause=1

;---------------------------
;Die Die Missile Lowest
[Statedef 3114]
type = S
physics = N
moveType = A
anim = 3114
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(5)>=0
value = -45
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = AnimElemTime(5)>=0
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 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
slot = 1
time = 1
stateno = 3143
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
slot = 1
time = 1
stateno = 3145
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
slot = 1
time = 1
stateno = 3147
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<=0
slot = 1
time = 1
stateno = 3149
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(5)>=0
slot = 1
time = 1
stateno = 3127
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 7, 7, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,20
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,40
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 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 = 35,35
id = 3111

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
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, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
value = 1

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = moveguarded
value = 3143
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = moveguarded
value = 3145
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = moveguarded
value = 3147
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<=0
trigger1 = moveguarded
value = 3149
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(5)>=0
trigger1 = moveguarded
value = 3127
 
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = movehit
value = 3143+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = movehit
value = 3145+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = movehit
value = 3147+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<=0
trigger1 = movehit
value = 3149+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(5)>=0
trigger1 = movehit
value = 3127+(parent,var(16)=1)
ignorehitpause = 0

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(5)>=0
trigger1 = Pos Y >= -100
value = 3127
ignorehitpause=1

;---------------------------
;Die Die Missile Low
[Statedef 3115]
type = S
physics = N
moveType = A
anim = 3115
sprpriority = 5
hitcountpersist = 1
movehitpersist = 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, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(4)>=0
value = -45
ignorehitpause = 1

[State 1033, VelSet]
type = VelSet
trigger1 = AnimElemTime(4)>=0
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 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
slot = 1
time = 1
stateno = 3151
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
slot = 1
time = 1
stateno = 3153
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
slot = 1
time = 1
stateno = 3155
attr = SCA, AA, AP, AT
ignorehitpause = 1
[State 1061, HitOverride]
type = HitOverride
trigger1 = AnimElemTime(4)>=0
slot = 1
time = 1
stateno = 3129
attr = SCA, AA, AP, AT
ignorehitpause = 1


[State 1061, Hitdef]
type = HitDef
trigger1 = AnimElem = 1
attr = A, HP
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 13 < 7, 7, root,fvar(11) *13)),1
priority  = 4,Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,20
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,50
hitsound   = s1034,0
guardsound = S6,1
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 = -5.8,-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 = 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 = 35,35
id = 3111

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
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, NoJuggle]
type = parentvarset
trigger1 = movecontact 
v = 16
value = 1

[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = moveguarded
value = 3151
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = moveguarded
value = 3153
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = moveguarded
value = 3155
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0
trigger1 = moveguarded
value = 3129
 
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<=0
trigger1 = movehit
value = 3151+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<=0
trigger1 = movehit
value = 3153+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<=0
trigger1 = movehit
value = 3155+(parent,var(16)=1)
ignorehitpause = 0
[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0
trigger1 = movehit
value = 3129+(parent,var(16)=1)
ignorehitpause = 0


[State 1061, Fade]
type = changestate
trigger1 = AnimElemTime(4)>=0
trigger1 = Pos Y >= -100
value = 3129
ignorehitpause=1

;----------------------------------------------------
;Missile Connects Mid was23
[Statedef 3125]
type    = A
movetype= A
physics = N
anim = 3121
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects Mid 
[Statedef 3126]
type    = A
movetype= A
physics = N
anim = 3121
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects Highest was21
[Statedef 3123]
type    = A
movetype= A
physics = N
anim = 3122
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects Highest
[Statedef 3124]
type    = A
movetype= A
physics = N
anim = 3122
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects High was22
[Statedef 3121]
type    = A
movetype= A
physics = N
anim = 3123
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9
;----------------------------------------------------
;Missile Connects High
[Statedef 3122]
type    = A
movetype= A
physics = N
anim = 3123
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects Lowest was24
[Statedef 3127]
type    = A
movetype= A
physics = N
anim = 3124
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects Lowest
[Statedef 3128]
type    = A
movetype= A
physics = N
anim = 3124
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects Low was25
[Statedef 3129]
type    = A
movetype= A
physics = N
anim = 3125
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects Low
[Statedef 3130]
type    = A
movetype= A
physics = N
anim = 3125
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2  was30
[Statedef 3131]
type    = A
movetype= A
physics = N
anim = 3130
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2  
[Statedef 3132]
type    = A
movetype= A
physics = N
anim = 3130
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects3  was31
[Statedef 3133]
type    = A
movetype= A
physics = N
anim = 3131
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects3 
[Statedef 3134]
type    = A
movetype= A
physics = N
anim = 3131
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H


;----------------------------------------------------
;Missile Connects4 was32
[Statedef 3135]
type    = A
movetype= A
physics = N
anim = 3132
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects4 
[Statedef 3136]
type    = A
movetype= A
physics = N
anim = 3132
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H


;----------------------------------------------------
;Missile Connects1 was33
[Statedef 3137]
type    = A
movetype= A
physics = N
anim = 3133
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects1 
[Statedef 3138]
type    = A
movetype= A
physics = N
anim = 3133
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was34
[Statedef 3139]
type    = A
movetype= A
physics = N
anim = 3134
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3140]
type    = A
movetype= A
physics = N
anim = 3134
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was35
[Statedef 3141]
type    = A
movetype= A
physics = N
anim = 3135
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3142]
type    = A
movetype= A
physics = N
anim = 3135
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H


;----------------------------------------------------
;Missile Connects2 was36
[Statedef 3143]
type    = A
movetype= A
physics = N
anim = 3136
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3144]
type    = A
movetype= A
physics = N
anim = 3136
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was37
[Statedef 3145]
type    = A
movetype= A
physics = N
anim = 3137
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3146]
type    = A
movetype= A
physics = N
anim = 3137
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was38
[Statedef 3147]
type    = A
movetype= A
physics = N
anim = 3138
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3148]
type    = A
movetype= A
physics = N
anim = 3138
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was39
[Statedef 3149]
type    = A
movetype= A
physics = N
anim = 3139
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3150]
type    = A
movetype= A
physics = N
anim = 3139
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H


;----------------------------------------------------
;Missile Connects2 was40
[Statedef 3151]
type    = A
movetype= A
physics = N
anim = 3140
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3152]
type    = A
movetype= A
physics = N
anim = 3140
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was41
[Statedef 3153]
type    = A
movetype= A
physics = N
anim = 3141
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2 
[Statedef 3154]
type    = A
movetype= A
physics = N
anim = 3141
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

;----------------------------------------------------
;Missile Connects2 was42
[Statedef 3155]
type    = A
movetype= A
physics = N
anim = 3142
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=Time>=9

;----------------------------------------------------
;Missile Connects2
[Statedef 3156]
type    = A
movetype= A
physics = N
anim = 3142
sprpriority = 5
velset = 0,0

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

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

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

[State ]
type=destroyself
trigger1=ishelper
trigger1=P2MoveType!=H

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

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

[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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 27
value = 3310,1
channel = -1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo 
value = 3310
elem = 28

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = -Ceil((root,fvar(13) / 100)*75)

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

[State 1510, VelSet]
type = VelSet
trigger1 = !PrevStateNo
trigger1 = Time >= 46
x = 10
[State 1510, VelSet]
type = VelSet
trigger1 = PrevStateNo
trigger1 = Time >= 0
x = 10

[State 1510, VelSet]
type = VelSet
trigger1 = !PrevStateNo
trigger1 = Time >= 46 && Pos Y <=20
y = 3
[State 1510, VelSet]
type = VelSet
trigger1 = PrevStateNo
trigger1 = Time >= 0 && Pos Y <=20
y = 3

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

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT ; The helper can't be hit by anything except Projectiles
ignorehitpause = 1

[State 1510, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP ; Only Projectiles will hit. This allows other projectiles to destroy this one
time = 1
ignorehitpause = 1

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

[State 1510, Hitdef]
type = HitDef
trigger1 = Time>=0
attr = A, HP 
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 7 < 1, 1, root,fvar(11) * 7)), 12
guardflag = MA
hitflag = MAF
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3311,0
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.velocity = -7.5
guard.hittime = 16
air.velocity = 0,0
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 = 0
fall.recover = 0
p1getp2facing = -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 = 3310

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, TargetState]
type = TargetState
trigger1 = NumTarget(3310)
trigger1 = !target,IsHelper
trigger1 = MoveHit = 1
value = 3320
ignorehitpause = 1
;persistent = 

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

[State 1510, Fade]
type = changestate
trigger1 = moveguarded ;destroyed state
value = 3315
ignorehitpause=1

[State 1510, Fade]
type = changestate
trigger1 = movehit ;destroyed state
value = 3312
ignorehitpause=1

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

;---------------------------
;Donut Hits
[Statedef 3312]
type    = A
movetype= A
physics = N
anim = 3312
ctrl = 0
sprpriority = 10
hitcountpersist = 1
movehitpersist = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = !NumTarget
value = 3313

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = !Time
ProjID = 30000
projanim = 1606
projremovetime = 200
supermovetime = 0
pausemovetime = 0

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

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 10

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = 0
y = 0
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 20
scale = 0.1*enemy,Const(size.ground.front),1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 3314
ID = 3314
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 120
scale = 1,1
sprpriority = -10
removeongethit = 0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 11
anim = 3314
ID = 3314
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 120
scale = 0.1*enemy,Const(size.ground.front),1
sprpriority = -10
removeongethit = 0

[State 0, PosSet]
type = PosSet
trigger1 = NumTarget
x = target, Pos X
y = target, Const(Size.Mid.Pos.Y)
ignorehitpause = 1
persistent = 1

[State 0, PosSet]
type = PosSet
trigger1 = P2MoveType =H
x = target, Pos X
y = target, Const(Size.Mid.Pos.Y)
ignorehitpause = 1
persistent = 1

[State 1510, Hitdef]
type = HitDef
trigger1 = enemy,StateNo!=3321
trigger1 = P2MoveType !=H
trigger2 = enemy,Time = 1
trigger2 = enemy,HitShakeOver=1
attr = A, HP 
damage    = 0
hitflag = MAFD
pausetime = 0,0
sparkno = -1
sparkxy = 0,-100
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.hittime = 16
air.velocity = 0,0
yaccel = 0.5
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 = 0,0
numhits = 0
id = 3310
persistent = 1

[State 1510, Hitdef]
type = HitDef
trigger1 = enemy,StateNo!=3321
trigger1 = P2MoveType !=H
trigger1 = Time >=5
attr = A, HT 
damage    = 0
hitflag = MAFD
pausetime = 0,0
sparkno = -1
sparkxy = 0,-100
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.hittime = 16
air.velocity = 0,0
yaccel = 0.5
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 = 0,0
numhits = 0
id = 3310
persistent = 1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = MoveHit = 1
value = 3321
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
triggerall = (enemy, Name != "Buu" && enemy, StateNo != 2501)
trigger1 = Time >= 120
trigger2 = P2MoveType !=H
trigger2 = Time >=20
trigger3 = target, life = 0
trigger4 = root,StateNo =3700
value = 3313

;---------------------------
;Donut Explodes
[Statedef 3313]
type    = A
movetype= A
physics = N
anim = 3313
ctrl = 0
velset = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

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

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

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

[State 0, VelSet]
type = VelSet
trigger1 = Time >2
x = 0
y = -3

[State 1061, Hitdef]
type = HitDef
trigger1 = Time=0
attr = A, HA
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 40 < 3, 3, root,fvar(11) * 40)), 0
priority  = 4,Hit
hitflag = MAF
pausetime = 0,0
sparkno = s7010
sparkxy = 0,0
hitsound   = s1034,0
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
airguard.velocity = -1, -1
air.velocity = -1,-8
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.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
getpower = 0
fall = 1

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 3313, DestroySelf]
type = DestroySelf
trigger1 = p2movetype != H
trigger1 = Time >=54

;---------------------------------------------------------------------------
; DESTROY Donut Helper
[Statedef 3315]
type    = A
movetype= I
physics = N
anim = 3315
ctrl = 0
sprpriority = 1

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

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

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

[State 1511, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;---------------------------------------------------------------------------
; Hit by Donut
[Statedef 3320]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 5

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

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time>=0
value = SCA,NT,ST,HT
time = 1

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

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

[State 0, ChangeState]
type = SelfState
trigger1 = Time >= 120
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
; Stay in Donut
[Statedef 3321]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 5
hitcountpersist = 9910
movehitpersist = 9910

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time>=0
value = SCA,NT,ST,HT
time = 1

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

[State 0, VelAdd]
type = VelAdd
trigger1 = Time>=0
x = Cond(Vel X>0,-1,Cond(Vel X<0,1,0))
y = Cond(Pos Y>-30,-1,Cond(Pos Y<-40,1,0))
ignorehitpause = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = Pos Y >=1
y = -2
ignorehitpause = 1

;[State 0, VelAdd]
;type = VelAdd
;trigger1 = Time>=0
;x = Cond(FrontEdgeBodyDist=0,-1,Cond(BackEdgeBodyDist=0,1,0))
;ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = Vel X = 0
x = 0
[State 0, VelSet]
type = VelSet
trigger1 = Pos Y <= -30 && Pos Y >=-40
y = 0
ignorehitpause = 1

[State 0, ChangeState]
type = SelfState
trigger1 = Time >= 120
value = 5050
ctrl = 0

;---------------------------
;RINGS Projectile
[Statedef 3410]
type    = A
movetype= A
physics = N
anim = 3411
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 27
value = 3310,1
channel = -1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = PrevStateNo
value = 3411
elem = 9

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 3412
ID = 3412
bindtime = -1
removetime = 160
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 3414
ID = 3412
bindtime = -1
removetime = 160
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 7
anim = 3415
ID = 3412
bindtime = -1
removetime = 160

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = root,Var(50)>0
;trigger1 = root,Var(51)>=2000
;trigger2 = root,Power >= 2000
value = 1.15
ignorehitpause = 1

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

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

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

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT ; The helper can't be hit by anything except Projectiles
ignorehitpause = 1

[State 1510, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP ; Only Projectiles will hit. This allows other projectiles to destroy this one
time = 1
ignorehitpause = 1

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

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

[State 1510, Hitdef]
type = HitDef
trigger1 = Time>=0
attr = A, HP 
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 20 < 3, 3, root,fvar(11) * 20)), 12
guardflag = MA
hitflag = MAFD
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3410,2
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.velocity = -7.5
guard.hittime = 16
air.velocity = 0,0
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
forcenofall = 1
p1getp2facing = -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 = 3410

[State 1510, Hitdef]
type = HitDef
trigger1 = GameTime%3 = 0
attr = A, HT 
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 20 < 3, 3, root,fvar(11) * 20)), 12
guardflag = MA
hitflag = MAFD
pausetime = 0,30
guard.pausetime = 0,15
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-100
hitsound   = s3410,2
guardsound = S6,1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,0
guard.velocity = -7.5
guard.hittime = 16
air.velocity = 0,0
airguard.velocity = -5, -4
envshake.time = 5
envshake.ampl = 4
envshake.freq = 176
forcenofall = 1
p1getp2facing = -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 = 3410

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
triggerall = !target,IsHelper
trigger1 = MoveHit = 1
value = 3430
ignorehitpause = 1
;persistent = 

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

[State 1510, Fade]
type = changestate
trigger1 = moveguarded ;destroyed state
value = 3415
ignorehitpause=1

[State 1510, Fade]
type = changestate
triggerall = NumTarget(3410);()
triggerall = !target,IsHelper
trigger1 = movehit ;
value = 3420
ignorehitpause=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (pos x!=[-240,240])
trigger2 = Time>180
id = 3412


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

;---------------------------------------------------------------------------
; DESTROY Rings Helper
[Statedef 3415]
type    = A
movetype= I
physics = N
anim = 3416
ctrl = 0
sprpriority = 1

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

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

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

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3416
ID = 3415
pos = -14,0
postype = p1  ;p2,front,back,left,right
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3416
ID = 3415
pos = -28,0
postype = p1  ;p2,front,back,left,right
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3416
ID = 3415
pos = -42,0
postype = p1  ;p2,front,back,left,right


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

[State 1511, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime


;---------------------------
;BALL Hits
[Statedef 3420]
type    = A
movetype= A
physics = N
anim = 3413
ctrl = 0
sprpriority = 10
hitcountpersist = 1
movehitpersist = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(1)=target,Life

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

[State 0, VarRandom]
type = VarRandom
trigger1 = !Time
v = 2
range = 0,3

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(1) = %d"
params = var(1)

[State 0, Helper]
type = Helper
triggerall = !NumHelper(3501)
triggerall = root, Facing = 1
trigger1 = root, NumExplod(91111195)
trigger1 = root, NumProjID(8008)
trigger2 = root,AILEVEL = 8
trigger2 = Var(2)=0
name = "Bounce fx"
ID = 3501
stateno = 35000
pos = -70,0
postype = right    ;p2,front,back,left,right
facing = -1
ownpal = 1
size.ground.back = 30
size.ground.front = 30
size.air.back = 12
size.air.front = 12
size.height = 60

[State 0, Helper]
type = Helper
triggerall = !NumHelper(3501)
triggerall = root, Facing = -1
trigger1 = root, NumExplod(91111195)
trigger1 = root, NumProjID(8008)
trigger2 = root,AILEVEL = 8
trigger2 = Var(2)=0
name = "Bounce fx"
ID = 3501
stateno = 35000
pos = 0,0
postype = left    ;p2,front,back,left,right
facing = -1
ownpal = 1
size.ground.back = 30
size.ground.front = 30
size.air.back = 12
size.air.front = 12
size.height = 60

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

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

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

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = !Time
ProjID = 30000
projanim = 1606
projremovetime = 600
supermovetime = 0
pausemovetime = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 10

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 3421
trigger1 = target, StateNo = 3431
value = 3421
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 3421
triggerall = target, Vel X !=0
trigger1 = target, BackEdgeBodyDist <= 0
trigger2 = target, FrontEdgeBodyDist <= 0
value = 3423
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = target, Vel X !=0
trigger1 = target, BackEdgeBodyDist <= 0
trigger2 = target, FrontEdgeBodyDist <= 0
value = 3410,3
channel = 2

[State 0, PlaySnd]
type = PlaySnd
triggerall = target, Vel Y !=0
trigger1 = target, Pos Y<=-200
trigger2 = target, Pos Y >=0
value = 3410,3
channel = 2

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 3421 
triggerall = Anim != 3423 
triggerall = target, Vel Y !=0
trigger1 = target, Pos Y<=-200
trigger2 = target, Pos Y >=0
value = 3422
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim!=3413
triggerall = Anim!=3422
trigger1 = Anim!=3423 
trigger1 = target, StateNo = 3430
trigger2 = Anim=3423
trigger2 = !AnimTime
value = 3420

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = target, Pos X
y = target, Pos Y
ignorehitpause = 1

[State 1501, 7]
type = TargetState
trigger1 = target, MoveType = H
trigger1 = target, life != 0
trigger1 = target, StateNo !=[3430,3431]
ignorehitpause=1
value = 3431

[State 0, ChangeState]
type = ChangeState
trigger1 = Time >= 600
trigger2 = root,StateNo = 3430
trigger3 = target, life = 0
trigger4 = target, Life <= Var(1)-root,Var(25)
trigger5 = RoundState>2
value = 3421

;---------------------------
;Ball Explodes
[Statedef 3421]
type    = A
movetype= A
physics = N
anim = 3313
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

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

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

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

[State 1061, Hitdef]
type = HitDef
trigger1 = Time=0
attr = A, HA
animtype  = hard
damage    = ceil(ifElse(root,fvar(11) * 10 < 3, 3, root,fvar(11) * 10)), 0
priority  = 4,Hit
hitflag = MAF
pausetime = 0,0
sparkno = s7010
sparkxy = 0,0
hitsound   = s1034,0
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
airguard.velocity = -1, -1
air.velocity = -1,-8
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.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
getpower = 0
fall = 1

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 3000
projanim = 15999
projremovetime = 1
ignorehitpause=1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = MoveHit = 1
value = 3432
persistent = 1

[State 3313, DestroySelf]
type = DestroySelf
trigger1 = p2movetype != H
trigger1 = Time >=54

;---------------------------------------------------------------------------
; Hit by Rings
[Statedef 3430]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 5

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
persistent = 1

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

[State 0, VelSet]
type = VelSet
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= 0
x = Vel X -Vel X*2

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y <-200
y = Vel Y -Vel Y*2

[State 0, VelAdd]
type = VelAdd
trigger1 = Pos Y <=-200
y = .1

[State 0, PosSet]
type = PosSet
trigger1 = Pos Y >10
y = 0
[State 0, PosSet]
type = PosSet
trigger1 = Pos Y <-200
y = -200

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y > 0
y = Vel Y -Vel Y*2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time>=0
value = SCA,NT,ST,HT
time = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
slot = 0
stateno = 5000
time = 1
forceair = 1



;---------------------------------------------------------------------------
; Ball Hit State
[Statedef 3431]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = 5

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
persistent = 1

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

[State 0, VelSet]
type = VelSet
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= 0
x = Vel X -Vel X*2

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y <-200
y = Vel Y -Vel Y*2

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y > 0
y = Vel Y -Vel Y*2

[State 0, PosSet]
type = PosSet
trigger1 = Pos Y >10
y = 0
[State 0, PosSet]
type = PosSet
trigger1 = Pos Y <-200
y = -200

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time>=0
value = SCA,NT,ST,HT
time = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
slot = 0
stateno = 5000
time = 1
forceair = 1



[State 0, ChangeState]
type = ChangeState
trigger1 = Time >= 15
value = 3430
ctrl = 0

;---------------------------------------------------------------------------
; Ball Explodes Hit State
[Statedef 3432]
type    = A
movetype= H
physics = A
ctrl = 0
sprpriority = 5

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = !Time
trigger1 = SelfAnimExist(5052)
value = 5052
ignorehitpause = 1
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
trigger1 = !SelfAnimExist(5052)
value = 3431
ignorehitpause = 1

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

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

[State 3052, Land]
type = changestate
trigger1 = Vel Y + Pos Y >= 0
value = 3433

[Statedef 3433]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0

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

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

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

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

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

[State 3052, Land]
type = selfstate
trigger1 = Vel Y + Pos Y >= 0
value = 5110

;---------------------------
;Mouf Bean
[Statedef 3670]
type = S
physics = N
moveType = A
anim = 3671
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 200, 1]
type = PlaySnd
trigger1 = !Time
value = 3657,1

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

[State 0, VarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1
;trigger1 = !root,NumHelper(3410)
fvar(13) = 1

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 1
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = back
fall.animtype = Back
damage = ceil(ifElse(root,fvar(11) * 50 < 7, 7, root,fvar(11) * 50)), 0
pausetime = 0 ,0
sparkno = s7010
guard.sparkno = s7000
sparkxy = 0,-70 
hitsound   = s1034,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
ground.slidetime = 24
guard.slidetime = 18
ground.hittime = 26
guard.hittime = 22
guard.ctrltime = 22
ground.velocity = -8, -2.5
guard.velocity = -1
air.velocity = -2,-.5
airguard.velocity = -1,-.5
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
kill = 1
guard.kill = 1
getpower = 0
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=32
p1sprpriority = 5

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

[State 1061, End]
type = destroyself
trigger1 = AnimTime >= 16
trigger1 = P2MoveType !=H
trigger2 = root,MoveType = H

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

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

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,StateNo!=3621
trigger1 = root,StateNo!=3623
trigger1 = root,StateNo!=752
trigger2 = Time >=16

;======================================================================
;SSJ3 Ghost Forming
[Statedef 3674]
type = A
movetype = I
physics = N
anim = 30010
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

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

;spit ghost snd
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3001,0
channel = -1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3)>=0
value = -5

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 6
x = -62
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 30010
trigger1 = !AnimTime
value = 30000+random%5

[State 30000, ChangeState]
type = ChangeState
trigger1 = Var(9)=0
trigger1 = Time = 24
trigger2 = Var(9)=1
trigger2 = Time = 48
trigger3 = Var(9)=2
trigger3 = Time = 62
value = 3675
ctrl = 0

;======================================================================
;SSJ3 Ghost Fire
[Statedef 3675]
type = A
movetype = A
physics = N
anim = 32000
sprpriority = -1
velset = 0,0
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1760
projanim = 1606
projremovetime = 1
supermovetime = 9999999
pausemovetime = 9999999

[State 0, PosAdd]
type = PosAdd
triggerall = Time > 6
trigger1 = Anim = 32001 && AnimElemTime(1)=0
trigger2 = Anim = 32005 && AnimElemTime(1)=0
y = Cond(Var(10)=1,-32,52)

[State 0, VarSet]
type = VarSet
trigger1 = Anim = 32002 || Anim = 32007 || Anim = 32010 || Anim = 32013 || Anim = 32004 || Anim = 32009 
var(10) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Anim = 32016 || Anim = 32011 || Anim = 32008 || Anim = 32012
var(10) = 2

;forward
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X >1
trigger1 = Anim = 32002 || Anim = 32007 || Anim = 32016 || Anim = 32010 || Anim = 32011
trigger1 = AnimElemTime(1) >= 9
trigger2 = P2Dist X >1
trigger2 = Anim = 32000 
trigger3 = Pos Y <= -350 || Pos Y >= 50
value = 32001
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X <0
trigger1 = Anim = 32010 || Anim = 32011 || Anim = 32016 || Anim = 32010
trigger1 = AnimElemTime(1) >= 9
trigger2 = Anim = 32000 
value = 32001

;up forward
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32000 || Anim = 32001 && AnimElemTime(3)=2
triggerall = Time > 5
trigger1 = P2Dist X >=20 && P2Dist X <=90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X <-1
trigger2 = Pos Y > -70
value = 32002

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 32002
value = 30010,0+random%4
persistent = 6

;up
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32002 
triggerall = AnimElemTime(1) >= 9
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X <-1
value = 32003

;up reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32013
triggerall = AnimElemTime(1) >= 9 
triggerall = Time > 5
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X >1
value = 32014

;up back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32003
triggerall = AnimElemTime(3) >= 2
trigger1 = P2Dist X <=-20 && P2Dist X >=-90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X <=-1 
trigger2 = P2Dist Y > 50 
trigger3 = P2Dist X >1
trigger3 = Pos Y < -70
value = 32009

;back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32013 || Anim = 32004 || Anim = 32008 || Anim = 32009 || Anim = 32012
triggerall = AnimElemTime(1) >= 9
triggerall = Time > 5
trigger1 = P2Dist X <-1
trigger2 = Pos Y <= -350 || Pos Y >= 50
value = 32005
;back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32009 || Anim = 32012 || Anim = 32008 
triggerall = AnimElemTime(1) >= 9
triggerall = Time > 5
trigger1 = P2Dist X >0
value = 32005

;down back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X <-20 &&  P2Dist X >-90
trigger1 = P2Dist Y > -30 
trigger1 = Anim = 32005
trigger1 = AnimElemTime(3) >= 2
trigger2 = Anim = 32005
trigger2 = AnimElemTime(7) >= 2
value = 32004
;down back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X >1
triggerall = Pos Y <= -70
trigger1 = Anim = 32005
trigger1 = AnimElemTime(3) >= 2
value = 32004

;down
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall =  Anim = 32007
triggerall = AnimElemTime(1) >= 9
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y > 30 
trigger2 = P2Dist X <1
value = 32006

;down reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32004 
triggerall = AnimElemTime(1) >= 9 
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y > 30 
trigger2 = P2Dist X >1
value = 32015

;up forward reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32005
triggerall = AnimElemTime(3) >= 2
triggerall = Time > 5
trigger1 = P2Dist X <=-20 && P2Dist X >=-90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X >1
value = 32013

;up back reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = (Anim = 32014 && AnimElemTime(3) >= 2)
trigger1 = P2Dist X >=20 && P2Dist X <=90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X < -1
trigger3 = P2Dist X >=1
trigger3 = P2Dist Y > 50
value = 32010

;down back reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X >20 &&  P2Dist X <90
triggerall = P2Dist Y > 30 
trigger1 = Anim = 32001
trigger1 = AnimElemTime(3) >= 2
trigger2 = Anim = 32005
trigger2 = AnimElemTime(7) >= 2
value = 32007
;down back reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X <-1
triggerall = Pos Y <= -70
trigger1 = Anim = 32001
trigger1 = AnimElemTime(3) >= 2
value = 32007

;up back lower
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32005
trigger1 = AnimElemTime(1) >= 9 
trigger1 = P2Dist X <=-20 && P2Dist X >=-90
trigger1 = P2Dist Y <-30 
trigger2 = AnimElemTime(1) >= 9 
trigger2 = P2Dist X >1
trigger2 = Pos Y >= -70
trigger3 = AnimElemTime(1) >= 20
value = 32008

;up forward lower
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32001
triggerall = AnimElemTime(1) >= 9 
trigger1 = P2Dist X >=20 && P2Dist X <=90
trigger1 = P2Dist Y <-30 
trigger2 = P2Dist X <-1
trigger2 = Pos Y >= -70
value = 32016

;down forward 2
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X >=0 && P2Dist X <=90
trigger1 = P2Dist Y >30 
trigger1 = Anim = 32000 || (Anim = 32006 && AnimElemTime(3) >= 2) 
trigger2 = P2Dist X >1
trigger2 = (Anim = 32015 && AnimElemTime(3) >= 2) 
trigger3 = P2Dist X >=0 
trigger3 = (Anim = 32015 && AnimElemTime(3) >= 2) 
value = 32011

;down back 2
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X <=-1 && P2Dist X >=-90
trigger1 = P2Dist Y >30 
trigger1 = Anim = 32000 || (Anim = 32015 && AnimElemTime(3) >= 2) 
trigger2 = P2Dist X <-1
trigger2 = (Anim = 32006 && AnimElemTime(3) >= 2) 
trigger3 = P2Dist X >=0 
trigger3 = (Anim = 32006 && AnimElemTime(3) >= 2) 
value = 32012

;forward
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32001
x = 5
y = Cond(P2Dist Y <-30, -1,Cond(P2Dist Y > 30,1,0))

;up forward
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32002
x = 3
y = -5
;up forward reversed
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32013
x = -3
y = -5

;up 
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32003
trigger2 = Anim = 32014
x = 0
y = -5

;up back
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32009
x = -3
y = -3
;up back reversed
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32010
x = 3
y = -3

;back
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32005
x = -5
y = Cond(P2Dist Y <-30, -1,Cond(P2Dist Y > 30,1,0))

;down back
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32004
x = -3
y = 5
;down back reversed
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32007
x = 3
y = 5

;up back lower
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32008
x = -3
y = -3
;up forward lower
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32016
x = 3
y = -3

;down back 2
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32011
x = 3
y = 3
;down forward 2
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32012
x = -3
y = 3

;down
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32006
trigger2 = Anim = 32015
x = 0
y = 5

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 1

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = MoveContact = 1
ProjID = 30000
projanim = 1606
projremovetime = 120
supermovetime = 0
pausemovetime = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = !Time
value = SCA
time = 5

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage    = ceil(ifElse(root,fvar(11) * 30 < 7, 7, root,fvar(11) *30)), 1
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-8
fall = 1
fall.recover = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = Pos Y >= 40
value = 3676
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,NumExplod(991901)

;----------------------------------------------------
; SSJ3 Ghost Explode
[Statedef 3676]
type    = A
movetype= A
physics = N
anim = 2846
sprpriority = 5
velset = 0,0
ctrl=0

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
ignorehitpause = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 31500,0
channel = 2

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

[State 1770, DestroySelf]
type = DestroySelf
trigger1 = p2movetype != H
trigger1 = Time >=54


;---------------------------
;Portal
[Statedef 3677]
type    = A
movetype= I
physics = N
anim = 3674
ctrl = 0
sprpriority = -8
hitcountpersist = 1
movehitpersist = 1

[State 1900, grey circle]
type = explod
trigger1 = time = 10
anim = 90202
id = 90200
pos = 0,-60
sprpriority = -8
;ontop = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .005,.005

[State 1900, grey circle]
type = modifyexplod
trigger1 = numexplod(90200) && time<155
scale = .12*(time-10),.12*(time-10)
ID = 90200

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

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

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 10
time = 56
freq = 60
ampl = -2
phase = 90
[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 66
time = 56
freq = 60
ampl = -2
phase = 90

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3677,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(2)=0
value = 3677,1

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

[State 1510, Button Detect]
type = VarSet
trigger1= !Time && !PrevStateNo
var(9) = Root, var(9) ;sets the helper var to be the same as the root's var

[State 1510, VelSet]
type = VelSet
trigger1 = AnimElemTime(2)<0
x = cond(var(9) = 2, 20, cond(var(9) = 1, 10, 4)) 
y = 0

[State 1510, VelSet]
type = VelSet
trigger1 = AnimElemTime(2)=0
x = 0
y = 0

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA
ignorehitpause = 1

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

;Electric
[State 2800, Electric]
type = explod
trigger1 = AnimElemTime(2)<0
anim = 2830+(random%12)
id = 2805
pos = 0,-60
sprpriority = -7
bindtime = 1
ownpal = 1
facing = IfElse(random%2=0,1,-1)
removetime = -2
scale = 0.5+0.1*(random%4), 0.5+0.1*(random%4)

;Electric
[State 2800, Electric]
type = explod
trigger1 = AnimElemTime(2)>=0
trigger1 = gametime%(8) = 0
anim = 2830+(random%12)
id = 2805
pos = 40-(random%80),-135+(Random%100)
sprpriority = -7
bindtime = 1
ownpal = 1
facing = IfElse(random%2=0,1,-1)
removetime = -2
scale = 0.5+0.1*(random%4), 0.5+0.1*(random%4)

[State 0, VarSet]
type = VarSet
trigger1 = enemy, StateNo=5120
var(1) = 30

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>0
trigger1 = enemy, StateNo != [120,155]
var(1) = -1

[State 0, VarSet]
type = VarSet
trigger1 = P2MoveType=H
var(2)=1
[State 0, VarSet]
type = VarSet
trigger1 = P2MoveType!=H
var(2)=0

[State 0]
type = StateTypeSet
trigger1 = Var(1)=0
trigger1 = Var(2)=1
movetype = A       ;I,A,H
ignorehitpause = 1

[State 0]
type = StateTypeSet
trigger1 = Var(1)>0
trigger2 = Var(2)=0
movetype = I        ;I,A,H
ignorehitpause = 1

[State 1510, Hitdef]
type = HitDef
trigger1 = Var(2)=1
trigger1 = enemy, Alive
attr = A, HA ; VERY IMPORTANT always remember to set your attr to NP, SP, or HP (Normal, Special, Hyper Projectile)
animtype  = back
damage    = 0,0;ceil(ifElse(root,fvar(11) * 200 < 100, 100, root,fvar(11) * 200)), 0
;guardflag = MA
hitflag = MAF
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-50
hitsound   = -1
guardsound = -1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,-8
guard.velocity = -7.5
guard.hittime = 16
guard.ctrltime = 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
p2sprpriority = -1
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
getpower = 0,0
givepower = 35,35
id = 3677
numhits = 0
kill = 0

[State 0, Projectile]
type = Projectile
triggerall = NumTarget(3677)
trigger1 = !target,IsHelper
trigger1 = MoveHit = 1
ProjID = 3700
projanim = 1
projremovetime = 1
ignorehitpause = 1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget(3677)
trigger1 = !target,IsHelper
trigger1 = MoveHit
value = 3701
ID = 3677
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root, StateNo != 3693
trigger1 = root, Alive
trigger1 = MoveHit
value = 3677
persistent = 0
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = P2StateNo = [3701,3702]
trigger1 = P2MoveType = H
flag = invisible

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root, StateNo = 3693
trigger2 = !root, Alive
value = 3674
elem = 104
persistent = 0
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = P2StateNo=3702
trigger2 = P2MoveType = H

;---------------------------
;Shockwave Portal
[Statedef 3678]
type    = A
movetype= I
physics = N
anim = 3676
ctrl = 0
sprpriority = -8
hitcountpersist = 1
movehitpersist = 1

[State 0, VelSet]
type = VelSet
trigger1 = enemy,BackEdgeBodyDist<90
x = 4

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

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA
ignorehitpause = 1

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

;Electric
[State 2800, Electric]
type = explod
trigger1 = AnimElemTime(2)>=0
trigger1 = gametime%(8) = 0
anim = 2830+(random%12)
id = 2805
pos = 40-(random%80),-135+(Random%100)
sprpriority = -7
bindtime = 1
ownpal = 1
facing = IfElse(random%2=0,1,-1)
removetime = -2
scale = 0.5+0.1*(random%4), 0.5+0.1*(random%4)

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

[State 0, VarSet]
type = VarSet
trigger1 = enemy, StateNo=5120
var(1) = 30

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>0
trigger1 = enemy, StateNo != [120,155]
var(1) = -1

[State 0, VarSet]
type = VarSet
trigger1 = P2MoveType=H
var(2)=1
[State 0, VarSet]
type = VarSet
trigger1 = P2MoveType!=H
var(2)=0

[State 0]
type = StateTypeSet
trigger1 = Var(1)=0
trigger1 = Var(2)=1
movetype = A       ;I,A,H
ignorehitpause = 1

[State 0]
type = StateTypeSet
trigger1 = Var(1)>0
trigger2 = Var(2)=0
movetype = I        ;I,A,H
ignorehitpause = 1

[State 1510, Hitdef]
type = HitDef
trigger1 = Var(2)=1
trigger1 = enemy, Alive
attr = A, HA ; VERY IMPORTANT always remember to set your attr to NP, SP, or HP (Normal, Special, Hyper Projectile)
animtype  = back
damage    = 0,0;ceil(ifElse(root,fvar(11) * 200 < 100, 100, root,fvar(11) * 200)), 0
;guardflag = MA
hitflag = MAFD
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-50
hitsound   = -1
guardsound = -1
ground.type = high
air.type = low
ground.slidetime = 10 ;20
ground.hittime  = 16 ;20
ground.velocity = 0,-8
guard.velocity = -7.5
guard.hittime = 16
guard.ctrltime = 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
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 = 35,35
id = 3677
numhits = 0
kill = 0

[State 0, Projectile]
type = Projectile
triggerall = NumTarget(3677)
trigger1 = !target,IsHelper
trigger1 =MoveHit = 1
ProjID = 3700
projanim = 1
projremovetime = 1
ignorehitpause = 1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget(3677)
trigger1 = !target,IsHelper
trigger1 =MoveHit = 1
value = 3701
ID = 3677
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root, StateNo = 3693
trigger2 = !root, Alive
value = 3674
elem = 104
persistent = 0
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = P2StateNo=3701
trigger2 = P2MoveType = H

;---------------------------
;Portal
[Statedef 3745]
type    = A
movetype= I
physics = N
anim = 3674
ctrl = 0
sprpriority = -8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(2)=0
value = 3677,1

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

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA
ignorehitpause = 1

;Electric
[State 2800, Electric]
type = explod
trigger1 = AnimElemTime(2)>=0
trigger1 = gametime%(8) = 0
anim = 2830+(random%12)
id = 2805
pos = -135+(random%100),-40+(Random%80)
sprpriority = -7
bindtime = 1
ownpal = 1
facing = IfElse(random%2=0,1,-1)
removetime = -2
scale = 0.5+0.1*(random%4), 0.5+0.1*(random%4)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time>=0
value = 90

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


;---------------------------
;ShockWave
[Statedef 3691]
type    = A
movetype= A
physics = N
anim = 3691
ctrl = 0
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(7)=0
value = 3691,0

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

[State 222, hit]
type = HitDef
trigger1 = root,StateNo != [3900,3999]
trigger1 = AnimElem=7
attr = A, HP
damage = 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,13
guard.pausetime = 0,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -17,-73
hitsound = s2705,0
guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 24
ground.velocity = -16,-3
guard.velocity = -9
guard.ctrltime = 24
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -16,-3
air.hittime = 12
air.animtype = back
fall.recover = 0
getpower= 0,0
givepower = 0,0
yaccel = 0.5
fall = 1
ID = 3692
kill = 0

[State 0, Projectile]
type = Projectile
triggerall = NumTarget(3692)
trigger1 = !target,IsHelper
trigger1 =MoveHit = 1
ProjID = 3701
projanim = 1
projremovetime = 40
ignorehitpause = 1

[State 0, Helper]
type = Helper
trigger1 = NumTarget(3692)
trigger1 = !target, IsHelper
trigger1 = MoveHit=1
name = "Portal"
ID = 3677
stateno = 3678
pos = -100,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = NumTarget(3692)
trigger1 = !target, IsHelper
trigger1 = MoveHit=1
name = "Portal"
ID = 3677
stateno = 3678
pos = 100,0
postype = p2    ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 1

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


;---------------------------------------------------------------
;Ghost Army
[Statedef 3851]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 0

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 90,20
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
scale = 1.2,1.2
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 180,20
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
scale = 1.2,1.2

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 70,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 110,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 150,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 190,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 90,-10
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 130,-20
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 170,-20
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 210,-20
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 80,-40
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 110,-80
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 140,-60
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 170,-70
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 0
Facing = -1
persistent = 0
scale = .8,.8

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 110,-50
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 2
ownpal = 0
Facing = -1
persistent = 0
scale = 1.2,1.2
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 150,-90
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 2
ownpal = 0
Facing = -1
persistent = 0
scale = 1.2,1.2
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 170,-30
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 2
ownpal = 0
Facing = -1
persistent = 0
scale = 1.2,1.2
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 210,-90
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 2
ownpal = 0
Facing = -1
persistent = 0
scale = 1.2,1.2

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 55,-77
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 80,-80
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 160,-90
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3854
ID = 3853
pos = 190,-65
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = -1
ownpal = 0
Facing = -1
persistent = 0

;slacker
[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 3855
ID = 3853
pos = 220,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
sprpriority = 0
ownpal = 0
Facing = -1
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = root, Anim = 3850
trigger1 = Time >= 559
x = 6

[State 0, VelSet]
type = VelSet
trigger1 = root, Anim = 1
x = 2

[State 0, PlaySnd];advance
type = PlaySnd
trigger1 = root, Anim = 3850
trigger1 = Time >= 559
value = 3860,6
persistent = 0

[State 0, PosSet]
type = PosSet
trigger1 = root, Anim = 1
x = -400
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Time >= 685
trigger1 = NumExplod(3817)<11
anim = 3817
ID = 3817
pos = -150+random%300,-100+random%150
postype = p2  ;p2,front,back,left,right
facing = Cond(Facing = 1,1,-1)
sprpriority = 1
ownpal = 1
persistent = 4
[State 0, Explod]
type = Explod
trigger1 = Time >= 685
trigger1 = NumExplod(3818)<6
anim = 3818
ID = 3818
pos = -150+random%300,-100+random%150
postype = p2  ;p2,front,back,left,right
facing = Cond(Facing = 1,1,-1)
sprpriority = 2
ownpal = 1
persistent = 11
[State 0, Explod]
type = Explod
trigger1 = Time >= 685
trigger1 = NumExplod(3819)<4
anim = 3819
ID = 3819
pos = -150+random%300,60
postype = p2  ;p2,front,back,left,right
facing = Cond(Facing = 1,1,-1)
sprpriority = 3
ownpal = 1
persistent = 15
[State 0, Explod]
type = Explod
trigger1 = Time >= 685
trigger1 = NumExplod(2845)<7
anim = 2845
ID = 3820
pos = -150+random%300,-100+random%150
postype = p2  ;p2,front,back,left,right
facing = Cond(Facing = 1,1,-1)
sprpriority = 2
ownpal = 1
removetime = 54
persistent = 18

[State 0, Explod]
type = Explod
trigger1 = Time >= 685
trigger1 = NumExplod(2845)<10
anim = 2847
ID = 3821
pos = -150+random%300,-100+random%150
postype = p2  ;p2,front,back,left,right
ownpal = 1
sprpriority = 2
persistent = 20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 685
value = 3860,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Anim = 15999
value = 3860,0
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time >= 685
value = 31500,0
channel = 2
persistent = 12

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time >= 685
value = 3860,1
channel = 3
persistent = 18

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time >= 689
value = 3860,2
channel = 4
persistent = 9

[State 0, StopSnd]
type = null;StopSnd
trigger1 = root, Anim = 15999
channel = 2
[State 0, StopSnd]
type = null;StopSnd
trigger1 = root, Anim = 15999
channel = 3
[State 0, StopSnd]
type = null;StopSnd
trigger1 = root, Anim = 15999
channel = 4

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 725
id = 3853
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, Anim = 15999
id = 3817
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, Anim = 15999
id = 3818
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, Anim = 15999
id = 3819
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, Anim = 15999
id = 3820
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, Anim = 15999
id = 3821

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, StateNo != 3850


;---------------------------------------------------------------
;DayDream Helper
[Statedef 3940]
type = A
movetype = I
physics = N
anim = 3940
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 1,root,Var(58)

[State 1000, flash]
type = PalFX
trigger1 = !Time
trigger2 = Anim = 3946
trigger2 = Time = 153
add = 256,256,256
sinadd = 0,0,0,1
time = 10

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 3940+random%23

[State 0, VarSet]
type = VarSet
trigger1 = !Time
fvar(0) = Pos X

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3944
name = "Eyes"
ID = 3912
stateno = 3913
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3947
name = "X Head"
ID = 3912
stateno = 3912
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = Anim = 3946
name = "Blanco Hair"
ID = 3912
stateno = 3914
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0
ownpal =1
[State 0, Helper]
type = Helper
trigger1 = Anim = 3946
name = "Shaggy"
ID = 3912
stateno = 3915
pos = -65,0
postype = p1    ;p2,front,back,left,right
persistent = 0
ownpal =1
[State 0, Helper]
type = Helper
trigger1 = Anim = 3946
name = "El Grande Padre"
ID = 3912
stateno = 3916
pos = 85,0
postype = p1    ;p2,front,back,left,right
persistent = 0
ownpal =1
[State 0, Helper]
type = Helper
trigger1 = Anim = 3946
name = "Red Shaggy"
ID = 3912
stateno = 3917
pos = 150,0
postype = p1    ;p2,front,back,left,right
persistent = 0
ownpal =1

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3948
name = "Gill"
ID = 3912
stateno = 3918
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3950
name = "Mario"
ID = 3912
stateno = 3919
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3951
name = "Dino"
ID = 3912
stateno = 3921
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3953
name = "Dragon"
ID = 3912
stateno = 3922
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3954
name = "Sword"
ID = 3912
stateno = 3923
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3955
name = "Flash"
ID = 3912
stateno = 3924
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3956
name = "Sesshoumaru"
ID = 3912
stateno = 3925
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3957
name = "Shishio's Kaguzuchi"
ID = 3912
stateno = 3926
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3958
name = "Ape Escape"
ID = 3912
stateno = 3927
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3959
name = "Gundam"
ID = 3912
stateno = 3928
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3960
name = "OPM"
ID = 3912
stateno = 3929
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3961
name = "Bowser"
ID = 3912
stateno = 3931
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = !NumHelper(3912)
trigger1 = Anim = 3962
name = "Proton"
ID = 3912
stateno = 3932
pos = 0,0
postype = p1    ;p2,front,back,left,right
persistent = 0

[State 1900, SSJ white circle]
type = explod
trigger1 = !Time 
anim = 90201
id = 90200
pos = 0,-60
sprpriority = 3
;ontop = 1
bindtime = -1
ownpal = 1
ignorehitpause = 1
removetime = -2
scale = .005,.005

[State 1900, SSJ white circle]
type = modifyexplod
trigger1 = numexplod(90200) 
scale = .12*(time),.12*(time)
ID = 90200

[State 4500, 1];transform SND
type = PlaySnd
trigger1 = !Time 
value = 194,0
channel = 1

[State 0, PosSet]
type = PosSet
trigger1 = !Time
trigger1 = Anim = 3951
x = 300

[State 0, Turn]
type = Turn
triggerall = Anim = 3951
trigger1 = Time = 1
trigger2= Time = 80

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3951
trigger1 = Time >= 1
x = 10

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3951
trigger1 = Facing = root, Facing
trigger1 = Time > 80
y = 1

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 3951
trigger1 = Facing = root, Facing
trigger1 = Time > 80
trigger1 = Pos X >= fvar(0)-100
x = 0
y = 0

[State 0, Helper]
type = Helper
trigger1 = Anim != 3951
trigger1 = Time = 10
name = "Dream Bubble"
ID = 3904
stateno = 3904
pos = Cond(Facing=1,Ceil(root, Pos X +100),Ceil(root, Pos X -100)),Ceil(root, Pos Y -90)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = Anim = 3951
trigger1 = Time = 10
name = "Dream Bubble"
ID = 3904
stateno = 3904
pos = Cond(Facing=1,Ceil(root, Pos X -350),Ceil(root, Pos X +350)),Ceil(root, Pos Y -90)
postype = p1    ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
persistent = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim != 3951
trigger1 = Time >200
scale = .3,.3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 3951
trigger1 = Time >200
scale = .2,.2

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3951
trigger1 = Time >=180 && Time <=200
x = 5
y = -2

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 3953
trigger1 = Time >=180 && Time <=200
y = -1

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;X Head
[Statedef 3912]
type = A
movetype = I
physics = N
anim = 4018
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Eyes
[Statedef 3913]
type = A
movetype = I
physics = N
anim = 3914
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Blanco Hair
[Statedef 3914]
type = A
movetype = I
physics = N
anim = 4000
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

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

;---------------------------------------------------------------
;Shaggy 
[Statedef 3915]
type = A
movetype = I
physics = N
anim = 4001
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, Trans]
type = Trans
trigger1 = Time >= 0
trans = addalpha
alpha = 0+(time)*2, 256-(time)*2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 2
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 210

;---------------------------------------------------------------
;El Grande Padre
[Statedef 3916]
type = A
movetype = I
physics = N
anim = 4003
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, Trans]
type = Trans
trigger1 = Time >= 0
trans = addalpha
alpha = 0+(time)*3, 256-(time)*3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = -4
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 210

;---------------------------------------------------------------
;Red Shaggy 
[Statedef 3917]
type = A
movetype = I
physics = N
anim = 4002
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, Trans]
type = Trans
trigger1 = Time >= 0
trans = addalpha
alpha = 0+(time)*3, 256-(time)*3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03


[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = -6
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 210

;---------------------------------------------------------------
;Gill
[Statedef 3918]
type = A
movetype = I
physics = N
anim = 4015
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Mario
[Statedef 3919]
type = A
movetype = I
physics = N
anim = 4019
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Dino
[Statedef 3921]
type = A
movetype = I
physics = N
anim = 4033
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, Turn]
type = Turn
trigger1 = Facing != parent, Facing

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .2,.2

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Dragon
[Statedef 3922]
type = A
movetype = I
physics = N
anim = 4038
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;X Head
[Statedef 3923]
type = A
movetype = I
physics = N
anim = 4046
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Flash
[Statedef 3924]
type = A
movetype = I
physics = N
anim = 4047
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 4047+random%2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Sesshoumaru
[Statedef 3925]
type = A
movetype = I
physics = N
anim = 4049
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Shishio's Kaguzuchi
[Statedef 3926]
type = A
movetype = I
physics = N
anim = 4050
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Ape Escape
[Statedef 3927]
type = A
movetype = I
physics = N
anim = 4051
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Gundam
[Statedef 3928]
type = A
movetype = I
physics = N
anim = 4052
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 4058
ID = 4058
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = 180
ownpal = 1


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;OnePunchMan
[Statedef 3929]
type = A
movetype = I
physics = N
anim = 4053
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Bowser
[Statedef 3931]
type = A
movetype = I
physics = N
anim = 4056
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290

;---------------------------------------------------------------
;Proton 
[Statedef 3932]
type = A
movetype = I
physics = N
anim = 4057
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = 1

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
source = 1,1
dest = 2,root,Var(58)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >=180 && Time <=200
scale = 1 - (time-180)*0.03, 1 - (time-180)*0.03

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >200
scale = .3,.3

[State 0, PosAdd]
type = PosAdd
trigger1 = Time >=180 && Time <=200
x = 0
y = -3

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 290



;---------------------------------------------------------------
;Dream Bubble
[Statedef 3904]
type = A
movetype = I
physics = N
anim = 4010
ctrl = 0
poweradd= 0
velset = 0,0
sprpriority = -1

[State 0, Trans]
type = Trans
trigger1 = Time >= 0
trans = addalpha
alpha = 0+time*3, 256-time*3

[State 0, Offset]
type = Offset
trigger1 = Time >=215
x = 0
y = -50

[State 0, Offset]
type = Offset
trigger1 = Time =[210,214]
x = 0
y = -25

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 4010
trigger1 = Time >= 0 && Time <= 215
scale =  20 - (time)*0.09, 20 - (time)*0.09

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 4010
trigger1 = Time > 215
scale =  .5, .5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 4011
trigger1 = Time > 215
scale =  1, 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root, Anim=3903
value = 4011
persistent = 0

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

;---------------------------
;FinisherPortal
[Statedef 3906]
type    = A
movetype= I
physics = N
anim = 3906
ctrl = 0
sprpriority = -8
hitcountpersist = 1
movehitpersist = 1

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

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

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

[State 1510, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA
ignorehitpause = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 10
time = 56
freq = 60
ampl = -6
phase = 90
[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 66
time = 36
freq = 60
ampl = -6
phase = 90

;Electric
[State 2800, Electric]
type = explod
trigger1 = AnimElemTime(2)>=0
trigger1 = gametime%(8) = 0
anim = 2830+(random%12)
id = 2805
pos = 40-(random%80),-135+(Random%100)
sprpriority = -7
bindtime = 1
ownpal = 1
facing = IfElse(random%2=0,1,-1)
removetime = -2
scale = 0.5+0.1*(random%4), 0.5+0.1*(random%4)

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

;---------------------------
; SSJ2 Shield AURA
[Statedef 2705]
type = A
movetype = A
physics = N
ctrl = 0
anim = 2705
velset = 0,0
sprpriority = 5

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

[State 222, hit]
type = HitDef
trigger1 = root, Anim != 331
trigger1 = Time = 1
attr = A, HP
damage = 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,13
guard.pausetime = 0,0
sparkno = -1
guard.sparkno = s7000
sparkxy = -17,-73
hitsound = s2705,0
;guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 24
ground.velocity = -6,0
guard.velocity = -9
guard.ctrltime = 8
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -1,-2
air.hittime = 12
air.animtype = back
fall.recover = 0
getpower= 0,0
givepower = 0,0
yaccel = 0.5
fall = 0
ID = 1098

[State 905, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 905, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;---------------------------
; SSJ2 CHARGE AURA
[Statedef 2720]
type = A
movetype = I
physics = N
ctrl = 0
anim = 2720
velset = 0,0
sprpriority = -1

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

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

[State 905, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,3

[State 905, DestroySelf]
type = DestroySelf
trigger1 = root,Var(50)<=0
trigger2 = root,StateNo = 900
trigger3 = root,StateNo = 2700

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

[State 0, RemapPal]
type = RemapPal
trigger1 = root,StateNo!=170
trigger1 = root,StateNo!=171
source = 1,1
dest = 2,root,Var(58)
[State 0, RemapPal]
type = RemapPal
trigger1 = root,StateNo=170 || root,StateNo=171
trigger1 = root, AnimElem = 14
source = 1,1
dest = 1,root,Var(58)
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = root,Var(50)>0
var(0) = 1

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

;2750 = frame
;2751 = full SSJ2 (orange)
;27510 = full buffer (blue)
;2752 = grey
;27520 = grey kanji
;2753 = yellow kanji
;2754 = orange kanji
;2755 = red kanji
;2756, 0-5 = flames
;2757,2758,2759 = fades

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

[State -2, Explod];Scale full bar orange
type = ModifyExplod
trigger1 = NumExplod(2761) && (root,Var(50))>0 && root,Var(51)<3001
scale = 0.5*ifelse(root,Var(51)<1000, (root,Var(51))/1000.0, ifelse(root,Var(51)>=2000, (root,Var(51)-2000)/1000.0, (root,Var(51)-1000)/1000.0)),0.5
id = 2761
sprpriority = 1
ontop = 1

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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,Var(51))>=1000
id = 2750
ignorehitpause = 1

[State -2, Explod];LVL1 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=1000 && (root,Var(51))<2000
anim = 2770
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 3
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2771
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];LVL1 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=1000 && (root,Var(51))<2000
anim = 2770
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 5
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2771
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,Var(51))>=2000
trigger2 = (root,Var(51))<1000
id = 2771
ignorehitpause = 1

[State -2, Explod];LVL2 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=2000 && (root,Var(51))<3000
anim = 2771
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 5
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2772
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];LVL2 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=2000 && (root,Var(51))<3000
anim = 2771
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 3
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2772
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,Var(51))>=3000
trigger2 = (root,Var(51))<2000
id = 2772
ignorehitpause = 1

[State -2, Explod];LVL3 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=3000
anim = 2772
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 5
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2773
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];LVL3 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=3000
anim = 2772
pos = 76+(root,var(45)),230-(root,var(46))
postype = left
removetime = 3
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2773
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = (root,Var(51))<3000
id = 2773
ignorehitpause = 1

[State -2, Explod];Empty bar EMO (orange)
type = Explod
trigger1 = !NumExplod(2765) && (root,Var(50))>0
anim = 2765
pos = 26+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.2
sprpriority = -5
id = 2765
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale emo bar
type = ModifyExplod
trigger1 = NumExplod(2765) && (root,Var(50))>0 && root,Var(52)<3001
scale = 0.5*ifelse(root,Var(52)<1000, (root,Var(52))/1000.0, ifelse(root,Var(52)>=2000, (root,Var(52)-2000)/1000.0, (root,Var(52)-1000)/1000.0)),0.2
id = 2765

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
id = 2765

[State -2, Explod]; 0 Gotenks
type = Explod
trigger1 = !NumExplod(2753) && (root,Var(50))>0
trigger1 = root,Var(52)<1000
anim = 27521
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2753
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; 1 Gotenks
type = Explod
trigger1 = !NumExplod(2754) && (root,Var(50))>0
trigger1 = (root,Var(52))>=1000 && (root,Var(52))<2000
anim = 27522
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2754
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; 2 Gotenks
type = Explod
trigger1 = !NumExplod(2755) && (root,Var(50))>0
trigger1 = (root,Var(52))>=2000 && (root,Var(52))<3000
anim = 27523
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2755
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; 3 Gotenks
type = Explod
trigger1 = !NumExplod(2756) && (root,Var(50))>0
trigger1 = (root,Var(52))>=3000
anim = 27524
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2756
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; X
type = Explod
trigger1 = !NumExplod(27529)
trigger1 = root,NumProjID(27529)
anim = 27529
pos = 5 +(root,var(45)),222-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 27529
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];EMO LVL1
type = Explod
trigger1 = !NumExplod(2780) && (root,Var(50))>0
trigger1 = root,Var(52)>=1000 && root,Var(52)<2000
anim = 2780
pos = 110+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -5
id = 2780
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = root, Var(52)<1000
trigger3 = root,Var(52)>=2000 
id = 2780

[State -2, Explod];EMO LVL2
type = Explod
trigger1 = !NumExplod(2781) && (root,Var(50))>0
trigger1 = root,Var(52)>=2000 && root,Var(52)<3000
anim = 2781
pos = 110+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -5
id = 2781
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = root, Var(52)<2000
trigger3 = root, Var(52)>=3000
id = 2781

[State -2, Explod];EMO LVL3
type = Explod
trigger1 = !NumExplod(2782) && (root,Var(50))>0
trigger1 = root,Var(52)>=3000 
anim = 2782
pos = 110+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -5
id = 2782
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = root, Var(52)<3000
id = 2782

[State -2, Explod];Circle
type = Explod
trigger1 = !NumExplod(27520) && (root,Var(50))>0
anim = 27520
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 9
id = 27520
bindtime = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;SSJ2 Gauge
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2750
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2751
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2761
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 27510
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2752
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 
id = 27520
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))>=1000
id = 27521
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))>=2000
id = 27522
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))>=3000
id = 27523
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))>=1000
id = 2753
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))>=2000  || (root,Var(52))<1000
id = 2754
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))>=3000 || (root,Var(52))<2000
id = 2755
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))<3000
id = 2756
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))<3000
id = 27511
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 
trigger2 = !root, NumProjID(27529)
id = 27529

[State -2, Explod];Grey bar fades
type = Explod
trigger1 = !NumExplod(2758) && (root,Var(50))<=0
anim = 2758
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 0
id = 2758
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];SSJ2 Gauge fades
type = Explod
trigger1 = !NumExplod(2759) && (root,Var(50))<=0
anim = 2759
pos = 5 +(root,var(45)),219-(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];Yellow Kanji fades
type = Explod
trigger1 = !NumExplod(2757) && (root,Var(50))<=0
anim = 2757
pos = 5 +(root,var(45)),219-(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 0, VarSet]
type = VarSet
trigger1 = root,Var(50)<=0
var(0) = 0

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

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

[State 0, RemapPal]
type = RemapPal
trigger1 = root,StateNo!=170
source = 1,1
dest = 2,root,Var(58)
[State 0, RemapPal]
type = RemapPal
trigger1 = root,StateNo=170
trigger1 = root, AnimElem = 14
source = 1,1
dest = 1,root,Var(58)
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = root,Var(50)>0
var(0) = 1

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

;2750 = frame
;2751 = full SSJ2 (orange)
;27510 = full buffer (blue)
;2752 = grey
;27520 = grey kanji
;2753 = yellow kanji
;2754 = orange kanji
;2755 = red kanji
;2756, 0-5 = flames
;2757,2758,2759 = fades

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

[State -2, Explod];Scale full bar orange
type = ModifyExplod
trigger1 = NumExplod(2761) && (root,Var(50))>0 && root,Var(51)<3001
scale = 0.5*ifelse(root,Var(51)<1000, (root,Var(51))/1000.0, ifelse(root,Var(51)>=2000, (root,Var(51)-2000)/1000.0, (root,Var(51)-1000)/1000.0)),0.5
id = 2761
sprpriority = 1
ontop = 1

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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,Var(51))>=1000
id = 2750
ignorehitpause = 1

[State -2, Explod];LVL1 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=1000 && (root,Var(51))<2000
anim = 2770
pos = 293+(root,var(45)),230-(root,var(46))
postype = left
removetime = 3
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2771
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];LVL1 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=1000 && (root,Var(51))<2000
anim = 2770
pos = 293+(root,var(45)),230-(root,var(46))
postype = left
removetime = 5
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2771
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,Var(51))>=2000
trigger2 = (root,Var(51))<1000
id = 2771
ignorehitpause = 1

[State -2, Explod];LVL2 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=2000 && (root,Var(51))<3000
anim = 2771
pos = 293+(root,var(45)),230-(root,var(46))
postype = left
removetime = 5
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2772
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];LVL2 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=2000 && (root,Var(51))<3000
anim = 2771
pos = 293+(root,var(45)),230-(root,var(46))
postype = left
removetime = 3
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2772
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (root,Var(51))>=3000
trigger2 = (root,Var(51))<2000
id = 2772
ignorehitpause = 1

[State -2, Explod];LVL3 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=3000
anim = 2772
pos = 293+(root,var(45)),230-(root,var(46))
postype = left
removetime = 5
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2773
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];LVL3 Frame
type = Explod
trigger1 = (root,Var(50))>0
trigger1 = (root,Var(51))>=3000
anim = 2772
pos = 293+(root,var(45)),230-(root,var(46))
postype = left
removetime = 3
supermove = 1
scale = 0.5,0.5
sprpriority = 5
id = 2773
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = (root,Var(51))<3000
id = 2773
ignorehitpause = 1

[State -2, Explod];Empty bar EMO (orange)
type = Explod
trigger1 = !NumExplod(2765) && (root,Var(50))>0
anim = 2765
pos = 293+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.2
sprpriority = -5
id = 2765
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Scale emo bar
type = ModifyExplod
trigger1 = NumExplod(2765) && (root,Var(50))>0 && root,Var(52)<3001
scale = -0.5*ifelse(root,Var(52)<1000, (root,Var(52))/1000.0, ifelse(root,Var(52)>=2000, (root,Var(52)-2000)/1000.0, (root,Var(52)-1000)/1000.0)),0.2
id = 2765

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
id = 2765

[State -2, Explod]; 0 Gotenks
type = Explod
trigger1 = !NumExplod(2753) && (root,Var(50))>0
trigger1 = root,Var(52)<1000
anim = 27521
pos = 297 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2753
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; 1 Gotenks
type = Explod
trigger1 = !NumExplod(2754) && (root,Var(50))>0
trigger1 = (root,Var(52))>=1000 && (root,Var(52))<2000
anim = 27522
pos = 297 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2754
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; 2 Gotenks
type = Explod
trigger1 = !NumExplod(2755) && (root,Var(50))>0
trigger1 = (root,Var(52))>=2000 && (root,Var(52))<3000
anim = 27523
pos = 297 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2755
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; 3 Gotenks
type = Explod
trigger1 = !NumExplod(2756) && (root,Var(50))>0
trigger1 = (root,Var(52))>=3000
anim = 27524
pos = 297 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 2756
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod]; X
type = Explod
trigger1 = !NumExplod(27529)
trigger1 = root,NumProjID(27529)
anim = 27529
pos = 297 +(root,var(45)),222-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 10
id = 27529
bindtime = -1
ontop = 1
ownpal = 0
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];EMO LVL1
type = Explod
trigger1 = !NumExplod(2780) && (root,Var(50))>0
trigger1 = root,Var(52)>=1000 && root,Var(52)<2000
anim = 2780
pos = 260+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -5
id = 2780
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = root, Var(52)<1000
trigger3 = root,Var(52)>=2000 
id = 2780

[State -2, Explod];EMO LVL2
type = Explod
trigger1 = !NumExplod(2781) && (root,Var(50))>0
trigger1 = root,Var(52)>=2000 && root,Var(52)<3000
anim = 2781
pos = 260+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -5
id = 2781
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = root, Var(52)<2000
trigger3 = root, Var(52)>=3000
id = 2781

[State -2, Explod];EMO LVL3
type = Explod
trigger1 = !NumExplod(2782) && (root,Var(50))>0
trigger1 = root,Var(52)>=3000 
anim = 2782
pos = 260+(root,var(45)),235-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = -5
id = 2782
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,Var(50)<=0
trigger2 = root, Var(52)<3000
id = 2782

[State -2, Explod];Circle
type = Explod
trigger1 = !NumExplod(27520) && (root,Var(50))>0
anim = 27520
pos = 297 +(root,var(45)),219-(root,var(46))
postype = left
removetime = -1
supermove = 1
scale = 0.5,0.5
sprpriority = 9
id = 27520
bindtime = -1
ontop = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;SSJ2 Gauge
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2750
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2751
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2761
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 27510
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0
id = 2752
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 
id = 27520
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))>=1000
id = 27521
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))>=2000
id = 27522
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))>=3000
id = 27523
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))>=1000
id = 2753
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))>=2000  || (root,Var(52))<1000
id = 2754
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))>=3000 || (root,Var(52))<2000
id = 2755
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(52))<3000
id = 2756
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 || (root,Var(51))<3000
id = 27511
[state 17100,remove FX]
type = removeexplod
trigger1 = (root,Var(50))<=0 
trigger2 = !root, NumProjID(27529)
id = 27529

[State -2, Explod];Grey bar fades
type = Explod
trigger1 = !NumExplod(2758) && (root,Var(50))<=0
anim = 2758
pos = 5 +(root,var(45)),219-(root,var(46))
postype = left
removetime = 14
supermove = 1
scale = 0.5,0.5
sprpriority = 0
id = 2758
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State -2, Explod];SSJ2 Gauge fades
type = Explod
trigger1 = !NumExplod(2759) && (root,Var(50))<=0
anim = 2759
pos = 5 +(root,var(45)),219-(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];Yellow Kanji fades
type = Explod
trigger1 = !NumExplod(2757) && (root,Var(50))<=0
anim = 2757
pos = 5 +(root,var(45)),219-(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 0, VarSet]
type = VarSet
trigger1 = root,Var(50)<=0
var(0) = 0

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

;===================================================
; 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
trigger3 = root, StateNo = [2700,2710]

;======================================================================
;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
supermove = 1
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
supermove = 1
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

[State 8020, End]
type = destroyself
trigger1 = !(roundstate>2)
trigger2 = time=1000

;==========================================================
; 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
removetime = 9999999999999
pausemovetime = 99999999999999
supermovetime = 99999999999999
supermove = 1
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 = 44
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
helpertype = Normal
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

[State 8020, End]
type = destroyself
trigger1 = !(roundstate>2)
trigger2 = time=150  ;1000

;------------------------------------------------------
;Rocks going up
[Statedef 19890]
type = A
movetype = I
physics = N
anim = 15999

[State 1003, Helper]
type = Helper
trigger1 = !time
helpertype = Normal
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
helpertype = Normal
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
helpertype = Normal
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
helpertype = Normal
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
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

[State 8020, End]
type = destroyself
trigger1 = !(roundstate>2)
trigger2 = time=150

;--------------------------------------
;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

[State 1004, DestroySelf]
type = DestroySelf
trigger1 = time > 130

;==========================================================
; 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


;----------------------------------------------------
; GhostMaker 20000
[Statedef 20000]
type    = S
movetype= I
physics = N
anim = 1606
sprpriority = 5

[State 0, Explod]
type = Explod
triggerALL = root,NumExplod(91111126)
trigger1 = root,command = "b"
anim = 1
ID = 91111241
removetime = 30
pausemovetime = 30
supermovetime = 30
ignorehitpause = 1

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

[State 1740, Helper]
type = Helper
triggerall = parent,StateNo = 3000
trigger1 = (parent,anim = 3000) && parent,AnimElem = 7
trigger1 = Var(54):=11
trigger2 = (parent,anim = 3001) && parent,AnimElem = 7
trigger2 = Var(54):=35
trigger3 = (parent,anim = 3002) && parent,AnimElem = 7
trigger3 = Var(54):=55
trigger4 = (parent,anim = 3003) && parent,AnimElem = 7
trigger4 = Var(54):=72
trigger5 = (parent,anim = 3004) && parent,AnimElem = 7
trigger5 = Var(54):=90
trigger6 = (parent,anim = 3001) && parent,AnimElem = 10
trigger6 = Var(54):=17
trigger7 = (parent,anim = 3002) && parent,AnimElem = 10
trigger7 = Var(54):=55
trigger8 = (parent,anim = 3003) && parent,AnimElem = 10
trigger8 = Var(54):=47
trigger9 = (parent,anim = 3004) && parent,AnimElem = 10
trigger9 = Var(54):=74
trigger10 = (parent,anim = 3002) && parent,AnimElem = 15
trigger10 = Var(54):=30
trigger11 = (parent,anim = 3003) && parent,AnimElem = 15
trigger11 = Var(54):=28
trigger12 = (parent,anim = 3004) && parent,AnimElem = 15
trigger12 = Var(54):=48
trigger13 = (parent,anim = 3003) && parent,AnimElem = 19
trigger13 = Var(54):=11
trigger14 = (parent,anim = 3004) && parent,AnimElem = 19
trigger14 = Var(54):=29
trigger15 = (parent,anim = 3004) && parent,AnimElem = 22
trigger15 = Var(54):=16
ID = 30000
name = "Ghost"
postype = p1
pos = 0,0
stateno = 30010
ownpal = 1
pausemovetime = 0
supermovetime = Var(54)
keyctrl = 1

[State 1740, Helper]
type = Helper
triggerall = parent,StateNo != 3000
trigger1 = root,Var(53)>0
trigger1 = !root,NumExplod(3000)
ID = 30000
name = "Ghost"
postype = p1
pos = -50,0
stateno = 31002
ownpal = 1
persistent = 0
[State 1740, Helper]
type = Helper
triggerall = parent,StateNo != 3000
trigger1 = root,Var(53)>1
trigger1 = !root,NumExplod(3000)
ID = 30000
name = "Ghost"
postype = p1
pos = -70,0
stateno = 31003
ownpal = 1
persistent = 0
[State 1740, Helper]
type = Helper
triggerall = parent,StateNo != 3000
trigger1 = root,Var(53)>2
trigger1 = !root,NumExplod(3000)
ID = 30000
name = "Ghost"
postype = p1
pos = -90,0
stateno = 31004
ownpal = 1
persistent = 0
[State 1740, Helper]
type = Helper
triggerall = parent,StateNo != 3000
trigger1 = root,Var(53)>3
trigger1 = !root,NumExplod(3000)
ID = 30000
name = "Ghost"
postype = p1
pos = -110,0
stateno = 31005
ownpal = 1
persistent = 0
[State 1740, Helper]
type = Helper
triggerall = parent,StateNo != 3000
trigger1 = root,Var(53)>4
trigger1 = !root,NumExplod(3000)
ID = 30000
name = "Ghost"
postype = p1
pos = -130,0
stateno = 31006
ownpal = 1
persistent = 0

;ZettoPort
[State 1740, Helper]
type = Helper
triggerall = parent,Anim = 751
triggerall = parent,AnimElem = 5
trigger1 = NumHelper(30000)<=4
ID = 30000
name = "Ghost"
postype = p1
pos = 70,0
stateno = 30010
ownpal = 1

[State 0, Projectile]
type = Projectile
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30100
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30101
trigger1 = !(helper(30000),AnimTime)
ProjID = 30101
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30102
trigger1 = !(helper(30000),AnimTime)
ProjID = 30102
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30103
trigger1 = !(helper(30000),AnimTime)
ProjID = 30103
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30104
trigger1 = !(helper(30000),AnimTime)
ProjID = 30104
projanim = 1
projremovetime = 1

[State 0, VarSet]
type = VarSet
trigger1 = P2MoveType !=H
var(6)=0

[State 0, VarAdd]
type = VarAdd
trigger1 = root, Var(29)=0
trigger1 = Var(7)>0
trigger2 = root, Var(29)=1
trigger2 = Var(7)>1
var(7)=-1

[State 0, VarSet]
type = VarSet
trigger1 = Var(7)<0
trigger2 = root, Var(29)=1
trigger2 = Var(7)<2
trigger2 = P2MoveType !=H
var(7)=0

[State 0, VarSet]
type = VarSet
triggerall = NumHelper(30000)
trigger1 = helper(30000),Pos X <= root, Pos X+30
trigger1 = helper(30000),Pos X >= root, Pos X-30
trigger1 = helper(30000),Pos Y <= root, Pos Y+30
trigger1 = helper(30000),Pos Y >= root, Pos Y-30
trigger1 = helper(30000),StateNo = 31000
var(40)=1

[State 0, VarSet]
type = VarSet
triggerall = NumHelper(30000)
trigger1 = helper(30000),Pos X >= root, Pos X+31
trigger2 = helper(30000),Pos X <= root, Pos X-31
trigger3 = helper(30000),Pos Y >= root, Pos Y+31
trigger4 = helper(30000),Pos Y <= root, Pos Y-31
trigger5 = helper(30000),StateNo = 31500
trigger5 = helper(30000), Time = 20
var(40)=0

[State 0, VarSet]
type = VarSet
triggerall = parent,StateNo != 3000
trigger1 = !root,NumExplod(3000)
trigger1 = 1
var(53) = root, Var(53)

[State 0, ParentVarSet]
type = ParentVarSet
;triggerall = parent,StateNo != 3000
trigger1 = root,NumExplod(3000)
var(53) = Var(53)
[State 0, VarSet]
type = VarSet
;triggerall = parent,StateNo != 3000
trigger1 = root,NumExplod(3000)
var(53) = root,Var(53)
[State 0, VarSet]
type = VarSet
;triggerall = parent,StateNo != 3000
trigger1 = root,NumExplod(3000)
var(53) = NumHelper(30000)

[State 0, Explod]
type = Explod
triggerall= !NumExplod(18801)
triggerall = Var(5)>0
trigger1 = root,NumProjId(18807)
trigger2 = root,NumProjId(18808)
trigger3 = root,NumProjId(18809)
anim = 18801+random%2
ID = 18801
pos = -200,0
postype = p1  ;p2,front,back,left,right
removetime = -1
sprpriority = 5
vel = 5,0

[State 0, Explod]
type = Explod
triggerall= NumExplod(18802)<21
triggerall = Var(5)>0
trigger1 = root,NumProjId(18810)
trigger2 = NumExplod(18802)
anim = 18801+random%2
ID = 18802
pos = 300,20-random%160
postype = p1  ;p2,front,back,left,right
removetime = -1
sprpriority = 5
vel = -5,0
facing = -1
persistent = 4

[State 0, Projectile]
type = Projectile
triggerALL = root,NumExplod(91111240)
trigger1 = root,command = "a"
ProjID = 8008
projanim = 1
projremovetime = 20
supermovetime = 20
pausemovetime = 20


;======================================================================
;Ghost Forming 1
[Statedef 30010]
type = A
movetype = I
physics = N
anim = 30010
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

[State 0, ChangeState]
type = ChangeState
trigger1 = !Time
trigger1 = parent,Var(21)>0
value = 30011

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = root, Anim = 751
value = 30751

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=2
value = 30011
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=3
value = 30012
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=4
value = 30013
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=5
value = 30014

;spit ghost snd
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3001,0
channel = -1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(21) = 5

;Tells Ghostmaker a ghost's time alive
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3)>=0
value = -5

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30010
trigger1 = AnimElem = 6
x = -62
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30011
trigger1 = AnimElem = 7
x = -98
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30012
trigger1 = AnimElem = 7
x = -112
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30013
trigger1 = AnimElem = 8
x = -140
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30014
trigger1 = AnimElem = 8
x = -172
y = 0

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

;Ghost Forming 2
[Statedef 30011]
type = A
movetype = I
physics = N
anim = 30010
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

[State 0, ChangeState]
type = ChangeState
trigger1 = !Time
trigger1 = parent,Var(22)>0
value = 30012

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = root, Anim = 751
value = 30751

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=2
value = 30011
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=3
value = 30012
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=4
value = 30013
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=5
value = 30014

;spit ghost snd
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3001,0
channel = -1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(22) = 4

;Tells Ghostmaker a ghost's time alive
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3)>=0
value = -5

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30010
trigger1 = AnimElem = 6
x = -62
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30011
trigger1 = AnimElem = 7
x = -98
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30012
trigger1 = AnimElem = 7
x = -112
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30013
trigger1 = AnimElem = 8
x = -140
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30014
trigger1 = AnimElem = 8
x = -172
y = 0

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

;Ghost Forming 3
[Statedef 30012]
type = A
movetype = I
physics = N
anim = 30010
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

[State 0, ChangeState]
type = ChangeState
trigger1 = !Time
trigger1 = parent,Var(23)>0
value = 30013

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = root, Anim = 751
value = 30751

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=2
value = 30011
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=3
value = 30012
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=4
value = 30013
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=5
value = 30014

;spit ghost snd
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3001,0
channel = -1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(23) = 3

;Tells Ghostmaker a ghost's time alive
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3)>=0
value = -5

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30010
trigger1 = AnimElem = 6
x = -62
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30011
trigger1 = AnimElem = 7
x = -98
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30012
trigger1 = AnimElem = 7
x = -112
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30013
trigger1 = AnimElem = 8
x = -140
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30014
trigger1 = AnimElem = 8
x = -172
y = 0

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

;Ghost Forming 4
[Statedef 30013]
type = A
movetype = I
physics = N
anim = 30010
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

[State 0, ChangeState]
type = ChangeState
trigger1 = !Time
trigger1 = parent,Var(24)>0
value = 30014

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = root, Anim = 751
value = 30751

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=2
value = 30011
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=3
value = 30012
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=4
value = 30013
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=5
value = 30014

;spit ghost snd
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3001,0
channel = -1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(24) = 2

;Tells Ghostmaker a ghost's time alive
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3)>=0
value = -5

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30010
trigger1 = AnimElem = 6
x = -62
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30011
trigger1 = AnimElem = 7
x = -98
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30012
trigger1 = AnimElem = 7
x = -112
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30013
trigger1 = AnimElem = 8
x = -140
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30014
trigger1 = AnimElem = 8
x = -172
y = 0

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

;Ghost Forming 5
[Statedef 30014]
type = A
movetype = I
physics = N
anim = 30010
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

[State 0, ChangeState]
type = ChangeState
trigger1 = !Time
trigger1 = parent,Var(25)>0
value = 30010

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = root, Anim = 751
value = 30751

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=2
value = 30011
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=3
value = 30012
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=4
value = 30013
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = root, Anim != 751
triggerall = !Time
trigger1 = parent,NumHelper(30000)=5
value = 30014

;spit ghost snd
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 3001,0
channel = -1

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

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(25) = 1

;Tells Ghostmaker a ghost's time alive
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3)>=0
value = -5

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30010
trigger1 = AnimElem = 6
x = -62
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30011
trigger1 = AnimElem = 7
x = -98
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30012
trigger1 = AnimElem = 7
x = -112
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30013
trigger1 = AnimElem = 8
x = -140
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Anim = 30014
trigger1 = AnimElem = 8
x = -172
y = 0

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

;======================================================================
;Ghost
[Statedef 30000]
type = A
movetype = I
physics = N
anim = 30000
sprpriority = -5
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
trigger1 = Var(21)>0
var(11) = 0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(11) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
trigger1 = Var(22)>0
var(12) = 0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(12) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
trigger1 = Var(23)>0
var(13) = 0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(13) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
trigger1 = Var(24)>0
var(14) = 0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(14) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
trigger1 = Var(25)>0
var(15) = 0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(15) = 0

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
triggerall = Var(21)>0
trigger1 = Var(21)=Var(22)
trigger2 = Var(21)=Var(23)
trigger3 = Var(21)=Var(24)
trigger4 = Var(21)=Var(25)
var(21) = 5
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(21)>0
triggerall = parent,Var(21)=Var(21)
trigger1 = parent,Var(21)=parent,Var(22)
trigger2 = parent,Var(21)=parent,Var(23)
trigger3 = parent,Var(21)=parent,Var(24)
trigger4 = parent,Var(21)=parent,Var(25)
var(21) = 5
[State 0, VarAdd]
type = VarAdd
triggerall = Var(22)>0
trigger1 = Var(22)=Var(21)
trigger2 = Var(22)=Var(23)
trigger3 = Var(22)=Var(24)
trigger4 = Var(22)=Var(25)
var(22) = 11
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(22)>0
triggerall = parent,Var(22)=Var(22)
trigger1 = parent,Var(22)=parent,Var(21)
trigger2 = parent,Var(22)=parent,Var(23)
trigger3 = parent,Var(22)=parent,Var(24)
trigger4 = parent,Var(22)=parent,Var(25)
var(22) = 11
[State 0, VarAdd]
type = VarAdd
triggerall = Var(23)>0
trigger1 = Var(23)=Var(22)
trigger2 = Var(23)=Var(21)
trigger3 = Var(23)=Var(24)
trigger4 = Var(23)=Var(25)
var(23) = 16
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(23)>0
triggerall = parent,Var(23)=Var(23)
trigger1 = parent,Var(23)=parent,Var(22)
trigger2 = parent,Var(23)=parent,Var(21)
trigger3 = parent,Var(23)=parent,Var(24)
trigger4 = parent,Var(23)=parent,Var(25)
var(23) = 16
[State 0, VarAdd]
type = VarAdd
triggerall = Var(24)>0
trigger1 = Var(24)=Var(22)
trigger2 = Var(24)=Var(23)
trigger3 = Var(24)=Var(21)
trigger4 = Var(24)=Var(25)
var(24) = 23
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(24)>0
triggerall = parent,Var(24)=Var(24)
trigger1 = parent,Var(24)=parent,Var(22)
trigger2 = parent,Var(24)=parent,Var(23)
trigger3 = parent,Var(24)=parent,Var(21)
trigger4 = parent,Var(24)=parent,Var(25)
var(24) = 23
[State 0, VarAdd]
type = VarAdd
triggerall = Var(25)>0
trigger1 = Var(25)=Var(22)
trigger2 = Var(25)=Var(23)
trigger3 = Var(25)=Var(24)
trigger4 = Var(25)=Var(21)
var(25) = 27
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(25)>0
triggerall = parent,Var(25)=Var(25)
trigger1 = parent,Var(25)=parent,Var(22)
trigger2 = parent,Var(25)=parent,Var(23)
trigger3 = parent,Var(25)=parent,Var(24)
trigger4 = parent,Var(25)=parent,Var(21)
var(25) = 27

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
triggerall = RoundState = [0,2]
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
triggerall = RoundState = [0,2]
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = 1
value = 30000,0+random%66
channel = 0
persistent = 100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
trigger2 = Anim =[30100,30199]
trigger2 = !AnimTime
value = 30000+random%6
elem = 1+random%5

[State 0, ChangeState]
type = ChangeState
trigger1 = Facing != Root, Facing
trigger1 = RootDist x >= 0
value = 30009
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist x <= 41 
trigger2 = Var(1)=2
trigger2 = RootDist x <= 81 
trigger3 = Var(1)=3
trigger3 = RootDist x <= 121 
trigger4 = Var(1)=4
trigger4 = RootDist x <= 161 
trigger5 = Var(1)=5
trigger5 = RootDist x <= 201 
x = -4.5

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist Y > 5
trigger2 = Var(1)=2
trigger2 = RootDist Y > 30
trigger3 = Var(1)=3
trigger3 = RootDist Y > 35
trigger4 = Var(1)=4
trigger4 = RootDist Y > 45
trigger5 = Var(1)=5
trigger5 = RootDist Y > 55
Y = 6

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist Y >= -5 && RootDist Y <= 5
trigger2 = Var(1)=2
trigger2 = RootDist Y >= -1 && RootDist Y <= 5
trigger3 = Var(1)=3
trigger3 = RootDist Y >= 1 && RootDist Y <= 7
trigger4 = Var(1)=4
trigger4 = RootDist Y >= 3 && RootDist Y <= 9
trigger5 = Var(1)=5
trigger5 = RootDist Y >= 5 && RootDist Y <= 11
Y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist Y < -25
trigger2 = Var(1)=2
trigger2 = RootDist Y < -55
trigger3 = Var(1)=3
trigger3 = RootDist Y < -65
trigger4 = Var(1)=4
trigger4 = RootDist Y < -75
trigger5 = Var(1)=5
trigger5 = RootDist Y < -85
trigger6 = Pos Y >10
Y = -6

[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(1) = 1
trigger2 = AnimElemTime(6) = 1
y = -1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(2) = 1
y = -1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(3) = 1
y = -1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(4) = 1
y = 1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(5) = 1
y = 2


[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist x >= 40 && RootDist x <= 50
trigger2 = Var(1)=2
trigger2 = RootDist x >= 70 && RootDist x <= 90
trigger3 = Var(1)=3
trigger3 = RootDist x >= 100 && RootDist x <= 130
trigger4 = Var(1)=4
trigger4 = RootDist x >= 130 && RootDist x <= 170
trigger5 = Var(1)=5
trigger5 = RootDist x >= 160 && RootDist x <= 210
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist x >= 51 && RootDist x < 71
trigger2 = Var(1)=2
trigger2 = RootDist x >= 81 && RootDist x <= 101
trigger3 = Var(1)=3
trigger3 = RootDist x >= 111 && RootDist x < 131
trigger4 = Var(1)=4
trigger4 = RootDist x >= 141 && RootDist x <= 161
trigger5 = Var(1)=5
trigger5 = RootDist x >= 171 && RootDist x <= 191
x = 2.5

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
trigger1 = RootDist x >= 71
trigger2 = Var(1)=2
trigger2 = RootDist x >= 101 
trigger3 = Var(1)=3
trigger3 = RootDist x >= 131
trigger4 = Var(1)=4
trigger4 = RootDist x >= 161 
trigger5 = Var(1)=5
trigger5 = RootDist x >= 181 
x = 5.5

;salute
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 30109
trigger1 = root, StateNo=269 
trigger1 = root, Time = 1
value = 30109

[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=1
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30105
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=2
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30106
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=3
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30107
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=4
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30108
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=5
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30109
projanim = 1
projremovetime = 1

;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(21)>0
trigger1 = Anim != 30100
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460 || (root, StateNo = [3625,3626])
trigger1 = root, Time = 1
value = 30100
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(22)>0
trigger1 = Anim != 30101
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460 || (root, StateNo = [3625,3626])
trigger1 = root, Time = 1
value = 30101
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(24)>0
trigger1 = Anim != 30102
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460 || (root, StateNo = [3625,3626])
trigger1 = root, Time = 1
value = 30102
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(23)>0
trigger1 = Anim != 30103
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460 || (root, StateNo = [3625,3626])
trigger1 = root, Time = 1
value = 30103
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(25)>0
trigger1 = Anim != 30104
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460 || (root, StateNo = [3625,3626])
trigger1 = root, Time = 1
value = 30104

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<5
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = root, Anim = 3211
trigger1 = root, AnimElem = 7
value = 33000
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, Anim = 1900
trigger1 = root, Time = 6
trigger2 = Root, Var(12) = 2
value = 31000
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, Anim = 1901
trigger1 = root, Time = 10
trigger2 = Root, Var(12) = 1
value = 32000
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, StateNo != 1904
trigger1 = Root, Var(12) >= 10
value = 32100
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, StateNo = 1904
trigger1 = root, Time = 11
trigger1 = Root, Var(12) >= 10
value = 32100
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = Var(1)=1
trigger1 = Root, StateNo = 160
value = 18410

[State 0, ChangeState]
type = ChangeState
triggerall = Var(1)=1
trigger1 = Root, StateNo = 161
value = 18500

[State 0, ChangeState]
type = ChangeState
trigger1 = Root, StateNo = 162
value = 18800

[State 0, ChangeState]
type = ChangeState
trigger1 = root,NumProjId(18800)
trigger2 = root,NumProjId(18801)
trigger3 = root,NumProjId(18802)
trigger4 = root,NumProjId(18803)
trigger5 = root,NumProjId(18804)
value = 18801

[State 0, ChangeState]
type = ChangeState
trigger1 = root,NumProjId(18807)
trigger2 = root,NumProjId(18808)
trigger3 = root,NumProjId(18809)
value = 18802

[State 0, ChangeState]
type = ChangeState
trigger1 = root,NumProjId(18810)
value = 18803

[State 0, ChangeState]
type = ChangeState
trigger1 = root,NumProjId(18805)
trigger2 = root,NumProjId(18806)
trigger3 = root,NumProjId(188011)
value = 18804

[State 0, ChangeState]
type = ChangeState
trigger1 = root,NumProjId(188030)
value = 18805

[State 0, ChangeState]
type = ChangeState
triggerall = RoundState = 4
trigger1 = !root,Alive
trigger2 = root, StateNo = 170
value = 18810

;[State 30000, ChangeState]
;type = ChangeState
;triggerall = Var(1)=1
;trigger1 = Root, Var(12) = 3
;value = 32200
;ctrl = 0

;[State 30000, ChangeState]
;type = ChangeState
;triggerall = Var(1)=1
;trigger1 = Root, StateNo = 1904
;trigger1 = root, Time = 10
;trigger1 = Root, Var(9) = 1
;value = 32300
;ctrl = 0

;[State 30000, ChangeState]
;type = ChangeState
;triggerall = parent,Var(6)<5
;triggerall = parent,Var(7)=0
;triggerall = Var(1)=1
;trigger1 = Root, StateNo = 1040
;trigger1 = root, Time = 13
;trigger2 = Root, StateNo = 1041
;trigger2 = root, Time = 13
;value = 32400
;ctrl = 0

;======================================================================
;Ghost Turn
[Statedef 30009]
type = A
movetype = I
physics = N
anim = 30009
sprpriority = -5
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Var(1)=1
trigger1 = !Time
value = 30010,0

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarAdd]
type = VarAdd
triggerall = Var(21)>0
trigger1 = Var(21)=Var(22)
trigger2 = Var(21)=Var(23)
trigger3 = Var(21)=Var(24)
trigger4 = Var(21)=Var(25)
var(21) = 5
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(21)>0
triggerall = parent,Var(21)=Var(21)
trigger1 = parent,Var(21)=parent,Var(22)
trigger2 = parent,Var(21)=parent,Var(23)
trigger3 = parent,Var(21)=parent,Var(24)
trigger4 = parent,Var(21)=parent,Var(25)
var(21) = 5
[State 0, VarAdd]
type = VarAdd
triggerall = Var(22)>0
trigger1 = Var(22)=Var(21)
trigger2 = Var(22)=Var(23)
trigger3 = Var(22)=Var(24)
trigger4 = Var(22)=Var(25)
var(22) = 11
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(22)>0
triggerall = parent,Var(22)=Var(22)
trigger1 = parent,Var(22)=parent,Var(21)
trigger2 = parent,Var(22)=parent,Var(23)
trigger3 = parent,Var(22)=parent,Var(24)
trigger4 = parent,Var(22)=parent,Var(25)
var(22) = 11
[State 0, VarAdd]
type = VarAdd
triggerall = Var(23)>0
trigger1 = Var(23)=Var(22)
trigger2 = Var(23)=Var(21)
trigger3 = Var(23)=Var(24)
trigger4 = Var(23)=Var(25)
var(23) = 16
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(23)>0
triggerall = parent,Var(23)=Var(23)
trigger1 = parent,Var(23)=parent,Var(22)
trigger2 = parent,Var(23)=parent,Var(21)
trigger3 = parent,Var(23)=parent,Var(24)
trigger4 = parent,Var(23)=parent,Var(25)
var(23) = 16
[State 0, VarAdd]
type = VarAdd
triggerall = Var(24)>0
trigger1 = Var(24)=Var(22)
trigger2 = Var(24)=Var(23)
trigger3 = Var(24)=Var(21)
trigger4 = Var(24)=Var(25)
var(24) = 23
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(24)>0
triggerall = parent,Var(24)=Var(24)
trigger1 = parent,Var(24)=parent,Var(22)
trigger2 = parent,Var(24)=parent,Var(23)
trigger3 = parent,Var(24)=parent,Var(21)
trigger4 = parent,Var(24)=parent,Var(25)
var(24) = 23
[State 0, VarAdd]
type = VarAdd
triggerall = Var(25)>0
trigger1 = Var(25)=Var(22)
trigger2 = Var(25)=Var(23)
trigger3 = Var(25)=Var(24)
trigger4 = Var(25)=Var(21)
var(25) = 27
[State 0, ParentVarAdd]
type = ParentVarAdd
triggerall = parent,Var(25)>0
triggerall = parent,Var(25)=Var(25)
trigger1 = parent,Var(25)=parent,Var(22)
trigger2 = parent,Var(25)=parent,Var(23)
trigger3 = parent,Var(25)=parent,Var(24)
trigger4 = parent,Var(25)=parent,Var(21)
var(25) = 27

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5

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

[State 0, VelSet]
type = VelSet
trigger1 = RootDist x <= 41 
x = -4.5

[State 0, VelSet]
type = VelSet
trigger1 = RootDist Y > 5
Y = 6

[State 0, VelSet]
type = VelSet
trigger1 = RootDist Y >= -5 && RootDist Y <= 5
Y = 0

[State 0, VelSet]
type = VelSet
trigger1 = RootDist Y < -5
Y = -6

[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(1) = 1
y = -1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(2) = 1
y = -1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(3) = 1
y = -1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(4) = 1
y = 1
[State 0, PosAdd]
type = PosAdd
triggerall = Pos Y < 5
trigger1 = AnimElemTime(5) = 1
y = 2


[State 0, VelSet]
type = VelSet
trigger1 = RootDist x >= 40 && RootDist x <= 50
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = RootDist x >= 51 && RootDist x < 71
x = 2.5

[State 0, VelSet]
type = VelSet
trigger1 = RootDist x >= 71
x = 5.5

;salute
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 30109
trigger1 = root, StateNo=269 
trigger1 = root, Time = 1
value = 30109

[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=1
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30105
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=2
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30106
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=3
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30107
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=4
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30108
projanim = 1
projremovetime = 1
[State 0, Projectile]
type = Projectile
trigger1 = Var(1)=5
triggerall = NumHelper(30000)
trigger1 = helper(30000),Anim=30100
trigger1 = !(helper(30000),AnimTime)
ProjID = 30109
projanim = 1
projremovetime = 1

;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(21)>0
trigger1 = Anim != 30100
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460
trigger1 = root, Time = 1
value = 30100
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(22)>0
trigger1 = Anim != 30101
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460
trigger1 = root, Time = 1
value = 30101
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(24)>0
trigger1 = Anim != 30102
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460
trigger1 = root, Time = 1
value = 30102
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(23)>0
trigger1 = Anim != 30103
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460
trigger1 = root, Time = 1
value = 30103
;taunt
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(25)>0
trigger1 = Anim != 30104
trigger1 = root, StateNo=195 || root, StateNo=660 || root, StateNo=460
trigger1 = root, Time = 1
value = 30104

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<5
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = root, Anim = 3211
trigger1 = root, AnimElem = 7
value = 33000
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, Anim = 1900
trigger1 = root, Time = 6
trigger2 = Root, Var(12) = 2
value = 31000
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, Anim = 1901
trigger1 = root, Time = 10
trigger2 = Root, Var(12) = 1
value = 32000
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, StateNo != 1904
trigger1 = Root, Var(12) >= 10
value = 32100
ctrl = 0

[State 30000, ChangeState]
type = ChangeState
triggerall = parent,Var(6)<2
triggerall = parent,Var(7)=0
triggerall = Var(1)=1
trigger1 = Root, StateNo = 1904
trigger1 = root, Time = 11
trigger1 = Root, Var(12) >= 10
value = 32100
ctrl = 0

;[State 30000, ChangeState]
;type = ChangeState
;triggerall = Var(1)=1
;trigger1 = Root, Var(12) = 3
;value = 32200
;ctrl = 0

;[State 30000, ChangeState]
;type = ChangeState
;triggerall = Var(1)=1
;trigger1 = Root, StateNo = 1904
;trigger1 = root, Time = 10
;trigger1 = Root, Var(9) = 1
;value = 32300
;ctrl = 0

;[State 30000, ChangeState]
;type = ChangeState
;triggerall = parent,Var(6)<5
;triggerall = parent,Var(7)=0
;triggerall = Var(1)=1
;trigger1 = Root, StateNo = 1040
;trigger1 = root, Time = 13
;trigger2 = Root, StateNo = 1041
;trigger2 = root, Time = 13
;value = 32400
;ctrl = 0
[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 30000
ctrl = 0

;======================================================================
;Ghost Mine
[Statedef 31000]
type = A
movetype = A
physics = N
anim = 31000
sprpriority = -1
velset = 0,0
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)
persistent = 2

;Clear Vars
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) - Var(21)+1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) +1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) - Var(22)+2
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) +2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) - Var(23)+3
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) +3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) - Var(24)+4
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) +4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) - Var(25)+5
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) +5

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=-1

;timer for firing another ghost
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(7) = 30
ignorehitpause=1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(11) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(11) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(12) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(12) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(13) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(13) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(14) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(14) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(15) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(15) = 1

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)>parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)>parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)>parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)>parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(11)<parent,var(12)
trigger1 = parent,var(11)<parent,var(13)
trigger1 = parent,var(11)<parent,var(14)
trigger1 = parent,var(11)<parent,var(15)
var(2) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)>parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)>parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)>parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)>parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(12)<parent,var(11)
trigger1 = parent,var(12)<parent,var(13)
trigger1 = parent,var(12)<parent,var(14)
trigger1 = parent,var(12)<parent,var(15)
var(2) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)>parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)>parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)>parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)>parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(13)<parent,var(12)
trigger1 = parent,var(13)<parent,var(11)
trigger1 = parent,var(13)<parent,var(14)
trigger1 = parent,var(13)<parent,var(15)
var(2) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)>parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)>parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)>parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)>parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(14)<parent,var(13)
trigger1 = parent,var(14)<parent,var(12)
trigger1 = parent,var(14)<parent,var(11)
trigger1 = parent,var(14)<parent,var(15)
var(2) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)>parent,var(11)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)>parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)>parent,var(13)
trigger1 = parent,var(15)<parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,var(14)
trigger1 = parent,var(15)<parent,var(13)
trigger1 = parent,var(15)>parent,var(12)
trigger1 = parent,var(15)<parent,var(11)
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(15)<parent,Var(14)
trigger1 = parent,var(15)<parent,Var(13)
trigger1 = parent,var(15)<parent,Var(12)
trigger1 = parent,var(15)<parent,Var(11)
var(2) = 5

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(0) = 1
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(0) = parent,Var(0)

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1761
projanim = 1606
projremovetime = Ceil((root,fvar(13) / 100)*10)
supermovetime = 9999999
pausemovetime = 9999999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = 1
value = 30000,0+random%66
channel = 0
persistent = 100


[State 0, NotHitBy]
type = NotHitBy
trigger1 = !Time
value = SCA
time = 5

[State 0, PalFXWiz]
type = PalFX
trigger1 = enemy,name="Gotenks Z2" && enemy,authorname="Team Z2"
trigger1 = root,TeamSide = 2
trigger1 = AnimElemTime(3)>=0
time = 99999
add = 256,0,0
mul = 250,150,0
sinadd = 110,45,85,10
invertall = 0
color = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 1

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = Pos Y <= -40
value = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 31000,0 + random%5
channel = 0

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage = 30,0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-8
fall = 1
guard.dist = 40
fall.recover = 0

;limiter for ghost combos
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit =1
var(6) = 1
ignorehitpause=1
persistent = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
value = 31500
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
triggerall = Time >= 31
trigger1 = root, StateNo = 1902
trigger1 = root,Time = 5
trigger1 = Var(2) =1
trigger2 = root, StateNo = 1903
trigger2 = root,Time = 5
trigger2 = Var(2)=parent,Var(0)
trigger3 = root, StateNo = 1905
trigger3 = root,Time = 5
value = 31001
ignorehitpause = 1

;======================================================================
;Ghost Transfer Back
[Statedef 31001]
type = A
movetype = I
physics = N
sprpriority = 5
anim = 31000
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 31001
ignorehitpause = 1

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 30010,0+random%4

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(0) = 0
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(0) = -1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(21)>0
var(21) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(22)>0
var(22) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(23)>0
var(23) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(24)>0
var(24) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(25)>0
var(25) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = Var(25)>0
var(25) = 1

[State 0, VarRangeSet]
type = VarRangeSet
trigger1 = !Time
value = 0 
first = 11
last = 15 

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

[State 30000, ChangeState]
type = ChangeState
trigger1 = Time = 10
value = 30000
ctrl = 0

;======================================================================
;Ghost Still Alive for next round
[Statedef 31002]
type = A
movetype = I
physics = N
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

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

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(21) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = 1
var(21) = 1

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5

[State 30000, ChangeState]
type = ChangeState
trigger1 = !Time
value = 30000
ctrl = 0
;======================================================================
;Ghost Still Alive for next round
[Statedef 31003]
type = A
movetype = I
physics = N
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

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

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(22) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = 1
var(22) = 1

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5

[State 30000, ChangeState]
type = ChangeState
trigger1 = !Time
value = 30000
ctrl = 0
;======================================================================
;Ghost Still Alive for next round
[Statedef 31004]
type = A
movetype = I
physics = N
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

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

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(23) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = 1
var(23) = 1

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5

[State 30000, ChangeState]
type = ChangeState
trigger1 = !Time
value = 30000
ctrl = 0
;======================================================================
;Ghost Still Alive for next round
[Statedef 31005]
type = A
movetype = I
physics = N
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

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

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(24) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = 1
var(24) = 1

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5

[State 30000, ChangeState]
type = ChangeState
trigger1 = !Time
value = 30000
ctrl = 0
;======================================================================
;Ghost Still Alive for next round
[Statedef 31006]
type = A
movetype = I
physics = N
sprpriority = 5
ctrl=0

[State 0, RemapPal]
type = RemapPal
trigger1 = !Time
trigger1 = root,Var(50)>0
source = 1,1
dest = 2,root,Var(58)

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

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=1

;Tells Ghostmaker a ghost's time alive
[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(25) = 1
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = 1
var(25) = 1

;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)>parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)>parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)>parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = parent,var(21)<parent,Var(22)
trigger1 = parent,var(21)<parent,Var(23)
trigger1 = parent,var(21)<parent,Var(24)
trigger1 = parent,var(21)<parent,Var(25)
var(1) = 5


;Order of ghosts
[State 0, VarSet]
type = VarSet
triggerall = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)>parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)>parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)>parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = parent,var(22)<parent,Var(21)
trigger1 = parent,var(22)<parent,Var(23)
trigger1 = parent,var(22)<parent,Var(24)
trigger1 = parent,var(22)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)>parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)>parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)>parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = parent,var(23)<parent,Var(22)
trigger1 = parent,var(23)<parent,Var(21)
trigger1 = parent,var(23)<parent,Var(24)
trigger1 = parent,var(23)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)>parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)>parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)>parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)>parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = parent,var(24)<parent,Var(23)
trigger1 = parent,var(24)<parent,Var(22)
trigger1 = parent,var(24)<parent,Var(21)
trigger1 = parent,var(24)<parent,Var(25)
var(1) = 5

;Order of ghosts
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 2
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 3
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)>parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)>parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)>parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)>parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = parent,var(25)<parent,Var(24)
trigger1 = parent,var(25)<parent,Var(23)
trigger1 = parent,var(25)<parent,Var(22)
trigger1 = parent,var(25)<parent,Var(21)
var(1) = 5
[State 30000, ChangeState]
type = ChangeState
trigger1 = !Time
value = 30000
ctrl = 0

;----------------------------------------------------
; Ghost Explode
[Statedef 31500]
type    = A
movetype= A
physics = N
anim = 2846
sprpriority = 5
velset = 0,0
ctrl=0

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 2847
ID = 2847
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
ownpal = 1
sprpriority = 4

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 31001
ignorehitpause = 1

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
trigger1 = PrevStateNo = 31000
var(0) = -1
;Not a missile
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(3) = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(11) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(12) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(13) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(14) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(15) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(21)>0
trigger1 = !Time
var(21) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(22)>0
trigger1 = !Time
var(22) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(23)>0
trigger1 = !Time
var(23) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(24)>0
trigger1 = !Time
var(24) = 0
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(25)>0
trigger1 = !Time
var(25) = 0

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(0)=0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(1)=0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(2)=0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(3)=0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 31500,0
channel = 2

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

[State 1770, DestroySelf]
type = DestroySelf
trigger1 = p2movetype != H
trigger1 = Time >=54


;======================================================================
;Ghost Fire
[Statedef 32000]
type = A
movetype = A
physics = N
anim = 32000
sprpriority = -1
velset = 0,0
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1761
projanim = 1606
projremovetime = Ceil((root,fvar(13) / 100)*10)
supermovetime = 9999999
pausemovetime = 9999999

;Clear Vars
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) - Var(21)+1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) +1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) - Var(22)+2
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) +2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) - Var(23)+3
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) +3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) - Var(24)+4
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) +4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) - Var(25)+5
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) +5

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=-1

;timer for firing another ghost
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(7) = 30
ignorehitpause=1

;Tell Ghostmaker it's a missile
[State 0, VarAdd]
type = VarAdd
trigger1 = !Time
var(3) = 1

[State 0, PosAdd]
type = PosAdd
triggerall = Time > 6
trigger1 = Anim = 32001 && AnimElemTime(1)=0
trigger2 = Anim = 32005 && AnimElemTime(1)=0
y = Cond(Var(10)=1,-32,52)

[State 0, VarSet]
type = VarSet
trigger1 = Anim = 32002 || Anim = 32007 || Anim = 32010 || Anim = 32013 || Anim = 32004 || Anim = 32009 
var(10) = 1
[State 0, VarSet]
type = VarSet
trigger1 = Anim = 32016 || Anim = 32011 || Anim = 32008 || Anim = 32012
var(10) = 2

;forward
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X >1
trigger1 = Anim = 32002 || Anim = 32007 || Anim = 32016 || Anim = 32010 || Anim = 32011
trigger1 = AnimElemTime(1) >= 9
trigger2 = P2Dist X >1
trigger2 = Anim = 32000 
trigger3 = Pos Y <= -350 || Pos Y >= 50
value = 32001
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X <0
trigger1 = Anim = 32010 || Anim = 32011 || Anim = 32016 || Anim = 32010
trigger1 = AnimElemTime(1) >= 9
trigger2 = Anim = 32000 
value = 32001

;up forward
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32000 || Anim = 32001 && AnimElemTime(3)=2
triggerall = Time > 5
trigger1 = P2Dist X >=20 && P2Dist X <=90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X <-1
trigger2 = Pos Y > -70
value = 32002

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 32002
trigger1 = AnimElemTime(3)=1
value = 32001,0+random%4

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 32002
value = 30010,0+random%4
persistent = 6

;up
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32002 
triggerall = AnimElemTime(1) >= 9
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X <-1
value = 32003

;up reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32013
triggerall = AnimElemTime(1) >= 9 
triggerall = Time > 5
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X >1
value = 32014

;up back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32003
triggerall = AnimElemTime(3) >= 2
trigger1 = P2Dist X <=-20 && P2Dist X >=-90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X <=-1 
trigger2 = P2Dist Y > 50 
trigger3 = P2Dist X >1
trigger3 = Pos Y < -70
value = 32009

;back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32013 || Anim = 32004 || Anim = 32008 || Anim = 32009 || Anim = 32012
triggerall = AnimElemTime(1) >= 9
triggerall = Time > 5
trigger1 = P2Dist X <-1
trigger2 = Pos Y <= -350 || Pos Y >= 50
value = 32005
;back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32009 || Anim = 32012 || Anim = 32008 
triggerall = AnimElemTime(1) >= 9
triggerall = Time > 5
trigger1 = P2Dist X >0
value = 32005

;down back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X <-20 &&  P2Dist X >-90
trigger1 = P2Dist Y > -30 
trigger1 = Anim = 32005
trigger1 = AnimElemTime(3) >= 2
trigger2 = Anim = 32005
trigger2 = AnimElemTime(7) >= 2
value = 32004
;down back
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X >1
triggerall = Pos Y <= -70
trigger1 = Anim = 32005
trigger1 = AnimElemTime(3) >= 2
value = 32004

;down
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall =  Anim = 32007
triggerall = AnimElemTime(1) >= 9
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y > 30 
trigger2 = P2Dist X <1
value = 32006

;down reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32004 
triggerall = AnimElemTime(1) >= 9 
trigger1 = P2Dist X >-20 && P2Dist X <20
trigger1 = P2Dist Y > 30 
trigger2 = P2Dist X >1
value = 32015

;up forward reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 32005
triggerall = AnimElemTime(3) >= 2
triggerall = Time > 5
trigger1 = P2Dist X <=-20 && P2Dist X >=-90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X >1
value = 32013

;up back reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = (Anim = 32014 && AnimElemTime(3) >= 2)
trigger1 = P2Dist X >=20 && P2Dist X <=90
trigger1 = P2Dist Y < -30 
trigger2 = P2Dist X < -1
trigger3 = P2Dist X >=1
trigger3 = P2Dist Y > 50
value = 32010

;down back reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X >20 &&  P2Dist X <90
triggerall = P2Dist Y > 30 
trigger1 = Anim = 32001
trigger1 = AnimElemTime(3) >= 2
trigger2 = Anim = 32005
trigger2 = AnimElemTime(7) >= 2
value = 32007
;down back reversed
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = P2Dist X <-1
triggerall = Pos Y <= -70
trigger1 = Anim = 32001
trigger1 = AnimElemTime(3) >= 2
value = 32007

;up back lower
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32005
trigger1 = AnimElemTime(1) >= 9 
trigger1 = P2Dist X <=-20 && P2Dist X >=-90
trigger1 = P2Dist Y <-30 
trigger2 = AnimElemTime(1) >= 9 
trigger2 = P2Dist X >1
trigger2 = Pos Y >= -70
trigger3 = AnimElemTime(1) >= 20
value = 32008

;up forward lower
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
triggerall = Anim = 32001
triggerall = AnimElemTime(1) >= 9 
trigger1 = P2Dist X >=20 && P2Dist X <=90
trigger1 = P2Dist Y <-30 
trigger2 = P2Dist X <-1
trigger2 = Pos Y >= -70
value = 32016

;down forward 2
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X >=0 && P2Dist X <=90
trigger1 = P2Dist Y >30 
trigger1 = Anim = 32000 || (Anim = 32006 && AnimElemTime(3) >= 2) 
trigger2 = P2Dist X >1
trigger2 = (Anim = 32015 && AnimElemTime(3) >= 2) 
trigger3 = P2Dist X >=0 
trigger3 = (Anim = 32015 && AnimElemTime(3) >= 2) 
value = 32011

;down back 2
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Time > 5
trigger1 = P2Dist X <=-1 && P2Dist X >=-90
trigger1 = P2Dist Y >30 
trigger1 = Anim = 32000 || (Anim = 32015 && AnimElemTime(3) >= 2) 
trigger2 = P2Dist X <-1
trigger2 = (Anim = 32006 && AnimElemTime(3) >= 2) 
trigger3 = P2Dist X >=0 
trigger3 = (Anim = 32006 && AnimElemTime(3) >= 2) 
value = 32012

;forward
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32001
x = 5
y = Cond(P2Dist Y <-30, -1,Cond(P2Dist Y > 30,1,0))

;up forward
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32002
x = 3
y = -5
;up forward reversed
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32013
x = -3
y = -5

;up 
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32003
trigger2 = Anim = 32014
x = 0
y = -5

;up back
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32009
x = -3
y = -3
;up back reversed
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32010
x = 3
y = -3

;back
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32005
x = -5
y = Cond(P2Dist Y <-30, -1,Cond(P2Dist Y > 30,1,0))

;down back
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32004
x = -3
y = 5
;down back reversed
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32007
x = 3
y = 5

;up back lower
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32008
x = -3
y = -3
;up forward lower
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32016
x = 3
y = -3

;down back 2
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32011
x = 3
y = 3
;down forward 2
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32012
x = -3
y = 3

;down
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32006
trigger2 = Anim = 32015
x = 0
y = 5

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 1

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = MoveContact = 1
ProjID = 30000
projanim = 1606
projremovetime = 120
supermovetime = 0
pausemovetime = 0

;kills ghost explod
[State 0, Projectile]
type = Projectile
trigger1 = !Time
ProjID = 31000
projanim = 1606
projremovetime = 1
supermovetime = 0
pausemovetime = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = !Time
value = SCA
time = 5

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage = 30,0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-8
fall = 1
fall.recover = 0

;limiter for ghost combos
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit =1
var(6) = 1
ignorehitpause=1
persistent = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = Pos Y >= 40
value = 31500
ignorehitpause = 1

;======================================================================
;Ghost HeadCrash
[Statedef 32100]
type = A
movetype = A
physics = N
anim = 32000
sprpriority = -1
velset = 0,0
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

;Clear Vars
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) - Var(21)+1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) +1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) - Var(22)+2
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) +2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) - Var(23)+3
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) +3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) - Var(24)+4
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) +4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) - Var(25)+5
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) +5

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=-1

;timer for firing another ghost
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(7) = 30
ignorehitpause=1

;Tell Ghostmaker it's a missile
[State 0, VarAdd]
type = VarAdd
trigger1 = !Time
var(3) = 1

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1761
projanim = 1606
projremovetime = Ceil((root,fvar(13) / 100)*10)
supermovetime = 9999999
pausemovetime = 9999999

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 32002
trigger1 = AnimElemTime(3)=1
value = 32001,0+random%4

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 5
value = 30010,0

;forward
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 5
value = 32001

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32001
x = 5 

;curve up
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 20
value = 32002

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32002
x = 3
y = -7

;up
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 22
value = 32003

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32003
x = 0
y = -20

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

[State 0, ChangeState]
type = ChangeAnim
trigger1 = Var(12)=10 && Pos Y <= -300
trigger2 = Var(12)=11 && Pos Y <= -500
trigger3 = Var(12)=12 && Pos Y <= -700
value = 32006

[State 0, PosSet]
type = PosSet
trigger1 = Anim = 32006
trigger1 = AnimElemTime(1)=1
x = enemy, Pos X

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32006
;trigger1 = AnimElemTime(1)>=1
x = 0
y = 20

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 1

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = MoveContact = 1
ProjID = 30000
projanim = 1606
projremovetime = 120
supermovetime = 0
pausemovetime = 0

;kills ghost explod
[State 0, Projectile]
type = Projectile
trigger1 = !Time
ProjID = 31000
projanim = 1606
projremovetime = 1
supermovetime = 0
pausemovetime = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = !Time
value = SCA
time = 5

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage = 30,0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-8
fall = 1
fall.recover = 0

;limiter for ghost combos
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit =1
var(6) = 1
ignorehitpause=1
persistent = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = Pos Y >= 40
value = 31500
ignorehitpause = 1

;======================================================================
;Ghost Volley Serve
[Statedef 33000]
type = A
movetype = A
physics = N
anim = 33000
sprpriority = 5
velset = 0,0
ctrl=0

[State 0, RemapPal]
type = RemapPal
triggerall = root,Anim != 2700 && root,Anim != 2710 && root,anim != 3601
triggerall = root, Var(29)!=1
trigger1 = root,Var(50)=0 
source = 1,1
dest = 1,root,Var(58)

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1760
projanim = 1606
projremovetime = 1
supermovetime = 9999999
pausemovetime = 9999999

;Clear Vars
[State 0, VarSet]
type = VarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) - Var(21)+1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(21)>0
trigger1 = Time=30
var(21) = Var(21) +1
[State 0, VarSet]
type = VarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) - Var(22)+2
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(22)>0
trigger1 = Time=30
var(22) = Var(22) +2
[State 0, VarSet]
type = VarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) - Var(23)+3
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(23)>0
trigger1 = Time=30
var(23) = Var(23) +3
[State 0, VarSet]
type = VarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) - Var(24)+4
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(24)>0
trigger1 = Time=30
var(24) = Var(24) +4
[State 0, VarSet]
type = VarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) - Var(25)+5
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = Var(25)>0
trigger1 = Time=30
var(25) = Var(25) +5

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(5)=-1

;timer for firing another ghost
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = !Time
var(7) = 30
ignorehitpause=1

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

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

[State 0, Pause]
type = Pause
trigger1 = Time = 22
time = 15
movetime = 15

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

[State 0, PosSet]
type = PosSet
trigger1 = AnimElemTime(4)=0
x = Cond(enemy, Facing = -1,enemy, Pos X +200,enemy, Pos X -200)
y = 0

;Tell Ghostmaker it's a missile
[State 0, VarAdd]
type = VarAdd
trigger1 = !Time
var(3) = 1

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

;removes juggle limit
[State 0, Projectile]
type = Projectile
trigger1 = MoveContact = 1
ProjID = 30000
projanim = 1606
projremovetime = 120
supermovetime = 0
pausemovetime = 0

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage    = ceil(ifElse(root,fvar(11) * 30 < 3, 3, root,fvar(11) *30)), 0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-10
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-10
fall = 1
fall.recover = 0

;limiter for ghost combos
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit =1
var(6) = 1
ignorehitpause=1
persistent = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
value = 31500
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = root, StateNo != [3200,3210]
value = 31001
ignorehitpause = 1

;======================================================================
;Ghost Shield
[Statedef 32200]
type = A
movetype = A
physics = N
anim = 32200
sprpriority = 5
velset = 0,0
ctrl=0

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1760
projanim = 1606
projremovetime = 1
supermovetime = 9999999
pausemovetime = 9999999

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)=8
trigger1 = root,NumProjId(20001)
var(1) = -1
persistent = 2
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>=9
trigger1 = root,NumProjId(20002)
var(1) = -1
persistent = 2

;take a Ghost out of the GhostMaker var
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time 
var(0) = -1

;Tell Ghostmaker it's in a different state
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(1) = 2

;Tell Ghostmaker how many are in a different state
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(2) = 1

;change number of ghost
[State 0, VarAdd]
type = VarAdd
trigger1 = !Time 
var(1) = parent,Var(0)+parent,Var(1)

[State 0, Projectile]
type = Projectile
trigger1 = !NumProjId(20000)
trigger1 = Time = 5
ProjID = 20000
projanim = 1606
projremovetime = 1

;Tell it it's a Missile
[State 0, VarSet]
type = VarSet
trigger1 = !Time
fvar(0) = 2

[State 0, BindToRoot]
type = BindToRoot
trigger1 = AnimElemTime(4)>=0
time = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 1

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage = 30,0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-8
fall = 1
fall.recover = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
value = 31500
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
triggerall = Time >= 31
trigger1 = root, StateNo = 1903
trigger1 = root,Time = 5
value = 31001
ignorehitpause = 1

;======================================================================
;Ghost Scream Alt
[Statedef 32300]
type = A
movetype = A
physics = N
anim = 32000
sprpriority = -1
velset = 0,0
ctrl=0

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1760
projanim = 1606
projremovetime = 1
supermovetime = 9999999
pausemovetime = 9999999

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)=8
trigger1 = root,NumProjId(20001)
var(1) = -1
persistent = 2
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>=9
trigger1 = root,NumProjId(20002)
var(1) = -1
persistent = 2

;take a Ghost out of the GhostMaker var
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time 
var(0) = -1

;Tell Ghostmaker it's in a different state
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(1) = 2

;Tell Ghostmaker how many are in a different state
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(2) = 1

;change number of ghost
[State 0, VarAdd]
type = VarAdd
trigger1 = !Time 
var(1) = parent,Var(0)+parent,Var(1)

[State 0, Projectile]
type = Projectile
trigger1 = !NumProjId(20000)
trigger1 = Time = 5
ProjID = 20000
projanim = 1606
projremovetime = 1

;forward
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 5
value = 32001

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32001
x = .75

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 32001
y = Cond(P2Dist Y >=20,2,Cond(P2Dist Y <=-20,-2,0))

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 5

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage = 30,0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = -1,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = -1,-8
fall = 1
fall.recover = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = Pos Y >= 40
value = 31500
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 300
value = 31001
ctrl = 0

;---------------------------
;Air Ghost Blast Firing
[Statedef 32400]
type = A
physics = N
moveType = A
anim = 32000
sprpriority = 5
hitcountpersist = 1
movehitpersist = 1

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 30010,0+random%4

[State 0, Projectile]
type = Projectile
trigger1 = MoveHit = 1
ProjID = 1760
projanim = 1606
projremovetime = 1
supermovetime = 9999999
pausemovetime = 9999999

[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)=8
trigger1 = root,NumProjId(20001)
var(1) = -1
persistent = 2
[State 0, VarAdd]
type = VarAdd
trigger1 = Var(1)>=9
trigger1 = root,NumProjId(20002)
var(1) = -1
persistent = 2

;take a Ghost out of the GhostMaker var
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time 
var(0) = -1

;Tell Ghostmaker it's in a different state
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(1) = 2

;Tell Ghostmaker how many are in a different state
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !Time
var(2) = 1

;change number of ghost
[State 0, VarAdd]
type = VarAdd
trigger1 = !Time 
var(1) = parent,Var(0)+parent,Var(1)

[State 0, Projectile]
type = Projectile
trigger1 = !NumProjId(20000)
trigger1 = Time = 5
ProjID = 20000
projanim = 1606
projremovetime = 1

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

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 6
value = 32400

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

[State 1050, Button Detect]
type = VarSet
trigger1= !Time 
var(9) = Root, var(9)
 
[State 1033, VelSet]
type = VelSet
trigger1 = Time >= 6
x = cond(var(9) = 2, 6, cond(var(9) = 1, 4, 2)) 
y = cond(var(9) = 2, 6, cond(var(9) = 1, 4, 2)) 

[State 0, VelAdd]
type = VelAdd
trigger1 = Anim = 32400
x = Cond(P2Dist X >=20, 2,Cond(P2Dist X <=-20, -2,0))

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA,NT,ST,HT
time = 1

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

[State 0, HitOverride]
type = HitOverride
trigger1 = Time >= 0
attr = SCA,NA,SA,HA,NP,SP,HP      ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 31500
time = 1
ignorehitpause = 1

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
damage = 30,0
pausetime = 0 ,12
guard.pausetime = 0 , 16
sparkno = s7010
guard.sparkno = -1
sparkxy = 0,-30
hitsound   = s32000,0
guardsound = S6,1
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 14
ground.hittime = 28
air.hittime = 28
ground.velocity = 3,-8
guard.velocity = -1
airguard.velocity = -1, -1
air.velocity = 3,-6
fall = 1
fall.recover = 0

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = 15,-50   
postype = p2
sprpriority = 2
bindtime = -1
ownpal = 1
facing = -1

[State 6050, Explod]
type = Explod
trigger1 = NumTarget
trigger1 = !target,IsHelper
trigger1 = MoveContact
anim = 8601
ID = 8600
pos = -15,-70   
postype = p2
sprpriority = 3
bindtime = -1
ownpal = 1
facing = -1

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

;----------------------------------------
;Ghost Oops Win Pose
[Statedef 18410]
type = A
physics = N
movetype = I
anim = 18410
ctrl = 0
velset = 0,0
sprpriority = 5
poweradd = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time<10
x = -.7
y = -.5

[State 0, PosSet]
type = PosSet
trigger1 = Time >= 10
x = Cond(Facing=1,root, Pos X -70,root, Pos X +70)
y = root, Pos Y -10 

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

;----------------------------------------------------
; Ghost Explode win
[Statedef 18411]
type    = A
movetype= A
physics = N
anim = 2846
sprpriority = 5
velset = 0,0
ctrl=0

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 2847
ID = 2847
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
ownpal = 1
sprpriority = 4

[State 0, Explod]
type = Explod
trigger1 = !Time
anim = 957
ID = 957
pos = 0,0
postype = left  ;p2,front,back,left,right
bindtime = -1
removetime = 5
scale = 5,5
ontop = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 31500,0
channel = 2

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

;----------------------------------------
;Ghost JoJo
[Statedef 18500]
type = A
physics = N
movetype = I
anim = 18500
ctrl = 0
velset = 0,0
sprpriority = 5
poweradd = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time<25
x = 3
y = -1

;
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 32002,0
loop = 1

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

;----------------------------------------
;Ghost Salute Win
[Statedef 18800]
type = A
physics = N
movetype = I
anim = 18800
ctrl = 0
velset = 0,0
sprpriority = 5
poweradd = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 18800

;----------------------------------------
;Ghost Bouncing
[Statedef 18801]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0,0
sprpriority = -1
poweradd = 0

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=1
x = 0
y = Cond(Vel Y <0,3,-3)
persistent = 15

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=2
x = 0
y = Cond(Vel Y <0,3,-3)
persistent = 13

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=3
x = 0
y = Cond(Vel Y <0,3,-3)
persistent = 18

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=4
x = 0
y = Cond(Vel Y <0,3,-3)
persistent = 9

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=5
x = 0
y = Cond(Vel Y <0,5,-5)
persistent = 15

;----------------------------------------
;Ghost Chase Buu Ghost
[Statedef 18802]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0,0
sprpriority = -1
poweradd = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=45
value = 32000
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=50
value = 32001

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)<=4
trigger1 = Time = 50
x = 4
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=5
trigger1 = Time = 50
x = 2
y = 0

;----------------------------------------
;Buu Ghost chase Ghostenks Ghost
[Statedef 18803]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0,0
sprpriority = -1
poweradd = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(1)<=4
trigger1 = Time=50
value = 30061
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(1)=5
trigger1 = Time=50
value = 30062

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)<=4
trigger1 = Time = 50
x = -4
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Var(1)=5
trigger1 = Time = 50
x = -4
y = -2

;----------------------------------------
;Ghost Win!
[Statedef 18804]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0,0
sprpriority = -1
poweradd = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 30120+random%3

;----------------------------------------
;Ghost Spin!
[Statedef 18805]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0,0
sprpriority = 5
poweradd = 0
anim = 32000

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = Cond(Facing = 1, 5,-5)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = Cond(Facing = 1, 1.2,.8),Cond(Facing = 1, 1.2,.8)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 32000
trigger1 = Time = 4
value = 32001

[State 0, VelSet]
type = VelSet
trigger1 = Anim != 32000
trigger1 = Time <=10
trigger1 = Var(1)=1
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = Anim != 32000
trigger1 = Time <=17
trigger1 = Var(1)=2
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = Anim != 32000
trigger1 = Time <=22
trigger1 = Var(1)=3
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = Anim != 32000
trigger1 = Time <=27
trigger1 = Var(1)=4
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = Anim != 32000
trigger1 = Time <=32
trigger1 = Var(1)=5
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = Time >12
trigger1 = Var(1)=1
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Time >17
trigger1 = Var(1)=2
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Time >22
trigger1 = Var(1)=3
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Time >27
trigger1 = Var(1)=4
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Time >32
trigger1 = Var(1)=5
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Anim != 32000
x = 6

[State 0, Turn]
type = Turn
triggerall = Var(1)=1
trigger1 = RootDist X >=70
trigger2 = RootDist X <=-70
persistent = 20
[State 0, Turn]
type = Turn
triggerall = Var(1)=2
trigger1 = RootDist X >=100
trigger2 = RootDist X <=-100
persistent = 20
[State 0, Turn]
type = Turn
triggerall = Var(1)=3
trigger1 = RootDist X >=130
trigger2 = RootDist X <=-130
persistent = 20
[State 0, Turn]
type = Turn
triggerall = Var(1)=4
trigger1 = RootDist X >=160
trigger2 = RootDist X <=-160
persistent = 20
[State 0, Turn]
type = Turn
triggerall = Var(1)=5
trigger1 = RootDist X >=210
trigger2 = RootDist X <=-210
persistent = 20


;----------------------------------------
;Ghost Lose!
[Statedef 18810]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0,0
sprpriority = -1
poweradd = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 30130+random%3

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = enemy,name = "Shin Satan Z2"
trigger1 = enemy, StateNo = 189
flag = invisible

;----------------------------------------
;Cinematic Super! Leave!
[Statedef 30060]
type = A
physics = N
movetype = I
anim = 30060
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 31001
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 30060+random%5

;random noise
[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Stateno != 3700
trigger1 = Var(1)=1
trigger1 = !Time
value = 30010,0+random%4

;girly scream
[State 0, PlaySnd]
type = PlaySnd
trigger1 = root, Stateno != 3700
trigger1 = Var(1)=1
trigger1 = !Time
value = 30020,0+random%7

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = root, Stateno = 3700
flag = invisible

[State 0, VarSet]
type = VarSet
trigger1 = !Time
var(19) = 0+random%2

[State 0, Turn]
type = Turn
trigger1 = !Time
trigger1 = Var(19) = 1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = !Time
value = 2302,0

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = IsHelper(30000)
trigger1 = !Time
value = 3521,0

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 30060
x = -5
y = 3
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 30061
x = -5
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 30062
x = -3
y = -5
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 30063
x = -2
y = -5
[State 0, VelSet]
type = VelSet
trigger1 = Anim = 30064
x = 0
y = -5

[State 0, ChangeState]
type = ChangeState
trigger1 = Time >= 50
;trigger2 = (pos y!=[-300,200])
value = 30061
ctrl = 0

;----------------------------------------
;Cinematic Super! Not here
[Statedef 30061]
type = A
physics = N
movetype = I
anim = 15999
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

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

[State 0, ChangeState]
type = ChangeState
trigger1 = !root, NumExplod(991901)
trigger1 = root, MoveType != H
trigger1 = enemy, AnimExist(5939)
trigger1 = !enemy, NumExplod(991901)
trigger2 = root, MoveType != H
trigger2 = !enemy, AnimExist(5939)
trigger2 = root,var(48) <= root,var(49) +29
trigger2 = root, Var(43)=[1,6] 
trigger3 = Lose
;trigger4 = root, StateNo = 3417 || root, StateNo = 3413 || root, StateNo = 0
value = 30062
ctrl = 0

;----------------------------------------
;Cinematic Super! Come Back!
[Statedef 30062]
type = A
physics = N
movetype = I
anim = 30000
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 30000+random%6
elem = 1+random%5

[State 0, VelSet]
type = VelSet
trigger1 = Var(3)=1
trigger1 = !Time
x = 3
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = !Time
trigger1 = IsHelper(30000)
x = Cond(root, Facing = 1,root,Pos X - 230,root,Pos X +230)
y = 0

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = !Time
value = 2302,0

[State 0, ChangeState]
type = ChangeState
trigger1 = Var(2) = 0 
trigger1 = Var(3) = 0
value = 30000
ctrl = 0
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(2) >= 1 
trigger2 = Var(3) = 1
value = 31001
ctrl = 0

;===========================================================================
; Stand
;===========================================================================
[Statedef 35000]
type = S
physics = S
sprpriority = 0
anim = 2001

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

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !PrevStateNo
trigger1 = !Time
trigger1 = Anim != 2002
value = 2002

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 2002
trigger1 = !AnimTime
value = 2001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 2002
trigger1 = AnimElem = 1
value = 2302,0
channel = -1

;When to play standing turn anim
[State -2, ChangeAnim]
type = ChangeAnim
triggerall = Anim !=2005
trigger1 = P2DisT x < -12
value = 2005

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2001 && Anim != 2005 && Anim != 2002 
trigger2 = Anim = 2005 && AnimTime = 0 ;Turn anim over
value = 2001

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < Const(movement.stand.friction.threshold)
trigger2 = Time = 4
x = 0

[State 0, Turn]
type = Turn
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) 
triggerall = Anim = 2005
trigger1 = P2Dist X < -12

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) 
triggerall =  Anim = 2001
trigger1 = P2Dist X <= 100
value = 35040
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, StateNo = 3421
value = 35060


;===========================================================================
;JUMP START OVERRIDE
;===========================================================================
[Statedef 35040]
type    = S
physics = S
anim = 2040
ctrl = 0
sprpriority = 1
facep2 = 1

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

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

[State 100, jump SND]
type = playsnd
trigger1 = !time
value = 40,1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = const(velocity.jump.neu.x)
y = const(velocity.jump.y)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 35050
ctrl = 0

;===========================================================================
;JUMP UP OVERRIDE (taking into account super jump commands)
;===========================================================================

; Jump Up
[Statedef 35050]
type    = A
physics = A

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

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

[State 0, ChangeState]
type = ChangeState
trigger1 = parent, StateNo = 3421
value = 35060

[State 52, 4]
type = ChangeState
trigger1 = P2Dist X <=70
trigger1 = PrevStateNo 
value = 35620
ctrl = 0

[State 50, 2]
type = ChangeAnim
trigger1 = time = 0
value = 2041

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
persistent = 0
value = 2044  ;ifelse(var(4)=1,45,44)

;===========================================================================
;JUMP LAND NO FRICTION
;===========================================================================
[Statedef 35052]
type    = S
physics = S
ctrl = 0
anim = 2047
velset = 0,0

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

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

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 35000
ctrl = 0

;===========================================================================
;Leave
;===========================================================================
[Statedef 35060]
type    = S
physics = S
ctrl = 0
anim = 2003
velset = 0,0

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

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

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



;---------------------------------------------------------------------------
; JUMP STRONG PUNCH
[Statedef 35620]
type = A
movetype = A
physics = A
anim = 2620
ctrl = 0
sprpriority = 2

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

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

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

[State 200, 1]
type = PlaySnd
trigger1 = animelem=2 && random<350
value = 2620,(random%2)
channel = 0

[State 650, 3];Opponent in air sent to custom bounce state
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
damage    = ceil(ifElse(root,fvar(11) * 20 < 7, 7, root,fvar(11) *20)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 4, Hit
pausetime = 12,12
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,2
guardsound = S6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -12*cos(pi/4),12*sin(pi/4) ;45 degree fall. Speed of 12
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall.envshake.time = 12
fall.envshake.freq = 60
fall.envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= 0
givepower = 35,35
yaccel = 0.35

[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 35050
ctrl = 0

;========================<EXPLODSIVE BUFFERING HELPER>=============================
[StateDef 90000005]
type = A
physics = N
moveType = I
anim = 1
velSet = 0,0
ctrl = 0

[State 90000005, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "by JustMorphPointman"
ignoreHitPause = 1
