Reference Source Test
public class | source

Weapon

Extends:

Equipment → Weapon

Equipment that can be equipped on a Character

Constructor Summary

Public Constructor
public

constructor(name: String, count: Number, ability: String, abilityLevel: Number)

Default constructor

Member Summary

Public Members
public

How much damage the weapon can inflict

public

Level of the weapon

public

Whether or not this weapon is a projectile

Method Summary

Public Methods
public

Return the damage this weapon inflicts

public

Return the level of this weapon

public

setDamage(damage: Number)

Set the amount of damage

public

setLevel(level: Number)

Set the level of this weapon

Inherited Summary

From class Equipment
public

Ability of the equipment

public

The ability level on the equipment

public

How many times it can be used

public

Name of the equipment

public

Check if there is a name on this item

public

Return the ability of the equipment

public

Get the ability level

public

Return the number of times equipment has been used

public

Return the name of the equipment

public

update(name: String, count: Number, ability: String, abilityLevel: Number)

Update the equipment stats

Public Constructors

public constructor(name: String, count: Number, ability: String, abilityLevel: Number) source

Default constructor

Override:

Equipment#constructor

Params:

NameTypeAttributeDescription
name String

Name of the equipment

count Number

How many times it can be used

ability String

The ability of this armor

abilityLevel Number

Level for this armor

Public Members

public damage: Number source

How much damage the weapon can inflict

public level: Number source

Level of the weapon

public ranged: Boolean source

Whether or not this weapon is a projectile

Public Methods

public getDamage(): Number source

Return the damage this weapon inflicts

Return:

Number

damage amount

public getLevel(): Number source

Return the level of this weapon

Return:

Number

level of the weapon

public setDamage(damage: Number) source

Set the amount of damage

Params:

NameTypeAttributeDescription
damage Number

amount of damage

public setLevel(level: Number) source

Set the level of this weapon

Params:

NameTypeAttributeDescription
level Number

weapon level