Angband
obj-power.h
Go to the documentation of this file.
1 
20 #ifndef OBJECT_POWER_H
21 #define OBJECT_POWER_H
22 
29 #define INHIBIT_POWER 20000
30 #define INHIBIT_BLOWS 3
31 #define INHIBIT_MIGHT 4
32 #define INHIBIT_SHOTS 3
33 #define HIGH_TO_AC 26
34 #define VERYHIGH_TO_AC 36
35 #define INHIBIT_AC 56
36 #define HIGH_TO_HIT 16
37 #define VERYHIGH_TO_HIT 26
38 #define HIGH_TO_DAM 16
39 #define VERYHIGH_TO_DAM 26
40 #define AMMO_RESCALER 20 /* this value is also used for torches */
41 
42 
51 };
52 
53 /*** Structures ***/
54 
55 struct iterate {
57  int max;
58 };
59 
60 struct power_calc {
61  struct power_calc *next;
62  char *name;
65  int operation;
66  struct iterate iterate;
67  char *apply_to;
68 };
69 
70 
71 extern struct power_calc *calculations;
72 
73 /*** Functions ***/
74 
76 
77 int object_power(const struct object *obj, bool verbose, ang_file *log_file);
78 int object_value_real(const struct object *obj, int qty);
79 int object_value(const struct object *obj, int qty);
80 
81 
82 #endif /* OBJECT_POWER_H */
Definition: obj-power.h:50
Definition: z-dice.c:30
dice_t * dice
Dice expression used in the calculation.
Definition: obj-power.h:64
int max
Definition: obj-power.h:57
Definition: obj-power.h:60
Definition: z-file.c:261
static ang_file * log_file
Definition: obj-randart.c:42
Structure for possible object kinds for an ego item.
Definition: object.h:296
power_calc_operation
Definition: obj-power.h:43
struct power_calc * calculations
Definition: obj-power.c:31
Definition: obj-power.h:46
int operation
How the calculation operates on power.
Definition: obj-power.h:65
expression_base_value_f power_calculation_by_name(const char *name)
Definition: obj-power.c:414
int object_value_real(const struct object *obj, int qty)
Return the real price of a known (or partly known) item.
Definition: obj-power.c:792
Definition: obj-power.h:44
Definition: obj-power.h:47
int verbose
Definition: unit-test.c:12
s32b(* expression_base_value_f)(void)
Definition: z-expression.h:34
Definition: obj-power.h:55
char * apply_to
What the calculation is applied to.
Definition: obj-power.h:67
Definition: obj-power.h:49
struct poss_item * poss_items
Definition: obj-power.h:63
int property_type
Definition: obj-power.h:56
int object_power(const struct object *obj, bool verbose, ang_file *log_file)
Run all the power calculations on an object to find its power.
Definition: obj-power.c:606
struct power_calc * next
Definition: obj-power.h:61
char * name
Name of the calculation.
Definition: obj-power.h:62
Intialize random names
Definition: init.c:656
Definition: obj-power.h:48
int object_value(const struct object *obj, int qty)
Return the price of an item including plusses (and charges).
Definition: obj-power.c:890
Definition: obj-power.h:45