Documentation

BasicEnemy
in package
implements FighterInterface

Tags
MappedSuperclass

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

$id

protected mixed $id
Tags
Id

@Column(type="uuid", unique=True)

$level

protected mixed $level
Tags
Column

(type="integer");

$name

protected mixed $name
Tags
Column

(type="string", length=50);

Methods

__construct()

BasicEnemy constructor. Sets uuid upon creation.

public __construct() : mixed
Tags
throws
Exception
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
Return values
mixed

Search results