[Statedef 4214]
type        = S
movetype    = I
physics     = N
ctrl        = 1
anim        = 1
velset      = 0,0
sprpriority = 1

[state 4214]
type = nothitby
trigger1 = time <= 50
trigger2 = Life = 1
value= SCA
time = time%1 = 0

[state 4214]
type = BindToRoot
trigger1 = 1
time = -1
facing = 1
pos = 0, 0
ignorehitpause=1

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

[State 4214]
type = ChangeAnim
trigger1 = anim != 1
value = 1

[state 4214]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause=1

[State 4214]
type = Turn
trigger1 = Facing != parent,Facing
ignorehitpause = 1

[State 4214]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 4214
time = -1

;---------------------------------------------------------------------------
[StateDef 2001]
type = S
movetype= H
physics = N
anim = 2001

[State 2001]
Type = Posset
Trigger1 = 1
x = Root,Pos X  
y = 9999999999999999999999
ignorehitpause = 1

[State 2001]
type = Assertspecial
trigger1 = 1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 2001]
type = nothitby
trigger1 =p1name!="ignis"
value = SCA
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 2001]
type=nothitby
trigger1 = roundstate = 2
trigger1 = ishelper(2001)
trigger1 = numhelper(2001)<1
trigger2 = roundstate = 1
trigger2 = ishelper(2001)
trigger2 = numhelper(2001)<6
value= SCA

[State 2001]
type = HitBy
trigger1 = roundstate = 2
trigger1 = ishelper(2001)
trigger1 = numhelper(2001)>=1
trigger2 = roundstate = 0
trigger2 = ishelper(2001)
trigger2 = numhelper(2001)>=6
value = SCA,NA

[State 2001]
type = DestroySelf
trigger1 = Root,StateNo != 2000
trigger1 = Root,StateNo != 2010
trigger1 = roundstate >= 2
trigger2 = numhelper(2002) > 0
trigger2 = helper(2002),numtarget >=1
trigger2 = roundstate >= 2
trigger3 = numhelper(2002) > 0
trigger3 = helper(2002),numtarget = 6
trigger3 = roundstate = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
[StateDef 2002]
type = A
movetype = I
physics = N
anim = 2002

[State 2002]
type = ReversalDef
trigger1 = ishelper(2002)
trigger1 = numtarget>0
reversal.attr = SCA,AA,AT,AP
priority = 999999999999999999999999999
pausetime = 0,0
sparkno = -1
hitsound = -1
ignorehitpause = 1

[State 2002]
type = nothitby
trigger1 = ishelper(2002)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State 2002]
Type = Posset
Trigger1 = 1
x = Root,Pos X  
y = 9999999999999999999999
ignorehitpause = 1

[State 2002]
type = AssertSpecial
trigger1 = ishelper(2002)
flag = invisible
flag2 = noshadow

[State 2002]
type = Helper
triggerall = numhelper(2001)<1
trigger1 = helper(2002),numtarget<1
name = "t"
stateno = 2001
ID = 2001
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 2002]
type=changeanim
trigger1 = ishelper(2002)
trigger1 = numtarget = 0
trigger1 = numhelper(2001)>0
value= 2002

[State 2002]
type=statetypeset
trigger1 = ishelper(2002)
trigger1 = numtarget=0
trigger1 = numhelper(2001)>0
type = A
movetype = A
physics  = N

[State 2002]
type = hitdef
trigger1 = ishelper(2002)
trigger1 = numtarget=0
trigger1 = numhelper(2001)=1
trigger1 = roundstate = 2
trigger2 = ishelper(2002)
trigger2 = numtarget < 3
trigger2 = roundstate = 1
attr = ,NA
damage = 0,0
numhits = 0
guardflag = 
hitflag = MAFDP
priority = 7, Hit
pausetime = 0,10
sparkno = 9999
guard.sparkno = 9999
animtype = hard
sparkxy = 9999,-9999
getpower = 0
givepower = -1
hitsound = -1
guardsound = -1
ground.type = high 
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = 0,0
airguard.velocity = 0,0
air.type = Low
air.velocity = 0,0
air.hittime = 5
fall = 0
ignorehitpause = 1
affectteam = F 

[State 2002]
type = TargetState
triggerall = target,ishelper
triggerall = numtarget>0
trigger1 = numhelper(2001)=0
trigger1 = enemy,name != "G Orochi"
trigger1 = enemy,name != "Devils eye"
trigger1 = enemy,name != "Zero Nightmare"
trigger1 = enemy,name != "UNKNOWN"
trigger1 = enemy,name != "Death Star"
trigger1 = enemy,name != "G Mizuchi"
trigger1 = enemy,name != "many"
trigger1 = Root,StateNo = 2000
value = 4444
ignorehitpause = 1

