;-------------------------------------------------------------------------------
;othk
[Statedef 17000]
statetype=U
physics=N
movetype=U
ctrl = 1
anim = anim
hitdefpersist=(name="Dame Da Ne")

[state ]
type=statetypeset
triggerall = enemy,name= "Dame Da Ne"
trigger1=alive&&!ishelper
trigger1=hitpausetime<4
movetype=A
ignorehitpause=1
supermovetime = 2147483647
pausemovetime = 2147483647

[State ]
type = Projectile
triggerall = !(root,name = "LastStarman"||root,name = "Death Star")
triggerall = enemy,name= "Dame Da Ne"
trigger1 = ishelper
projanim = anim
projremove = 1
projremovetime = 1
affectteam = F
attr = A,HA
hitflag = MAFPD
P1stateno = prevstateno
supermovetime = 2147483647
pausemovetime = 2147483647

[State ]
type = Projectile
triggerall = root,name = "LastStarman"
triggerall = root,alive
trigger1 = ishelper
projanim = 201
projremove = 1
projremovetime = 1
affectteam = F
attr = A,HA
hitflag = MAFPD
sparkno = -1
P1stateno = ifelse(random%2,random*random,140)
supermovetime = 2147483647
pausemovetime = 2147483647

[State ]
type = Projectile
triggerall = root,name = "Death Star"
trigger1 = ishelper
projanim = 11400
projremove = 1
projremovetime = 1
affectteam = F
attr = A,HA
hitflag = MAFPD
sparkno = -1
P1stateno = 20022
supermovetime = 2147483647
pausemovetime = 2147483647

[State ]
type = ParentVarSet
triggerall = IsHelper
trigger1 = root,name = "Death Star"
var(11) = -2147483648
ignorehitpause = 1

[State ]
type = ParentVarSet
triggerall = IsHelper
trigger1 = root,name = "Death Star"
var(12) = -2147483648
ignorehitpause = 1

[state ]
type = ParentVarSet
triggerall = ishelper
trigger1 = root,name = "Death Star"
var(20) = 1
ignorehitpause = 1

[State 1000044]
type = changeanim2
triggerall = enemy,name= "Dame Da Ne"
trigger1 = !ishelper
value = 33000
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044]
type = changeanim2
triggerall = enemy,name= "Dame Da Ne"
trigger1 = ishelper
value = 33001
supermovetime = 2147483647
pausemovetime = 2147483647

[state 1000043]
type = hitdef
triggerall = enemy,name= "Dame Da Ne"
trigger1 = !ishelper
attr = SCA,NA,SA,HA,NT,ST,HT,NP,SP,HP,AP
hitflag = MAFD
pausetime = 0,0
damage = 0,0
sparkno = -1
givepower = 0,0
getpower = 0,0
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044, LifeSet]
type = LifeSet
triggerall = enemy,name= "Dame Da Ne"
trigger1 = !ishelper
value = 0
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0, LifeAdd]
type = LifeAdd
triggerall = enemy,name= "Dame Da Ne"
trigger1 = !ishelper
value = -99999999999
kill = 1
absolute = 1
ignorehitpause = 1
persistent = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044, 2]
type = VelSet
triggerall = enemy,name= "Dame Da Ne"
trigger1 = ishelper
x = 0
y = 0
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044, 2]
type = PosSet
triggerall = name!= "Dame Da Ne"
trigger1 = !ishelper
x = 0
y = 999999999
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044, VarRangeSet]
type = VarRangeSet
triggerall = enemy,name= "Dame Da Ne"
trigger1 = ishelper
value = ifelse(random%2,1+random%123456789,1-random%123456789)
first = 0
last = 59
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044]
type = destroyself
triggerall = enemy,name= "Dame Da Ne"
trigger1 = ishelper
trigger1 = time > 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0, CtrlSet]
type = CtrlSet
triggerall = !ishelper
trigger1 = enemy,name= "Dame Da Ne"
value = 0
ignorehitpause = 1
persistent = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044]
type = SelfState
triggerall = !ishelper
trigger1 = name= "Dame Da Ne"
value = var(38)
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1000044]
type = Lifeset
triggerall = !ishelper
trigger1 = name= "Dame Da Ne"
value = lifemax
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0, SelfState]
type = SelfState
triggerall = enemy,name= "Dame Da Ne"
triggerall = !ishelper
trigger1 = !alive
trigger2 = life <= 1
trigger3 = loseko
value = 5150
ignorehitpause = 1
persistent = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0, SelfState]
type = SelfState
triggerall = !ishelper
trigger1 = alive && hitpausetime >= 4
trigger2 = alive && time >= 40
value = 1000044
ignorehitpause = 1
persistent = 1
supermovetime = 2147483647
pausemovetime = 2147483647
