Skip to content

Commit

Permalink
Fix: Mjollnir "doesn't seem designed to be thrown" for Valkyrie
Browse files Browse the repository at this point in the history
The check accounted for aklyses being designed to be thrown since they
auto-return, but Mjollnir was not counted, meaning Valkyries trying to
throw it would have to say yes to the prompt every time. Replace it with
the AutoReturn macro which accounts for all auto-returning weapons.

Note that because of how AutoReturn behaves, Mjollnir is only treated as
an auto-returning weapon *if the player is a Valkyrie*. This means that
other roles trying to throw it, even if wearing gauntlets of power and
physically able to, will still get the "doesn't seem designed to be
thrown" prompt. Perhaps because they are not as familiar with the lore
of Mjollnir as a Valkyrie would be, the idea of throwing such a weapon
seems strange.

Fixes #208
  • Loading branch information
copperwater committed Jan 13, 2024
1 parent b4cdc9c commit f86bfb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dothrow.c
Expand Up @@ -247,8 +247,8 @@ throw_obj(struct obj *obj, int shotlimit)
|| (!is_missile(obj) && !objects[obj->otyp].oc_merge)
/* ... but even that heuristic has a few gaps in it */
|| obj->otyp == SCALPEL || obj->otyp == WORM_TOOTH)
/* aklyses, because of autoreturning, are intended to be thrown */
&& (obj->otyp != AKLYS)) {
/* autoreturning weapons are intended to be thrown */
&& !AutoReturn(obj, obj->owornmask)) {
if (ParanoidThrow) {
if (is_ammo(obj))
pline("You're not wielding the right launcher for that.");
Expand Down

0 comments on commit f86bfb2

Please sign in to comment.