;---------------------------------------------------------------------------------------------------
[Statedef 186]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset=0,5
ctrl = 0
anim =186
sprpriority = 6

[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 
y = -330
[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(2)<0 
y = .56

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animelemtime(2)<0 && pos y >=0 && time >2
value = 186
elem = 2
[State 0, VelSet]
type = VelSet
trigger1 =animelem=2 
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(2)>=0
y = 0

;---------------------------------------------------------------------------------------------------
[Statedef 187]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset=0,5
ctrl = 0
anim =187
sprpriority = 6

[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 
y = -330

[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(2)<0 
y = .56

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animelemtime(2)<0 && pos y >=0 && time >2
value = 187
elem = 2
[State 0, VelSet]
type = VelSet
trigger1 =animelem=2 
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(2)>=0
y = 0

;---------------------------------------------------------------------------------------------------
[Statedef 1901]
type    = A
movetype= A
physics = N
juggle  =0
poweradd= 0
ctrl = 0
anim =1161
sprpriority = 6

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S300,2
[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AP,AA,AT
stateno=1152
slot=0


[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1


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

;---------------------------------------
[Statedef 1902]
type    = A
movetype=A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1017
sprpriority = 9

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S300,11
channel = 3



[State 0, VarSet]
type = VarSet
trigger1 = var(1)<20&&time <20
trigger2= root,animelemtime(26)>0
v =1    ;fv = 10
value =var(1)+1
;ignorehitpause = 
;persistent = 


[State 0, Helper]
type = Helper
trigger1 = time=15
helpertype = normal ;player
name ="Haoh-ken"
ID = 1024
stateno = 1024
pos =0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.5
size.yscale=.5
[State 0, AngleDraw]
type = AngleDraw
trigger1=var(1)<=20
value = 1
scale = .05+(var(1)*.020),.05+(var(1)*.020)
ignorehitpause=1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = time*2
ignorehitpause=1


[State 0, AngleDraw]
type = AngleDraw
trigger1 =var(1)>=21
value =1
scale = .850-(var(1)*.024),.850-(var(1)*.024)
ignorehitpause=1



[State 2000]
type = AssertSpecial
trigger1 = 1
flag=nomusic
ignorehitpause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(1) = %d  vel x = %f"
params = var(1),.850-(var(1)*.015)
ignorehitpause = 1
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
ignorehitpause=1

[State 210, 5]
type = destroyself
trigger1 = var(1)>=30 && time >30
;---------------------------------------------------------------------------------------------------
[Statedef 1001]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim =1001
sprpriority = 6

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 10011

;=======================================;
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 9   ;fv = 10
value = root,var(9)
;ignorehitpause = 
;persistent = 


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S300,1

[State 0, VelSet]
type = VelSet
trigger1 =time=0
x = ifelse(var(9)=2,2.5,ifelse(var(9)=0,4.6,7.2))

[State 0, VelMul]
type = VelMul
trigger1 =root,var(9)=2 
x = 1.025
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
;persistent = 
[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1


[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1002


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1



[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
trigger2= root,numprojid(1000)=0&&time%2=0&&var(9)=2
ProjID = 1000
projanim = 1001
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0

[State 0, VelSet]
type = VelSet
trigger1 =movecontact && var(9)=2 
x =2

[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = root,var(5)=0
trigger1 =  time > 0 && !movecontact
trigger2= time%10=0&&var(9)=2
attr = S, SP
animtype  = Medium
damage =ceil(ifelse(var(9)=2,26,70)*root,fvar(2)),5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  ifelse(var(9)=2,12,18)
guard.ctrltime= ifelse(var(9)=2,12,18)
ground.slidetime = ifelse(var(9)=2,10,15)
ground.velocity = -9
air.velocity = -3.5,-5.5
air.fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,99,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55


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

[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1000)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
;ignorehitpause = 
;persistent = 

[State 1, VarSet]
type =parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 18    ;v = 570
value = 1
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
trigger1 = movecontact=1 ||(root,numprojid(1000)=0)
value = ifelse(var(9)=2,0,60)
ignorehitpause=1
;persistent = 

[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 ||(root,numprojid(1000)=0)
v = 57    ;v = 570
value = ifelse((movehit=1||(root,numprojid(1000)=0)),ifelse(var(9)=2,22,67),ifelse(var(9)=2,4,23))
ignorehitpause=1


;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1002=1 
;v = 57    ;v = 570
;value = ifelse((movehit),25,12)
;ignorehitpause=1
;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1003=1 
;v = 57    ;v = 570
;value = ifelse((movehit),10,5)
;ignorehitpause=1

;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5

[State 210, 5]
type = ChangeState
trigger1 = (movecontact&&var(9)!=2)||(var(2)=3&&var(9)=2)
trigger2= root,numprojid(1000)=0 
value = 1002
;---------------------------------------------------------------------------------------------------
[Statedef 10011]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
;anim =1001
sprpriority = 6

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1001

;=======================================;

;ignorehitpause = 
;persistent = 


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A


[State 0, VelMul]
type = VelMul
trigger1 =root,var(9)=2 
x = 1.025
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
;persistent = 
[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1


[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1002


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1



[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
trigger2= root,numprojid(1000)=0&&time%2=0&&var(9)=2
ProjID = 1000
projanim = 1001
projhitanim = -1
affectteam=f
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0

[State 0, VelSet]
type = VelSet
trigger1 =movecontact && var(9)=2 
x =2

[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = root,var(5)=0
trigger1 =  time > 0 && !movecontact
trigger2= time%10=0&&var(9)=2
attr = S, SP
affectteam=f
animtype  = Medium
damage =ceil(ifelse(var(9)=2,26,70)*root,fvar(2)),5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  ifelse(var(9)=2,12,18)
guard.ctrltime= ifelse(var(9)=2,12,18)
ground.slidetime = ifelse(var(9)=2,10,15)
ground.velocity = -9
air.velocity = -3.5,-5.5
air.fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,99,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55


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

[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1000)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
;ignorehitpause = 
;persistent = 

[State 1, VarSet]
type =parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 18    ;v = 570
value = 1
ignorehitpause=1


;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1002=1 
;v = 57    ;v = 570
;value = ifelse((movehit),25,12)
;ignorehitpause=1
;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1003=1 
;v = 57    ;v = 570
;value = ifelse((movehit),10,5)
;ignorehitpause=1

;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5

[State 210, 5]
type = ChangeState
trigger1 = (movecontact&&var(9)!=2)||(var(2)=3&&var(9)=2)
trigger2= root,numprojid(1000)=0 
value = 1002
;--------------------------------------------------------------------------------------------
[Statedef 1002]
type    = S
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =99999
sprpriority = 2

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

[State 0, Explod]
type = Explod
trigger1 =time=0
anim =1002
ID =1001
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .5,.5
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = time=0
anim =1008
ID =1001
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .5,.5
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 210, 5]
type = destroyself
trigger1 =!numtarget
;---------------------------------------------------------------------------------------------------
[Statedef 1003]
type    = A
movetype= H
physics = N
juggle  = 8
velset=0,0
poweradd= 0
ctrl = 0
sprpriority = 9

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


 [State 0, DestroySelf]
type = DestroySelf
trigger1 =1
;ignorehitpause =
;persistent =
;---------------------------------------------------------------------------------------------------
[Statedef 1021]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim =1011
sprpriority = 6

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 10211

;=======================================;


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S300,7
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 1    ;fv = 10
value = ifelse(root,stateno=1020+((root,statetype=A)*10),0,ifelse(root,stateno=1025+((root,statetype=A)*10),1,2))
[State 0, VelSet]
type = VelSet
trigger1 =time=0
x =ifelse(root,statetype=A,ifelse(var(1)=2,1.5,7.5),ifelse(var(1)=0,4.5,10))
y= ifelse(root,statetype=A,ifelse(var(1)=2,1.5,ifelse(var(1)=0,5.5,7.5)),0)
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = vel y !=0
statetype = A       ;S,A,C,L

;persistent = 

[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1022



[State 0, VarSet]
type = VarSet
trigger1 = var(1)=2&&root,stateno=1026+((root,statetype=A)*10)
v = 3    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 


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


[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 2    ;fv = 10
value = vel y
ignorehitpause = 1
;persistent = 

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1

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



[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1011
projanim = 1011
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 1
projremovetime = ifelse(var(1)=2,50,-1)
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),fvar(2)

[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = root,var(5)=0
triggerall = (!root,movehit||root,var(8)=1||vel y!=0) || root,stateno=1026+((root,statetype=A)*10)
trigger1 = !movecontact
attr = S, SP
animtype  = up
damage =ceil(ifelse(root,statetype=A,ifelse(var(1)=2,80,60),100)*(root,fvar(2))),15
guardflag = MA
hitflag=MAF
pausetime =0,ifelse(var(1)=2,12,4)
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-0
ground.type = High
getpower=0,0
ground.hittime = 17
guard.ctrltime=17
ground.slidetime = 21
ground.velocity = -4.5,-9
air.velocity = -4.5,-9
fall = 1
fall.recover=0
yaccel=.55
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.6
palfx.time=20
palfx.add = 100,100,100
palfx.mul = 256,256,256
palfx.sinadd = 0,0,100,5

[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1011)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
;persistent = 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %f"
params = var(2),vel x

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


[State 1, VarSet]
type =parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 18    ;v = 570
value = 1
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
triggerall =root,var(9)!=2
trigger1 = movecontact=1 ||(root,numprojid(1011)=0)
value = 70
ignorehitpause=1
;persistent = 

[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 ||(root,numprojid(1011)=0)
v = 57    ;v = 570
value = ifelse((movehit=1||(root,numprojid(1011)=0)),60,24)
ignorehitpause=1


;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1002=1 
;v = 57    ;v = 570
;value = ifelse((movehit),25,12)
;ignorehitpause=1
;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1003=1 
;v = 57    ;v = 570
;value = ifelse((movehit),10,5)
;ignorehitpause=1

;persistent = 
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5
trigger2= (var(2)=1)
trigger3= pos y >=0
id =1023
;ignorehitpause = 
;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5


[State 210, 5]
type = ChangeState
trigger1 = (var(2)=1)
trigger2= pos y >=0
trigger3= time=50 && var(3)=1
value = 1022



;---------------------------------------------------------------------------------------------------
[Statedef 10211]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
;anim =1011
sprpriority = 6

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1021

;=======================================;


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A




;ignorehitpause = 
;persistent = 

[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1022




;ignorehitpause = 
;persistent = 


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


[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 2    ;fv = 10
value = vel y
ignorehitpause = 1
;persistent = 

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1

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



[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1011
projanim = 1011
projhitanim = -1
projremanim = -1
affectteam=f
projscale = 0,0
offset=0,0
projpriority = 1
projremovetime = ifelse(var(1)=2,50,-1)
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),fvar(2)

[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = root,var(5)=0
triggerall = (!root,movehit||root,var(8)=1) || root,stateno=1026+((p2statetype=A)*10)
trigger1 =  time > 0 && hitcount=0
attr = S, SP
affectteam=f
animtype  = up
damage =ceil(ifelse(p2statetype=A,ifelse(var(1)=2,80,60),100)*(root,fvar(2))),15
guardflag = MA
hitflag=MAF
pausetime =0,ifelse(var(1)=2,12,4)
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-0
ground.type = High
getpower=0,0
ground.hittime = 17
guard.ctrltime=17
ground.slidetime = 21
ground.velocity = -4.5,-9
air.velocity = -4.5,-9
fall = 1
fall.recover=0
yaccel=.55
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.6
palfx.time=20
palfx.add = 100,100,100
palfx.mul = 256,256,256
palfx.sinadd = 0,0,100,5

[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1011)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
;persistent = 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %f"
params = var(2),vel x

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


[State 1, VarSet]
type =parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 18    ;v = 570
value = 1
ignorehitpause=1



;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1002=1 
;v = 57    ;v = 570
;value = ifelse((movehit),25,12)
;ignorehitpause=1
;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1003=1 
;v = 57    ;v = 570
;value = ifelse((movehit),10,5)
;ignorehitpause=1

;persistent = 
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5
trigger2= (var(2)=1)
trigger3= pos y >=0
id =1023
;ignorehitpause = 
;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5


[State 210, 5]
type = ChangeState
trigger1 = (var(2)=1)
trigger2= pos y >=0
trigger3= time=50 && var(3)=1
value = 1022
;--------------------------------------------------------------------------------------------
[Statedef 1022]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1012
sprpriority = 9
[State 1000, 1]
type = PlaySnd
trigger1 =time=0
value = S300,9
channel=3
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1023
[State 0, AngleDraw]
type = AngleDraw
trigger1 =1 
value = 1
scale = 1-(time*.06),1-(time*.06)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time>16 
value = 99999
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1


[State 210, 5]
type = destroyself
trigger1 = time >= 16 && !numtarget

;--------------------------------------------------------------------------------------------
[Statedef 1023]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1017
sprpriority = 9
[State 0, VarSet]
type = VarSet
trigger1 = var(1)<20&&root,anim!=1015+((root,statetype=A)*10)
trigger2=root,stateno!=1020+((root,statetype=A)*10)
trigger2= root,stateno!=1025+((root,statetype=A)*10)
trigger2= root,stateno!=1026+((root,statetype=A)*10)
trigger3 =root,anim=1015+((root,statetype=A)*10) && root,animelemtime(2)>0 
v =1    ;fv = 10
value =var(1)+1
;ignorehitpause = 
;persistent = 
[State 0, BindToRoot]
type = BindToRoot
trigger1 =root,stateno=[1020,1026] 
;time = 1
facing = 1
pos = 9,-82
[State 0, BindToRoot]
type = BindToRoot
trigger1 =root,stateno=[1030,1036] 
;time = 1
facing = 1
pos = -6,-96

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 300, 6
channel=1
[State 0, Helper]
type = Helper
trigger1 = time=15
helpertype = normal ;player
name ="Haoh-ken"
ID = 1024
stateno = 1024
pos =0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.5
size.yscale=.5
[State 0, AngleDraw]
type = AngleDraw
trigger1=root,anim!=1015+((root,statetype=A)*10) || (root,animelemtime(2)< 0 && root,anim=1015+((root,statetype=A)*10))
value = 1
scale = .05+(var(1)*.020),.05+(var(1)*.020)

[State 0, AngleDraw]
type = AngleDraw
trigger1 =root,anim=1015+((root,statetype=A)*10) && root,animelemtime(2)>=0
value =1
scale = .850-(var(1)*.024),.850-(var(1)*.024)


[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(1) = %d  vel x = %f"
params = var(1),.850-(var(1)*.015)
ignorehitpause = 1
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add


[State 210, 5]
type = destroyself
trigger1 = var(1)>=30 && time >30
trigger2= root,stateno!=[1020,1036]

;--------------------------------------------------------------------------------------------
[Statedef 1024]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1019
sprpriority = 9

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

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause = 
;persistent = 
[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1024

[State 0, BindToRoot]
type = BindToRoot
trigger1 =(root,stateno=[1020,1026]) && (root,stateno=[1020,1036])
;time = 1
facing = 1
pos = 9,-82
[State 0, BindToRoot]
type = BindToRoot
trigger1 =(root,stateno=[1030,1036]) && (root,stateno=[1020,1036])
;time = 1
facing = 1
pos = -6,-96

[State 0, BindToRoot]
type = BindToRoot
trigger1 =(root,stateno=193)
;time = 1
facing = 1
pos = -6,55

[State 210, 5]
type = destroyself
trigger1 = root,numhelper(1023)=0 && (root,stateno=[1020,1036])
trigger2= parent, var(1)>20
trigger3 = root,anim=1015+((root,statetype=A)*10)&& (root,stateno=[1020,1036])
;---------------------------------------------------------------------------------------------------
[Statedef 1101]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim =1104
sprpriority = 6

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 11011

;=======================================;


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0&&prevstateno!=1101
value = S300,4
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0&&prevstateno!=1101
value = S300,4
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 1    ;fv = 10
value = ifelse(root,stateno=1010,0,ifelse(root,stateno=1015,1,2))
[State 0, VelSet]
type = VelSet
trigger1 =time=0
x = ifelse(var(1)=0,5,ifelse(var(1)=1,11,2.7))

[State 0, VarSet]
type = VarSet
trigger1 = time=0
v =35    ;fv = 10
value = root,var(35)
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 




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


[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
;persistent = 


[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1102

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1


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




[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
trigger2= numprojid(1104)=0&&time%2=0
ProjID = 1104
projanim = 1107
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 0, VelSet]
type = VelSet
trigger1 =movecontact &&var(35)!=0 
x =4
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = root,var(5)=0
trigger1 =  time > 0 && hitcount=0
trigger2= time%8=0&&var(35)!=0&&root,var(1)!=2
trigger3= timemod=22,2&&root,var(1)=2
attr = S, SP
animtype  = diagup
damage =ifelse(var(35)=0,100,ifelse(var(35)=1,60+(var(1)=2*10),50)),5
guardflag = MA
hitflag=MAF
pausetime =0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-0
ground.type = High
getpower=0,0
ground.hittime = 17
guard.ctrltime=17
ground.slidetime = 21
ground.velocity = -6.5,-5
air.velocity = -6.5,-6
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.6
[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1104)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
;persistent = 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %f"
params = var(2),vel x

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


[State 1, VarSet]
type =parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 18    ;v = 570
value = 1
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
triggerall =root,var(9)!=2
trigger1 = movecontact=1 ||(root,numprojid(1104)=0)
value = ifelse(var(1)!=2,ifelse(root,var(35)=0,70,ifelse(root,var(35)=1,35,30)),0)
ignorehitpause=1
;persistent = 

[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 ||(root,numprojid(1104)=0)
v = 57    ;v = 570
value = ifelse((movehit=1||(root,numprojid(1104)=0)),ifelse(root,var(9)=2,22,67),ifelse(root,var(9)=2,4,23))
ignorehitpause=1


;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1002=1 
;v = 57    ;v = 570
;value = ifelse((movehit),25,12)
;ignorehitpause=1
;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1003=1 
;v = 57    ;v = 570
;value = ifelse((movehit),10,5)
;ignorehitpause=1

;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -60 || backedgedist <= -60) && time > 5


[State 210, 5]
type = ChangeState
trigger1 = (var(2)=var(35)+1)
value = 1102

;---------------------------------------------------------------------------------------------------
[Statedef 11011]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
;anim =1104
sprpriority = 6

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1101

;=======================================;


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0&&prevstateno!=1101
value = S300,4
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0&&prevstateno!=1101
value = S300,4



;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 




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


[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
;persistent = 


[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1102

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0
value = SCA
;value2 = S,NA
time = 1


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




[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
trigger2= numprojid(1104)=0&&time%2=0
ProjID = 1104
projanim = 1107
projhitanim = -1
affectteam=f
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 0, VelSet]
type = VelSet
trigger1 =movecontact &&var(35)!=0 
x =4
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = root,var(5)=0
trigger1 =  time > 0 && hitcount=0
trigger2= time%8=0&&var(35)!=0&&root,var(1)!=2
trigger3= timemod=22,2&&root,var(1)=2
affectteam=f
attr = S, SP
animtype  = diagup
damage =ifelse(var(35)=0,100,ifelse(var(35)=1,60+(var(1)=2*10),50)),5
guardflag = MA
hitflag=MAF
pausetime =0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-0
ground.type = High
getpower=0,0
ground.hittime = 17
guard.ctrltime=17
ground.slidetime = 21
ground.velocity = -6.5,-5
air.velocity = -6.5,-6
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.6
[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1104)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
;persistent = 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(10) = %d  vel x = %f"
params = var(2),vel x

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


[State 1, VarSet]
type =parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 18    ;v = 570
value = 1
ignorehitpause=1


;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1002=1 
;v = 57    ;v = 570
;value = ifelse((movehit),25,12)
;ignorehitpause=1
;[State 0, VarSet]
;type = parentVaradd
;triggerall=parent,var(10)=0
;trigger1 =projcontact1003=1 
;v = 57    ;v = 570
;value = ifelse((movehit),10,5)
;ignorehitpause=1

;persistent = 


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -60 || backedgedist <= -60) && time > 5


[State 210, 5]
type = ChangeState
trigger1 = (var(2)=var(35)+1)
value = 1102


;--------------------------------------------------------------------------------------------
[Statedef 1102]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1105
sprpriority = 9

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

[State 0, Explod]
type = Explod
trigger1 =time=0
anim =1105
ID =1001
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .5,.5
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = time=0
anim =1108
ID =1001
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .5,.5
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1



[State 210, 5]
type = destroyself
trigger1 = time = 1
;--------------------------------------------------------------------------------------------
[Statedef 1103]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1106
sprpriority = 9
[State 0, BindToParent]
type = BindToParent
triggerall = root,anim=1100
trigger1 = root,animelemtime(5)>=0 && root,animelemtime(6)<0
time = -1
facing = 1
pos = -63,-87
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1100
trigger1 = root,animelem=6
time = -1
facing = 1
pos = -60,-82
ignorehitpause =1
persistent = 1



[State 0, BindToParent]
type = BindToParent
triggerall = root,anim=1110
trigger1 = root,animelemtime(5)>=0 && root,animelemtime(6)<0
time = -1
facing = 1
pos = -63,-87
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1110
trigger1 = parent,animelem=6
time = -1
facing = 1
pos = -60,-82
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1110
trigger1 = parent,animelem=10
time = -1
facing = 1
pos = -58,-76
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1101
trigger1 = parent,animelem=1
time = -1
facing = 1
pos = -58,-76
ignorehitpause =1
persistent = 1

[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1101
trigger1 = parent,animelem = 2
time = -1
facing = 1
pos = -61,-68
ignorehitpause =1
persistent = 1
[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1101
trigger1 = parent,animelem = 3
time = -1
facing = 1
pos = -67,-70
ignorehitpause =1
persistent = 1

[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1102
trigger1 = parent,animelem = 1
time = -1
facing = 1
pos = -65,-65
ignorehitpause =1
persistent = 1

[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1102
trigger1 = parent,animelem = 2
time = -1
facing = 1
pos = -65,-63
ignorehitpause =1
persistent = 1
;-----------

[State 0, BindToParent]
type = BindToParent
triggerall = root,anim=1111
trigger1 = root,animelemtime(5)>=0 && root,animelemtime(6)<0
time = -1
facing = 1
pos = -63,-87
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1111
trigger1 = root,animelemtime(6)>=0 && root,animelemtime(10)<0
time = -1
facing = 1
pos = -60,-82
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1111
trigger1 = parent,animelem=10
time = -1
facing = 1
pos = -58,-76
ignorehitpause =1
persistent = 1
[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1111
trigger1 = parent,animelem=11
time = -1
facing = 1
pos = -62,-73
ignorehitpause =1
persistent = 1

[State 0, BindToParent]
type = BindToParent
triggerall = parent,anim=1111
trigger1 = root,animelemtime(12)>=0 && root,animelemtime(14)<0
time = -1
facing = 1
pos =-67,-69
ignorehitpause =1
persistent = 1
;--------
[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,anim=1103 || parent,movetype=H|| root,animelemtime(14)>=0 && root,anim=1111

;---------------------------------------------------------------------------------------------------
[Statedef 1151]
type    = A
movetype= A
physics = N
juggle  =0
poweradd= 0
ctrl = 0
anim =1152
sprpriority = 6
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(14)=0 && root,var(5)=1 && p2statetype=A 
movetype = I 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(5)=0 
movetype =A

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S300,2


[State 0, ReversalDef]
type = ReversalDef
trigger1=root,anim=1160
reversal.attr = SCA,AP          ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno =-1
;sparkxy = 0,0 ;offset
p1stateno = 1159
p2stateno = 1003
[State 0, ReversalDef]
type = ReversalDef
trigger1=root,anim!=1160
reversal.attr = SCA,NP,SP          ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno =-1
;sparkxy = 0,0 ;offset
p1stateno = 1153
p2stateno = 1003
[State 0, ReversalDef]
type = ReversalDef
trigger1=root,anim!=1160
reversal.attr = SCA,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno =-1
;sparkxy = 0,0 ;offset
p1stateno = 1154
p2stateno = 1003

[State 3005, hitoverride]
type=hitoverride
trigger1=root,anim=1160
time=-1
attr=SCA,AP,AA,AT
stateno=1159
slot=0
[State 3005, hitoverride]
type=hitoverride
trigger1=root,anim!=1160
time=-1
attr=SCA,NP,SP,AA,AT
stateno=1153
slot=1

[State 3005, hitoverride]
type=hitoverride
trigger1=root,anim!=1160
time=-1
attr=SCA,HP
stateno=1154
slot=2


[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1



[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = p2bodydist x <40
trigger1 =  time > 0 
attr = S, SP
animtype  = up
damage =ceil(70*(root,fvar(2))),5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime = 16
ground.slidetime = 15
ground.velocity = -4,-5.5
air.velocity = -3.5,-7.5
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -7
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.43
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = movecontact=1 
value =50
ignorehitpause=1
[State 0, ParentVarSet]
type = ParentVarSet
trigger1 =movehit
v = 17   ;fv =
value = 1

[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 
v = 57    ;v = 570
value = ifelse((movehit=1),50,15)
ignorehitpause=1


[State 3005, end]
type=changestate
trigger1=(parent,animelem=12 && parent,anim=1150) ||(parent,animelem=19 && parent,anim=1151)||(parent,animelem=16 && parent,anim=1160)  || movecontact
trigger2=parent,stateno!=[1150,1161]
value=1152
;--------------------------------------------------------------------------------------------
[Statedef 1152]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim =1154
sprpriority = 9

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, VarSet]
type = parentVarset
trigger1 = time = 10
v = 17;fv = 10
value = 0
[State 210, 5]
type = destroyself
trigger1 = animtime = 0
;--------------------------------------------------------------------------------------------
[Statedef 1153]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1154
sprpriority = 9

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

[State 0, Helper]
type = Helper
trigger1 =time=0
helpertype = normal ;player
name ="Haoh-ken"
ID = 1155
stateno = 1155
pos =0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.5
size.yscale=.5
[State 0, VarSet]
type = parentVarset
trigger1 = time = 10
v = 17;fv = 10
value = 0
[State 210, 5]
type = destroyself
trigger1 = animtime = 0
;--------------------------------------------------------------------------------------------
[Statedef 1154]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1154
sprpriority = 9
[State 0, VarSet]
type = parentVarset
trigger1 = time = 10
v = 17;fv = 10
value = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, Helper]
type = Helper
trigger1 =time=0
helpertype = normal ;player
name ="Haoh-ken"
ID = 1157
stateno = 1157
pos =0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.5
size.yscale=.5
[State 210, 5]
type = destroyself
trigger1 = animtime = 0
;---------------------------------------------------------------------------------------------------
[Statedef 1155]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim =1155
sprpriority = 6
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 11551

;=======================================;
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S800,1

[State 0, VelSet]
type = VelSet
trigger1 =time=0
x = 4

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1156

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0&& time >=5
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0 || time <5
value = SCA
;value2 = S,NA
time = 1


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

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


[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1154
projanim = 1155
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority =1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0 && time >5
trigger1 =  time > 0 
attr = S, SP
animtype  = up
damage =60,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  14
guard.ctrltime=14
ground.slidetime = 17
ground.velocity = -4,-5.5
air.velocity = -3.5,-4
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55
[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1154)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
trigger1 = movecontact=1 ||(root,numprojid(1154)=0)
value = 50
ignorehitpause=1
;persistent = 

[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 ||(root,numprojid(1154)=0)
v = 57    ;v = 570
value = ifelse((movehit=1||(root,numprojid(1154)=0)),67,20)
ignorehitpause=1


[State 210, 5]
type = ChangeState
trigger1 = (var(2)>=1)&& (p2movetype=H || time >20&& movecontact) 
trigger2=(movecontact || moveguarded) && p2movetype=H
value = 1156
[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5
;---------------------------------------------------------------------------------------------------
[Statedef 11551]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
;anim =1155
sprpriority = 6
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1155

;=======================================;



[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1156

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0&& time >=5
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0 || time <5
value = SCA
;value2 = S,NA
time = 1


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

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


[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1154
projanim = 1155
projhitanim = -1
affectteam=f
projremanim = -1
projscale = 0,0
offset=0,0
projpriority =1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0 && time >5
trigger1 =  time > 0 
affectteam=f
attr = S, SP
animtype  = up
damage =60,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  14
guard.ctrltime=13
ground.slidetime = 17
ground.velocity = -4,-5.5
air.velocity = -3.5,-4
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55
[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1154)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1


[State 210, 5]
type = ChangeState
trigger1 = (var(2)>=1)&& (p2movetype=H || time >20&& movecontact) 
trigger2=(movecontact || moveguarded) && p2movetype=H
value = 1156
[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5
;--------------------------------------------------------------------------------------------
[Statedef 1156]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1156
sprpriority = 9

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

[State 210, 5]
type = destroyself
trigger1 = animtime = 0
;---------------------------------------------------------------------------------------------------
[Statedef 1157]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim =1157
sprpriority = 6
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 11571

;=======================================;
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S800,1

[State 0, VelSet]
type = VelSet
trigger1 =time=0
x = 8

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1158

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0&& time >=5
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0 || time <5
value = SCA
;value2 = S,NA
time = 1

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

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


[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1154
projanim = 1155
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority =1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
trigger1 =  time > 0 && time >5
attr = S, SP
animtype  = diagup
damage =175,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  14
guard.ctrltime=14
ground.slidetime = 17
ground.velocity = -6,-5.5
air.velocity = -5.5,-5.5
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
trigger1 = movecontact=1 ||(root,numprojid(1154)=0)
value = 50
ignorehitpause=1
;persistent = 

[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 ||(root,numprojid(1154)=0)
v = 57    ;v = 570
value = ifelse((movehit=1||(root,numprojid(1154)=0)),67,20)
ignorehitpause=1

[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1154)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
[State 210, 5]
type = ChangeState
trigger1 = (var(2)>=1)&& (p2movetype=H || time >20&&movecontact) 
trigger2= (movecontact || moveguarded) && p2movetype=H
value = 1158

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5
;---------------------------------------------------------------------------------------------------
[Statedef 11571]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
;anim =1157
sprpriority = 6
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1157

;=======================================;
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S800,1

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1158

[State 0, HitBy]
type = HitBy
trigger1 = enemy,numproj=0&& time >=5
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
[State 0, HitBy]
type = notHitBy
trigger1 = enemy,numproj>0 || time <5
value = SCA
;value2 = S,NA
time = 1

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

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


[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1154
projanim = 1155
affectteam=f
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority =1
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
trigger1 =  time > 0 && time >5
affectteam=f
attr = S, SP
animtype  = diagup
damage =175,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  14
guard.ctrltime=13
ground.slidetime = 17
ground.velocity = -6,-5.5
air.velocity = -5.5,-5.5
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55

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


[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1154)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
[State 210, 5]
type = ChangeState
trigger1 = (var(2)>=1)&& (p2movetype=H || time >20&&movecontact) 
trigger2= (movecontact || moveguarded) && p2movetype=H
value = 1158

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -20 || backedgedist <= -20) && time > 5
;--------------------------------------------------------------------------------------------
[Statedef 1158]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1158
sprpriority = 9

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

[State 210, 5]
type = destroyself
trigger1 = animtime = 0
;---------------------------------------------------------------------------------------------------
[Statedef 1159]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim =1157
sprpriority = 6
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 11591

;=======================================;
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S800,1

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

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1158

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

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


[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1154
projanim = 1155
projhitanim = -1
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 7
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0&& time >5
trigger1 =  time > 0 
attr = S, SP
animtype  = diagup
damage =145,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  14
guard.ctrltime=13
ground.slidetime = 17
ground.velocity = -6,-5.5
air.velocity = -5.5,-5.5
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55
id=1210
[State 0, TargetState]
type = TargetState
triggerall = p2statetype!=A
trigger1 =movehit && p2stateno!=1220
value =1165
ID = 1210
ignorehitpause =1 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
trigger1 = movecontact=1 ||(root,numprojid(1154)=0)
value = 50
ignorehitpause=1
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1154)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 
[State 0, VarSet]
type = parentVaradd
triggerall=parent,var(10)=0
trigger1 =movecontact=1 ||(root,numprojid(1154)=0)
v = 57    ;v = 570
value = ifelse((movehit=1||(root,numprojid(1154)=0)),67,20)
ignorehitpause=1


[State 210, 5]
type = ChangeState
trigger1 = (var(2)=1)
trigger2= (movecontact || moveguarded) && p2movetype=H
value = 1158


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -90 || backedgedist <= -90) && time > 5

;---------------------------------------------------------------------------------------------------
[Statedef 11591]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
;anim =1157
sprpriority = 6
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1159

;=======================================;
[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S800,1

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

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 1    ;fv = 10
value = vel x
ignorehitpause = 1
[State 3005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1158

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

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


[State 1005, This is for fossils]
type = Projectile
trigger1 = !time
ProjID = 1154
projanim = 1155
projhitanim = -1
affectteam=f
projremanim = -1
projscale = 0,0
offset=0,0
projpriority = 7
projremovetime = -1
postype = p1         ;p2,front,back,left,right
velocity = fvar(1),0
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0&& time >5
trigger1 =  time > 0 
affectteam=f
attr = S, SP
animtype  = diagup
damage =145,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime =  14
guard.ctrltime=13
ground.slidetime = 17
ground.velocity = -6,-5.5
air.velocity = -5.5,-5.5
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.55
id=1210
[State 0, TargetState]
type = TargetState
triggerall = root,statetype!=A
trigger1 =movehit && root,stateno!=1220
value =1165
ID = 1210
ignorehitpause =1 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, PowerAdd]
type = PowerAdd
trigger1 = movecontact=1 ||(root,numprojid(1154)=0)
value = 50
ignorehitpause=1
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = movecontact=1 || root,numprojid(1154)=0
v = 2   ;fv = 10
value = 1
ignorehitpause =0 



[State 210, 5]
type = ChangeState
trigger1 = (var(2)=1)
trigger2= (movecontact || moveguarded) && root,movetype=H
value = 1158


[State 0, DestroySelf]
type = DestroySelf
trigger1 = (frontedgedist <= -90 || backedgedist <= -90) && time > 5
;---------------------------------------------------------------------------
;??1·???????(?????)??
[Statedef 1165]
type    = S
movetype= H
physics = S
velset = -5,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0&& !selfanimexist(5950) && !selfanimexist(5190)
value = 1500
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =selfanimexist(5950) && time=0 
value = 5950
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =selfanimexist(5190) && time=0 &&anim!=5950
value = 5190



[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = 1

y = 0


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

;ignorehitpause = 
;persistent = 
[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time=80
trigger1 =!SelfAnimExist(5111)
value = 5110

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time=80
trigger1 = SelfAnimExist(5111)
value =5111


[State 820, 1]
type = SelfState
trigger1=time=85
value = ifelse(alive,5120,5150)
;--------------------------------------------------------------------------------------------
[Statedef 1238]
type    = S
movetype= H
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =1307
sprpriority = 9
[State 0, VarSet]
type = VarSet
triggerall = time=0
trigger1 = root,stateno!=1231
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 200, ?????]
type = HitDef
triggerall = root,numtarget(440)=0
trigger1 = time%4=0&&root,stateno!=1231
trigger2 = time%2=0&&root,stateno=1231
attr = S, NA
damage =  0,ifelse(root,stateno=1230,9,7)
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1,1
getpower=40,40
sparkno = s4010
guard.sparkno = s4110
sparkxy = -20, -45+(random%50)
hitsound = s400,2
getpower=40,40
guardsound = s2,1
ground.type = High
ground.slidetime = 16
ground.hittime  = 25
guard.ctrltime=ifelse(var(0)=0,16,13)
ground.velocity = -0
airguard.velocity = -2.5,-1.8
air.type = High
air.velocity = -2.5,-3
air.hittime = 99
forcenofall=1
ground.cornerpush.veloff=0
[State 210, 5]
type = destroyself
trigger1 = time=ifelse(var(0)=1,24,16)
;---------------------------------------------------------------------------------------------------
[Statedef 2026]
type    = A
movetype= A
physics = N
juggle  =0
poweradd= 0
ctrl = 0
anim =2026
sprpriority = 4

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

[State 210, 5]
type = destroyself
trigger1 =animtime=0
;---------------------------------------------------------------------------------------------------
[Statedef 2027]
type    = A
movetype= A
physics = N
juggle  =0
poweradd= 0
ctrl = 0
anim =2025
sprpriority = 4

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1

[State 210, 5]
type = destroyself
trigger1 =animtime=0
;------------------------------------------------------------------------------------------
[Statedef 2029]
type    = A
movetype= A
physics = N
juggle  =0
poweradd= 0
ctrl = 0
anim =2026
sprpriority = 4

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1 =1 
value = 180 
ignorehitpause =1 
;persistent = 
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add ;none, add, addalpha, add1, sub
ignorehitpause=1
;alpha = 256,256
;ignorehitpause = 
;persistent = 

[State 210, 5]
type = destroyself
trigger1 =animtime=0
;---------------------------------------------------------------------------------------------------
[Statedef 2036]
type    = A
movetype= A
physics = N
juggle  =0
poweradd= 0
ctrl = 0
anim =2047
sprpriority = 6

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
value = S300,3


[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

[State 0, AfterImage]
type = AfterImage
trigger1 =1
time = 99
length = 2
palcolor = 256
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = -15,-15,-15
paladd = 255,255,255
palmul = .5,1,1
timegap = 1
framegap = 1
trans = sub
ignorehitpause=1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1

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

[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
trigger1 = !movehit
attr = S, SP
animtype  = up
damage =100,5
guardflag = MA
hitflag=MAF
pausetime = 0,8
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-10
ground.type = High
getpower=0,0
ground.hittime = 16
ground.slidetime = 15
ground.velocity = -4,-5.5
air.velocity = 0,-9.75
fall = 1
fall.recover=0
air.juggle = ifelse(root,var(5)=1,16,0)
guard.velocity = -7
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.35
kill=0
p2stateno=2038


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

[State 3005, end]
type=destroyself
trigger1=animtime=0
;--------------------------------------------------------------------------------------------
[Statedef 2037]
type    = A
movetype=A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim =2046
sprpriority = 9

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S300,11
channel = 3
[State 0, PlaySnd]
type = PlaySnd
trigger1 = root,animelem=41 
value = S300,10
channel = 3


[State 0, VarSet]
type = VarSet
trigger1 = var(1)<20&&time <20
trigger2= hitcount=5
v =1    ;fv = 10
value =var(1)+1
;ignorehitpause = 
;persistent = 
[State 0, BindToRoot]
type = BindToRoot
trigger1 =root,animelemtime(29)>=0 && root,animelemtime(31)<0
;time = 1
facing = 1
pos = 9,-82

[State 0, BindToRoot]
type = BindToRoot
trigger1 =root,animelemtime(31)>=0 && root,animelemtime(44)<0
;time = 1
facing = 1
pos = -7,-65

[State 0, AngleDraw]
type = AngleDraw
trigger1=var(1)<=20
value = 1
scale = .05+(var(1)*.020),.05+(var(1)*.020)
ignorehitpause=1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = time*2
ignorehitpause=1


[State 0, AngleDraw]
type = AngleDraw
trigger1 =var(1)>=21
value =1
scale = .850-(var(1)*.024),.850-(var(1)*.024)
ignorehitpause=1
[State 0, VelSet]
type = VelSet
trigger1 =root,animelem=46 
x = 8.5
[State 0, VelSet]
type = VelSet
trigger1 =movehit && hitcount>1 
x = 0

[State 0, Pause]
type = Pause
trigger1 = var(1)=20 && time%3=0
time = 2
movetime = 2
[State -2, Helper]
type = Helper
trigger1 = winko && movehit
triggerall = NumHelper(11009) < 1
helpertype = normal ;player
name = "winko"
ID = 11009
stateno = 11009
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime =999
pausemovetime = 999
ignorehitpause = 1
[State 2000]
type = AssertSpecial
trigger1 = 1
flag=nomusic
ignorehitpause = 1
[State 210, 2]
type = HitDef
triggerall = root,numtarget(440)=0
triggerall = var(1)=20
trigger1 =  time > 0 && hitcount<5
attr = S, SP
animtype  = diagup
damage =ceil(ifelse(hitcount=0,39,ifelse(hitcount=1,41,ifelse(hitcount=2,43,ifelse(hitcount=3,44,80))))*(root,fvar(2))),15
guardflag = MA
hitflag=MAF
pausetime =7,12
sparkno = s4020
guard.sparkno = s4120
hitsound = s400,2
guardsound = s2,2
sparkxy = 0,-0
ground.type = High
getpower=0,0
ground.hittime = 17
guard.ctrltime=12
ground.slidetime = 21
ground.velocity = -4.5,-9
air.velocity = -4.5,-9
fall = 1
fall.recover=0
yaccel=.55
air.juggle =0
guard.velocity = -6
airguard.velocity = -6,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.6
kill=ifelse(hitcount=4,1,0)
palfx.time=20
palfx.add = 100,100,100
palfx.mul = 256,256,256
palfx.sinadd = 0,0,100,5
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(1) = %d  vel x = %f"
params = var(1),.850-(var(1)*.015)
ignorehitpause = 1
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause=1
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
ignorehitpause=1

[State 210, 5]
type = destroyself
trigger1 = var(1)>=30 && time >30
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw

[Statedef 2038]
type    = A
movetype= H
physics = N
sprpriority = 0
velset=0,-9.75
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1
value =1
movecamera=1,0

[State 0, VelAdd]
type = VelAdd
trigger1 =1 
y = .3







[State 820, 1]
type = ChangeAnim
Trigger1 = Time = 0 && selfanimexist(5061)
value = 5061
[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0 && !selfanimexist(5061)
value = 5061

;anim =
;ignorehitpause = 
;persistent = 
[State 0, SelfState]
type = SelfState
trigger1 =pos y>=0&&time>10
value =5100
;=========================================================================
[StateDef 7000]
type = A
movetype= I
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim =10000
poweradd = 20


[State 0, Explod]
type = Explod
triggerall = roundstate=2
trigger1 =time=0
anim =10001
ID = 11011
pos = ifelse(teamside=1,15,178),231
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
removetime = -1
scale = 1,1
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
;----------
[State 0, Explod]
type = Explod
triggerall = roundstate=2
triggerall =(root,var(57) =[1,499]) && root,var(10)=0
trigger1= numexplod(11000)<1
anim =10002
ID = 11000
pos = ifelse(teamside=1,22,296),232
postype = left  ;p2,front,back,left,right
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 7
ontop =1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
[State 0, Explod]
type = Explod
triggerall = roundstate=2
triggerall =root,var(57) >=500 || root,var(10)=1
trigger1= numexplod(11003)<1
anim =10003
ID = 11003
pos = ifelse(teamside=1,22,296),232
postype = left  ;p2,front,back,left,right
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority =7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = root,var(57)<=500
ID =11000
scale = .00201*(root,var(57)),1
ignorehitpause =1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = root,var(57)<=500
ID =11003
scale = .00201*(root,var(57)),1
ignorehitpause =1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =(root,var(10)=0&&root,var(57)<500)
id = 11003
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =(root,var(57)>499)
id = 11000
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11003 
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11000 
ignorehitpause = 1
[State 0, Explod]
type = Explod
triggerall = roundstate=2
triggerall =root,var(57) >500
trigger1= numexplod(11001)<1
anim =10003
ID = 11001
pos = ifelse(teamside=1,78,240),232
postype = left  ;p2,front,back,left,right
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID =11001
scale = .002004*(root,var(57)-500),1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =root,var(57)<500 
id = 11001
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11001 
ignorehitpause = 1
;trans = 
;persistent =
;supermove = 0
;pausemove = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =roundstate!=2 
id =11011 
ignorehitpause = 1
;persistent = 

[State 0, VarSet]
type = parentVaradd
trigger1 =root,var(10)=1 
v = 57    ;v = 570
value = -1
ignorehitpause=1
[State 0, Explod]
type = Explod
triggerall = roundstate=2
trigger1 =time=0
anim =9999
ID = 11011
pos = ifelse(teamside=1,15,178),231
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
removetime = -1
scale = 1,1
sprpriority = 6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 0, VarSet]
type =Varset
triggerall=var(23)=0&&var(24)=0
trigger1 = root,movetype=H && root,statetype=A && root,time=1
v = 23   ;fv = 10
value = 1
ignorehitpause =1
persistent=1
[State 0, VarSet]
type = VarSet
trigger1 =var(23)=1 && gametime%2=1
v = 24    ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 =root,statetype=A && root,movetype!=H
v = 24    ;fv = 10
value = 0
ignorehitpause = 1
;persistent = 


[State 0, VarSet]
type = parentVaradd
trigger1 =var(23)=1 && time%2=0
v = 23   ;fv = 10
value = 1
ignorehitpause =1 
[State 0, VarSet]
type = VarSet
trigger1 = var(23)=1 
v =23   ;fv = 10
value = 0
ignorehitpause =1 
[State 0, VarSet]
type = parentVarSet
trigger1 =root,var(23)>=3 
v = 24   ;fv = 10
value = 1
ignorehitpause =1 
;ignorehitpause =
;persistent =

[State 192, end]
type = destroyself
trigger1 =roundstate!=2
;---------------------------------------------------------------------------------------------------
[Statedef 9998]
type    = A
movetype= H
physics = N
juggle  = 8
velset=0,0
poweradd= 0
ctrl = 0
anim =10000;192
sprpriority = 9

;ignorehitpause = 
;persistent = 
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = !var(35)
v = 22   ;fv = 10
value = root,var(7)
;ignorehitpause = 
;persistent = 


;var(35) = movehit
[State 0, VarSet]
type = VarSet
triggerall = var(35)=0
trigger1 = root,movehit=1&& enemy,hitshakeover
;define exceptions where movecontact is fine
v = 35    ;fv = 10
value = 1
[State 0, VarSet]
type = parentVarSet
trigger1 = 1;&& enemy,hitshakeover
v = 42    ;fv = 10
value = var(34)
[State 0, VarSet]
type = parentVarSet
trigger1 = 1
v = 43   ;fv = 10
value = var(35)
;===non attacks
;incoming
[State 0, Null]
type = Null
triggerall =root,stateno=1251116&& !var(35) 
trigger1 =root,power >1500 && random%5>=3&& root,var(14)>=9
trigger1 = var(34):=cond((root,fvar(10)<40&&p2statetype=A),1400,1300)
trigger2 =root,power <1500 && random%5>=2&& root,var(14)>=9
trigger2 = var(34):=1200+(random%2)*10
;====

;==Helpers==
;[State 0, Null]
;type = Null
;trigger1 =root,numhelper(1022)
;trigger1 = helper(1022),movehit&& (random%5>2) &&var(34)=-1&& root,var(14)>=8
;trigger1 = var(34):=cond(root,p2bodydist x <60,1010,cond(root,var(10)>3,1005,55))
;trigger1 = var(30):=var(34)=55
;trigger2 =root,numhelper(1002) && var(10)<2 && root,p2bodydist x >99
;trigger2 =  helper(1002),vel x =0 && helper(1002),vel y =0
;trigger2 = var(22)&& (random%5>1) 
;trigger2 = var(34):=1003
;trigger2 = var(30):=var(34)=1003
;trigger3 =root,numhelper(1003)&&var(34)=-1
;trigger3 = var(22)&& (random%5>2) 
;trigger3 = var(34):=cond(root,p2bodydist x <60,1010,cond(root,var(10)>3,1005,605))
;trigger3 = var(30):=var(34)=[600,1005]
;trigger4 =root,numhelper(1003) && var(10)<2
;trigger4 = var(22)&& (random%5>1) && helper(1003),vel x =0 && helper(1003),vel y =0&& root,p2bodydist x >100
;trigger4 = var(34):=1003
;trigger4 = var(30):=var(34)=1003
;trigger5 =root,numhelper(1001) && root,stateno=1010 
;trigger5 = root,p2bodydist x <60 && root,frontedgebodydist <45&& enemy,backedgebodydist <20
;trigger5 = helper(1001),movehit && (random%5>2) && root,stateno=1010 
;trigger5 = root,power >400 && p2statetype=A
;trigger5 = var(34):=4


;====


;====specials
;1010
[State 0, Null]
type = Null
triggerall =(root,stateno=1010)&& var(35) && root,var(47) = 240 && root,var(2)=0
trigger1 =(random%5>2) && root,animelemtime(5) > 0
trigger1 = var(4):=3

;1000
[State 0, Null]
type = Null
triggerall =(root,stateno=1010)&& var(35) && root,var(47) = 240 && root,var(2)=0
trigger1 =(random%5>2) && root,animelemtime(4) > 0
trigger1 = var(4):=3

;1001
[State 0, Null]
type = Null
triggerall =(root,stateno=1011)&& var(35) && root,var(47) = 240 && root,var(2)=0
trigger1 =(random%5>2) && root,animelemtime(4) > 0
trigger1 = var(4):=3

;;1001
;[State 0, Null]
;type = Null
;triggerall =root,stateno=1010&& var(35) && root,var(47) = 240
;trigger1 =root,var(14)  >=8
;trigger1 = var(4):=3
;trigger2 = (random%5>2) 
;trigger2 =var(4):=3



;universaltagout
[State 0, Null]
type = Null
triggerall= numpartner>0; && partner,alive&& root,var(47) = 240
triggerall = partner,alive&& root,var(47) = 240
trigger1 =(root,stateno=[1000,1020])&& var(35) 
trigger1 =root,var(14) >=8
trigger1 = var(4):=3
trigger2 =(root,stateno=[1000,1399])&& root,moveguarded&& (random%5>2)
trigger2 = var(4):=3
trigger3 =root,numhelper(1022)
trigger3 = helper(1022),moveguarded&& (random%5>3) &&var(34)=-1
trigger3 = var(4):=3
trigger4 =(root,stateno=[1000,1399])&& var(35)  && (random%5>2)
trigger4 =root,life <500
trigger4 = var(4):=3
trigger5 =(root,stateno=[200,410])&& var(35)  && (random%5>2)
trigger5 =root,var(14)>=12
trigger5 = var(4):=3
;=====================

[State 0, VarSet]
type = VarSet
trigger1 = var(4)!=0 && root,ctrl
v = 4    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 


[State 0, VarSet]
type = parentVarSet
trigger1 = enemy,movetype=H 
v = 43   ;fv = 10
value = var(34)
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = enemy,movetype!=H
trigger2 = root,stateno=var(34)&& root,time=1
v = 34    ;fv = 10
value = -1

[State 0, VarSet]
type = VarSet
trigger1 = var(35)
v = 35    ;fv = 10
value = 0
;selection made?

;ignorehitpause = 
;persistent = 

 [State 0, DestroySelf]
type = DestroySelf
trigger1 =roundstate!=2
;---------------------------------------------------------------------------------------------------
[Statedef 9999]
type    = A
movetype= H
physics = N
juggle  = 8
velset=0,0
poweradd= 0
ctrl = 0
anim =10000
sprpriority = 9


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(2) = %d var(3) = %d  vel x = %d movehit= %d"
params = var(0),var(5),var(40),var(31)
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 40    ;fv = 10
value = root,Ailevel
;ignorehitpause = 
;persistent = 

;persistent = 
[State 0, VarSet]
type = Varset
trigger1 =var(10)>=0
trigger2 =var(11)>=0
v = 3   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =var(10)>=0
trigger2 =var(11)>=0
trigger3 =var(12)>=0
trigger4 =var(13)>=0
trigger10 =var(20)>=0
trigger11 =var(21)>=0
v = 2   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =var(10)=0
trigger1 =var(11)=0
trigger1 =var(12)=0
trigger1 =var(13)=0
trigger1 =var(20)=0
trigger1 =var(21)=0
v = 2   ;fv = 10
value = 0
ignorehitpause = 1

[State 0, VarSet]
type = Varset
trigger1 =var(10)=0
trigger1 =var(11)=0
v = 3   ;fv = 10
value = 0
ignorehitpause = 1
;enough for lights
[State 0, Explod]
type = varset
triggerall = var(10)=0 && p2statetype!=A
trigger1 = root,movehit=1 && (root,stateno=600||(root,stateno=630 )) && root,pos y =[-66,-40*cond(root,var(3)>0,.75,1)]
trigger2 = root,movehit=1 && root,stateno=620 && root,pos y =[-65,-40*cond(root,var(3)>0,.75,1)]
trigger3 = root,movehit=1 && (root,stateno=640)&& root,pos y =[-65,-40*cond(root,var(3)>0,.75,1)]
v=10
value=1

;enough for heavys
[State 0, Explod]
type = varset
triggerall = var(10)=0&& p2statetype!=A
triggerall = var(11)=0
trigger1 = root,movehit=1 && (root,stateno=600) && root,pos y >-40*cond(root,var(3)>0,.75,1)
trigger2 = root,movehit=1 && root,stateno=610 && root,pos y >-40*cond(root,var(3)>0,.75,1)
trigger3 = root,movehit=1 && (root,stateno=630 )&& root,pos y >-40*cond(root,var(3)>0,.75,1)
trigger4 = root,movehit=1 && (root,stateno=640)&& root,pos y >-40*cond(root,var(3)>0,.75,1)
v=11
value=1

;blocked so inch slowly
[State 0, Explod]
type = varset
triggerall = var(10)=0
triggerall = var(11)=0
triggerall = var(12)=0
trigger1 = root,moveguarded=1 &&root,stateno=200
trigger2 = root,moveguarded=1&& root,stateno=430 
trigger3 = root,moveguarded=1&& root,stateno=230
trigger4 = root,moveguarded=1&& root,stateno=400
v=12
value=1

[State 0, VarSet]
type = Varadd
triggerall = enemy,hitshakeover
trigger1 =root,moveguarded=1 
v = 1   ;fv = 10
value = 1
ignorehitpause = 0
[State 0, VarSet]
type = VarSet
trigger1 = root,movehit
v = 1    ;fv = 10
value = 0
;persistent = 
[State 0, VarSet]
type = Varset
trigger1 =root,statetype=A&& root,movetype!=H
v = 4   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =root,statetype=A&& root,movetype=H
v = 4   ;fv = 10
value = 2
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =var(6)=1
v = 4   ;fv = 10
value = 0
ignorehitpause = 1
[State 0, VarSet]
type = Varadd
trigger1 =var(4)=2
v = 5   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = Varset
trigger1 =root,movehit
trigger2 = root,var(15)
v = 5   ;fv = 10
value =0
ignorehitpause = 1 
[State 0, VarSet]
type = Varset
trigger1 = (root,stateno=[5000,5200])&&root,prevstateno=[120,155]
v = 6   ;fv = 10
value = p2stateno
ignorehitpause = 1
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =  p2stateno=var(6)
v =7   ;fv = 10
value = 1
ignorehitpause = 1
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =  p2stateno!=var(6)
v =7   ;fv = 10
value = 0
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=5120 
v = 8    ;fv = 10
value = 10
[State 0, VarSet]
type = Varadd
trigger1 = root,stateno!=5120 && var(8)>0
v = 8    ;fv = 10
value = -1

[State 0, VarSet]
type = VarSet
trigger1 = var(8)<0
v = 8    ;fv = 10
value = 0

;bait
[State 0, Explod]
type = varset
triggerall = var(10)=0
triggerall = var(11)=0
triggerall = var(13)=0
triggerall = var(1)>3
trigger1 = root,moveguarded=1 &&root,stateno=200
trigger2 = root,moveguarded=1&& root,stateno=430 
trigger3 = root,moveguarded=1&& root,stateno=230
trigger4 = root,moveguarded=1&& root,stateno=400
v=13
value=1

;do meaty
[State 0, Explod]
type = varset
triggerall = root,p2bodydist x =[-10,100]
triggerall = root,stateno=1200
triggerall = p2statetype!=L|| p2stateno=5120 && enemy,time >5
triggerall = var(15)=0 && var(31)<43*var(40)
trigger1= root,p2bodydist y >-35 && !enemy,hitfall && p2statetype=A
trigger2= p2stateno=5120 && enemy,time>5
trigger3 = p2statetype=C && p2stateno=[150,155]
v=15
value=4
ignorehitpause =1
;do slide
[State 0, Explod]
type = varset
triggerall = root,prevstateno=440|| root,p2bodydist x =[55,100]
triggerall = root,stateno=1200
triggerall = var(40) <=5 && var(31)<249||var(40) >5&&(p2statetype=S || root,prevstateno=440);&& p2stateno=[120,155]
triggerall = var(15)=0 && var(31)<30*var(40)
trigger1= root,time=1
trigger2= root,time%3=0
v=15
value=2
ignorehitpause =1
;do cash out 
[State 0, Explod]
type = varset
triggerall = root,p2bodydist x =[-15,50]
triggerall = root,stateno=1200  && p2stateno!=5120
triggerall = var(40) <=5 && var(31)<249||var(40) >5&&p2movetype=H && p2stateno!=[120,155]
triggerall = var(15)=0 && var(31)<55*var(40)  && p2statetype!=L
trigger1= root,p2bodydist y <-25 && enemy,hitfall || root,p2bodydist x <55 && root,prevstateno=440|| root,p2bodydist x <45 
trigger1 = root,time%3=0 || root,time=1
v=15
value=3
ignorehitpause =1

;do nothing
[State 0, Explod]
type = varset
triggerall = root,stateno=1200
triggerall = var(15)=0
triggerall = root,var(2)=0
trigger1= (root,p2bodydist x >80||root,p2bodydist x <50 && p2statetype!=L) && (p2movetype!= H ||p2stateno=[120,155])
trigger2 =  p2stateno=[120,155]
trigger3 = root,time >105
trigger4 = p2movetype=A && p2bodydist x <100
trigger5 = roundstate!=2
trigger6 = p2stateno=[900,999]
v=15
value=1
ignorehitpause =1

[State 0, VarRandom]
type = VarRandom
trigger1 = 1
v = 31
range = 0,999
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = parentVarSet
trigger1 = (life<= ceil(lifemax/2.15)) &&(p2life>= ceil(enemy,lifemax/1.7))
trigger2 = (p2life< ceil(enemy,lifemax/3.3))
trigger3 = power >= 4750 && roundno=1&&(p2life< ceil(enemy,lifemax/2.5))
trigger4= root,var(10)=1
v = 20   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = var(8)=0 && (  enemy,gethitvar(hitshaketime)=1||(p2stateno=2011  ||p2stateno=1292 ||p2stateno=1202&&enemy,time=1||root,stateno=2031&&enemy,stateno=5050)&&p2movetype=H) || root,stateno=2030
trigger1=  enemy,hitfall
v = 45  ;fv = 10
value = cond((root,stateno=[1150,1161]),55,40)
[State 0, VarSet]
type = Varadd
trigger1 = var(45)>0 
v = 45  ;fv = 10
value = -1
;1000
;1000
[State 0, Explod]
type = varset
triggerall = var(20)=0
triggerall = root,numprojid(1000)=0
triggerall = ( root,p2bodydist x =[60,100])|| root,movecontact || (p2stateno=5120 && root,p2bodydist y >-40) &&   root,p2bodydist x <105
triggerall = (stateno = [210,220]) ||(stateno = [210,220]) ||(stateno = [240,250])||(stateno = 440) ||(stateno = 410)|| !root,movecontact
triggerall = root,movetype!=H
triggerall = root,stateno!=[800,899]
triggerall = (root,ctrl||root,stateno=101||root,stateno=[10,20]) || root,movecontact
trigger1=  root,p2bodydist x<= var(0) && enemy,pos y >=0 && var(0)>-1
trigger2= var(31)<125&&((root,p2bodydist y >-55||p2stateno=[5030,5040])&& enemy,vel y >0)&& root,p2bodydist x >=40
trigger3 = root,movecontact 
v=20
value=1
ignorehitpause =1
;1001
[State 0, Explod]
type = varset
triggerall = var(21)=0
triggerall = root,movetype!=H
triggerall = root,numprojid(1000)=0
triggerall =(stateno = [210,220]) ||(stateno = [210,220]) ||(stateno = [240,250]) ||(stateno = 410) || !root,movecontact
triggerall = root,stateno!=[800,899]
triggerall = root,movetype!=H
triggerall = ( root,p2bodydist x =[100,260])
triggerall = (root,ctrl||root,stateno=101||root,stateno=[10,20])  || root,movecontact
trigger1=  root,p2bodydist x-15<= var(0) && enemy,pos y >=0 && var(0)>-1
trigger2= var(31)<125&&((root,p2bodydist y >-65||p2stateno=[5030,5040])&& enemy,vel y >0)&&  root,p2bodydist x >120
trigger3 = root,movecontact 
v=21
value=1
ignorehitpause =1

;1001
[State 0, Explod]
type = varset
triggerall = var(22)=0
triggerall = p2stateno!=5901
triggerall = root,movetype!=H
triggerall = root,numprojid(1000)=0
triggerall = (root,stateno=240||root,stateno=210||root,stateno=440) || !root,movecontact
triggerall = root,stateno!=[800,899]
triggerall = root,movecontact ||root,fvar(15) >90  ||( p2stateno=10612 &&p2statetype=L || p2stateno=5120||p2stateno=10613)&& root,fvar(15)>20
triggerall = (root,ctrl||root,stateno=[10,20])  || root,movecontact||root,stateno=101
trigger1= root,fvar(15)-20<= var(0)  && var(0)>-1
trigger2= var(31)<125&&((root,p2bodydist y >-65||p2stateno=824||p2stateno=[5030,5040])&& enemy,vel y >0)&& root,fvar(15) >90 && p2statetype!=L
trigger3 = root,movecontact
v=22
value=1
ignorehitpause =1


;ignorehitpause = 
;persistent = 
[State 25, VarSet]
type = VarSet
triggerall = random <249;|| root,var(31)>0
triggerall = p2statetype!=A|| p2movetype=H 
trigger1 = ((enemy,movetype !=A)|| root,p2bodydist x >5)&& p2statetype!=L ;&& root,var(31)=0
trigger2 = root,backedgebodydist <10 && p2movetype=A;&& root,var(31)=0
trigger3 = root,p2bodydist y <0 && p2statetype=A  ;&& root,var(31)=0
trigger4 = root,var(31)>0 && root,p2bodydist x >40
trigger5 = var(12)
v = 25   ;fv = 10
value = 1

;---adjust for p2's position
[State 0, VarSet]
type = Varadd
triggerall = var(20)=0
trigger1 = p2statetype=L 
v = 0    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = var(20)=0
trigger2 = var(21)=0
v = 0    ;fv = 10
value = -1
;ignorehitpause = 
;persistent = 

;0----------removeexplods---
[State 0, RemoveExplod]
type = varset
trigger1 = p2movetype!=H || p2stateno=4999
v =10
value=0
ignorehitpause = 1
[State 0, RemoveExplod]
type = varset
trigger1 = p2movetype!=H|| p2stateno=4999
v = 11
value=0
ignorehitpause = 1

[State 0, RemoveExplod]
type = varset
trigger1 = p2stateno=4999||p2movetype=H && p2stateno!=[120,155]
v = 12
value=0
ignorehitpause = 1

[State 0, RemoveExplod]
type = varset
trigger1 = p2stateno=4999||root,movehit=1
v = 13
value=0
ignorehitpause = 1
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = root,stateno!=1200
v = 15   ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = parentVarSet
trigger1 = (life> ceil(lifemax/2.15)) &&(p2life<ceil(enemy,lifemax/1.7)) &&root,var(10)=0
trigger2 = (p2life>= ceil(enemy,lifemax/3.3))  &&root,var(10)=0
trigger3 = power < 4750 && roundno=1&&(p2life>= ceil(enemy,lifemax/2.5)) &&root,var(10)=0
v = 20   ;fv = 10
value = 0

;200
[State 0, RemoveExplod]
type = varset
trigger1 = root,numhelper(1001)>0|| p2stateno=4999 || root,movetype=H
trigger2= root,p2bodydist x <40

v = 20
value=0
ignorehitpause = 1
;230
[State 0, RemoveExplod]
type = varset
trigger1 = root,numhelper(1001)>0 || p2stateno=4999|| root,movetype=H
trigger2= root,p2bodydist x <100
v=21
value=0
ignorehitpause = 1


[State 0, RemoveExplod]
type = varset
trigger1 = root,numhelper(1001)>0 || root,movetype=H 
trigger2= root,p2bodydist x <110 && !root,movecontact 
v=22
value=0
ignorehitpause = 1
[State 25, VarSet]
type = VarSet
triggerall = root,backedgebodydist >10
trigger1 =  enemy,movetype =A
trigger2 = root,p2bodydist x <5 && p2statetype=L && root,p2bodydist y=0
trigger3 = p2statetype=A && p2movetype!=H&& root,p2bodydist x <5 && p2statetype!=L ;&& root,var(31)=0
;trigger4 = root,var(31)>0 && p2bodydist x <25 && root,var(31)!=6 
v = 25   ;fv = 10
value = 0

;-----------
[State 0, VarSet]
type = VarSet
trigger1 = root,movehit
trigger2= time=0
trigger3 = root,numhelper(1001)
trigger3 = helper(1001),movehit
trigger4=root,numhelper(1101)
trigger4=helper(1101),movehit
trigger5= enemy,hitdefattr=SC,AT 
v = 40    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = root,stateno=[5000,5300]
trigger2 = root,stateno=[800,3999]
trigger2=root,movetype=H
v = 40    ;fv = 10
value = 0

 [State 0, VarSet]
type = parentVarSet
trigger1 = root,statetype = A
trigger2 = root,movetype=H && root,stateno!=[120,155]
trigger3= root,prevstateno=40
trigger4= (p2stateno=[5121,5899])
trigger5 = (root,prevstateno=52 ||root,prevstateno=5120) && p2statetype=A
trigger6 = root,p2bodydist x <45 && root,frontedgebodydist >50 && p2statetype!=L
v=30
value = 0

[State 0, VarSet]
type = parentVarSet
triggerall = root,statetype != A && var(40)
triggerall = (var(8)<=0) ||enemy,hitdefattr=SC,AT 
triggerall = var(31) <339|| p2movetype=A
triggerall = root,p2bodydist x >45 || root,frontedgebodydist <50 ;|| p2stateno=4999
trigger1= enemy,hitdefattr=SC,AT && (root,ctrl||root,stateno=20||root,stateno=101)
trigger2= p2stateno =5120 && (root,p2bodydist x =[55,120]) && (root,ctrl||root,stateno=20||root,stateno=101)
trigger3= p2stateno =5120 && root,frontedgedist <60 &&(root,ctrl||root,stateno=20||root,stateno=101)
trigger4 = (root,p2bodydist x >40||root,frontedgedist <30)&& (root,ctrl||root,stateno=20||root,stateno=101) && root,movetype!=H&&(p2stateno=4999||p2movetype!=H) 
trigger5 = p2stateno=5120 && (root,p2bodydist x <30  ||root,frontedgedist <60 )&& (root,ctrl||root,stateno=20||root,stateno=101)
v = 30   ;fv = 10
value = 1


;ignorehitpause = 
;persistent = 

 [State 0, DestroySelf]
type = DestroySelf
trigger1 =roundstate!=2
;---------------------------------------------------------------------------
[Statedef 11009]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 10000
ctrl = 0
sprpriority = -2

[State 11009, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = S400,13

[State 0, AssertSpecial]
type = AssertSpecial
Triggerall = time = [0,60]
trigger1 =1
ignorehitpause = 1
persistent = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,60]
flag=nomusic


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

[State 911, Trans]
type = trans
trigger1 = 1
trans = add


[State 0, Explod]
type = Explod
trigger1 =time=0
anim =8100
ID = 9999
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
scale = .667,ifelse(GameHeight=180,0.5980066445182724,0.7973421926910299)
sprpriority = -8
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 0, Explod]
type = Explod
trigger1 =time=0
anim =8101
ID = 9999
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0 
scale = .667,ifelse(GameHeight=180,0.5980066445182724,0.7973421926910299)
sprpriority = -9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1



[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time >60
flag = invisible


[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 669

