steed has taken on a new shape */
| 849 | |
| 850 | /* steed has taken on a new shape */ |
| 851 | void |
| 852 | poly_steed( |
| 853 | struct monst *steed, |
| 854 | struct permonst *oldshape) |
| 855 | { |
| 856 | if (!can_saddle(steed) || !can_ride(steed)) { |
| 857 | /* can't get here; newcham() -> mon_break_armor() -> m_lose_armor() |
| 858 | removes saddle and/or forces hero to dismount, if applicable, |
| 859 | before newcham() calls us */ |
| 860 | dismount_steed(DISMOUNT_FELL); |
| 861 | } else { |
| 862 | char buf[BUFSZ]; |
| 863 | |
| 864 | Strcpy(buf, x_monnam(steed, ARTICLE_YOUR, (char *) 0, |
| 865 | SUPPRESS_SADDLE, FALSE)); |
| 866 | if (oldshape != steed->data) |
| 867 | (void) strsubst(buf, "your ", "your new "); |
| 868 | You("adjust yourself in the saddle on %s.", buf); |
| 869 | |
| 870 | /* riding blocks stealth unless hero+steed fly */ |
| 871 | steed_vs_stealth(); |
| 872 | } |
| 873 | } |
| 874 | |
| 875 | /* decide whether hero's steed is able to move; |
| 876 | doesn't check for holding traps--those affect the hero directly */ |
no test coverage detected