Legend of the Green Dragon

Stats
in package

Table of Contents

$lastCat  : string
Last category used.
$stats  : array<string|int, mixed>
Array stats of character.
addcharstat()  : mixed
Add a attribute and/or value to the character stats display.
getcharstat()  : mixed
Returns the value associated with the section & label. Returns an empty string if the stat isn't set.
getLastCat()  : string
Get last category used.
getStats()  : array<string|int, mixed>
Get array stats of character.
setcharstat()  : mixed
Sets a value to the passed category & label for character stats.
setLastCat()  : self
Set last category used.
setStats()  : array<string|int, mixed>
Set array stats of character. (THIS ACTION REMPLACE ALL STATS) Use for alter original stats (getStats()).
wipeStats()  : mixed
Resets the character stats array.

Properties

$lastCat

Last category used.

protected string $lastCat = 'Other Info'

$stats

Array stats of character.

protected array<string|int, mixed> $stats = []

Methods

addcharstat()

Add a attribute and/or value to the character stats display.

public addcharstat(string $label[, string $value = null ]) : mixed
Parameters
$label : string

The label to use

$value : string = null

(optional) value to display

Return values
mixed

getcharstat()

Returns the value associated with the section & label. Returns an empty string if the stat isn't set.

public getcharstat(string $section[, string $title = null ]) : mixed
Parameters
$section : string

The character stat section

$title : string = null

(Optional) The stat display label

Return values
mixed

The value associated with the stat

getLastCat()

Get last category used.

public getLastCat() : string
Return values
string

getStats()

Get array stats of character.

public getStats() : array<string|int, mixed>
Return values
array<string|int, mixed>

setcharstat()

Sets a value to the passed category & label for character stats.

public setcharstat(string $cat[, string $label = null ][, string $val = null ]) : mixed
Parameters
$cat : string

The category for the char stat

$label : string = null

(Optional) The label associated with the value

$val : string = null

The value of the attribute

Return values
mixed

setLastCat()

Set last category used.

public setLastCat(string $lastCat) : self
Parameters
$lastCat : string

Last category used

Return values
self

setStats()

Set array stats of character. (THIS ACTION REMPLACE ALL STATS) Use for alter original stats (getStats()).

public setStats(array<string|int, mixed> $stats) : array<string|int, mixed>
Parameters
$stats : array<string|int, mixed>
Return values
array<string|int, mixed>

wipeStats()

Resets the character stats array.

public wipeStats() : mixed
Return values
mixed

Search results