BasicEnemy
in package
implements
FighterInterface
Tags
Interfaces, Classes and Traits
- FighterInterface
- Interface for models that should be able to participate in fights.
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.
- 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.
- 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 —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 —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