aklys message improvements

This commit is contained in:
nhmall
2026-06-06 15:01:54 -04:00
parent 498db90437
commit 1f4198c705
+34 -20
View File
@@ -1437,7 +1437,8 @@ throwing_weapon(struct obj *obj)
|| obj->otyp == WAR_HAMMER || obj->otyp == AKLYS);
}
/* the currently thrown object is returning to you (not for boomerangs) */
/* the currently thrown object is returning to you (not for boomerangs
or tethered weapons) */
staticfn void
sho_obj_return_to_u(struct obj *obj)
{
@@ -1520,7 +1521,8 @@ throwit(
boolean crossbowing,
impaired = (Confusion || Stunned || Blind
|| Hallucination || Fumbling),
tethered_weapon = (arw && arw->tethered && (wep_mask & W_WEP) != 0);
tethered_weapon = (arw && arw->tethered && (wep_mask & W_WEP) != 0),
tether_released_msg = FALSE;
gn.notonhead = FALSE; /* reset potentially stale value */
if ((obj->cursed || obj->greased) && (u.dx || u.dy) && !rn2(7)) {
@@ -1685,8 +1687,14 @@ throwit(
/* bhit display cleanup was left with this caller
for tethered_weapon, but clean it up now since
we're about to return */
if (tethered_weapon)
if (tethered_weapon) {
if (!tether_released_msg) {
pline("The tether comes off your %s.",
body_part(ARM));
tether_released_msg = TRUE;
}
tmp_at(DISP_END, 0);
}
throwit_return(FALSE);
return;
}
@@ -1699,8 +1707,14 @@ throwit(
if (!gt.thrownobj) {
/* missile has already been handled */
if (tethered_weapon)
if (tethered_weapon) {
if (!tether_released_msg) {
pline("The tether comes off your %s.",
body_part(ARM));
tether_released_msg = TRUE;
}
tmp_at(DISP_END, 0);
}
} else if (u.uswallow && !iflags.returning_missile) {
swallowit(obj);
return;
@@ -1738,21 +1752,16 @@ throwit(
if obj is quivered, remove it before wielding */
if (obj->owornmask & W_QUIVER)
setuqwep((struct obj *) 0);
#if 0
setuwep(obj);
set_twoweap(twoweap); /* u.twoweap = twoweap */
#endif
if (cansee(gb.bhitpos.x, gb.bhitpos.y))
newsym(gb.bhitpos.x, gb.bhitpos.y);
}
if (!dmg) {
if (tethered_weapon) {
pline(Blind ? "%s%s back and is left"
" dangling from your %s."
: "%s%s and is left dangling from your %s.",
Blind ? "Your tethered weapon" : Tobjnam(obj, "return"),
Blind ? " snaps" : "",
body_part(ARM));
/* Blind mods unnecessary; you know what you threw,
* and it is tethered to your arm */
pline("Your tethered %s snaps back but the tether slips from your %s.",
simpleonames(obj), body_part(ARM));
tether_released_msg = TRUE;
} else {
pline(Blind
? "%s lands %s your %s."
@@ -1764,9 +1773,8 @@ throwit(
} else {
dmg += rnd(3);
if (tethered_weapon) {
Your("tethered %s your %s!",
Blind ? "weapon returns and hits" : Tobjnam(obj, "hit"),
body_part(ARM));
Your("tethered %s returns and hits your %s!",
simpleonames(obj), body_part(ARM));
} else {
pline(
Blind
@@ -1789,14 +1797,22 @@ throwit(
if (!ship_object(obj, u.ux, u.uy, FALSE))
dropy(obj);
} else {
pline_The("%s tether releases from your %s!",
if (!tether_released_msg) {
pline_The("%s tether comes off your %s.",
s_suffix(simpleonames(obj)), body_part(ARM));
tether_released_msg = TRUE;
}
}
}
throwit_return(TRUE);
return;
} else {
if (tethered_weapon) {
if (!tether_released_msg) {
pline("The tether comes off your %s.",
body_part(ARM));
tether_released_msg = TRUE;
}
tmp_at(DISP_END, 0);
/* when this location is stepped on, the weapon will be
auto-picked up due to 'obj->how_lost' of LOST_THROWN;
@@ -1806,8 +1822,6 @@ throwit(
explicitly rewield the weapon to get throw-and-return
capability back anyway, quivered or not shouldn't
matter */
pline("The tether snaps off your %s!",
body_part(ARM));
} else {
pline("%s to return!", Tobjnam(obj, "fail"));
}