Adjust shopkeeper damage fixing

Allow shopkeeper to remove webs and pits.

Change the damage fix messaging to be more specific when
shopkeeper removes a trap. Before this the message was
"A trap was removed from the floor", which sounds really silly
when it comes to holes.

Change the damage fixing so the shopkeeper will fix one damage spot
at a time (instead of all at once), so it's more like a monster action.

Some code cleanup, splitting into smaller functions.

While doing this, I noticed that shopkeepers don't actually bill
the hero for the damage, but that'll have to be another commit...
This commit is contained in:
Pasi Kallinen
2021-06-25 19:50:02 +03:00
parent 823b770ad9
commit 075844b4d6
8 changed files with 188 additions and 166 deletions

View File

@@ -50,6 +50,8 @@ enum encumbrance_types {
#define SHOP_HOLE_COST 200L /* cost of making hole/trapdoor */
#define SHOP_WALL_COST 200L /* cost of destroying a wall */
#define SHOP_WALL_DMG (10L * ACURRSTR) /* damaging a wall */
#define SHOP_PIT_COST 100L /* cost of making a pit */
#define SHOP_WEB_COST 30L /* cost of removing a web */
/* hunger states - see hu_stat in eat.c */
enum hunger_state_types {