2010-08-08 10:06:34 +02:00
|
|
|
#ifndef H_KRNL_ALCHEMY_H
|
|
|
|
#define H_KRNL_ALCHEMY_H
|
2012-06-09 00:13:13 +02:00
|
|
|
|
2018-01-12 10:01:06 +01:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2010-08-08 10:06:34 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-11-01 13:10:22 +01:00
|
|
|
struct potion_type;
|
|
|
|
struct unit;
|
|
|
|
struct region;
|
2018-01-12 09:17:01 +01:00
|
|
|
struct faction;
|
2014-11-01 13:10:22 +01:00
|
|
|
struct item_type;
|
|
|
|
struct order;
|
2015-01-30 20:37:14 +01:00
|
|
|
|
2018-01-12 09:17:01 +01:00
|
|
|
extern struct attrib_type at_effect;
|
|
|
|
|
2015-01-30 20:37:14 +01:00
|
|
|
enum {
|
|
|
|
/* Stufe 1 */
|
|
|
|
P_FAST,
|
|
|
|
P_STRONG,
|
|
|
|
P_LIFE,
|
|
|
|
/* Stufe 2 */
|
|
|
|
P_DOMORE,
|
2018-02-15 20:25:58 +01:00
|
|
|
P_OINTMENT,
|
2015-01-30 20:37:14 +01:00
|
|
|
P_BAUERNBLUT,
|
|
|
|
/* Stufe 3 */
|
|
|
|
P_WISE, /* 6 */
|
|
|
|
P_FOOL,
|
|
|
|
P_STEEL,
|
|
|
|
P_HORSE,
|
|
|
|
P_BERSERK, /* 10 */
|
|
|
|
/* Stufe 4 */
|
|
|
|
P_PEOPLE,
|
|
|
|
P_WAHRHEIT,
|
|
|
|
P_HEAL,
|
|
|
|
MAX_POTIONS
|
|
|
|
};
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2018-01-12 09:17:01 +01:00
|
|
|
void new_potiontype(struct item_type * itype, int level);
|
|
|
|
int potion_level(const struct item_type *itype);
|
|
|
|
void show_potions(struct faction *f, int sklevel);
|
|
|
|
|
2015-08-27 14:46:08 +02:00
|
|
|
void herbsearch(struct unit *u, int max);
|
2018-01-12 09:17:01 +01:00
|
|
|
int use_potion(struct unit *u, const struct item_type *itype,
|
2015-01-30 20:37:14 +01:00
|
|
|
int amount, struct order *);
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2018-01-12 09:17:01 +01:00
|
|
|
int get_effect(const struct unit *u, const struct item_type *effect);
|
|
|
|
int change_effect(struct unit *u, const struct item_type *effect,
|
2015-01-30 20:37:14 +01:00
|
|
|
int value);
|
2018-01-12 10:01:06 +01:00
|
|
|
bool display_potions(struct unit *u);
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2018-01-12 10:01:06 +01:00
|
|
|
/* TODO: rausnehmen, sobald man attribute splitten kann: */
|
2015-01-30 20:37:14 +01:00
|
|
|
typedef struct effect_data {
|
2018-01-12 09:17:01 +01:00
|
|
|
const struct item_type *type;
|
2015-01-30 20:37:14 +01:00
|
|
|
int value;
|
|
|
|
} effect_data;
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2011-03-07 08:02:35 +01:00
|
|
|
#endif /* ALCHEMY_H */
|