#include <stdbool.h>
#include "list.h"
#include "mob.h"
Go to the source code of this file.
Items are things that mobs can carry around, and possibly equip. They live in inventories. Note: when a mob picks up or drops a luminous item, its (the mob) luminosity should change by 1.
Used to determine the type of an item
Enumerator |
---|
NONE |
|
WEAPON |
|
ARMOUR |
|
FOOD |
|
DRINK |
|
Item* choose_item_by_type |
( |
List * |
inventory, |
|
|
enum ItemType |
type, |
|
|
const char * |
prompt, |
|
|
bool |
no_equipped |
|
) |
| |
Choose an item by type
- Parameters
-
inventory | The inventory to choose from |
type | The type of the item |
prompt | The prompt |
no_equipped | Don't include equipped things |
- Returns
- NULL if nothing was selected, otherwise a pointer to the choice.
List** choose_items |
( |
List * |
inventory, |
|
|
const char * |
prompt |
|
) |
| |
Choose some items from an inventory
- Parameters
-
inventory | The inventory to choose from |
prompt | The prompt to display |
void display_inventory |
( |
List * |
inventory, |
|
|
const char * |
title |
|
) |
| |
Display an inventory
- Parameters
-
inventory | The inventory to display |
title | The title to display |