Class PetAbstract

Pet is a companion for Player which can be used in a battle. Pet will attack during battle based on it's own attribute. To add your own pet, extend Pet class and change the attributes to your liking.


export class Dragon extends Pet {
name = "dragon";
id = "dragon";
attack = 20;
interceptRate = 0.4;
}

Hierarchy

  • Base
    • Pet

Constructors

  • Returns Pet

Properties

attack: number = 5

Damage dealt when attack

description: string = ""

Description of the pet

id: string

The unique id of the entity. Please ensure this id does not contain any spaces

imageUrl?: string

Image to represent this Pet

interceptRate: number = 0.05

Frequency to intercept and attack in battle in the form of percentage

name: string

The name of the entity

ownerName: string = ""

Pet's owner name

Methods

  • Action to take by Pet when in Battle

    Parameters

    Returns EmbedBuilder

  • Returns true if intercept

    Returns boolean

  • Sets the pet ownership

    Parameters

    Returns void

  • MessageEmbed that represents Pet

    Returns EmbedBuilder

Generated using TypeDoc