From: arromdee Date: Sat, 12 Jan 2002 05:37:33 +0000 (+0000) Subject: Fix some steed/wounded legs things. Also add a wizard-only enlightenment X-Git-Tag: MOVE2GIT~3500 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5d7f1500791ec0a1e73d54b8f8fb097685645ca;p=nethack Fix some steed/wounded legs things. Also add a wizard-only enlightenment message specifying that the steed has wounded legs. --- diff --git a/doc/buglist b/doc/buglist index 645ac5900..b15d3a57f 100644 --- a/doc/buglist +++ b/doc/buglist @@ -152,16 +152,8 @@ Riding bugs: showing the player in that situation. The u.usteed check in the display_self() macro could become u.usteed && !u.usteed.minvis to accomodate that. --- Land mine traps cause wounded legs when the character is riding, and - don't do any harm to the steed. -- Wielding Stormbringer while riding should result in it attacking your steed on occasion. --- There are several inappropriate items around riding a steed - with wounded legs: - -Dexterity is periodically abused. - -Wounded legs are a minor prayer trouble. - -Wounded legs are considered an unfixable unicorn horn trouble. - -Falling/being thrown from steed doesn't incur usual wounded-legs DEX hit. -- The steed might want to wander about when you are paralyzed (of course the knight's well-trained pony wouldn't) [eino.keskitalo@purkki.mbnet.fi] diff --git a/doc/fixes33.2 b/doc/fixes33.2 index 739d93cb6..cb8d44b7d 100644 --- a/doc/fixes33.2 +++ b/doc/fixes33.2 @@ -234,6 +234,10 @@ quaffing a noncursed potion of speed no longer heals the steed's wounded legs prevent mounting of steed when you have Wounded_legs to prevent abuse; dismount does an unconditional healing of Wounded_legs during the Wounded_legs context switch +wounded legs on a steed doesn't count as a prayer trouble +wounded legs on a steed doesn't abuse dexterity +make wounded legs gained by falling off a steed consistent (dexterity loss) +land mines while mounted should hurt the steed self-genocide while sitting on a throne should not refer to scroll of genocide eating dogfood or fixing a squeaky board conveys experience but didn't check for gaining a new level diff --git a/src/apply.c b/src/apply.c index 55b707925..760e2595e 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2703,7 +2703,11 @@ int unfixable_trouble_count(is_horn) if (Stoned) unfixable_trbl++; if (Strangled) unfixable_trbl++; - if (Wounded_legs) unfixable_trbl++; + if (Wounded_legs +#ifdef STEED + && !u.usteed +#endif + ) unfixable_trbl++; if (Slimed) unfixable_trbl++; /* lycanthropy is not desirable, but it doesn't actually make you feel bad */ diff --git a/src/attrib.c b/src/attrib.c index 0a7421f79..c05e080bc 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -350,7 +350,11 @@ exerper() if(Sick || Vomiting) exercise(A_CON, FALSE); if(Confusion || Hallucination) exercise(A_WIS, FALSE); - if(Wounded_legs || Fumbling || HStun) exercise(A_DEX, FALSE); + if((Wounded_legs +#ifdef STEED + && !u.usteed +#endif + ) || Fumbling || HStun) exercise(A_DEX, FALSE); } } diff --git a/src/cmd.c b/src/cmd.c index 1bd029b47..c82920a0b 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -790,6 +790,14 @@ int final; /* 0 => still in progress; 1 => over, survived; 2 => dead */ Sprintf(buf, "wounded %s", makeplural(body_part(LEG))); you_have(buf); } +#if defined(WIZARD) && defined(STEED) + if (Wounded_legs && u.usteed && wizard) { + Strcpy(buf, x_monnam(u.usteed, ARTICLE_YOUR, (char *)0, + SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION, FALSE)); + *buf = highc(*buf); + enl_msg(buf, " has", " had", " wounded legs"); + } +#endif if (Sleeping) enl_msg("You ", "fall", "fell", " asleep"); if (Hunger) enl_msg("You hunger", "", "ed", " rapidly"); diff --git a/src/pray.c b/src/pray.c index c630ad4f1..2b4e8ada1 100644 --- a/src/pray.c +++ b/src/pray.c @@ -167,7 +167,11 @@ in_trouble() if(Blinded > 1) return(TROUBLE_BLIND); for(i=0; i= HUNGRY) return(TROUBLE_HUNGRY); if(HStun) return (TROUBLE_STUNNED); if(HConfusion) return (TROUBLE_CONFUSED); diff --git a/src/steed.c b/src/steed.c index 3d4766c05..1dc98d6f6 100644 --- a/src/steed.c +++ b/src/steed.c @@ -457,8 +457,7 @@ dismount_steed(reason) You("%s off of %s!", verb, mon_nam(mtmp)); if (!have_spot) have_spot = landing_spot(&cc,1); losehp(rn1(10,10), "riding accident", KILLED_BY_AN); - HWounded_legs += rn1(5, 5); - EWounded_legs |= BOTH_SIDES; + set_wounded_legs(BOTH_SIDES, HWounded_legs + rn1(5,5)); repair_leg_damage = FALSE; break; case DISMOUNT_POLY: diff --git a/src/trap.c b/src/trap.c index 0df175e05..11be76df3 100644 --- a/src/trap.c +++ b/src/trap.c @@ -974,9 +974,23 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); already_seen ? a_your[trap->madeby_u] : "", already_seen ? " land mine" : "it"); } else { +#ifdef STEED + /* prevent landmine from killing steed, throwing you to + * the ground, and you being affected again by the same + * mine because it hasn't been deleted yet + */ + static boolean recursive_mine = FALSE; + + if (recursive_mine) break; +#endif seetrap(trap); pline("KAABLAMM!!! You triggered %s land mine!", a_your[trap->madeby_u]); +#ifdef STEED + recursive_mine = TRUE; + (void) steedintrap(trap, (struct obj *)0); + recursive_mine = FALSE; +#endif set_wounded_legs(LEFT_SIDE, rn1(35, 41)); set_wounded_legs(RIGHT_SIDE, rn1(35, 41)); exercise(A_DEX, FALSE); @@ -1059,6 +1073,11 @@ struct obj *otmp; } steedhit = TRUE; break; + case LANDMINE: + if (thitm(0, mtmp, (struct obj *)0, rnd(16))) + trapkilled = TRUE; + steedhit = TRUE; + break; case PIT: case SPIKED_PIT: if (mtmp->mhp <= 0 ||