docs
This commit is contained in:
@@ -11,13 +11,21 @@ import {
|
||||
import { Character } from '../../characters/entities/character.entity';
|
||||
import { HuntEncounter } from '../../hunting/entities/hunt-encounter.entity';
|
||||
import { MonsterDefinition } from '../../monsters/entities/monster-definition.entity';
|
||||
import { CombatIntent } from '../combat-engine.types';
|
||||
import { ActiveStatusEffect, CombatIntent } from '../combat-engine.types';
|
||||
import { CombatStatus } from '../combat-status.enum';
|
||||
import type { MonsterAbilities } from '../../monsters/monster-abilities';
|
||||
|
||||
export interface CombatCombatantState {
|
||||
attack: number;
|
||||
armor: number;
|
||||
pendingAction?: CombatIntent;
|
||||
statusEffects?: ActiveStatusEffect[];
|
||||
}
|
||||
|
||||
export interface CombatMonsterState extends CombatCombatantState {
|
||||
// Snapshotted from MonsterDefinition when the fight starts, so retuning
|
||||
// content mid-fight cannot change the rules of a running combat.
|
||||
abilities: MonsterAbilities;
|
||||
}
|
||||
|
||||
export interface CombatPlayerState extends CombatCombatantState {
|
||||
@@ -69,7 +77,7 @@ export class Combat {
|
||||
playerState!: CombatPlayerState;
|
||||
|
||||
@Column({ name: 'monster_state', type: 'jsonb' })
|
||||
monsterState!: CombatCombatantState;
|
||||
monsterState!: CombatMonsterState;
|
||||
|
||||
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
||||
createdAt!: Date;
|
||||
|
||||
Reference in New Issue
Block a user