Angband
z-dice.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_Z_DICE_H
20 #define INCLUDED_Z_DICE_H
21 
22 #include "h-basic.h"
23 
24 #include "z-rand.h"
25 #include "z-expression.h"
26 
27 typedef struct dice_s dice_t;
28 
29 dice_t *dice_new(void);
30 void dice_free(dice_t *dice);
31 bool dice_parse_string(dice_t *dice, const char *string);
32 int dice_bind_expression(dice_t *dice, const char *name,
33  const expression_t *expression);
34 void dice_random_value(dice_t *dice, random_value *v);
35 int dice_evaluate(dice_t *dice, int level, aspect aspect, random_value *v);
36 int dice_roll(dice_t *dice, random_value *v);
37 bool dice_test_values(dice_t *dice, int base, int dice_count, int sides,
38  int bonus);
39 bool dice_test_variables(dice_t *dice, const char *base, const char *dice_name,
40  const char *sides, const char *bonus);
41 
42 #endif /* INCLUDED_Z_DICE_H */