import * as roll from "../utils/dice.js"; import * as id from "../utils/id.js"; /** * A playable character. * * @class */ export class Character { /** @type {string} character's name */ name; /** * Alive? * * @protected * @type {boolean} */ _alive = true; get alive() { return _alive; } /** * @protected * @type {number} The number of XP the character has. */ _xp = 0; get xp() { return this._xp; } /** * @protected * @type {number} The character's level. */ _level = 1; get level() { return this._level; } /** * @protected * @type {string} unique name used for chats when there's a name clash and also other things that require a unique character id */ _id; get id() { return this._id; } /** * @protected * @type {string} username of the player that owns this character. */ _username; get username() { return this._username; } /** @type {string} Bloodline background */ ancestry; /** @type {string} Foundational background */ foundation; /** @type {string} Money */ silver; /** @type {number} Current number of hit points */ currentHitPoints; /** @type {number} Number of hit points when fully healed */ maxHitPoints; /** @type {number} Number items you can carry */ itemSlots; /** @type {Set} Things the character is particularly proficient at. */ proficiencies = new Set(); /** @type {Map