57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
//---
|
|
// items: Dropped objects that can be picked up from the ground
|
|
//---
|
|
|
|
#pragma once
|
|
|
|
#include "comp/entity.h"
|
|
#include "comp/fighter.h"
|
|
#include "geometry.h"
|
|
#include "anim.h"
|
|
|
|
enum {
|
|
ITEM_LIFE = 0,
|
|
ITEM_POTION_ATK = 1,
|
|
ITEM_POTION_COOLDOWN = 2,
|
|
ITEM_POTION_DEF = 3,
|
|
ITEM_POTION_FRZ = 4,
|
|
ITEM_POTION_HP = 5,
|
|
ITEM_POTION_SPD = 6,
|
|
|
|
/**/ ITEM_EQUIPMENT_START = 100,
|
|
ITEM_SCEPTER1,
|
|
ITEM_SCEPTER2,
|
|
ITEM_SWORD1,
|
|
ITEM_SWORD2,
|
|
ITEM_ARMOR1,
|
|
/**/ ITEM_EQUIPMENT_END,
|
|
};
|
|
|
|
/* Animation for each item. */
|
|
anim_t const *item_anim(int item);
|
|
|
|
/* Item name (fancy huh?). */
|
|
char const *item_name(int item);
|
|
|
|
/* Item description, can be multi-line. NULL if none specified. */
|
|
char const *item_description(int item);
|
|
|
|
/* Whether an item is a piece of equipment. */
|
|
#define item_is_equip(item) \
|
|
((item) >= ITEM_EQUIPMENT_START && (item) <= ITEM_EQUIPMENT_END)
|
|
|
|
/* Create an item. This is just an AOE with a particular type. */
|
|
entity_t *item_make(int item, vec2 position);
|
|
|
|
/* Give an item to a player entity. */
|
|
bool item_pick_up(int item, entity_t *player);
|
|
|
|
/* Which equipment slot an item goes in. */
|
|
int item_equipment_slot(int item);
|
|
|
|
/* Stat increases for each item that can be equipped, per level. */
|
|
fighter_stats_t item_stat_model(int item);
|
|
|
|
/* Get skills associated with each item that can be equipped. */
|
|
void item_skills(int item, int *skill1, int *skill2, int *skill3);
|