SystemCharacter
in package
implements
CharacterInterface
Uses
MockCharacter
Provides a basic system character to serve as an anonymous user.
Whenever a message should be sent by the System instead of a standard character, this class is returned by the entity containing the message instead of a standard character instance.
Interfaces, Classes and Traits
- CharacterInterface
- Interface for the character model and all objects that mimick such a model.
Table of Contents
- $characterName : mixed
- $instance : mixed
- __call() : mixed
- damage() : mixed
- getAttack() : int
- getBuffs() : BuffList
- Returns an empty bufflist.
- getDefense() : int
- getDisplayName() : string
- getHealth() : int
- getId() : UuidInterface
- getInstance() : SystemCharacter
- Return an instance of SystemCharacter.
- getLevel() : int
- getMaxHealth() : int
- getName() : string
- getProperty() : mixed
- getViewpoint() : Viewpoint
- heal() : mixed
- isAlive() : bool
- setHealth() : mixed
- __construct() : mixed
- Private constructor. Use the static method getInstance().
Properties
$characterName
public
static mixed
$characterName
= "System"
$instance
public
static mixed
$instance
= null
Methods
__call()
public
__call(mixed $name, mixed $arguments) : mixed
Parameters
- $name : mixed
- $arguments : mixed
Tags
Return values
mixed —damage()
public
damage(int $damage) : mixed
Parameters
- $damage : int
Tags
Return values
mixed —getAttack()
public
getAttack([bool $ignoreBuffs = false ]) : int
Parameters
- $ignoreBuffs : bool = false
Tags
Return values
int —getBuffs()
Returns an empty bufflist.
public
getBuffs() : BuffList
Return values
BuffList —getDefense()
public
getDefense([bool $ignoreBuffs = false ]) : int
Parameters
- $ignoreBuffs : bool = false
Tags
Return values
int —getDisplayName()
public
getDisplayName() : string
Tags
Return values
string —getHealth()
public
getHealth() : int
Tags
Return values
int —getId()
public
getId() : UuidInterface
Tags
Return values
UuidInterface —getInstance()
Return an instance of SystemCharacter.
public
static getInstance() : SystemCharacter
Return values
SystemCharacter —getLevel()
public
getLevel() : int
Tags
Return values
int —getMaxHealth()
public
getMaxHealth() : int
Tags
Return values
int —getName()
public
getName() : string
Tags
Return values
string —getProperty()
public
getProperty(string $name[, null $default = null ]) : mixed
Parameters
- $name : string
- $default : null = null
Return values
mixed —getViewpoint()
public
getViewpoint() : Viewpoint
Tags
Return values
Viewpoint —heal()
public
heal(int $heal[, bool $overheal = false ]) : mixed
Parameters
- $heal : int
- $overheal : bool = false
Tags
Return values
mixed —isAlive()
public
isAlive() : bool
Tags
Return values
bool —setHealth()
public
setHealth(int $amount) : mixed
Parameters
- $amount : int
Tags
Return values
mixed —__construct()
Private constructor. Use the static method getInstance().
private
__construct() : mixed