[Data]
life = 999999    ; DO NOT CHANGE THIS VALUE! INSTEAD, USE THE SETTING IN THE SYSTEM.CNS FILE TO CHANGE MAXIMUM LIFE!
attack = 100
defence = 100
power = 9999
fall.defence_up = 50
liedown.time = 25
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 100
IntPersistIndex = 48
FloatPersistIndex = 39

[Size]
xscale = 0.5           ;Horizontal scaling factor.
yscale = 0.5           ;Vertical scaling factor.
ground.back = 16     ;Player width (back, ground)
ground.front = 16    ;Player width (front, ground)
air.back = 16        ;Player width (back, air)
air.front = 16       ;Player width (front, air)
height = 75          ;Height of player (for opponent to jump over)
attack.dist = 90    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = -5, -70   ;Approximate position of head
mid.pos = -5, -50    ;Approximate position of midsection
shadowoffset = 0     ;Number of pixels to vertically offset the shadow
draw.offset = 0,0    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.4      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 4.6, 0    ;Run forward (x, y)
run.back = -4.5,-3.8 ;Hop backward (x, y)
jump.neu = 0,-7.4    ;Neutral jumping velocity (x, y)
jump.back = -2.0    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;Jump forward Speed (x, y)
runjump.back = -4.55,-6.9 ;Running jump speeds (opt)
runjump.fwd = 4,-6.9      ;.
airjump.neu = 0,-6.9      ;.
airjump.back = -4.55      ;Air jump speeds (opt)
airjump.fwd = 4.5         ;.

[Movement]
airjump.num = 1      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .28         ;Vertical acceleration
stand.friction = .89  ;Friction coefficient when standing
crouch.friction = .86 ;Friction coefficient when crouching

[Statedef 190]

[State 190]
Type=PLaysnd
Trigger1=time=0
value=S1,1

[State 190]
Type=PLaysnd
Trigger1=time=0
value=S11,0

[State 190]
Type=VarSet
Trigger1=Command="Debug"
Trigger1=!IsHelper
var(0)=1

[State 190]
Type=ParentVarSet
Trigger1=Command="Debug"
Trigger1=IsHelper(1)
var(0)=1

;Run FWD
[Statedef 100]
Type    = S
Physics = N
Anim    = 100
Ctrl    = 0
VelSet  = 0,0
SprPriority = 1

[State 100]
Type=NotHitBy
Trigger1=1
value=,NP,SP

[State 100]
Type = VelSet
Trigger1 = Time = 6
X = Const(Velocity.Run.Fwd.X)

[State 100]
Type = AssertSpecial
Trigger1 = 1
Flag = NoWalk
Flag2 = NoAutoTurn

[State 100]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,25
PalMul = .5,.5,.5

[State 3560, Effect]
type = Explod
trigger1 = time = 0
anim = 109
scale = 0.5,0.5
postype = p1
pos = 0,-45
sprpriority = 4
ownpal = 1
removeongethit = 1
facing = 1

[State 100]
Type = PlaySnd
Trigger1 = Time = 0
Value = s0,3

[State 100]
Type = ChangeState
Triggerall = Time > 5
Trigger1 = var(59)=0
Trigger1 = command = "holdup"
Trigger2 = var(59)>0
Trigger2 = abs(P2Dist Y)>40
Value = 40

[State 100, 3]
type = ChangeState
trigger1 = Command !="holdfwd"
trigger1 = var(59)=0
trigger2 = P2BodyDist X<30
trigger2 = var(59)=1
trigger3 = time>60
trigger3 = var(59)=1
trigger4 = roundstate>2
value = 0
ctrl=1

; Run Back
[Statedef 105]
Type    = A
Physics = N
Anim    = 105
Ctrl    = 0
VelSet  = 0,0
SprPriority = 1

[State 100]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,25
PalMul = .5,.5,.5

[State 105, 1]
type = VelSet
trigger1 = time=0
x = const(velocity.run.back.x)
y = -4

[State 105, 1]
type = VelAdd
trigger1 = 1
y = const(movement.yaccel)

[State 100]
Type=NotHitBy
Trigger1=1
value=,NP,SP

[State 100]
Type = AssertSpecial
Trigger1 = 1
Flag = NoWalk
Flag2 = NoAutoTurn

[State 3560, Effect]
type = Explod
trigger1 = time = 0
anim = 109
scale = 0.5,0.5
postype = p1
pos = 0,-30
sprpriority = 4
ownpal = 1
removeongethit = 1
facing = -1

[State 100]
Type = PlaySnd
Trigger1 = Time = 0
Value = s0,3

[State 100]
Type = ChangeState
Triggerall = Time > 5
Trigger1 = var(59)=0
Trigger1 = command = "holdup"
Trigger2 = var(59)>0
Trigger2 = abs(P2Dist Y)>40
Value = 40

[State 100, 3]
type = ChangeState
trigger1 = Command !="holdback"
trigger1 = var(59)=0
trigger2 = BackEdgeDist<30
trigger2 = var(59)=1
trigger3 = time>60
trigger3 = var(59)=1
trigger4 = roundstate>2
trigger5 = pos Y>=0
trigger5 = vel y>=0
value = 50
ctrl=1

; Air Run FWD
[Statedef 110]
type = A
ctrl = 1
physics = N
anim = 110
velset = 0,0

[State 100]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,25
PalMul = .5,.5,.5

[State 650, 1]
type = VarAdd
trigger1 = Time = 0
var(1) = 1

[State 3560, Effect]
type = Explod
trigger1 = time = 0
anim = 109
scale = 0.5,0.5
postype = p1
pos = 0,-45
sprpriority = 4
ownpal = 1
removeongethit = 1
facing = 1

[State 100]
Type=NotHitBy
Trigger1=1
value=,NP,SP

[State 110]
type = PlaySnd
trigger1 = time = 0
value = s0,3

[State 115]
type = velset
trigger1 = time = 0
x = 6

[State 100, 3]
type = ChangeState
trigger1 = Command !="holdfwd"
trigger1 = var(59)=0
trigger2 = P2BodyDist X<30
trigger2 = var(59)=1
trigger3 = time>60
trigger3 = var(59)=1
trigger4 = roundstate>2
value = 51
ctrl=1

; Air Run Back
[Statedef 115]
type = A
ctrl = 1
physics = N
anim = 115
velset = 0,0

[State 100]
Type=NotHitBy
Trigger1=1
value=,NP,SP

[State 650, 1]
type = VarAdd
trigger1 = Time = 0
var(1) = 1

[State 100]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,25
PalMul = .5,.5,.5

[State 3560, Effect]
type = Explod
trigger1 = time = 0
anim = 109
scale = 0.5,0.5
postype = p1
pos = 0,-45
sprpriority = 4
ownpal = 1
removeongethit = 1
facing = -1

[State 110]
type = PlaySnd
trigger1 = time = 0
value = s0,3

[State 115]
type = velset
trigger1 = time = 0
x = -5

[State 115]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

[Statedef 200]
type    = U
movetype= A
physics = U
juggle  = 3
ctrl = 0
anim = 200+10*(StateType=C)+40*(StateType=A)
facep2=1
poweradd=30

[State 1080]
Type=StateTypeSet
Trigger1=StateType=A
Physics=A

[State 1080]
Type=StateTypeSet
Trigger1=StateType=S
Physics=S

[State 1080]
Type=StateTypeSet
Trigger1=StateType=C
Physics=C

[State 1090]
Type=Turn
Trigger1=P2Dist X<0

[State 1080]
Type=VelSet
Trigger1=StateType!=A
Trigger2=var(1)>=100
Y=0

[State 1090]
Type=VelSet
Trigger1=StateType=A
Trigger1=var(1)<100
Y=0.7*vel Y

[State 251]
Type = HitDef
Trigger1 = time = 1
Attr              = A, NA
Damage            = 24
GetPower          = 50,10
Givepower	  = -18,0
AnimType          = Hard
HitFlag           = MA
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,-49
hitsound = S1,5
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
;ground.velocity = -4.0,0
;guard.velocity = -3.0
;air.velocity = -4.0,ifelse(enemy,Vel Y <= 0 ,-3.5,-1.8)
;airguard.velocity = -3,0
;ground.cornerpush.veloff = -4.1
;guard.cornerpush.veloff = -4.8
;air.cornerpush.veloff = -4.1
Air.Type          = Low
fall=var(48)>7
fall.recover=0
ID=200

[State 200]
Type=VarAdd
Trigger1=MoveContact
var(49)=1
persistent=0

[State 200]
Type=VarAdd
Trigger1=MoveContact
var(48)=1
persistent=0

[State 2700,Spark]
Type=Helper
Trigger1=NumTarget(200)>0
Trigger1=MoveHit
Stateno=6000
ID=200
Name="Hitspark"
Pos = 35,-49
PosType=P1
ownpal=1

[State 200]
Type=TargetDrop
Trigger1=NumTarget(200)>0

