#Roller
#AAAAAA ROLLER MAH BOI I LOVE YO-

Freeslot
SPR_ROLL
S_ROLL_STND1
S_ROLL_STND2
S_ROLL_FOUN
S_ROLL_SPINDASH
S_ROLL_SPINCOLOR
S_ROLL_SPINSOUND
S_ROLL_SPINDASH1
S_ROLL_SPINDASH2
S_ROLL_SPINDASH3
S_ROLL_SPINDASH4
S_ROLL_SPINDASHREPEAT
S_ROLL_ROLL1
S_ROLL_ROLL2
S_ROLL_ROLL3
S_ROLL_ROLL4
S_ROLL_ALTDASH1
S_ROLL_DASH1
S_ROLL_DASH2
S_ROLL_DASH3
S_ROLL_DASH4
S_ROLL_CHECK1
S_ROLL_JUMP1
S_ROLL_JUMP2
S_ROLL_JUMP3
S_ROLL_PAUSE

Object MT_ROLLER
#$Name "Roller"
#$Sprite ROLLA3A7
#$Category Sonic 1 Badniks
MapThingNum = 3089
SpawnState = S_ROLL_STND1
SpawnHealth = 1
SeeState = S_ROLL_FOUN
SeeSound = sfx_None
ReactionTime = 60
AttackSound = sfx_None
PainState = S_NULL
PainChance = 200
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_NULL
DeathState = S_XPLD_FLICKY
XDeathState = S_NULL
DeathSound = sfx_pop
Speed = 6
Radius = 26*FRACUNIT
Height = 48*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_s3k7b
RaiseState = S_NULL
Flags = MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY

State S_ROLL_STND1
SpriteFrame = A
SpriteName = ROLL
Duration = 10
Next = S_ROLL_STND2
Action = A_look
Var1 = (2048<<16)+0
Var2 = 0

State S_ROLL_STND2
SpriteFrame = B
SpriteName = ROLL
Duration = 10
Next = S_ROLL_STND1
Action = A_look
Var1 = (2048<<16)+0
Var2 = 0

State S_ROLL_FOUN
SpriteFrame = A
SpriteName = ROLL
Duration = 40
Next = S_ROLL_SPINDASH
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_ROLL_SPINDASH
SpriteFrame = E
SpriteName = ROLL
Duration = 1
Next = S_ROLL_SPINDASH1
Action = A_DualAction
Var1 = S_ROLL_SPINCOLOR
Var2 = S_ROLL_SPINSOUND

State S_ROLL_SPINCOLOR
SpriteFrame = E
SpriteName = ROLL
Duration = 1
Next = S_ROLL_SPINDASH1
Action = A_ChangeColorABsolute
Var1 = 0
Var2 = 54

State S_ROLL_SPINSOUND
SpriteFrame = E
SpriteName = ROLL
Duration = 1
Next = S_ROLL_SPINDASH1
Action = A_PlaySound
Var1 = sfx_spndsh
Var2 = 1

State S_ROLL_SPINDASH1
SpriteFrame = E
SpriteName = ROLL
Duration = 2
Next = S_ROLL_SPINDASH2
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_ROLL_SPINDASH2
SpriteFrame = F
SpriteName = ROLL
Duration = 2
Next = S_ROLL_SPINDASH3
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_ROLL_SPINDASH3
SpriteFrame = G
SpriteName = ROLL
Duration = 2
Next = S_ROLL_SPINDASH4
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_ROLL_SPINDASH4
SpriteFrame = H
SpriteName = ROLL
Duration = 1
Next = S_ROLL_SPINDASHREPEAT
Action = A_FaceTarget
Var1 = 0
Var2 = 0

State S_ROLL_SPINDASHREPEAT
SpriteFrame = H
SpriteName = ROLL
Duration = 2
Next = S_ROLL_ROLL1
Action = A_Repeat
Var1 = 3
Var2 = S_ROLL_SPINDASH

State S_ROLL_DASH1
SpriteFrame = C
SpriteName = ROLL
Duration = 1
Next = S_ROLL_DASH2
Action = A_Thrust
Var1 = 40
Var2 = 1

State S_ROLL_DASH2
SpriteFrame = C
SpriteName = ROLL
Duration = 1
Next = S_ROLL_DASH3
Action = A_Thrust
Var1 = 40
Var2 = 1

State S_ROLL_DASH3
SpriteFrame = D
SpriteName = ROLL
Duration = 1
Next = S_ROLL_DASH4
Action = A_Thrust
Var1 = 40
Var2 = 1

State S_ROLL_DASH4
SpriteFrame = D
SpriteName = ROLL
Duration = 1
Next = S_ROLL_DASH1
Action = A_Thrust
Var1 = 40
Var2 = 1

State S_ROLL_ROLL1
SpriteFrame = C
SpriteName = ROLL
Duration = 1
Next = S_ROLL_ROLL2
Action = A_DualAction
Var1 = S_ROLL_DASH1
Var2 = S_ROLL_CHECK1

State S_ROLL_ROLL2
SpriteFrame = C
SpriteName = ROLL
Duration = 1
Next = S_ROLL_ROLL3
Action = A_DualAction
Var1 = S_ROLL_DASH2
Var2 = S_ROLL_CHECK1

State S_ROLL_ROLL3
SpriteFrame = D
SpriteName = ROLL
Duration = 1
Next = S_ROLL_ROLL4
Action = A_DualAction
Var1 = S_ROLL_DASH3
Var2 = S_ROLL_CHECK1

State S_ROLL_ROLL4
SpriteFrame = D
SpriteName = ROLL
Duration = 1
Next = S_ROLL_ROLL1
Action = A_Repeat
Var1 = S_ROLL_DASH1
Var2 = S_ROLL_CHECK1

State S_ROLL_CHECK1
SpriteFrame = C
SpriteName = ROLL
Duration = 1
Next = S_ROLL_DASH2
Action = A_CheckTrueRange
Var1 = (0<<16)+128
Var2 = S_ROLL_JUMP1

State S_ROLL_ROLL4
SpriteFrame = D
SpriteName = ROLL
Duration = 1
Next = S_ROLL_JUMP1
Action = A_Repeat
Var1 = 20
Var2 = S_ROLL_ROLL1

State S_ROLL_JUMP1
SpriteFrame = C
SpriteName = ROLL
Duration = 3
Next = S_ROLL_JUMP2
Action = A_BunnyHop
Var1 = 9
Var2 = 10

State S_ROLL_JUMP2
SpriteFrame = D
SpriteName = ROLL
Duration = 3
Next = S_ROLL_JUMP3
Var1 = 0
Var2 = 0

State S_ROLL_JUMP3
SpriteFrame = C
SpriteName = ROLL
Duration = 3
Next = S_ROLL_JUMP2
Var1 = 0
Var2 = 0

State S_ROLL_PAUSE
SpriteFrame = A
SpriteName = ROLL
Duration = 40
Next = S_ROLL_FOUN
Var1 = 0
Var2 = 0