Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Player

Hierarchy

  • Player

Implements

Index

Constructors

constructor

  • Returns Player

Properties

attack

attack: number = 0

attackFromEquip

attackFromEquip: number = 0

creatureSpawnTimer

creatureSpawnTimer: number = 0

deathBy

deathBy: string = messages[Message.Mysteriously]

defense

defense: PlayerDefense = new PlayerDefense(0,new Resistances(DamageType.Blunt, 0,DamageType.Piercing, 0,DamageType.Fire, 0,DamageType.Slashing, 0),new Vulnerabilities(DamageType.Blunt, 0,DamageType.Piercing, 0,DamageType.Fire, 0,DamageType.Slashing, 0))

defenses

defenses: number[] = []

dehydration

dehydration: number = 0

dexterity

dexterity: number = 0

dialog

dialog: any

facingDirection

facingDirection: FacingDirection = FacingDirection.None

fromX

fromX: number = 0

fromY

fromY: number = 0

gender

gender: Gender

health

health: number = 0

healthTimer

healthTimer: number = 0

hintSeen

hintSeen: boolean[] = []

hunger

hunger: number = 0

hungerTimer

hungerTimer: number = 0

isMoving

isMoving: boolean

lightBonus

lightBonus: number = 0

malignityNegative

malignityNegative: number = 0

malignityPlus

malignityPlus: number = 0

moveType

moveType: MoveType = MoveType.Land

movement

movement: IInputMovement

nextX

nextX: number = -1

nextY

nextY: number = -1

score

score: number = 0

skills

skills: ISkillSet = skillSet()

stamina

stamina: number = 0

staminaTimer

staminaTimer: number = 0

starvation

starvation: number = 0

state

state: PlayerState = PlayerState.None

stepCounter

stepCounter: number = 0

strength

strength: number = 0

Player strength !== max health

swimming

swimming: boolean = false

talent

talent: number

thirst

thirst: number = 0

thirstTimer

thirstTimer: number = 0

turns

turns: number = 0

weight

weight: number = 0

weightBonus

weightBonus: number = 20

x

x: number = 0

y

y: number = 0

z

z: number = Z_NORMAL

Methods

addMilestone

  • addMilestone(milestone: MilestoneType, data?: number | null): void
  • Parameters

    • milestone: MilestoneType
    • Default value data: number | null = null

    Returns void

attributes

  • attributes(): void
  • Returns void

calculateEquipmentStats

  • calculateEquipmentStats(): void
  • Returns void

canCarve

  • canCarve(): IItem | null
  • Returns IItem | null

canJump

  • canJump(): boolean
  • Returns boolean

checkWeight

  • checkWeight(): void
  • Returns void

damage

  • damage(amount: number, damageMessage: string, soundDelay?: number): void
  • Parameters

    • amount: number
    • damageMessage: string
    • Default value soundDelay: number = 0

    Returns void

damageEquipment

  • damageEquipment(): void
  • Returns void

directionToMovement

drink

  • drink(): void
  • Returns void

equip

  • Parameters

    • item: IItem
    • slot: EquipType
    • Default value internal: boolean = false

    Returns void

getBurned

  • getBurned(bypassMessages?: boolean): number | null
  • Parameters

    • Default value bypassMessages: boolean = false

    Returns number | null

getMalignity

  • getMalignity(): number
  • Returns number

getMaxHealth

  • getMaxHealth(): number
  • Returns number

getSerializationProperties

  • getSerializationProperties(_: string): Array<string>

hurtHands

  • Parameters

    Returns void

jump

  • jump(): void
  • Returns void

pickUpAllItems

  • pickUpAllItems(): void
  • Returns void

Private resetDefense

  • resetDefense(): void
  • Returns void

skillGain

  • skillGain(skillType: SkillType, mod?: number, bypass?: boolean): void
  • Parameters

    • skillType: SkillType
    • Optional mod: number
    • Optional bypass: boolean

    Returns void

staminaCheck

  • staminaCheck(): boolean
  • Returns boolean

staminaReduction

  • staminaReduction(skillType: SkillType): void
  • Parameters

    Returns void

Private statGain

  • statGain(stat: StatType, bypass: boolean): void
  • Parameters

    Returns void

unequip

  • unequip(item: IItem): void
  • Parameters

    Returns void

updateDirection

  • Parameters

    Returns void

updateMalignity

  • updateMalignity(malignity: number): void
  • Parameters

    • malignity: number

    Returns void

Object literals

direction

direction: object

x

x: number = 0

y

y: number = 0

inventory

inventory: object

containedItems

containedItems: IItemArray = <Item.IItemArray>(new Array())

containedWithin

containedWithin: null = null

weightCapacity

weightCapacity: number = Infinity

status

status: object

bleeding

bleeding: boolean = false

burned

burned: boolean = false

poisoned

poisoned: boolean = false

Generated using TypeDoc