[State 1005, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1

[Statedef 201]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 201
facep2=1
poweradd=60

[State 251]
Type = HitDef
Trigger1 = time = 1
Attr              = S, NA
Damage            = 38
GetPower          = 80,0
Givepower	  = -24,0
AnimType          = Hard
HitFlag           = MA
GuardFlag         = LA
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,-29
hitsound = S201,1
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
;ground.velocity = -4.0,0
;guard.velocity = -3.0
;air.velocity = -4.0,ifelse(enemy,Vel Y <= 0 ,-3.5,-1.8)
;airguard.velocity = -3,0
;ground.cornerpush.veloff = -4.1
;guard.cornerpush.veloff = -4.8
;air.cornerpush.veloff = -4.1
Air.Type          = Low
ID=201
fall=var(48)>7
fall.recover=0

[State 200]
Type=VarAdd
Trigger1=MoveContact
var(49)=1
persistent=0

[State 200]
Type=VarAdd
Trigger1=MoveContact
var(48)=2
persistent=0

[State -2]
Type = Explod
Trigger1 = NumTarget(201)>0
Trigger1 = ! MoveGuarded
anim= 20005
ID = 201
Name = "HitSpark"
Pos = 35,-29
Sprpriority=2
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
scale = 0.3,0.3
;trans=add

[State 200]
Type=TargetDrop
Trigger1=NumTarget(201)>0

[State 1005, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 202]
type    = U
movetype= A
physics = U
juggle  = 3
ctrl = 0
anim = 202+10*(StateType=C)+40*(StateType=A)
facep2=1
poweradd=80

[State 1080]
Type=StateTypeSet
Trigger1=StateType=A
Physics=A

[State 1080]
Type=StateTypeSet
Trigger1=StateType=S
Physics=S

[State 1080]
Type=StateTypeSet
Trigger1=StateType=C
Physics=C

[State 1090]
Type=Turn
Trigger1=P2Dist X<0

[State 1080]
Type=VelSet
Trigger1=StateType!=A
Trigger2=var(1)>=100
Y=0

[State 1090]
Type=VelSet
Trigger1=StateType=A
Trigger1=var(1)<100
Y=0.7*vel Y

[State 251]
Type = HitDef
Trigger1 = time = 1
Attr              = A, NA
Damage            = 63
GetPower          = 90,0
Givepower	  = -32,0
AnimType          = Hard
HitFlag           = MA
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,-44
hitsound = S1,5
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
ground.velocity = -4.0,0
guard.velocity = -3.0
air.velocity = -4.0,ifelse(enemy,Vel Y <= 0 ,-3.5,-1.8)
airguard.velocity = -3,0
ground.cornerpush.veloff = -4.1
guard.cornerpush.veloff = -4.8
air.cornerpush.veloff = -4.1
Air.Type          = Low
ID=202
fall=var(48)>7
fall.recover=0

[State 200]
Type=VarAdd
Trigger1=MoveContact
var(49)=2
persistent=0

[State 2700,Spark]
Type=Helper
Trigger1=NumTarget(202)>0
Trigger1=MoveHit
Stateno=6000
ID=202
Name="Hitspark"
Pos = 40,-44
PosType=P1
ownpal=1

[State 200]
Type=TargetDrop
Trigger1=NumTarget(202)>0

[State 1005, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1

[Statedef 300]
Type=A
MoveType=A
Physics=N
velset=0,0
ctrl=0
anim=300
poweradd = 100

[State 300]
Type=StateTypeSet
Trigger1=Pos Y>=0
StateType=S

[State 2700,Spark]
Type=Helper
Trigger1=time=0
Stateno=310
ID=300
Name="AttackEffect"
Pos = 0,0
PosType=P1
ownpal=1

[State 300]
Type=NotHitBY
Trigger1=PrevStateno=[120,160]
value=,NA,SA,NT

[State 300]
Type=VarAdd
Trigger1=1
var(16)=2+2*(PrevStateno=[120,160])

[State 251]
Type = HitDef
Trigger1 = time >=20
Trigger1 = time %10 = 0
Attr              = A, NA
Damage            = 27
GetPower          = 50
Givepower	  = -15,0
AnimType          = DiagUp
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,-49
fall = 1
hitsound = S1,5
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
ground.velocity = -0.55,-5.0
guard.velocity = -4
air.velocity = -0.55,-5.0
airguard.velocity = -4,0
ground.cornerpush.veloff = -3.8
guard.cornerpush.veloff = -3.8
air.cornerpush.veloff = -3.8
Air.Type = Low
ID=300

[State 200]
Type=VarAdd
Trigger1=MoveContact
var(49)=2
persistent=0

[State 200]
type = PlaySnd
trigger1 = time %20 = 0
value=300,0

[State 2700,Spark]
Type=Helper
Trigger1=NumTarget(300)>0
Trigger1=(MoveHit>0)
Stateno=6000
ID=202
Name="Hitspark"
Pos = random %10-5+Ceil(target(300),Pos X - Pos X)*Facing,Ceil(target(300),Pos Y - Pos Y)-25
PosType=P1
ownpal=1

[State 200]
Type=TargetDrop
Trigger1=NumTarget(300)>0

[State 1005, 5]
type = ChangeState
triggerall = Time>=40
trigger1 = var(59)=0
trigger1 = command!="holdc"
trigger2 = var(59)>0
trigger2 = abs(P2Bodydist X)>60
trigger4 = var(59)>0
trigger4 = var(16)>=980
trigger5 = var(59)>0
trigger5 = enemy, Pos Y>Pos Y+10
trigger3 = var(16)>1010
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1

; Data Fragment
[Statedef 500]
type    = U
movetype= A
physics = U
juggle  = 3
ctrl = 0
anim = 200+10*(StateType=C)+40*(StateType=A)
facep2=1
poweradd=18

[State 1080]
Type=StateTypeSet
Trigger1=StateType=A
Physics=A

[State 1080]
Type=StateTypeSet
Trigger1=StateType=S
Physics=S

[State 1080]
Type=StateTypeSet
Trigger1=StateType=C
Physics=C

[State 1090]
Type=Turn
Trigger1=P2Dist X<0

[State 1080]
Type=VelSet
Trigger1=StateType!=A
Trigger2=var(1)>=100
Y=0

[State 1090]
Type=VelSet
Trigger1=StateType=A
Trigger1=var(1)<100
Y=0.7*vel Y

[State 1030]
Type=VarAdd
Trigger1=time=0
var(16)=45

[State 200]
type = Helper
trigger1 = AnimElem= 3
ID = 501
pos = 30,-50
postype = p1
stateno = 501
helpertype = normal
name = "DataFragment"
sprpriority = 2
keyctrl = 0
ownpal = 1

[State 200]
type = PlaySnd
trigger1 = AnimElem= 3
value=S500,1

[State 200 , 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1

[Statedef 501]
anim=501
movetype=A
type=A
physics=N
velset=7,0

[State 501]
Type=VarSet
Trigger1=1
var(9)=0

[State 251]
Type = HitDef
Trigger1 = 1
Attr              = A, NP
Damage            = 9
GetPower          = 27,10
Givepower	  = -6,0
AnimType          = Hard
HitFlag           = MA
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,0
hitsound = S1,5
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
Air.Type          = Low
ID=501

[State 200]
Type=ParentVarAdd
Trigger1=MoveContact
var(49)=1
persistent=0

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 501]
Type=ChangeState
Trigger1=MoveContact
Trigger2=Frontedgedist<-30
value=6000

[State 501]
Type=ChangeState
Trigger1=Time>0
value=502

[Statedef 502]

[State 162]
type = Explod
trigger1 = 1
anim = 750+random %41
postype = p1
pos = random %25-12,random %25-12
vel = 7+0.5*(random %7-3),0.5*(random %7-3)
removetime=6
bindtime=1
sprpriority = 5
ownpal = 1
ID=502
scale=0.5,0.5

[State 502]
Type=VarAdd
Trigger1=1
var(9)=1

[State 502]
Type=ChangeState
Trigger1=1
value=502-(var(9)>=10)


; Data Block
[Statedef 510]
type    = U
movetype= A
physics = U
juggle  = 3
ctrl = 0
anim = 202+10*(StateType=C)+40*(StateType=A)
facep2=1
poweradd=75

[State 1080]
Type=StateTypeSet
Trigger1=StateType=A
Physics=A

[State 1080]
Type=StateTypeSet
Trigger1=StateType=S
Physics=S

[State 1080]
Type=StateTypeSet
Trigger1=StateType=C
Physics=C

[State 1090]
Type=Turn
Trigger1=P2Dist X<0

[State 1080]
Type=VelSet
Trigger1=StateType!=A
Trigger2=var(1)>=100
Y=0

[State 1090]
Type=VelSet
Trigger1=StateType=A
Trigger1=var(1)<100
Y=0.7*vel Y

[State 1030]
Type=VarAdd
Trigger1=time=0
var(16)=220

[State 200]
type = Helper
trigger1 = AnimElem= 3
ID = 511
pos = 40,-50
postype = p1
stateno = 511
helpertype = normal
name = "DataBlock"
sprpriority = 2
keyctrl = 0
ownpal = 1

[State 200]
type = PlaySnd
trigger1 = AnimElem= 3
value=S510,0

[State 200 , 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1

[Statedef 511]
anim=501
movetype=A
type=A
physics=N

;[State 511]
;Type=VarAdd
;Trigger1=1
;var(15)=3

;[State 511]
;Type=VarAdd
;Trigger1=1
;var(16)=-5

;[State 511]
;Type=VarAdd
;Trigger1=1
;var(17)=7

[State 511]
Type=VelAdd
Trigger1=1
X=IfElse(P2Dist X>0,0.05,-0.05)
Y=IfElse(P2Dist Y>40,0.05,-0.05)

[State 511]
Type=VelSet
Trigger1=1
X=0.99*vel X
Y=0.99*vel Y

[State 501]
Type=VarSet
Trigger1=1
var(9)=0

[State 502]
Type=VarAdd
Trigger1=1
var(10)=5

[State 251]
Type = HitDef
Trigger1 = 1
Attr              = A, NP
Damage            = 101,0
GetPower          = 150,0
Givepower	  = -18,100
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,0
hitsound = S510,1
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
Air.Type          = Low
ID=511

[State 610]
Type=Null;Assertspecial
Trigger1=Helper(1),stateNo=1101
Trigger2=Helper(1),stateNo=1201
Trigger3=Helper(1),stateNo=[1300,1305]
flag=invisible

[State 200]
Type=ParentVarAdd
Trigger1=MoveContact
var(49)=3
persistent=0

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 501]
Type=ChangeState
Trigger1=MoveContact
Trigger2=Helper(1),stateNo=1101
Trigger3=Helper(1),stateNo=1201
Trigger4=Helper(1),stateNo=[1300,1305]
value=6000

[State 501]
Type=ChangeState
Triggerall=Helper(1),stateNo!=1101
Triggerall=Helper(1),stateNo!=1201
Triggerall=Helper(1),stateNo!=[1300,1305]
Trigger1=Time>0
value=512

[Statedef 512]

[State 512]
Type=VarSet
Trigger1=1
;fvar(1)=IfElse(var(9) % 3=0,var(15),IfElse(var(9) % 3=1,var(16),var(17)))*pi/180
fvar(1)=(60*(var(9)%3-1))*pi/180

[State 512]
Type=VarSet
Trigger1=1
fvar(2)=(random %360)*pi/180

[State 512]
Type=VarSet
Trigger1=1
; A
fvar(3)= 34*sin(fvar(2))

[State 512]
Type=VarSet
Trigger1=1
; B
fvar(4)= 12*cos(fvar(2))

[State 512]
Type=VarSet
Trigger1=1
; alpha
fvar(5)= atan(fvar(3)/fvar(4))

[State 512]
Type=VarSet
Trigger1=fvar(3)<0
; alpha
fvar(5)= -fvar(5)

[State 162]
type = Explod
trigger1 = 1
anim = 700+random %2
postype = p1
pos = fvar(3)*cos(fvar(5)+fvar(1))/sin(fvar(5)),fvar(3)*sin(fvar(5)+fvar(1))/sin(fvar(5))
vel = 0,0
removetime=1
bindtime=1
sprpriority = 5
ownpal = 1
ID=502
scale=0.5,0.5

[State 502]
Type=VarAdd
Trigger1=1
var(9)=1

[State 502]
Type=ChangeState
Trigger1=1
value=512-(var(9)>=90)


; Teleport
[Statedef 550]
Type= A
Physics =N
MoveType= I
velset=0,0
ctrl=0

[State 550]
Type=ChangeAnim
Trigger1=anim=[20,21]
value=0

[State 1150]
Type=HitFallSet
Trigger1=1
value=0

[State 396]
Type=NotHitBy
Trigger1=time>3
Trigger2=Prevstateno=[120,160]
Trigger3=Prevstateno=5120
Value=SAC

[State 396]
Type=Trans
Trigger1=1
trans=AddAlpha
alpha=(256-12*time)*(time<=20)+(16+(time-20)*12)*(time>20),256-((256-12*time)*(time<=20)+(16+(time-20)*12)*(time>20))

[State 396]
Type=PlaySnd
Trigger1=time=1
Value=550,0

[State 396]
Type=PosAdd
Trigger1=time=20
X=(command="holdfwd"*300+command="holdback"*-300)*(var(59)=0)

[State 396]
Type=PosSet
Trigger1=time=20
Trigger1=(var(59)>0)
X=300*(Pos X<0)-300*(Pos X>0)

[State 396]
Type=Null;PosAdd
Trigger1=time=20
Trigger1=(var(59)>0)
X=(P2Dist X>180)*-300+(P2Dist X<-180)*300+(P2Dist X=[1,180])*300-300*(P2Dist X=[-180,0])

[State 396]
Type=ChangeAnim
Trigger1=time=20
value=300

[State 396]
Type=ChangeState
Trigger1=time>40
Value=50
ctrl=1

; Data Beam
[Statedef 520]
type    = U
movetype= A
physics = N
juggle  = 3
ctrl = 0
anim = 200+10*(StateType=C)+40*(StateType=A)
facep2=1
poweradd=60
velset = 0,0

[State 1090]
Type=NUll;Turn
Trigger1=P2Dist X<0

[State 1030]
Type=VarAdd
Trigger1=time=0
var(16)=280

[State 200]
type = Helper
trigger1 = AnimElem= 3
ID = 521
pos = 27,-50+10*(StateType=C)
postype = p1
stateno = 521
helpertype = normal
name = "Beam"
sprpriority = 2
keyctrl = 0
ownpal = 1
persistent=0
size.xscale=1
size.yscale=0.5

[State 521]
Type=ChangeAnim
Trigger1=NumHelper(521)>0
Trigger1=Helper(521),time <52
value=anim
elem=3

[State 200 , 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1

[Statedef 521]
Type=A
MoveType=A
anim=520
Physics=N
velset=0,0
sprpriority=5

[State 521]
Type=BindToParent
Trigger1=1
pos = 27,-50+10*(parent,StateType=C)

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 521]
Type=AttackDist
Trigger1=1
value=999

[State 521]
Type=Trans
Trigger1=time<16
trans=addalpha
alpha=time*16,256-time*16

[State 200]
type = PlaySnd
trigger1 = time=16
value=S1000,2

[State 251]
Type = HitDef
Trigger1 = time >= 16
Trigger1 = time % 8 = 0
Attr              = A, NP
Damage            = 8
GetPower          = 27
Givepower	  = -3,0
AnimType          = Hard
HitFlag           = MA
GuardFlag         =
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,-49
hitsound = S1,5
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
Air.Type          = Low
ID=521

[State 200]
Type=ParentVarAdd
Trigger1=MoveContact
var(49)=4
persistent=0

[State 2700,Spark]
Type=Helper
Trigger1=NumTarget(521)>0
Stateno=6000
ID=521
Name="Hitspark"
Pos = random %10-5+Ceil(target(521),Pos X - Pos X)*Facing,Ceil(target(521),Pos Y - Pos Y)-50
PosType=P1
ownpal=1

[State 200]
Type=TargetDrop
Trigger1=NumTarget(521)>0

[State 521]
Type=DestroySelf
Trigger1=time>=71
Trigger2=parent,stateno!=520

; Summon Guardian
[Statedef 600]
type    = U
movetype= A
physics = U
juggle  = 3
ctrl = 0
anim = 202+10*(StateType=C)+40*(StateType=A)
facep2=1

[State 1080]
Type=StateTypeSet
Trigger1=StateType=A
Physics=A

[State 1080]
Type=StateTypeSet
Trigger1=StateType=S
Physics=S

[State 1080]
Type=StateTypeSet
Trigger1=StateType=C
Physics=C

[State 1090]
Type=Turn
Trigger1=P2Dist X<0

[State 1080]
Type=VelSet
Trigger1=StateType!=A
Trigger2=var(1)>=100
Y=0

[State 1090]
Type=VelSet
Trigger1=StateType=A
Trigger1=var(1)<100
Y=0.7*vel Y

[State 600]
Type=VarAdd
Trigger1=time=0
var(16)=500

[State 200]
type = Helper
trigger1 = AnimElem= 3
ID = 600
pos = 27+50,-50
postype = p1
stateno = 619
helpertype = normal
name = "Guardian"
sprpriority = 2
keyctrl = 0
ownpal = 1
persistent=0
size.xscale=0.5
size.yscale=0.5
persistent=0

[State 600]
Type=ChangeState
Trigger1=animtime=0
value = 11*(StateType=C)+50*(StateType=A)
ctrl=1

[Statedef 610]
Type=A
MoveType=I
Physics=N
anim=600

[State 610]
Type=Turn
Trigger1=facing=-1

[State 610]
Type=AngleDraw
Trigger1=1
value=var(1)

[State 610]
Type=VarAdd
Trigger1=1
var(1)=var(2)

[State 610]
Type=VarSet
Trigger1=time % 180=0
var(2)=random %5-2

[State 610]
Type=Trans
Trigger1=1
trans=add

[State 610]
Type=VelSet
Trigger1=time % 180=0
Trigger1=var(2)=0
X=(random %21-10)*0.1
Y=(random %21-10)*0.1

[State 610]
Type=Velset
Trigger1=var(2)!=0
X=0
Y=0

[State 610]
Type=Velset
Trigger1=Pos Y>-80
Y=-0.2

[State 610]
Type=Velset
Trigger1=Pos Y<-180
Y=0.2

[State 610]
Type=Velset
Trigger1=ScreenPos X<30
X=0.6

[State 610]
Type=Velset
Trigger1=ScreenPos X>290
X=-0.6

[State 501]
type = HitOverride
trigger1 = 1
attr = SCA, AP,ST,HT
stateno = 615
time = -1

[State 610]
Type=NotHitBy
Trigger1=1
value=,AA,NT

[State 539]
Type=varset
Trigger1= 1
v=10
value=enemy,Screenpos X

[State 539]
Type=varset
Trigger1= 1
v=11
value=enemy,Screenpos Y-25-random %30

[State 539]
Type= VarSet
Trigger1=1
fvar(7)=-(180/(pi)*atan((var(11)- ScreenPos Y)/-(var(10)-ScreenPos X)))

[State 539]
Type= VarAdd
Trigger1=-(var(10)- ScreenPos X)<0
fvar(7)=180

[State 539]
Type = VarSet
Trigger1 = (var(10)-ScreenPos X)=0
fvar(7) = IfElse(-ScreenPos Y<0,90,-90)

[State 610]
Type=VarAdd
Trigger1=var(31)>0
var(31)=-1

[State -3]
Type=DisplaytoClipboard
Trigger1=1
text="SCX : %f"
params=Screenpos X

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 610]
Type=Assertspecial
Trigger1=Helper(1),stateNo=1101
Trigger2=Helper(1),stateNo=1201
Trigger3=Helper(1),stateNo=[1300,1305]
flag=invisible

[State 610]
Type=PlaySnd
Triggerall=Helper(1),stateNo!=1101
Triggerall=Helper(1),stateNo!=1201
Triggerall=Helper(1),stateNo!=[1300,1305]
Trigger1=time %360=0
value=S12,0

[State 610]
Type=ChangeState
Triggerall=var(31)=0
Triggerall=RoundState=2
Triggerall=Helper(1),stateNo!=1101
Triggerall=Helper(1),stateNo!=1201
Triggerall=Helper(1),stateNo!=[1300,1305]
Trigger1=abs(-ceil(fvar(7))-var(1)-90) %360<2
Trigger1=ScreenPos X=[10,310]
Trigger1=random<500
Trigger1=abs(ScreenPos X-enemy,ScreenPos X)+abs(ScreenPos Y-enemy,ScreenPos Y)>125
value=611

; Guardian Appear State
[Statedef 619]
Type=A
MoveType=I
Physics=N
anim=600
poweradd = 100

[State 619]
Type=PlaySnd
Trigger1=time=0
value=S550,0

[State 619]
Type=Trans
Trigger1=1
trans=addalpha
alpha=8*time,256

[State 619]
Type=NotHitBy
Trigger1=1
value=SAC

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 619]
Type=ChangeState
Trigger1=time>=32
value=610

