chore(release): 0.2.5
[risinglegends.git] / src / shared / items / index.ts
1 import { ItemEffect } from "./base";
2 import {HealthPotionSmall} from './health_potion';
3
4 export type Item = {
5   id: number;
6   name: string;
7   description: string;
8   effect_name: string;
9   icon_name: string;
10 }
11
12 // this is the result of a join, the actual 
13 // table only maps player_id/item_id + amount
14 export type PlayerItem = {
15   item_id: number;
16   player_id: string;
17   amount: number;
18   name: string;
19   effect_name: string;
20   icon_name: string;
21   description: string;
22 }
23
24 export type ShopItem = {
25   item_id: number;
26   location_id: number;
27   amount: number;
28   price_per_unit: number;
29 }
30
31 export const ItemEffects: Map<string, ItemEffect<number>> = new Map<string, ItemEffect<any>>();
32
33 ItemEffects.set(HealthPotionSmall.name, HealthPotionSmall);