projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace magic MINTRS/MAXTRS with a treasure attribute in YAML.
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/actions.c
index b059e8228622e506c9a36b51a013cb9c5aaafd63..c5f06e59f2b96d16039caa78defd156fae6e7b02 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-899,7
+899,7
@@
static int throw (FILE *cmdin, struct command_t *command)
rspeak(spk);
return GO_CLEAROBJ;
}
rspeak(spk);
return GO_CLEAROBJ;
}
- if (
command->obj >= MINTRS && command->obj <= MAXTRS
&& AT(TROLL)) {
+ if (
object_descriptions[command->obj].is_treasure
&& AT(TROLL)) {
spk = TROLL_SATISFIED;
/* Snarf a treasure for the troll. */
DROP(command->obj, 0);
spk = TROLL_SATISFIED;
/* Snarf a treasure for the troll. */
DROP(command->obj, 0);