[Statedef 615]
Type=A
MoveType=H
Physics=N
anim=600

[State 501]
type = HitOverride
trigger1 = 1
attr = SCA, AP,ST,HT
stateno = 615
time = -1

[State 610]
Type=NotHitBy
Trigger1=1
value=,AA,NT

[State 610]
Type=AngleDraw
Trigger1=1
value=var(1)

[State 615]
Type=VarAdd
Trigger1=time=0
var(13)=GetHitVar(Damage)

[State 615]
Type=poweradd
Trigger1=var(13)>=200
value=200

[State 610]
Type=PlaySnd
Trigger1=var(13)>=200
value=S12,1

[State 615]
Type=ChangeState
Trigger1=var(13)>=200
value=6000

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 615]
Type=ChangeState
Trigger1=time>=5
value=610

[Statedef 611]
MoveType=A
velset = 0,0

[State 611]
Type=AttackDist
Trigger1=1
value=999

[State 610]
Type=AngleDraw
Trigger1=1
value=var(1)

[State 610]
Type=Varset
Trigger1=1
var(31)=90

[State 610]
Type=Trans
Trigger1=1
trans=add

[State 532]
Type=Helper
Trigger1 = time=0
StateNo = 612
ID = 612
Name = "Laser"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = 1
Size.YScale = 1
Facing=-facing

