@kayahr/wastelib
    Preparing search index...

    Class Character

    Character data used for player characters and NPCs.

    TODO Add setters for all the data.

    Index

    Methods

    • Returns the afflictions.

      TODO This is bit map. Find out what each bit means.

      Returns number

      The afflictions.

    • Returns the item index of the equipped armor. The index starts with 1. 0 means no armor is equipped.

      Returns number

      The item index of the equipped armor. 0 if none.

    • Returns the armor class.

      Returns number

      The armor class.

    • Returns the chance of refusing an attribute usage. Affected by the willingness value.

      TODO Find out how this actually works.

      Returns number

      The chance to refuse an attribute usage.

    • Returns the current constitution.

      Returns number

      The current constitution.

    • Returns the dexterity.

      Returns number

      The dexterity.

    • Returns the experience points.

      Returns number

      The experience points.

    • Returns the intelligence.

      Returns number

      The intelligence.

    • Returns the chance of refusing an item usage. Affected by the willingness value.

      TODO Find out how this actually works.

      Returns number

      The chance to refuse an item usage.

    • Returns the string ID of the join message.

      Returns number

      The string ID of the join message.

    • Returns the last constitution before the player went unconscious or worse.

      Returns number

      The last recorded constitution.

    • Returns the maximum constitution.

      Returns number

      The maximum constitution.

    • Returns the amount of dollars the character owns.

      Returns number

      The amount of dollars.

    • Returns the character name. NPC names are always upper-case.

      Returns string

      The character name.

    • Returns the number of unspent skill points.

      Returns number

      The number of unspent skill points.

    • Returns the chance of refusing a skill usage. Affected by the willingness value.

      TODO Find out how this actually works.

      Returns number

      The chance to refuse a skill usage.

    • Returns the chance of refusing to trade. Affected by the willingness value.

      TODO Find out how this actually works.

      Returns number

      The chance to refuse trading.

    • Returns the item index of the equipped weapon. The index starts with 1. 0 means no weapon is equipped.

      Returns number

      The item index of the equipped weapon. 0 if none.

    • Returns the willingness to carry out a command.

      TODO Find out how this actually works.

      Returns number

      The willingness to carry out a command.

    • Checks if character has won the game.

      Returns boolean

      True if character has won the game, false if not.

    • Checks if character is an NPC.

      Returns boolean

      True if NPC, false if player character.

    • Checks if character has received the special promotion after the end of the game.

      Returns boolean

      True if character has received the special promotion, false if not.