tormenta20 - v0.0.0
    Preparing search index...

    Class Raca

    A Raça (playable race) in Tormenta20.

    Raca.all()
    Raca.find("humano")

    const elfo = Raca.find("elfo")!
    elfo.attributeBonusFor("DES") // +2
    elfo.hasVisaoNoEscuro // false

    Hierarchy

    • BaseModel
      • Raca
    Index

    Constructors

    • Parameters

      • _row: Record<string, unknown>

      Returns Raca

    Accessors

    • get attributeBonuses(): Record<string, number>

      Map of attribute key → bonus value (e.g. { DES: 2, INT: -2 }).

      Returns Record<string, number>

    • get availableChosenAbilities(): unknown[]

      Pool of ability IDs the player chooses from.

      Returns unknown[]

    • get chosenAbilitiesAmount(): number

      Number of racial abilities the player may choose at character creation.

      Returns number

    • get createdAt(): string

      ISO 8601 timestamp of record creation.

      Returns string

    • get hasVisaoNoEscuro(): boolean

      true if the race has darkvision.

      Returns boolean

    • get id(): string

      Unique string identifier (e.g. "espada_longa", "guerreiro").

      Returns string

    • get movement(): number

      Base movement speed in metres.

      Returns number

    • get name(): string

      Display name.

      Returns string

    • get racialAbilities(): string[]

      IDs of racial abilities all members of this race have.

      Returns string[]

    • get skillBonuses(): unknown[]

      JSON array of skill bonus descriptors.

      Returns unknown[]

    • get updatedAt(): string

      ISO 8601 timestamp of last update.

      Returns string

    • get visionRange(): number | null

      Effective range of darkvision/low-light vision in metres, or null for normal vision.

      Returns number | null

    Methods

    • Returns the racial attribute bonus for the given attribute key (e.g. "FOR", "DES"). Returns 0 if there is no bonus for that attribute.

      Parameters

      • attribute: string

      Returns number

    • Returns a plain-object representation of this record.

      Returns {
          attribute_bonuses: Record<string, number>;
          available_chosen_abilities: unknown[];
          chosen_abilities_amount: number;
          description: string;
          id: string;
          movement: number;
          name: string;
          racial_abilities: string[];
          size: RacaSize;
          skill_bonuses: unknown[];
          vision: RacaVision;
          vision_range: number | null;
      }