[State 619]
Type=NotHitBy
Trigger1=1
value=SAC

[State 610]
Type=Assertspecial
Trigger1=Helper(1),stateNo=1101
Trigger2=Helper(1),stateNo=1201
Trigger3=Helper(1),stateNo=[1300,1305]
flag=invisible

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 615]
Type=ChangeState
Trigger1=NumHelper(612)=0
value=610

[Statedef 612]
Type=A
MoveType = I
Physics  = N
Anim     = 520
SprPriority = 7

[State 539]
Type = BindToParent
Trigger1 = 1

[State 539]
Type=varset
Trigger1= time=0
fvar(7)=parent,fvar(7)

[State 539]
Type = AngleSet
Trigger1 = 1
Value = fvar(7)

[State 610]
Type=Assertspecial
Trigger1=Helper(1),stateNo=1101
Trigger2=Helper(1),stateNo=1201
Trigger3=Helper(1),stateNo=[1300,1305]
flag=invisible

[State 539]
Type= AngleDraw
Trigger1=1

[State 539]
Type=PlaySnd
Trigger1 = time=0
value=S1,7

[State 200]
type = PlaySnd
trigger1 = time=90
value=S1000,3

[State 539]
Type=Trans
Trigger1 = time>=90
trans=none

[State 539]
Type=Trans
Trigger1 = time<90
trans=addalpha
alpha=3*time,256-3*time

[State -2]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150])
Trigger1 = Enemy(0),GetHitvar(chainID) = 612
Trigger1 = NumHelper(666)<2
Trigger1 = (Enemy(0),StateNo != [120,160])
StateNo = 6000
ID = 666
Name = "HitSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State -2]
Type = Helper
Trigger1 = NumEnemy >1
Trigger1 = (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150])
Trigger1 = Enemy(1),GetHitvar(chainID) = 612
Trigger1 = NumHelper(666)<2
Trigger1 = (Enemy(1),StateNo != [120,160])
StateNo = 6000
ID = 666
Name = "HitSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State 539]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 532]
Type=Helper
Trigger1 = time=0
StateNo =613
ID = 613
Name = "Targeting"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = 1
Size.YScale = 1

[State 539]
Type=DestroySelf
Trigger1 = Time>=100

[Statedef 613]
Type=A
MoveType = I
Physics  = N
Anim     = 3005
SprPriority = 9
velset=0,0

[State 539]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 539]
Type=varset
Trigger1= time=0
fvar(7)=parent,fvar(7)

[State 539]
Type = AngleSet
Trigger1 = 1
Value = fvar(7)

[State 539]
Type= AngleDraw
Trigger1=1
scale=0.5,0.5

[State 610]
Type=Assertspecial
Trigger1=Helper(1),stateNo=1101
Trigger2=Helper(1),stateNo=1201
Trigger3=Helper(1),stateNo=[1300,1305]
flag=invisible

[State 531]
Type = trans
Trigger1 = 1
trans = add

[State 1425]
Type=Changestate
Trigger1=animtime=0
value=617

[Statedef 617]
anim=9999
MoveType=I
Physics=N
Type=A

[State 539]
Type=varset
Trigger1= 1
fvar(7)=parent,fvar(7)+90

[State 539]
Type = Projectile
Triggerall=Helper(1),stateNo!=1101
Triggerall=Helper(1),stateNo!=1201
Triggerall=Helper(1),stateNo!=[1300,1305]
Trigger1 = parent,time=90
Attr              = A, NP
Damage            = 2,0
GetPower          = 10,0
AnimType          = Hard
PauseTime         = 0,9
Guard.PauseTime   = 0,9
Offset            = 10*var(3)*sin(fvar(7)*pi/180),10*var(3)*cos(fvar(7)*pi/180)
Velocity          = 0,0
ProjID            = 9997
ProjAnim          = 9997
ProjHitAnim       = -1
ProjRemanim       = -1
ProjHits          = 3
ProjMissTime      = 3
ProjScale         = 1,1
ProjPriority      = 9999
ProjRemove        = 0
ProjRemoveTime    = 10
ProjHeightBound   = -400,50
HitFlag           = MAF
GuardFlag         =
SparkNo           = -1
SparkXY           = 0,0
HitSound          = S1,5
GuardSound        = S1,6
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 19
Ground.HitTime    = 19
Air.HitTime       = 19
Ground.Velocity   = 0,-6.5
Air.Velocity      = 0,-6.5
Fall = 1
Fall.Recover = 1
ID = 612
hitonce = 0

[State 617]
Type=VarAdd
Trigger1=parent,time=90
var(3)=1

