Home Reference Source Repository
public class | source

BlackVoidSphere

Extends:

EntityCreature → BlackVoidSphere

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public
public
public
public

Inherited Summary

From class Entity
public
public

getId(): *

public

getName(): *

public
public

toString(): *

From class Creature
public

addAbility(ability: Ability)

Adds an Ability to the Creature's list of Abilities.

public

addItem(item: Item, backpackOnly: boolean)

Adds an item to the creature's inventory, optionally equipping it if there's room

public

applyBuff(dungeon: Dungeon, buff: Buff)

Puts a Buff onto the creature.

public

Tells whether the Creature may act on the current timestep.

public

canAddItem(item: Item, backpackOnly: boolean): boolean

Checks to see if the creature's backpack can hold another item

public

canOccupy(tile: *): Boolean

public

canOccupyNow(tile: *): *

public

canSee(dungeon: *, tile: *): Boolean

Determines if the Creature can see the given tile and what's on it.

public

Tells whether the creature can pickup and use items.

public

die(-: Dungeon)

Kills this creature, removing it from the Dungeon

public

executeMove(dungeon: *, move: *)

public

Gets a list of the Creature's abilities

public

Gets the creature's Ability at the given index

public

Gets the index of a creature's Ability

public

getArmor(): *

public

Get's the Creature's maximum allowed hitpoints

public

Get's the Creature's maximum allowed mana

public

Gets a list of the Creature's Buffs.

public

getClosestEnemy(dungeon: *): *

public

Get's the Creature's current hitpoints

public

Get's the Creature's current mana

public

Get's the amount that damage of the given type is reduced by the creature's defenses.

public
public

Gets the creature's inventory

public
public

getNextMove(dungeon: *): Move | Promise

public
public
public
public

Gets the number of timesteps until this Creature's next move.

public

getVisibleCreatures(dungeon: *): *

public

getVisibleEnemies(dungeon: *): *

public

getVisibleTiles(dungeon: *): *

public
public

hasSeen(tile: *): *

public

heal(dungeon: Dungeon, amount: number)

Restores the Creature's hitpoints by a given amount. The Creature cannot go above it's hitpoint maximum in this way

public

Tells whether the Creature is dead.

public

isEnemy(other: *): *

public
public

Modifies the Creature's current mana by the given amount. Mana cannot go below zero or above the Creature's base mana value

public

observeMove(dungeon: *, actor: *, move: *)

public

An optional death handler for this Creature.

public

receiveDamage(dungeon: Dungeon, amount: number, type: string): number

Applies a given amount of typed damage to the creature, minus the creature's damage reduction

public

setArmor(armor: *)

public

setMeleeWeapon(weapon: *)

public

setRangedWeapon(weapon: *)

public

setStrategy(strategy: *)

public

takeItems(dungeon: Dungeon)

Takes items from the Creature's current tile and attempts to add each one to it's Inventory in sequence

public

timestep(dungeon: *)

public

visionObsuredBy(tile: *): *

Public Constructors

public constructor() source

Override:

Creature#constructor

Public Methods

public getBaseHP(): number source

Override:

Creature#getBaseHP

Return:

number

public getMeleeWeapon(): * source

Override:

Creature#getMeleeWeapon

Return:

*

public getRangedWeapon(): undefined source

Override:

Creature#getRangedWeapon

Return:

undefined

public getSpeed(): number source

Override:

Creature#getSpeed

Return:

number