summaryrefslogtreecommitdiff
path: root/src/q_fireprof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/q_fireprof.c')
-rw-r--r--src/q_fireprof.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/q_fireprof.c b/src/q_fireprof.c
index 4405d43b..3afa348f 100644
--- a/src/q_fireprof.c
+++ b/src/q_fireprof.c
@@ -119,17 +119,19 @@ static bool_ fireproof_enough_points(object_type *o_ptr, int *stack)
/* check for item type and multiply number in the stack by the
* amount of points per item of that type */
- if (o_ptr->tval == TV_BOOK)
+ switch (o_ptr->tval)
{
+ case TV_BOOK:
item_value = FIREPROOF_BOOK_POINTS * (*stack);
- }
- else if (o_ptr->tval == TV_STAFF)
- {
+ break;
+ case TV_STAFF:
item_value = FIREPROOF_STAFF_POINTS * (*stack);
- }
- else if (o_ptr->tval == TV_SCROLL)
- {
+ break;
+ case TV_SCROLL:
item_value = FIREPROOF_SCROLL_POINTS * (*stack);
+ break;
+ default:
+ assert(FALSE);
}
/* do we have enough points? */