[State 617]
Type=ChangeState
Trigger1=var(3)<80
Trigger1=parent,time=90
value=617

[State 618]
Type=Destroyself
Trigger1=parent,time>95
Trigger2=numhelper(612)=0

; Data Highway
[Statedef 1000]
Type=A
MoveType=A
Physics=N
velset=0,0
ctrl=0
anim=310
poweradd = -1000

[State 1000]
Type=NotHitBy
Trigger1=1
value=SAC

[State 1000, SuperPause]
type = SuperPause
trigger1 = time=0
time = 40
anim = S8200
sound = S1,0
pos = 0,-50
movetime = 40
darken = 1
p2defmul = 0
poweradd = 0
unhittable = 1

[State 1400]
Type=PlaySnd
Trigger1=time=0
value=S11,0
channel=0

[State 300]
Type=StateTypeSet
Trigger1=Pos Y>=-5
StateType=S

[State 2700,Spark]
Type=Helper
Trigger1=time=40
Stateno=1010
ID=1010
Name="AttackEffect"
Pos = 0,0
PosType=P1
ownpal=1

[State 251]
Type = HitDef
Trigger1 = time >=90
Trigger1 = time %12 = 0
Attr              = A, HP
Damage            = 24
Givepower	  = -10,0
AnimType          = DiagUp
HitFlag           = MAFD
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,20
SparkNo           = -1
SparkXY           = 0,-49
fall = 1
hitsound = S1,5
guardsound = S1,6
ground.type = High
ground.slidetime = 11
ground.hittime = 28
guard.slidetime = 7
guard.hittime = 28
ground.velocity = 0,-2
guard.velocity = -4
air.velocity = 0,-2
airguard.velocity = -4,0
Air.Type = Low
ID=1000

[State 200]
type = PlaySnd
trigger1 = time>90
trigger1 = time %20=0
value=1000,0

[State 2700,Spark]
Type=Helper
Trigger1=NumTarget(1000)>0
Trigger1=(MoveHit>0)
Stateno=6000
ID=1000
Name="Hitspark"
Pos = random %10-5+Ceil(target(1000),Pos X - Pos X)*Facing,Ceil(target(1000),Pos Y - Pos Y)-25
PosType=P1
ownpal=1

[State 200]
Type=TargetDrop
Trigger1=NumTarget(1000)>0

[State 1005, 5]
type = ChangeState
trigger1 = Time>=240
value = 11*(StateType=C)+50*(StateType=A)
ctrl = 1



[Statedef 1010]
Movetype=I
anim=9999

[State 161]
Type=BindtoParent
Trigger1=1
Pos =0,0

[State 161]
Type=VarSet
Trigger1=1
var(9)=0

[State 161]
Type=ChangeState
Trigger1=time>0
trigger1=parent,stateno!=1000
value=1015

[State 161]
Type=Changestate
Trigger1=time>0
value=1012

[Statedef 1012]

[State 162]
type = Explod
trigger1 = 1
anim = 701
scale = 0.5,0.5
postype = p1
pos = 82*sin((var(10)+var(9))*pi/180),24*cos((var(10)+var(9))*pi/180)
removetime=1
bindtime=1
sprpriority = 5-10*(cos((var(10)+var(9))*pi/180)<0)
ownpal = 1
ID=701

[State 1012]
Type=VarSet
Trigger1=1
var(6)=random %360

[State 1012]
Type=VarSet
Trigger1=1
fvar(6)=random*0.001

[State 162]
type = Explod
trigger1 = random<50
anim = 750+random %41
scale = 0.5,0.5
postype = p1
pos = fvar(6)*79*sin(var(6)*pi/180),fvar(6)*24*cos(var(6)*pi/180)
vel = 0,-1
accel = 0,-0.01*(random %50+8)
removetime=40
bindtime=1
sprpriority = 5-10*(cos(var(6)*pi/180)<0)
ownpal = 1
ID=701
trans=add

[State 162]
Type= VarAdd
Trigger1= 1
var(9)=8

[State 162]
Type=ChangeState
Trigger1=var(9)>=360
value=1013+(var(9):=0)*0

[State 161]
Type=Changestate
Trigger1=1
value=1012

[Statedef 1013]

[State 163]
Type=VarAdd
Trigger1=1
var(9)=8

[State 162]
type = Explod
trigger1 = 1
anim = 700
scale = 0.5,0.5
postype = p1
pos = 41*sin((var(10)+var(9))*pi/180),18*cos((var(10)+var(9))*pi/180)
removetime=1
bindtime=1
sprpriority = 5-10*(cos((var(10)+var(9))*pi/180)<0)
ownpal = 1
ID=701

[State 162]
Type=ChangeState
Trigger1=var(9)>=360
value=1014+(var(9):=0)*0

[State 161]
Type=Changestate
Trigger1=1
value=1013

[Statedef 1014]

[State 164]
Type=VarAdd
Trigger1=1
var(10)=3

[State 164]
Type=ChangeState
Trigger1=1
value=1010

[Statedef 1015]

[State 165]
Type=changeState
Trigger1=parent,stateno=1000
value=1010

[State 165]
Type=destroyself
trigger1=time>10


[Statedef 1100]
Type=A
MoveType=A
Physics=N
anim=41
ctrl=0
velset=0,-1

[State 539]
Type = Projectile
triggerall = !(P2name="Aura" && enemy,authorname="Seravy")
Trigger1 = time=[50,55]
Attr              = A, HT
Damage            = 0,0
GetPower          = 0,0
AnimType          = Hard
PauseTime         = 0,9
Guard.PauseTime   = 0,9
Offset            = 0,0
Velocity          = 0,0
ProjID            = 1100
ProjAnim          = 9998
ProjHitAnim       = -1
ProjRemanim       = -1
ProjHits          = 1
ProjMissTime      = 1
ProjScale         = 1,1
ProjPriority      = 9999
ProjRemove        = 0
ProjRemoveTime    = 3
ProjHeightBound   = -9999,9999
HitFlag           = MAFD
GuardFlag         =
SparkNo           = -1
ID = 1100
hitonce = 0
P2StateNo=1199

[State 1000, SuperPause]
type = SuperPause
trigger1 = time=0
time = 40
anim = S8200
sound = S11,0
pos = 0,-50
movetime = 0
darken = 1
p2defmul = 0
poweradd = 0

[State 1100]
Type=BGPalFX
Trigger1=1
add=-time*6,-time*6,-time*6
time=1

[State 1100]
Type=Trans
Trigger1=1
Trans=addalpha
alpha=256-time*6,time*6

[State 2700,Spark]
Type=Helper
Trigger1=time=0
Stateno=1141
ID=1141
Name="1141"
Pos = 0,0
PosType=P1
ownpal=1
SuperMovetime=99999
MoveTime=99999

[State 1100]
Type=NotHitBy
Trigger1=time>=50
value=SAC

[State 1100]
Type=ChangeState
Trigger1=P2StateNo=1199
value=1101

[State 1100]
Type=ChangeState
Trigger1=time>59
value=50
ctrl=1

[Statedef 1141]
anim=9999
MoveType=I
Physics=N

[State 1141]
TYpe=VarSet
Trigger1=1
var(6)=random %360

[State 162]
type = Explod
trigger1 = 1
anim = 700+random %2
scale = 0.5,0.5
postype = p1
pos = 69*sin(var(6)*pi/180),24*cos(var(6)*pi/180)
vel = 0,-1
accel = 0,-0.01*(random %50+8)
removetime=40
bindtime=1
sprpriority = 5-10*(cos(var(6)*pi/180)<0)
ownpal = 1
ID=1141
trans=add
supermovetime=9999
pausemovetime=9999

[State 1141]
Type=ChangeState
Trigger1=time>0
value=1141

[State 1141]
Type=DestroySelf
Trigger1=Parent,StateNo!=1100
Trigger1=Parent,StateNo!=1300

[Statedef 1199]
Type=S
MoveType=H
Physics=N
anim=5000
velset=0,0
ctrl=0

[State 1199]
Type=Changeanim
Trigger1=1
value=5000

[State 1199]
Type=PosSet
Trigger1=1
X=130*(1-2*(TeamSide=1))
Y=0

[State 1101]
Type=Turn
Trigger1=Teamside=1
Trigger1=facing=-1
Trigger2=Teamside=2
Trigger2=facing=1

[State 119]
Type=NotHitBy
Trigger1=1
value=,AA,AP,NT,ST

[State 1199]
Type=ChangeState
Trigger1=RoundState>2
Trigger1=Life<=0
Value=1198

[State 1199]
Type=SelfState
Trigger1=time>=12000
Trigger2=GetHitVar(ChainID)=1102
Trigger2=time>=3
Trigger3=RoundState>2
Value=0
ctrl=1

[Statedef 1198]
Type=S
MoveType=H
Physics=N
anim=5000
velset=0,0
ctrl=0

[State 1198]
Type=NotHitBY
Trigger1=1
value=SAC

[State 1199]
Type=Changeanim
Trigger1=1
value=5000

