;=========================================================================='
;Jon
[Statedef 8500]
type    = S
movetype= A
physics = N
juggle  = 4
anim = ifelse(anim=8500,-1,8500)
ctrl = 0
sprpriority = 2
[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(3)<0
x = -150*facing
ignorehitpause = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,winko
trigger1 = animelemtime(3)<-1
value = anim
elem = 3
ignorehitpause = 1
[State 8500, Projectile]
type = Projectile
trigger1 = !root,winko
trigger1 = animelemtime(1)%4=1
numhits = random
ProjID = 8550
projanim = 1212
projhitanim = -1
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projshadow = -1
projscale = 0.52,0.52
offset = 65,-48
velocity = sin(animelemtime(1)*(pi/180)*8.36)*cos(animelemtime(1)*(pi/180)*0.725)*2,(cos(animelemtime(1)*(pi/180)*3.65)/(2.44+sin(animelemtime(1)*(pi/180)*3.49)))*1.56
accel = (sin((pi/180)*animelemtime(1)*4)*0.03*ifelse(animelemtime(1)%2,-1,1)),cos((pi/180)*animelemtime(1)*4)*0.03
attr = S, SA
damage = 120,120; 15,1
animtype = medium
guardflag = MA
hitflag = MAFDP
pausetime = 0,0
hitsound = s5,random%23
sparkno = random%4
sparkxy = 15,0
guardsound = s6,0; = 6,0
ground.type = Low
ground.slidetime = 1; 25
ground.hittime = 1;  = 25
ground.velocity = -5
air.animtype = Back
air.velocity = -4,-6
air.juggle = 3
air.fall = 1
[State 8500, Projectile]
type = Projectile
trigger1 = !root,winko
trigger1 = animelemtime(1)%4=1
numhits = random
ProjID = 8550
projanim = 1212
projhitanim = -1
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projshadow = -1
projscale = 0.52,0.52
offset = 65,-48
velocity = -sin(animelemtime(1)*(pi/180)*8.36)*cos(animelemtime(1)*(pi/180)*0.725)*2,-(cos(animelemtime(1)*(pi/180)*3.65)/(2.44+sin(animelemtime(1)*(pi/180)*3.49)))*1.56
accel = -(sin((pi/180)*animelemtime(1)*4)*0.03*ifelse(animelemtime(1)%2,-1,1)),-cos((pi/180)*animelemtime(1)*4)*0.03
attr = S, SA
damage = 120,120; 15,1
animtype = medium
guardflag = MA
hitflag = MAFDP
pausetime = 0,0
hitsound = s5,random%23
sparkno = random%4
sparkxy = 15,0
guardsound = s6,0; = 6,0
ground.type = Low
ground.slidetime = 1; 25
ground.hittime = 1;  = 25
ground.velocity = -5
air.animtype = Back
air.velocity = -4,-6
air.juggle = 3
air.fall = 1
[State 8500, VelSet]
type = VelSet
trigger1 = animelem = 3
x = -5

[State 8500, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;=========================================================================='
;Garjo
[Statedef 90]
movetype= I
[State eee]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 3
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
facing = 1
pos = 0,0
ignorehitpause = 1
[State 0, VarSet]
type = VarRandom
trigger1 = 1
v = 50
range = 0,9999
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
trigger1 = random<24
value = random%361
scale = random/99.0,random/99.0
ignorehitpause = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(Var(50))
value = Var(50)
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = random<500
flag = invisible
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = 1
fvar(1) = 6.37
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = !fvar(2)||fvar(2)<0.999997
fvar(2) = 1.000000
ignorehitpause = 1
[State 0, VarSet]
type = VarAdd
trigger1 = fvar(2)>1.000001
fvar(2) = -0.013253
ignorehitpause = 1
[State 0, VarSet]
type = VarAdd
trigger1 = gethitvar(damage)
fvar(2) = 0.432373*((root,palno-9)/0.8642)
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = 1
fvar(3) = 1.01
ignorehitpause = 1
;=========================================================================='
;TargetCapture/Konsen
[Statedef 900000]
[State debug]
type = DisplayToClipboard
trigger1 = 1
text = "TargetDirective:%i"
params = var(0)
ignorehitpause = 1
[State GetTargetStateno]
type = VarSet
triggerall = numtarget
triggerall = enemy,name="Devils eye"
trigger1 = target(0),stateno=22101
trigger2 = target(0),stateno=1412
trigger3 = target(0),stateno=11502
trigger4 = target(0),stateno=3002
trigger5 = target(0),stateno=6400000
trigger6 = target(0),stateno=40000
trigger7 = target(0),stateno=41000
trigger8 = target(0),stateno=23640
var(0) = target(0),stateno
ignorehitpause = 1
[State GetTargetStateno]
type = VarSet
triggerall = numtarget
triggerall = enemy,name="F-Kung Fu Man"
trigger1 = target(0),stateno=30
var(0) = target(0),stateno
ignorehitpause = 1
[State GetTargetStateno]
type = VarSet
triggerall = numtarget
triggerall = enemy,name="Donald period"
trigger1 = target(0),stateno=8005
trigger2 = target(0),stateno=77
trigger3 = target(0),stateno=2700000
var(0) = target(0),stateno
ignorehitpause = 1
[State GetTargetStateno]
type = VarSet
triggerall = numtarget
triggerall = enemy,name="Madness Donald"
trigger1 = target(0),stateno=3742000
var(0) = target(0),stateno
ignorehitpause = 1
[State 0, TargetState]
type = TargetState
triggerall = numtarget
triggerall = target(0),name!="L_Garfield"
trigger1 = var(0)
value = var(0)
ID = -1
persistent = 256
ignorehitpause = 1
[State 0, TargetState]
type = TargetState
triggerall = numtarget
triggerall = target(0),name!="L_Garfield"
trigger1 = enemy,name!="Devils eye"
trigger1 = enemy,name!="F-Kung Fu Man"
trigger1 = enemy,name!="Donald period"
trigger1 = enemy,name!="Madness Donald"
value = 1000000000
ID = -1
persistent = 256
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(100)||ishelper(101)||ishelper(102)||ishelper(103)||ishelper(104)||ishelper(105)
pos = 0,-40-(ishelper(101)*4)-(ishelper(102)*8)-(ishelper(103)*12)-(ishelper(104)*16)-(ishelper(105)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(200)||ishelper(201)||ishelper(202)||ishelper(203)||ishelper(204)||ishelper(205)
pos = 0,-64-(ishelper(201)*4)-(ishelper(202)*8)-(ishelper(203)*12)-(ishelper(204)*16)-(ishelper(205)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(300)||ishelper(301)||ishelper(302)||ishelper(303)||ishelper(304)||ishelper(305)
pos = 0,-88-(ishelper(301)*4)-(ishelper(302)*8)-(ishelper(303)*12)-(ishelper(304)*16)-(ishelper(305)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(400)||ishelper(401)||ishelper(402)||ishelper(403)||ishelper(404)||ishelper(405)
pos = 0,-112-(ishelper(401)*4)-(ishelper(402)*8)-(ishelper(403)*12)-(ishelper(404)*16)-(ishelper(405)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(406)||ishelper(407)
pos = 0,-136-(ishelper(407)*4)
ignorehitpause = 1
[State movetype?]
type=StateTypeSet
trigger1=!numtarget
movetype=A
ignorehitpause=1
[State movetype?]
type=StateTypeSet
trigger1=numtarget
movetype=I
ignorehitpause=1
[State Anim]
type=ChangeAnim
trigger1=1
value=ifelse(numtarget,910000,900000)
ignorehitpause=1
[State GetTarget]
type=HitDef
trigger1=!numtarget
attr=,NA
hitflag=MAFDP
guardflag=
priority=1,Hit
sparkno=-1
guard.dist=0
affectteam=F
numhits=0
pausetime=0,0
ID=0
[State KeepTarget]
type=ReversalDef
trigger1=numtarget
reversal.attr=,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime=0,0
sparkno=-1
hitsound=-1
numhits=0
ignorehitpause=1
;=========================================================================='
;TargetDummy
[Statedef 900001]
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(110)||ishelper(111)||ishelper(112)||ishelper(113)||ishelper(114)||ishelper(115)
pos = 0,-40-(ishelper(111)*4)-(ishelper(112)*8)-(ishelper(113)*12)-(ishelper(114)*16)-(ishelper(115)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(210)||ishelper(211)||ishelper(212)||ishelper(213)||ishelper(214)||ishelper(215)
pos = 0,-64-(ishelper(211)*4)-(ishelper(212)*8)-(ishelper(213)*12)-(ishelper(214)*16)-(ishelper(215)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(310)||ishelper(311)||ishelper(312)||ishelper(313)||ishelper(314)||ishelper(315)
pos = 0,-88-(ishelper(311)*4)-(ishelper(312)*8)-(ishelper(313)*12)-(ishelper(314)*16)-(ishelper(315)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(410)||ishelper(411)||ishelper(412)||ishelper(413)||ishelper(414)||ishelper(415)
pos = 0,-112-(ishelper(411)*4)-(ishelper(412)*8)-(ishelper(413)*12)-(ishelper(414)*16)-(ishelper(415)*20)
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = ishelper(416)||ishelper(417)
pos = 0,-136-(ishelper(417)*4)
ignorehitpause = 1
[State Anim]
type=ChangeAnim
trigger1=1
value=900001
ignorehitpause=1
[State Remove]
type=DestroySelf
trigger1=helper(100),numtarget
ignorehitpause=1
;=========================================================================='
;ReversalStateCheck
[Statedef 900002]
[State 0]
type = BindToRoot
trigger1 = 1
pos = 0,-10
ignorehitpause = 1
[State movetype?]
type=StateTypeSet
trigger1=1
movetype=A
ignorehitpause=1
[State ReversalDefCheck]
type=HitDef
trigger1=1
attr=S,NA
hitflag=
guardflag=
priority=1,Hit
sparkno=-1
guard.dist=0
affectteam=B
numhits=0
pausetime=0,0
[State Anim]
type=ChangeAnim
trigger1=1
value=900000
ignorehitpause=1
;=========================================================================='
;Marking
[Statedef 920000]
[State 0]
type = PosSet
trigger1 = 1
x = 0
y = 0
ignorehitpause = 1
[State movetype?]
type=StateTypeSet
trigger1=!numtarget
movetype=A
ignorehitpause=1
[State movetype?]
type=StateTypeSet
trigger1=numtarget
movetype=I
ignorehitpause=1
[State Marking]
type=HitDef
triggerall=enemy,name!="Madness Donald"
triggerall=roundstate=2
trigger1=!numtarget
trigger1=gametime%4<2
attr=,NA
hitflag=MAFDP
guardflag=
priority=1,Hit
sparkno=-1
guard.dist=0
numhits=0
pausetime=0,0
[State KeepTarget]
type=ReversalDef
triggerall=roundstate=2
trigger1=numtarget
trigger2=gametime%4>=2
trigger3=enemy,name="Madness Donald"
reversal.attr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime=0,0
sparkno=-1
hitsound=-1
numhits=0
ignorehitpause=1
[State Drain]
type = TargetLifeAdd
triggerall = numtarget
trigger1 = root,stateno=2000||root,stateno=2100||root,numhelper(8888)||numhelper(121000)
trigger2 = enemy,name="Madness Donald"
value = -999999999999999999999999999
ID = -1
absolute = 1
ignorehitpause = 1
[State 0, TargetState]
type = TargetState
triggerall = numtarget
trigger1 = root,stateno=2100||root,stateno=2300||root,numhelper(8888)||numhelper(121000)
value = 5150
ID = -1
ignorehitpause = 1
[State 0, TargetDrop]
type = TargetDrop
trigger1 = target,ishelper
ignorehitpause = 1
[State Anim]
type=ChangeAnim
trigger1=1
value=920000
ignorehitpause=1
;=========================================================================='
;KonsenStateDummy
[Statedef 920001]
movetype=I
[State 0]
type = PosSet
trigger1 = 1
x = 0
y = -10
ignorehitpause = 1
[State movetype?]
type=StateTypeSet
trigger1=1
movetype=I
ignorehitpause=1
[State Anim]
type=ChangeAnim
trigger1=1
value=920001
ignorehitpause=1
[State dont get targeted]
type = NotHitBy
trigger1 = roundstate=0
trigger2 = gethitvar(damage)
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 2
ignorehitpause = 1
;=========================================================================='
;TargetHitDef
[Statedef 920002]
[State 0]
type = PosSet
trigger1 = 1
x = enemy,pos x
y = enemy,pos y-10
ignorehitpause = 1
[State movetype?]
type=StateTypeSet
trigger1=1
movetype=A
ignorehitpause=1
[State HitDef]
type=HitDef
trigger1=gametime%15=1
attr=,NA
hitflag=MAFDP
guardflag=
priority=1,Hit
sparkno=-1
guard.dist=0
numhits=0
pausetime=0,0
damage=255,255
[State Drain]
type = TargetLifeAdd
trigger1 = numtarget
value = -2147483647
ID = -1
absolute = 1
ignorehitpause = 1
[State 0, TargetDrop]
type = TargetDrop
trigger1 = target,ishelper
ignorehitpause = 1
[State Anim]
type=ChangeAnim
trigger1=1
value=920000
ignorehitpause=1
;=========================================================================='
;NullReversal
[Statedef 920003]
[State 0]
type = PosSet
trigger1 = 1
x = enemy,pos x
y = enemy,pos y
ignorehitpause = 1
[State movetype?]
type=StateTypeSet
trigger1=1
movetype=A
ignorehitpause=1
[State NullReverse]
type=ReversalDef
trigger1=1
reversal.attr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime=0,4
sparkno=-1
hitsound=-1
numhits=0
p2stateno=1500000000
ignorehitpause=1
[State 0, TargetDrop]
type = TargetDrop
trigger1 = target,ishelper
ignorehitpause = 1
[State Anim]
type=ChangeAnim
trigger1=1
value=920000
ignorehitpause=1