Skip to content

Commit

Permalink
create UnitSize & UnitDisplayInfo types
Browse files Browse the repository at this point in the history
  • Loading branch information
allmtz committed Jul 28, 2023
1 parent 2083027 commit a675eab
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/data/units.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
import { Movement } from '../creature';

export type UnitSize = 1 | 2 | 3;
export type UnitDisplayInfo = {
width: number;
height: number;
'offset-x': number;
'offset-y': number;
};

type Stats = {
health: number;
regrowth: number;
Expand Down Expand Up @@ -25,13 +35,13 @@ type UnitDataStructure = readonly {
playable: boolean;
level: number | string;
realm: string;
size: number;
size: UnitSize;
stats: Stats;
animation: { walk_speed: number };
type?: string;
drop?: { name: string } & Partial<Stats>;
movementType?: 'hover';
display?: { width: number; height: number; 'offset-x': number; 'offset-y': number };
movementType?: Movement;
display?: UnitDisplayInfo;
set?: 'α' | 'β';

ability_info: readonly {
Expand Down

0 comments on commit a675eab

Please sign in to comment.