[State 1199]
Type=PosSet
Trigger1=1
X=130*(1-2*(TeamSide=1))
Y=0

[State 1198]
Type=Trans
Trigger1=1
trans=addalpha
alpha=256-time*2,time*2

[State 1198]
Type=Assertspecial
Trigger1=1
flag=noshadow

[Statedef 1101]
Type=S
MoveType=A
Physics=N
anim=1101
ctrl=0

[State 1101]
Type=RemoveExplod
Trigger1=time=0
value=1141

[State 1431]
Type=AssertSpecial
Trigger1=1
flag=nomusic

[State 1101]
Type=BgPalFx
Trigger1=time<350
add=-255,-255,-255
mul=0,0,0
time=50

[State 1101]
Type=AssertSpecial
Trigger1=1
flag=NoBG
flag2=NoFG

[State 1101]
Type=Turn
Trigger1=Teamside=1
Trigger1=facing=-1
Trigger2=Teamside=2
Trigger2=facing=1

[State 1199]
Type=PosSet
Trigger1=1
X=130*(1-2*(TeamSide=1))
Y=0

[State 1101]
Type=NotHitBy
Trigger1=1
value=SAC

[State 1000, SuperPause]
type = SuperPause
trigger1 = time=3
time = 40
anim = S8200
sound = S1,2
pos = 0,-50
movetime = 0
darken = 1
p2defmul = 0
poweradd = -2000*(NumHelper(1111)=0)
unhittable = 1

[State 539]
Type = Projectile
Trigger1 = time=[100,400]
Attr              = A, HT
Damage            = 1+(random<250)
GetPower          = 0,0
Givepower = -1,0
AnimType          = Hard
PauseTime         = 0,0
Guard.PauseTime   = 0,0
Offset            = 0,0
Velocity          = 0,0
ProjID            = 9998
ProjAnim          = 9998
ProjHitAnim       = -1
ProjRemanim       = -1
ProjHits          = 1
ProjMissTime      = 1
ProjScale         = 1,1
ProjPriority      = 9999
ProjRemove        = 0
ProjRemoveTime    = 3
ProjHeightBound   = -9999,9999
HitFlag           = MAFD
GuardFlag         =
SparkNo           = -1
ID = 1101+1*(time>395)
hitonce = 0
P2StateNo=1199

[State 3560, Effect]
type = Explod
trigger1 = time = 40
anim = 3005
scale = 1,1
postype = p1
pos = 27,-50
bindtime=-1
sprpriority = 7
ownpal = 1
ID=1101

[State 1101]
Type=Null;PlaySnd
Trigger1=time=40
value=S1,2

[State 1101]
Type=PlaySnd
Trigger1=time=80
value=S1100,0
volume=255

[State 3560, Effect]
type = Explod
trigger1 = time = [80,100]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = 37+13*(time-80),-50
bindtime=-1
removetime=-1
sprpriority = 3
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [80,100]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = 37+13*(time-80)-11,-50-6
bindtime=-1
removetime=-1
sprpriority = 3
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [80,100]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = 37+13*(time-80)-11,-50+6
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1101

[State 1101]
Type=VarSet
Trigger1=1
var(9)=random %11-5

[State 3560, Effect]
type = Explod
triggerall = root,numtarget(1101)>0
trigger1 = time = [100,400]
anim = 750+random %41
scale = 0.5,0.5
postype = p2
pos = random %31-15,-50+random %31-15
vel = 13,var(9)
accel = 0,-0.07*var(9)
trans=add
facing=-1
removetime=20
sprpriority = 3
ownpal = 1
ID=1102

[State 3560, Effect]
type = Explod
triggerall = root,numtarget(1101)>0
trigger1 = time = [300,400]
anim = 750+random %41
scale = 0.5,0.5
postype = p2
pos = random %31-15,-50+random %31-15
vel = 13,var(9)
accel = 0,-0.07*var(9)
trans=add
facing=-1
removetime=20
sprpriority = 3
ownpal = 1
ID=1102

[State 3560, Effect]
type = Explod
triggerall = root,numtarget(1101)>0
trigger1 = time = [300,400]
anim = 750+random %41
scale = 0.5,0.5
postype = p2
pos = random %31-15,-50+random %31-15
vel = 13,var(9)
accel = 0,-0.07*var(9)
trans=add
facing=-1
removetime=20
sprpriority = 3
ownpal = 1
ID=1102

[State 2700,Spark]
Type=Helper
Trigger1=time>=100
Trigger1=time %20=0
Stateno=6000
ID=200
Name="Hitspark"
Pos = 0,-50
PosType=P2
ownpal=1

[State 1100]
Type=HitAdd
Trigger1=time<100
value=-2

[State 1100]
Type=HitAdd
Trigger1=time>=100
Trigger1=root,projhittime(1100)>0
value=3

[State 3560, Effect]
type = RemoveExplod
trigger1 = time>400
ID=1101

[State 1100]
Type=ChangeState
Trigger1=AnimTime=0
value=0
ctrl=1

[State 1101]
Type=VarSet
Trigger1=1
var(49)=0

; Drain Heart
[Statedef 1200]
Type=A
MoveType=I
Physics=N
anim=41
ctrl=0

[State 1400]
Type=PlaySnd
Trigger1=time=0
value=S11,0
channel=0

[State 1200]
Type=Turn
Trigger1=facing=1
Trigger1=pos X>1
Trigger2=facing=-1
Trigger2=pos X<-1

[State 1200]
Type=Velset
Trigger1=1
X=facing*IfElse(Pos X<-5,5,IfElse(Pos X>5,-5,0))
Y=IfElse(ScreenPos Y<145,5,IfElse(ScreenPos Y>155,-5,0))

[State 1200]
Type=NotHitBy
Trigger1=1
value=,NP,SP

[State 100]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,25
PalMul = .5,.5,.5

[State 1200]
Type=PlayerPush
Trigger1=1
value=0

[State 1100]
Type=ChangeState
Trigger1=Pos X=[-5,5]
Trigger1=ScreenPos Y=[145,155]
Trigger2=time>=240
value=1201


; Drain Heart Start
[Statedef 1201]
Type=A
MoveType = A
Physics  = N
Anim     = 300
PowerAdd = -3000
SprPriority = 12

[State 1201]
Type=Turn
Trigger1=facing=-1

[State 1101]
Type=BgPalFx
Trigger1=time<=590
add=-255,-255,-255
mul=0,0,0
time=50

[State 1101]
Type=AssertSpecial
Trigger1=1
flag=NoBG
flag2=NoFG

[State 1201]
Type=NotHitBy
Trigger1=1
value=SAC

[State 1431]
Type=AttackDist
Trigger1=1
value=999

[State 1615]
Type=PosSet
Trigger1=1
X=0

[State 1614]
Type=PosAdd
Trigger1=ScreenPos Y!=150
Y=-(ScreenPos Y-150)

[State 1000, SuperPause]
type = SuperPause
trigger1 = time=0
time = 40
anim = S8200
sound = -1
pos = 0,-50
movetime = 0
darken = 1
p2defmul = 0
poweradd = 0
unhittable = 1

[State 1000, dm sound]
type = Null;Playsnd
trigger1 = time=120
value = S1,4
channel=6
loop=1
volume=255

[State 1000, dm sound]
type = Playsnd
trigger1 = time=40
value = S1100,0
volume=255

;Horizontal
[State 3560, Effect]
type = Explod
trigger1 = time = [40,60]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = 27+13*(time-40),-35
bindtime=-1
removetime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [40,60]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = 27+13*(time-40)-11,-35+6
bindtime=-1
removetime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [40,60]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = 27+13*(time-40)-11,-35-6
bindtime=-1
removetime=-1
sprpriority = -2
ownpal = 1
ID=1101

; Horizontal 2
[State 3560, Effect]
type = Explod
trigger1 = time = [60,80]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = -27-13*(time-60),-35
bindtime=-1
removetime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [60,80]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = -27-13*(time-60)+11,-35+6
bindtime=-1
removetime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [60,80]
anim = 1100
scale = 0.5,0.5
postype = p1
pos = -27-13*(time-60)+11,-35-6
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

;Vertical
[State 3560, Effect]
type = Explod
trigger1 = time = [45,65]
anim = 1200
scale = 0.5,0.5
postype = p1
pos = 0,-35-13*(time-45)
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [45,65]
anim = 1200
scale = 0.5,0.5
postype = p1
pos = 6,-35-13*(time-45)-11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [45,65]
anim = 1200
scale = 0.5,0.5
postype = p1
pos = -6,-35-13*(time-45)-11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

; Vertical 2
[State 3560, Effect]
type = Explod
trigger1 = time = [50,70]
anim = 1200
scale = 0.5,0.5
postype = p1
pos = 0,-35+13*(time-50)
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [50,70]
anim = 1200
scale = 0.5,0.5
postype = p1
pos = -6,-35+13*(time-50)+11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [50,70]
anim = 1200
scale = 0.5,0.5
postype = p1
pos = 6,-35+13*(time-50)+11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