[State 2002]
type = TargetState
triggerall = target,ishelper
triggerall = numtarget>0
trigger1 = Root,StateNo = 2010
trigger1 = numhelper(2001)=0
trigger1 = enemy,name != "Devils eye"
trigger1 = enemy,name != "Zero Nightmare"
trigger1 = enemy,name != "G Orochi"
trigger1 = enemy,name != "UNKNOWN"
trigger1 = enemy,name != "Death Star"
trigger1 = enemy,name != "G Mizuchi"
trigger1 = enemy,name != "Chu-goku"
trigger1 = enemy,name != "Poltergeist"
trigger1 = enemy,name != "many"
value = 4445
ignorehitpause = 1

[State 2002]
type = TargetState
triggerall = target,ishelper
triggerall = numtarget>0
triggerall = numhelper(2001)=0
trigger1 = enemy,name = "Devils eye"
trigger2 = enemy,name = "many"
value = 22101
ignorehitpause = 1

[State 2002]
type = TargetState
triggerall = target,ishelper
triggerall = numtarget>0
trigger1 = numhelper(2001)=0
trigger1 = enemy,name = "Zero Nightmare"
value = 1000
ignorehitpause = 1

[State 2002]
type = TargetState
triggerall = target,ishelper
triggerall = numtarget>0
triggerall = numhelper(2001)=0
trigger1 = enemy,name = "G Orochi"
trigger2 = enemy,name = "UNKNOWN"
trigger3 = enemy,name = "Death Star"
trigger4 = enemy,name = "G Mizuchi"
value = 44444
ignorehitpause = 1

[State 2002]
type=changeanim
triggerall = ishelper(2002)
trigger1 = roundstate = 2
trigger1 = numtarget=1 
trigger2 = roundstate = 1
trigger2 = numtarget=6
value= 99999

[State 2002]
type=statetypeset
triggerall = ishelper(2002)
trigger1 = roundstate = 2
trigger1 = numtarget=1 
trigger2 = roundstate = 1
trigger2 = numtarget=6
type     = A
movetype = I
physics  = N
;---------------------------------------------------------------------------

[StateDef 2003]
type = A
movetype= I
physics = N
anim = 2001

[State 2003]
Type = Posset
Trigger1 = 1
x = Root,Pos X  
y = 5000000
ignorehitpause = 1

[State 2003]
type = Assertspecial
trigger1 = 1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 2003]
type = HitBy
trigger1 = 1
value = C,HP

[State 2003]
type = DestroySelf
trigger1 = !ishelper
ignorehitpause = 1
;---------------------------------------------------------------------------
[StateDef 4444]
type = S
movetype= H
physics = N

[State 4444]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 4444]
type = Projectile
triggerall = Ishelper
triggerall = enemy,stateno !=5150
triggerall = enemy,stateno !=110
triggerall = enemy,stateno !=2006
trigger1 = Root,Alive
attr = C,HP
projid = 4444
projanim = 200
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 30
postype = p2
offset = 0,5000000
pausetime = 0,2
p1stateno = 110 
pausemovetime = 99999999
supermovetime = 99999999 
ignorehitpause = 1

[State 4444]
type = DestroySelf
triggerall = roundstate = 2
trigger1 = !root,alive
trigger2 = enemy,stateno != 2000
ignorehitpause = 1

;---------------------------------------------------------------------------
[StateDef 4445]
type = S
movetype= H
physics = N

[State 4445]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 4445]
type = Projectile
trigger1 = Ishelper
triggerall = enemy,stateno !=5150
triggerall = enemy,stateno !=5110
trigger1 = Root,Alive
attr = C,HP
projid = 4444
projanim = 200
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 30
postype = p2
offset = 0,5000000
pausetime = 0,2
p1stateno = 110 + 5000 * (random % 2 || !root,alive)
pausemovetime = 99999999
supermovetime = 99999999 
ignorehitpause = 1

[State 4445]
type = DestroySelf
triggerall = roundstate = 2
trigger1 = !root,alive
trigger2 = enemy,stateno != 2010
ignorehitpause = 1
;---------------------------------------------------------------------------
[Statedef 22101]
type = S
movetype= I
physics = N

[State 22101]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 22101]
type = parentvarset
trigger1=name!="ignis"
trigger1=var(55):=(gametime+123456789)+1||1
var(55)=(gametime+123456789)+1
ignorehitpause = 1

[State 22101]
type = parentvarset
trigger1=name="many"
fvar(26)=9999
ignorehitpause = 1

[State 22101]
type = parentvarset
trigger1=name="many"
fvar(32)=1
ignorehitpause = 1

[State 22101]
type = Projectile
trigger1 = Ishelper
trigger1 = Name = "Devils eye"
trigger1 = Root,Alive
attr = C,HP
projid = 512
projanim = 23640
projhits = 999
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 30
postype = p2
offset = 0,5000000
pausetime = 0,10
p1stateno = 30201
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[state 22101]
type = helper

trigger1 = Ishelper

