Skip to content

Commit

Permalink
fix: Expose Creature interface
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Apr 22, 2023
1 parent b9da610 commit 418d8bb
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "obsidian";
import type { Creature } from "./src/utils/creature";
import type { Spell, Trait, ability } from "obsidian-overload";

// CUSTOM EVENTS
Expand Down Expand Up @@ -214,3 +213,47 @@ export interface ExperienceThreshold {
Deadly: number;
Daily: number;
}

import type InitiativeTracker from "src/main";
export declare function getId(): string;
export declare class Creature {
creature: HomebrewCreature;
active: boolean;
name: string;
modifier: number;
hp: number;
hit_dice?: string;
temp: number;
ac: number | string;
note: string;
enabled: boolean;
hidden: boolean;
max: number;
level: number;
player: boolean;
status: Set<Condition>;
marker: string;
private _initiative;
source: string | string[];
id: string;
xp: number;
viewing: boolean;
number: number;
display: string;
friendly: boolean;
"statblock-link": string;
getXP(plugin: InitiativeTracker): number;
constructor(creature: HomebrewCreature, initiative?: number);
get hpDisplay(): string;
get initiative(): number;
set initiative(x: number);
getName(): string;
getStatblockLink(): string;
[Symbol.iterator](): Generator<string | number | boolean, void, unknown>;
static new(creature: Creature): Creature;
static from(creature: HomebrewCreature | SRDMonster): Creature;
update(creature: HomebrewCreature): void;
toProperties(): this;
toJSON(): CreatureState;
static fromJSON(state: CreatureState): Creature;
}

0 comments on commit 418d8bb

Please sign in to comment.