;Diagonal
[State 3560, Effect]
type = Explod
trigger1 = time = [80,100]
anim = 1201
scale = 0.5,0.5
postype = p1
pos = 0-13*(time-80),-35-13*(time-80)
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [80,100]
anim = 1201
scale = 0.5,0.5
postype = p1
pos = 3-13*(time-80),-35-13*(time-80)+11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [80,100]
anim = 1201
scale = 0.5,0.5
postype = p1
pos = 11-13*(time-80),-35-13*(time-80)+3
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

; Vertical 3
[State 3560, Effect]
type = Explod
trigger1 = time = [66,86]
anim = 1201
scale = 0.5,0.5
postype = p1
pos = 0+13*(time-66),-35+13*(time-66)
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [66,86]
anim = 1201
scale = 0.5,0.5
postype = p1
pos = -3+13*(time-66),-35+13*(time-66)-11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [66,86]
anim = 1201
scale = 0.5,0.5
postype = p1
pos = -11+13*(time-66),-35+13*(time-66)-3
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

;Diagonal 2
[State 3560, Effect]
type = Explod
trigger1 = time = [52,72]
anim = 1202
scale = 0.5,0.5
postype = p1
pos = 0-13*(time-52),-35+13*(time-52)
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [52,72]
anim = 1202
scale = 0.5,0.5
postype = p1
pos = 3-13*(time-52),-35+13*(time-52)-11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [52,72]
anim = 1202
scale = 0.5,0.5
postype = p1
pos = 11-13*(time-52),-35+13*(time-52)-3
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

; Diagonal 4
[State 3560, Effect]
type = Explod
trigger1 = time = [90,110]
anim = 1202
scale = 0.5,0.5
postype = p1
pos = 0+13*(time-90),-35-13*(time-90)
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [90,110]
anim = 1202
scale = 0.5,0.5
postype = p1
pos = -3+13*(time-90),-35-13*(time-90)+11
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101

[State 3560, Effect]
type = Explod
trigger1 = time = [90,110]
anim = 1202
scale = 0.5,0.5
postype = p1
pos = -11+13*(time-90),-35-13*(time-90)+3
removetime=-1
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1101




[State 541]
Trigger1= Time=120
Type=Helper
StateNo = 1202
ID = 1202
Name = "DrainHeart"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = 2
Size.YScale = 2

[State 1431]
Type=AssertSpecial
Trigger1=1
flag=nomusic

[State 1000, dm sound]
type = Stopsnd
trigger1 = time=640
Trigger2 = RoundState>2
channel=6

[State 1201]
Type=RemoveExplod
Trigger1=time=620
Trigger2 = RoundState>2
ID=1101

[State 541]
Type = ChangeState
Trigger1 = time>=640
Trigger2 = RoundState>2
value=50
ctrl=1

; >Drain Heart Helper
[Statedef 1202]
Type     = A
MoveType = A
Physics  = N
Anim     = 540
Ctrl     = 0
Facep2   = 1
PowerAdd = 0
Sprpriority=2

[State 1431]
Type=AttackDist
Trigger1=1
value=999

[State 1432]
Type=Bindtoparent
Trigger1=1
pos = 0,-35

[State 1432]
Type=HitAdd
Trigger1=1
value=3

[State 542]
Type = HitDef
Trigger1 = Time %2 =1
Attr              = A, HT
Damage            = 2+random %2,1+1*(NumHelper(1111)>0)
GetPower          = 0,0
Givepower = -1,0
HitFlag           = MAFD
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 0,19
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = 0,0
HitSound          = S1,5
GuardSound        = S1,5
Ground.Type       = High
Air.Type          = Low
Fall=1
hitonce = 0
ID=1202

[State 2700,Spark]
Type=Helper
Trigger1=NumTarget(1202)>0
Trigger1=(numhelper(1203)=0) || (helper(1203),time>=80)
Trigger1=time <420
Stateno=6000
ID=1203
Name="Hitspark"
Pos = 0,-50
PosType=P2
ownpal=1

[State 542]
Type=Trans
Trigger1= 1
Trans=addalpha
alpha=224,256

[State 461]
Type=VarSet
Trigger1=1
var(5)=random %320

[State 461]
Type=VarSet
Trigger1=1
var(6)=random %200

[State 461]
Type = Explod
Trigger1 = 1
Anim = 700+ random %2
ID = 462
Pos = var(5),var(6)
PosType=Left
Ownpal = 1
SprPriority = -5
IgnoreHitPause = 1
removetime = 25
vel= -(var(5)-160)*0.04,-(var(6)-100)*0.04
scale = 0.5,0.5

[State 461]
Type=VarSet
Trigger1=1
var(5)=random %320

[State 461]
Type=VarSet
Trigger1=1
var(6)=random %200

[State 461]
Type = Explod
Trigger1 = 1
Anim = 700+ random %2
ID = 462
Pos = var(5),var(6)
PosType=Left
Ownpal = 1
SprPriority = -5
IgnoreHitPause = 1
removetime = 25
vel= -(var(5)-160)*0.04,-(var(6)-100)*0.04
scale = 0.5,0.5

[State 461]
Type=VarSet
Trigger1=1
var(5)=random %320

[State 461]
Type=VarSet
Trigger1=1
var(6)=random %200

[State 461]
Type = Explod
Trigger1 = 1
Anim = 700+ random %2
ID = 462
Pos = var(5),var(6)
PosType=Left
Ownpal = 1
SprPriority = -5
IgnoreHitPause = 1
removetime = 25
vel= -(var(5)-160)*0.04,-(var(6)-100)*0.04
scale = 0.5,0.5

[State 542]
Type=DestroySelf
Trigger1= time>=520
Trigger2 = RoundState>2


[Statedef 1300]
Type=A
MoveType=A
Physics=N
anim=41
ctrl=0
velset=0,-1

[State 539]
Type = Projectile
Trigger1 = time=[50,55]
Attr              = A, HT
Damage            = 0,0
GetPower          = 0,0
AnimType          = Hard
PauseTime         = 0,9
Guard.PauseTime   = 0,9
Offset            = 0,0
Velocity          = 0,0
ProjID            = 1100
ProjAnim          = 9998
ProjHitAnim       = -1
ProjRemanim       = -1
ProjHits          = 1
ProjMissTime      = 1
ProjScale         = 1,1
ProjPriority      = 9999
ProjRemove        = 0
ProjRemoveTime    = 3
ProjHeightBound   = -9999,9999
HitFlag           = MAFD
GuardFlag         =
SparkNo           = -1
ID = 1300
hitonce = 0
P2StateNo=1399

[State 1000, SuperPause]
type = SuperPause
trigger1 = time=0
time = 40
anim = S8200
sound = S11,0
pos = 0,-50
movetime = 0
darken = 1
p2defmul = 0
poweradd = 0

[State 2700,Spark]
Type=Helper
Trigger1=time=0
Stateno=1141
ID=1141
Name="1141"
Pos = 0,0
PosType=P1
ownpal=1
SuperMovetime=99999
MoveTime=99999

[State 1100]
Type=NotHitBy
Trigger1=time>=50
value=SAC

[State 1100]
Type=BGPalFX
Trigger1=1
add=-time*6,-time*6,-time*6

[State 1100]
Type=ChangeState
Trigger1=P2StateNo=1399
value=1301

[State 1100]
Type=ChangeState
Trigger1=time>59
value=50
ctrl=1

[Statedef 1398]
Type=A
MoveType=H
Physics=N
anim=5000
velset=0,0
ctrl=0

[State 1198]
Type=NotHitBY
Trigger1=1
value=SAC

[State 1199]
Type=Changeanim
Trigger1=1
value=5000

[State 1199]
Type=PosSet
Trigger1=time>=128
X=0
Y=0

[State 1198]
Type=Trans
Trigger1=1
trans=addalpha
alpha=256-time*2,time*2

[State 1198]
Type=Assertspecial
Trigger1=1
flag=noshadow

[Statedef 1399]
Type=A
MoveType=H
Physics=N
ctrl=0
velset=0,0
sprpriority=2

[State 1199]
Type=ChangeState
Trigger1=RoundState>2
Trigger1=Life<=0
Value=1398

[State 1199]
Type=SelfState
Trigger1=name="Aura"
Trigger1=authorname="Seravy"
Value=50
ctrl=1

[State 1431]
Type=AssertSpecial
Trigger1=1
flag=nomusic

[State 1101]
Type=BgPalFx
Trigger1=1
add=-255,-255,-255
mul=0,0,0
time=5

[State 1101]
Type=AssertSpecial
Trigger1=1
flag=NoBG
flag2=NoFG

[State 1399]
Type=ChangeAnim
Trigger1=1
value=5000

[State 1200]
Type=Turn
Trigger1=facing=1
Trigger1=pos X>1
Trigger2=facing=-1
Trigger2=pos X<-1

[State 1200]
Type=Velset
Trigger1=1
X=facing*IfElse(Pos X<-3,3,IfElse(Pos X>3,-3,0))
Y=IfElse(ScreenPos Y<147,3,IfElse(ScreenPos Y>153,-3,0))

