;=================================================;
;Coding File for Layer 1 Overlay                  ;
;=================================================;
[Statedef 30000]
sprpriority = 3
anim = 1
[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = !selfanimexist(root,anim+30000)
flag = invisible
[State 30000, failsafe]
type = ChangeAnim
trigger1 = !selfanimexist(root,anim+30000) 
trigger1 = anim != 1
value = 1
[State 30200, VarSet]
type = VarSet
trigger1 = !time
var(0) = root,stateno
[State 10000, ChangeAnim]
type = ChangeAnim
trigger1 = 1
triggerall = selfanimexist(root,anim+30000)
value = root,anim+30000
elem = root,animelemno(0)
[State 100000, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1
[State 1415, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State -3, Variable Height]
type=playerpush
triggerall= root,statetype=A && root,movetype!=H && root,numenemy
triggerall= p2bodydist x = [-(enemynear,const(size.ground.back) + enemynear,const(size.ground.front)), 0]
trigger1= p2statetype=S
trigger1= p2dist y >= (enemynear,const(size.height) - 12)
trigger2= p2statetype=C
trigger2= p2dist y >= (enemynear,const(size.height) - 28)
trigger3= p2statetype=L
trigger3= p2dist y >= (enemynear,const(size.height) - 12);>= 24
value=0
ignorehitpause=1
[State 30000, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 1
pos = 0,0
[State 30200, VarSet];Change palette
type = VarSet
trigger1 = !time
var(45) = root,var(45)
[State 5900, 3];Change palette
type = RemapPal
trigger1 = 1
source = 1,1
dest = 1,var(45)

