ElixirDoom.Enemy (elixir_doom v0.1.0)

Copy Markdown View Source

What monsters do in their states: wait and listen, chase, close in and attack, and cry out when hurt or killed.

Each function takes the world and the id of the thing acting and gives the world back; ElixirDoom.Actions calls them by the action names in the state table.

Summary

Functions

A sound made by thing id wakes the monsters within earshot of it.

A baron's claw or ball.

A demon's bite.

When the last baron of E1M8 dies, the floor tagged 666 lowers.

A cacodemon's bite or ball.

A heavy weapon dude's chaingun burst.

A lost soul hurls itself at its target.

Chase the target: turn to the way it is going, attack when it can, step on.

A blast of 128 at the thing, credited to whatever set it off.

Turn to face the target, a little off where it is hard to see.

A body stops blocking.

An imp's claw or fireball.

Stand and look and listen for a player; wake to chase one.

The pain cry.

A zombie's pistol shot.

After a burst, keep firing while the target is alive and in sight; give up now and then less often than one time in chance out of 256.

A Cyberdemon fires a rocket at its target.

The death cry.

A sergeant's shotgun blast.

The sound of being torn apart.

A step that makes a sound, name, then the chase goes on.

Functions

alert(world, id)

@spec alert(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A sound made by thing id wakes the monsters within earshot of it.

baron(world, id)

@spec baron(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A baron's claw or ball.

bite(world, id)

A demon's bite.

boss_death(world, id)

@spec boss_death(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

When the last baron of E1M8 dies, the floor tagged 666 lowers.

caco(world, id)

A cacodemon's bite or ball.

chaingun(world, id)

@spec chaingun(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A heavy weapon dude's chaingun burst.

charge(world, id)

@spec charge(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A lost soul hurls itself at its target.

chase(world, id)

@spec chase(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

Chase the target: turn to the way it is going, attack when it can, step on.

explode(world, id)

@spec explode(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A blast of 128 at the thing, credited to whatever set it off.

face_target(world, id)

@spec face_target(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

Turn to face the target, a little off where it is hard to see.

fall(world, id)

A body stops blocking.

imp(world, id)

An imp's claw or fireball.

look(world, id)

Stand and look and listen for a player; wake to chase one.

pain(world, id)

The pain cry.

pistol(world, id)

@spec pistol(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A zombie's pistol shot.

refire(world, id, chance)

@spec refire(ElixirDoom.World.t(), term(), 0..255) :: ElixirDoom.World.t()

After a burst, keep firing while the target is alive and in sight; give up now and then less often than one time in chance out of 256.

rocket(world, id)

@spec rocket(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A Cyberdemon fires a rocket at its target.

scream(world, id)

@spec scream(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

The death cry.

shotgun(world, id)

@spec shotgun(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()

A sergeant's shotgun blast.

slop(world, id)

The sound of being torn apart.

stomp(world, id, name)

A step that makes a sound, name, then the chase goes on.