trigger1 = Name = "many"
name = "Helper"

id = 6400000

helpertype = normal
pos = 50,0
postype = p1
stateno = 1380
supermove = 1
ignorehitpause = 1

[State 2001]
type = HitBy
trigger1 = Name = "many"
value = C,HP

[State 22101]
type = Projectile
trigger1 = Ishelper
trigger1 = Name = "many"
trigger1 = Root,Alive
attr = C,HP
projid = 512
projanim = 40010
damage = 1
projhits = 99999
projmisstime = 0
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 30
postype = p1
offset = 0,0
pausetime = 0,0
;p1stateno = 0
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1
affectteam = F 

[State 22101]
type = DestroySelf
trigger1 = !root,alive
ignorehitpause = 1
;---------------------------------------------------------------------------
[Statedef 1000]
type = S
movetype= H
physics = N

[State 1000]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[state 1000]
type = varset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "Zero Nightmare"
var(1) = -1000
ignorehitpause = 1

[state 1000]
type = varset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "Zero Nightmare"
var(10) = 10000
ignorehitpause = 1

[state 1000]
type = varset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "Zero Nightmare"
var(11) = -10000
ignorehitpause = 1

[State 1000]
type = DestroySelf
trigger1 = !root,alive
ignorehitpause = 1
;---------------------------------------------------------------------------
[StateDef 44444]
type = S
movetype= H
physics = N

[State 44444]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 44444]
type = Projectile
trigger1 = Ishelper
trigger1 = Name = "G Orochi"
trigger1 = Root,Alive
attr = C,HP
projid = 4445
projanim = 22060 
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 30
postype = p2
offset = 0,5000000
pausetime = 0,0
p1stateno = 169995
pausemovetime = 99999999
supermovetime = 99999999 
ignorehitpause = 1

[State 44444]
type = Projectile
trigger1 = Ishelper
trigger1 = Name = "UNKNOWN"
trigger1 = Root,Alive
attr = C,HP
projid = 4448
projanim = 1050
projhits=999
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 5000
postype = p2
offset = 0,5000000
pausetime = 0,10
p1stateno = 832
pausemovetime = 99999999
supermovetime = 99999999 
ignorehitpause = 1

[state 44444]
type = Parentvarset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "UNKNOWN"
var(35) = 9999

[State 44444]
type = Projectile
trigger1 = Ishelper
trigger1 = Name = "Death Star"
trigger1 = Root,Alive
attr = C,HP
projid = 4448
projanim = 10100
projhits=999
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 5000
postype = p2
offset = 0,5000000
pausetime = 0,10
p1stateno = 20022
pausemovetime = 99999999
supermovetime = 99999999 
ignorehitpause = 1

[state 44444]
type = Parentvarset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "Death Star"
var(11) = -999999

[state 44444]
type = Parentvarset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "Death Star"
var(12) = -9999999999999

[state 44444]
type = Parentvarset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "Death Star"
var(14) = 0

[State 44444]
type = Projectile
trigger1 = Ishelper
trigger1 = Name = "G Mizuchi"
trigger1 = Root,Alive
attr = C,HP
projid = 4445
projanim = 200
projpriority = 7
projremove = 0
sparkno = -1
hitsound   = -1
projremovetime = 30
postype = p2
offset = 0,5000000
pausetime = 0,0
p1stateno = 169996
pausemovetime = 99999999
supermovetime = 99999999 
ignorehitpause = 1

[state 44444]
type = Parentvarset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "G Mizuchi"
var(41) = -999999
ignorehitpause = 1

[state 44444]
type = Parentvarset
triggerall = ishelper
triggerall = root,alive
trigger1 = Name = "G Mizuchi"
var(57) = -9999
ignorehitpause = 1

[State 44444]
type = DestroySelf
trigger1 = !root,alive
ignorehitpause = 1
;---------------------------------------------------------------------------
[Statedef 5001]
type    = S
movetype= I
physics = N
anim = 2001

[State 5001]
type = Changestate
trigger1 = !ishelper
value = 0
ctrl = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 5001]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 5001]
type = hitby
trigger1 = 1
value = A,NP
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 5001]
type = DestroySelf
trigger1 = time>0
trigger1 = roundstate != 2
trigger1 = enemy(0),numprojid(1007)=0
trigger1 = enemy(1),numprojid(1007)=0
trigger1 = enemy(0),stateno!=5152
trigger1 = enemy(1),stateno!=5152
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999
;---------------------------------------------------------------------------
[StateDef 99999]
type = A
movetype= I
physics = N
anim = 99999

[State 2003]
Type = Posset
Trigger1 = 1
x = Root,Pos X  
y = 5000000000000
ignorehitpause = 1

[State 2003]
type = Assertspecial
trigger1 = 1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 2003]
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State 2003]
type = DestroySelf
trigger1 = roundstate >= 2
ignorehitpause = 1
;---------------------------------------------------------------------------