\K_Skill

Monster skill.

Represents an object from the table 'k_skill'.

Summary

Methods
Properties
Constants
__construct()
get_image()
$db
$id
$name
$description
$slot
$cooltime
$hits
$passive
$aoe
$max_level
$multiplier_formula
$upgrade
$level
$effect
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$db

$db : resource

Type

resource — Database connection.

$id

$id : integer

Type

integer — Skill identifier.

$name

$name : string

Type

string — Skill name.

$description

$description : string

Type

string — Skill description.

$slot

$slot : integer

Type

integer — Skill order.

$cooltime

$cooltime : integer

Type

integer — Skill cooldown turns.

$hits

$hits : integer

Type

integer — Number of hits.

$passive

$passive : boolean

Type

boolean — Wether the skill is passive or not.

$aoe

$aoe : boolean

Type

boolean — Wether the skill is AOE.

$max_level

$max_level : integer

Type

integer — Skill max level.

$multiplier_formula

$multiplier_formula : string

Type

string — Skill formula.

$upgrade

$upgrade : \K_SKill

Type

\K_SKill — The skill upgrading this one.

$level

$level : array<mixed,\K_Skill_Level>

Type

array<mixed,\K_Skill_Level> — Available skill levels.

$effect

$effect : array<mixed,\K_Effect>

Type

array<mixed,\K_Effect> — Associated eeffects.

Methods

__construct()

__construct(resource  $db, integer  $id) 

Constructor.

Searches the database and retrieves the information about the skill, populating it and it's items.

Parameters

resource $db

Connection to the database.

integer $id

Skill identifier.

get_image()

get_image() : string

Gets the path to the skill image. The image must be in the img/skill/ directory, and its name must be the set id, padded with '0' to 8 digits, and the extension must be '.png'.

Returns

string —

Image URL, or a fixed unknown image.