# SWDB

# \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

File
  application/entity/K_Skill.php
Package
  Default
Class hierarchy
  \Entity
  \K_Skill

## Tags

category | Entity

## Properties

### $db

    $db : resource

#### Type

resource — Database connection.

#

Inherited from
  \Entity

## Tags

None found

### $id

    $id : integer

#### Type

integer — Skill identifier.

#

## Tags

None found

### $name

    $name : string

#### Type

string — Skill name.

#

## Tags

None found

### $description

    $description : string

#### Type

string — Skill description.

#

## Tags

None found

### $slot

    $slot : integer

#### Type

integer — Skill order.

#

## Tags

None found

### $cooltime

    $cooltime : integer

#### Type

integer — Skill cooldown turns.

#

## Tags

None found

### $hits

    $hits : integer

#### Type

integer — Number of hits.

#

## Tags

None found

### $passive

    $passive : boolean

#### Type

boolean — Wether the skill is passive or not.

#

## Tags

None found

### $aoe

    $aoe : boolean

#### Type

boolean — Wether the skill is AOE.

#

## Tags

None found

### $max_level

    $max_level : integer

#### Type

integer — Skill max level.

#

## Tags

None found

### $multiplier_formula

    $multiplier_formula : string

#### Type

string — Skill formula.

#

## Tags

None found

### $upgrade

    $upgrade : \K_SKill

#### Type

\K_SKill — The skill upgrading this one.

#

## Tags

None found

### $level

    $level : array<mixed,\K_Skill_Level>

#### Type

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

#

## Tags

None found

### $effect

    $effect : array<mixed,\K_Effect>

#### Type

array<mixed,\K_Effect> — Associated eeffects.

#

## Tags

None found

## 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.

#

## Tags

None found

### 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.

#

## Tags

None found

### K_Skill.php