Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Player

Hierarchy

  • Player

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

  • Returns Player

Properties

absentLastUsedTime

absentLastUsedTime: number = 0

attack

attack: number = 0

benignity

benignity: number = 0

containerSortInfo

containerSortInfo: object

Type declaration

currentHint

currentHint: HintType = HintType.WelcomeToWayward

customization

customization: IPlayerCustomization

deathBy

deathBy: string = messages[Message.Mysteriously]

defense

defense: PlayerDefense = new PlayerDefense(0, 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

dialogContainerInfo

dialogContainerInfo: IDialogInfo[] = []

dialogInfo

dialogInfo: object

Type declaration

equipped

equipped: object

Type declaration

  • [index: number]: number

exploredMap

exploredMap: IExploreMap[] | undefined

exploredMapEncodedData

exploredMapEncodedData: number[][]

exploredMapNotSaved

exploredMapNotSaved: IExploreMap[] | undefined

facingDirection

facingDirection: FacingDirection = FacingDirection.None

fromX

fromX: number = 0

fromY

fromY: number = 0

handToUse

handToUse: EquipType = EquipType.LeftHand

hintSeen

hintSeen: boolean[] = []

id

id: number

identifier

identifier: string

isConnecting

isConnecting: boolean = false

isMoving

isMoving: boolean = false

isMovingClientside

isMovingClientside: boolean = false

lightBonus

lightBonus: number = 0

malignity

malignity: number = 0

moveType

moveType: MoveType = MoveType.Land

movementAnimation

movementAnimation: number = 0

movementComplete

movementComplete: boolean = false

movementCompleteZ

movementCompleteZ: number | undefined = undefined

movementFinishTime

movementFinishTime: number = 0

movementProgress

movementProgress: number = 1

name

name: string

nextMoveDirection

nextMoveDirection: FacingDirection | undefined

nextMoveTime

nextMoveTime: number = 0

nextProcessInput

nextProcessInput: number = 0

nextX

nextX: number = -1

nextY

nextY: number = -1

noInputReceived

noInputReceived: boolean = false

options

options: IOptions

quickSlotInfo

quickSlotInfo: IQuickSlotInfo[] = []

raft

raft: number | undefined = undefined

realTimeTickActionDelay

realTimeTickActionDelay: number = 0

restData

restData: IRestData | undefined

revealedItems

revealedItems: object

Type declaration

  • [index: number]: boolean

score

score: number = 0

skills

skills: ISkillSet = skillSet()

spawnPoint

spawnPoint: IPointZ = {} as IPointZ

starvation

starvation: number = 0

state

state: PlayerState = PlayerState.None

stopNextMovement

stopNextMovement: boolean = false

strength

strength: number = 0

swimming

swimming: boolean = false

tamedCreatures

tamedCreatures: number[] = []

travelData

travelData: IPlayerTravelData | undefined

turns

turns: number = 0

walkSoundCounter

walkSoundCounter: number = 4

wasAbsentPlayer

wasAbsentPlayer: boolean = false

weight

weight: number = 0

weightBonus

weightBonus: number = weightBonus

x

x: number = 0

y

y: number = 0

z

z: WorldZ = WorldZ.Overworld

Methods

addDelay

  • addDelay(delay: Delay, replace?: boolean): void
  • Parameters

    • delay: Delay
    • Optional replace: boolean

    Returns void

addMilestone

attributes

  • attributes(): void

burn

  • burn(skipMessage?: boolean, skipParry?: boolean, equipType?: EquipType): number | undefined
  • Burn the player

    Parameters

    • Default value skipMessage: boolean = false
    • Optional skipParry: boolean
    • Optional equipType: EquipType

    Returns number | undefined

calculateEquipmentStats

  • calculateEquipmentStats(): void

canJump

  • canJump(): boolean
  • Returns boolean

canSeeTile

  • canSeeTile(tileX: number, tileY: number, tileZ: number, isClientSide?: boolean): boolean
  • Parameters

    • tileX: number
    • tileY: number
    • tileZ: number
    • Optional isClientSide: boolean

    Returns boolean

cancelResting

checkAndRemoveBlood

  • checkAndRemoveBlood(): boolean

checkForGather

  • checkForGather(): IDoodad | undefined

checkForGatherFire

  • checkForGatherFire(): string | undefined

checkForStill

  • checkForStill(): boolean

checkForTargetInRange

  • checkForTargetInRange(range: number, includePlayers?: boolean): IMobCheck

checkReputationMilestones

  • checkReputationMilestones(): void

checkSkillMilestones

  • checkSkillMilestones(): void

checkUnder

  • checkUnder(inFacingDirection?: boolean, autoActions?: boolean, enterCave?: boolean, forcePickUp?: boolean, skipDoodadEvents?: boolean): void
  • Parameters

    • Optional inFacingDirection: boolean
    • Optional autoActions: boolean
    • Default value enterCave: boolean = true
    • Default value forcePickUp: boolean = false
    • Default value skipDoodadEvents: boolean = false

    Returns void

checkWeight

  • checkWeight(): void

createItemInInventory

damage

  • damage(damageInfoOrAmount: IDamageInfo | number, damageMessage?: string, soundDelay?: number): number | undefined
  • Parameters

    • damageInfoOrAmount: IDamageInfo | number
    • Optional damageMessage: string
    • Default value soundDelay: number = 0

    Returns number | undefined

damageEquipment

  • damageEquipment(): void

equip

  • equip(item: IItem, slot: EquipType, internal?: boolean, switchingHands?: boolean): void
  • Parameters

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

    Returns void

getConsumeBonus

  • getConsumeBonus(skillUse: SkillType, item: IItem | undefined): number

getDefaultCarveTool

  • getDefaultCarveTool(): IItem | undefined

getDialogInfo

  • getDialogInfo(dialogIndex: string | number): IDialogInfo

getEquipSlotForItem

getEquippedItem

getEquippedItems

  • getEquippedItems(): IItem[]

getFacingPoint

getFacingTile

getHandToUse

getInspectHealthMessage

getMaxHealth

  • getMaxHealth(): number

getMovementFinishTime

  • getMovementFinishTime(): number

getMovementIntent

  • getMovementIntent(): Bindable | undefined

getName

  • getName(html?: boolean): string
  • Parameters

    • Optional html: boolean

    Returns string

getPoint

getReputation

  • getReputation(): number

getTile

getWeightMovementPenalty

  • getWeightMovementPenalty(): number

getWeightStatus

hasDelay

  • hasDelay(): boolean
  • Returns boolean

hasTamedCreature

  • hasTamedCreature(creature: ICreature): boolean

healthSyncCheck

  • healthSyncCheck(): void

hurtHands

inspect

  • inspect(x: number, y: number, z?: number): void
  • Parameters

    • x: number
    • y: number
    • Default value z: number = this.z

    Returns void

inspectTile

isFacingCarvableTile

  • isFacingCarvableTile(): boolean

isGhost

  • isGhost(): boolean
  • Returns boolean

isLocalPlayer

  • isLocalPlayer(): boolean

isResting

  • isResting(): boolean
  • Returns boolean

isRestingCancelled

  • isRestingCancelled(): boolean

isServer

  • isServer(): boolean
  • Returns boolean

kill

  • kill(): void
  • Returns void

passTurn

  • Parameters

    Returns void

preSerializeObject

  • preSerializeObject(): void

processInput

  • processInput(): void

queueSoundEffect

  • queueSoundEffect(type: SfxType, delay?: number, speed?: number, noPosition?: boolean): void
  • Parameters

    • type: SfxType
    • Default value delay: number = 0
    • Default value speed: number = 1
    • Default value noPosition: boolean = false

    Returns void

queueSoundEffectInFront

  • queueSoundEffectInFront(type: SfxType, delay?: number, speed?: number, noPosition?: boolean): void
  • Parameters

    • type: SfxType
    • Default value delay: number = 0
    • Default value speed: number = 1
    • Default value noPosition: boolean = false

    Returns void

resetMovementStates

  • resetMovementStates(): void

restoreExploredMap

  • restoreExploredMap(): void

revealItem

setId

  • setId(id: number): void
  • Parameters

    • id: number

    Returns void

setPosition

  • setPosition(point: IPointZ): void

setRaft

  • setRaft(itemId: number | undefined): void
  • Parameters

    • itemId: number | undefined

    Returns void

setTamedCreatureEnemy

setZ

  • setZ(z: number): void
  • Parameters

    • z: number

    Returns void

setup

  • setup(completedMilestones: number): void
  • Parameters

    • completedMilestones: number

    Returns void

shakeStat

skillGain

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

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

    Returns void

staminaCheck

  • staminaCheck(): boolean

staminaReduction

  • staminaReduction(skillType: SkillType): void

startResting

tick

  • tick(isPassTurn?: boolean): void
  • Parameters

    • Optional isPassTurn: boolean

    Returns void

unequip

  • unequip(item: IItem, internal?: boolean, skipMessage?: boolean, switchingHands?: boolean): void
  • Parameters

    • item: IItem
    • Default value internal: boolean = false
    • Default value skipMessage: boolean = false
    • Default value switchingHands: boolean = false

    Returns void

unequipAll

  • unequipAll(): void

updateCraftTable

  • updateCraftTable(): void

updateDialogInfo

  • updateDialogInfo(dialogIndex: string | number): void
  • Parameters

    • dialogIndex: string | number

    Returns void

updateDismantleTable

  • updateDismantleTable(): void

updateMilestones

  • updateMilestones(): void

updateMovementIntent

  • updateMovementIntent(bind: Bindable | undefined): void

updateQuickSlotInfo

updateReputation

  • updateReputation(reputation: number): void
  • Parameters

    • reputation: number

    Returns void

updateStatsAndAttributes

  • updateStatsAndAttributes(): void

updateTables

  • updateTables(): void

updateTablesAndWeight

  • updateTablesAndWeight(): void

Object literals

attackFromEquip

attackFromEquip: object

leftHand

leftHand: number = 0

rightHand

rightHand: number = 0

direction

direction: object

x

x: number = 0

y

y: number = 0

inventory

inventory: object

containedItems

containedItems: IItem[] = (new Array()) as IItemArray

weightCapacity

weightCapacity: number = Infinity

stats

stats: object

health

health: object

regen

regen: number = 80

regenBase

regenBase: number = 80

timer

timer: number = 0

value

value: number = 0

hunger

hunger: object

regen

regen: number = 100

regenBase

regenBase: number = 100

timer

timer: number = 0

value

value: number = 0

stamina

stamina: object

regen

regen: number = 10

regenBase

regenBase: number = 10

timer

timer: number = 0

value

value: number = 0

thirst

thirst: object

regen

regen: number = 80

regenBase

regenBase: number = 80

timer

timer: number = 0

value

value: number = 0

status

status: object

bleeding

bleeding: boolean = false

burned

burned: boolean = false

poisoned

poisoned: boolean = false

Generated using TypeDoc