Monster
extends BasicEnemy
in package
Uses
AutoScaleFighter
The Monster entity.
Tags
Table of Contents
- $health : int
- $id : mixed
- $level : mixed
- $name : mixed
- __construct() : mixed
- BasicEnemy constructor. Sets uuid upon creation.
- damage() : mixed
- Does damage to the entity.
- getAttack() : int
- Returns the attack value based on the fighter's level.
- getBuffs() : BuffList
- Returns an empty bufflist.
- getDefense() : int
- Returns the defense value based on the fighter's level.
- getDisplayName() : string
- Returns the enemy's display name - this is the same than the name.
- getHealth() : int
- Returns the enemy's current health.
- getId() : int
- Returns the enemy's id.
- getLevel() : int
- Returns the enemy's level.
- getMaxHealth() : int
- Returns the maximum health based on the fighter's level.
- getName() : string
- Returns the enemy's name.
- heal() : mixed
- Heals the enemy.
- isAlive() : bool
- Returns true if the enemy is alive.
- setHealth() : mixed
- Sets the enemy's current health.
Properties
$health
protected
int
$health
$id
protected
mixed
$id
Tags
$level
protected
mixed
$level
Tags
$name
protected
mixed
$name
Tags
Methods
__construct()
BasicEnemy constructor. Sets uuid upon creation.
public
__construct() : mixed
Tags
Return values
mixed —damage()
Does damage to the entity.
public
damage(int $damage) : mixed
Parameters
- $damage : int
Return values
mixed —getAttack()
Returns the attack value based on the fighter's level.
public
getAttack([bool $ignoreBuffs = false ]) : int
Parameters
- $ignoreBuffs : bool = false
Return values
int —getBuffs()
Returns an empty bufflist.
public
getBuffs() : BuffList
Return values
BuffList —getDefense()
Returns the defense value based on the fighter's level.
public
getDefense([bool $ignoreBuffs = false ]) : int
Parameters
- $ignoreBuffs : bool = false
Return values
int —getDisplayName()
Returns the enemy's display name - this is the same than the name.
public
getDisplayName() : string
Return values
string —getHealth()
Returns the enemy's current health.
public
getHealth() : int
Return values
int —getId()
Returns the enemy's id.
public
getId() : int
Return values
int —getLevel()
Returns the enemy's level.
public
getLevel() : int
Return values
int —getMaxHealth()
Returns the maximum health based on the fighter's level.
public
getMaxHealth() : int
Return values
int —getName()
Returns the enemy's name.
public
getName() : string
Return values
string —heal()
Heals the enemy.
public
heal(int $heal[, type $overheal = false ]) : mixed
Parameters
- $heal : int
- $overheal : type = false
-
True if healing bigger than maxhealth is desired.
Return values
mixed —isAlive()
Returns true if the enemy is alive.
public
isAlive() : bool
Return values
bool —setHealth()
Sets the enemy's current health.
public
setHealth(int $health) : mixed
Parameters
- $health : int