[State 1200]
Type=NotHitBy
Trigger1=1
value=SC,AA,AP,ST,NT

[State 1399]
Type=Null;Trans
Trigger1=1
trans=addalpha
alpha=(256*Life)/LifeMax,256-(256*Life)/LifeMax

[State 1399]
Type=AssertSpecial
Trigger1=1
flag=NoShadow

[State 1200]
Type=PlayerPush
Trigger1=1
value=0

[Statedef 1301]
anim=41
velset=0,0
poweradd = -5000

[State 1302]
Type=VelSet
Trigger1=1
X=facing*IfElse(Pos X<-123,3,IfElse(Pos X>-117,-3,0))
Y=IfElse(ScreenPos Y<147,3,IfElse(ScreenPos Y>153,-3,0))

[State 1100]
Type=NotHitBy
Trigger1=1
value=SAC

[State 1302]
Type=Turn
Trigger1=Pos X=[-123,-117]
Trigger1=ScreenPos Y=[147,153]
Trigger1=facing=-1

[State 1302]
Type=ChangeState
Trigger1=Pos X=[-123,-117]
Trigger1=ScreenPos Y=[147,153]
Trigger1=enemy,pos X=[-3,3]
Trigger1=enemy,screenpos Y=[147,153]
value=1303

[State 1100]
Type=ChangeState
Trigger1=time>500
value=50
ctrl=1

[Statedef 1303]
anim=242
velset=0,0

[State 1101]
Type=PlaySnd
Trigger1=time=0
value=S1100,0
volume=255

[State 1100]
Type=NotHitBy
Trigger1=1
value=SAC

[State 1303]
Type=VarSet
Trigger1=1
var(9)=-5

[State 1303]
Type=VarSet
Trigger1=1
var(10)=-5

[State 1303]
Type=Changestate
Trigger1=1
value=1304

[Statedef 1304]

[State 3560, Effect]
type = Explod
trigger1 = abs(var(9)+var(10))<=7
trigger1 = time = 0
anim = 1200
scale = 0.5,0.5
postype = p2
pos = 0-6*var(9)-6*var(10),-45-11*var(9)+11*var(10)
bindtime=-1
removetime=-1
sprpriority = -1
ownpal = 1
ID=1301

[State 1404]
Type=VarAdd
Trigger1=1
var(9)=1

[State 1404]
Type=ChangeState
Trigger1=var(9)<=5
value=1304

[State 1404]
Type=VarSet
Trigger1=1
var(9)=-5

[State 1404]
Type=VarAdd
Trigger1=1
var(10)=1

[State 1404]
Type=ChangeState
Trigger1=var(10)<=5
value=1304

[State 1404]
Type=ChangeState
Trigger1=1
value=1305


[Statedef 1305]
facep2=1

[State 1000, dm sound]
type = Null;Playsnd
trigger1 = time=0
value = S1,3
channel=6
loop=1
volume=255

[State 1305]
Type=NotHitBy
Trigger1=1
value=SAC

[State 3560, Effect]
type = Explod
trigger1 = time =[10,50]
anim = 1201
scale = 0.5,0.5
postype = p2
pos = 0-13*(time-30),-35-13*(time-30)
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1301

[State 3560, Effect]
type = Explod
trigger1 = time = [10,50]
anim = 1201
scale = 0.5,0.5
postype = p2
pos = 3-13*(time-30),-35-13*(time-30)+11
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1301

[State 3560, Effect]
type = Explod
trigger1 = time = [10,50]
anim = 1201
scale = 0.5,0.5
postype = p2
pos = 11-13*(time-30),-35-13*(time-30)+3
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1301

[State 3560, Effect]
type = Explod
trigger1 = time = [27,67]
anim = 1202
scale = 0.5,0.5
postype = p2
pos = 0-13*(time-47),-35+13*(time-47)
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1301

[State 3560, Effect]
type = Explod
trigger1 = time = [27,67]
anim = 1202
scale = 0.5,0.5
postype = p2
pos = 3-13*(time-47),-35+13*(time-47)-11
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1301

[State 3560, Effect]
type = Explod
trigger1 = time = [27,67]
anim = 1202
scale = 0.5,0.5
postype = p2
pos = 11-13*(time-47),-35+13*(time-47)-3
removetime=-1
bindtime=-1
sprpriority = 3
ownpal = 1
ID=1301

[State 1431]
Type=AssertSpecial
Trigger1=1
flag=nomusic

[State 1101]
Type=BgPalFx
Trigger1=1
add=-255,-255,-255
mul=0,0,0
time=5

[State 1101]
Type=AssertSpecial
Trigger1=1
flag=NoBG
flag2=NoFG

[State 396]
Type=ChangeAnim
Trigger1=time>=10
value=242
elem=3

[State 1305]
Type=PlaySnd
Trigger1=time>=80
value=S300,0

[State 541]
Trigger1= Time=80
Type=Helper
StateNo = 1310
ID = 1310
Name = "DeleteEffect"
Pos = 0,-45
PosType = P2
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = 2
Size.YScale = 2

[State 1306]
Type=RemoveExplod
Trigger1=Roundstate>2
ID=1301

[State 1306]
Type=ChangeState
Trigger1=Roundstate>2
value=50
ctrl=1

[Statedef 1310]
anim=501
movetype=A
type=A
physics=N

[State 501]
Type=VarSet
Trigger1=1
var(9)=0

[State 502]
Type=VarAdd
Trigger1=1
var(10)=5

[State 502]
Type=VarAdd
Trigger1=1
var(45)=1

[State 251]
Type = HitDef
Trigger1 = 1
Attr              = A, HT
Damage            = 0,0
GetPower          = 0,0
Givepower	  = -999,-999
AnimType          = Hard
HitFlag           = MAFD
GuardFlag         =
Priority          = 4,Hit
PauseTime         = 0,0
SparkNo           = -1
SparkXY           = 0,0
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 11
ground.hittime = 14
guard.slidetime = 7
guard.hittime = 10
Air.Type          = Low
ID=1310
P2StateNo=1399

[State 1310]
Type=TargetLifeAdd
Trigger1=time=1
value=-1-floor(var(45)*0.003)
absolute=1

[State 461]
Type = Explod
Trigger1 = 1
Anim = 700+ random %2
ID = 1311
Pos = random %41-20,random %41-20-45
PosType=P2
Ownpal = 1
SprPriority = -5
IgnoreHitPause = 1
removetime = 25
vel= (random %41-20)*0.4,(random %41-20)*0.4
scale = 0.5,0.5

[State 501]
Type=Assertspecial
Trigger1=1
flag=noshadow

[State 501]
Type=ChangeState
Trigger1=Time>0
value=1311

[State 1310]
TYpe=ChangeState
Trigger1=RoundState>2
value=1319

[Statedef 1311]

[State 512]
Type=VarSet
Trigger1=1
;fvar(1)=IfElse(var(9) % 3=0,var(15),IfElse(var(9) % 3=1,var(16),var(17)))*pi/180
fvar(1)=(60*(var(9)%3-1))*pi/180

[State 512]
Type=VarSet
Trigger1=1
fvar(2)=(random %360)*pi/180

[State 512]
Type=VarSet
Trigger1=1
; A
fvar(3)= 65*sin(fvar(2))

[State 512]
Type=VarSet
Trigger1=1
; B
fvar(4)= 27*cos(fvar(2))

[State 512]
Type=VarSet
Trigger1=1
; alpha
fvar(5)= atan(fvar(3)/fvar(4))

[State 512]
Type=VarSet
Trigger1=fvar(3)<0
; alpha
fvar(5)= -fvar(5)

[State 162]
type = Explod
trigger1 = 1
anim = 700+random %2
postype = p1
pos = fvar(3)*cos(fvar(5)+fvar(1))/sin(fvar(5)),fvar(3)*sin(fvar(5)+fvar(1))/sin(fvar(5))
vel = 0,0
removetime=1
bindtime=1
sprpriority = 5
ownpal = 1
ID=502
scale=0.5,0.5

[State 502]
Type=VarAdd
Trigger1=1
var(9)=1

[State 502]
Type=ChangeState
Trigger1=1
value=1311-(var(9)>=180)

[Statedef 1319]

[State 1319]
Type=Destroyself
Trigger1=time>10

; Resurrect
[Statedef 1400]

[State 1400]
Type=PlaySnd
Trigger1=time=0
value=S11,1
channel=0

[State 162]
type = Explod
Trigger1=1
anim = 8300
scale = 1,1
postype = p1
pos = 0,-45
removetime=-2
bindtime=-1
sprpriority = -2
ownpal = 1
ID=1400

[State 1]
Type=LifeSet
Trigger1=1
value=ceil(0.05*var(14))

[State 1]
Type=VarSet
Trigger1=1
var(13)=0.9*var(14)

[State 1]
Type=poweradd
Trigger1=1
value=-6000

[State 190]
Type=PLaysnd
Trigger1=time=0
value=S1400,0

[State 1]
Type=changestate
Trigger1=1
value=1

