status: selected obvious capabilities, assorted troubles */
| 937 | |
| 938 | /* status: selected obvious capabilities, assorted troubles */ |
| 939 | staticfn void |
| 940 | status_enlightenment(int mode, int final) |
| 941 | { |
| 942 | boolean magic = (mode & MAGICENLIGHTENMENT) ? TRUE : FALSE; |
| 943 | int cap; |
| 944 | char buf[BUFSZ], youtoo[BUFSZ], heldmon[BUFSZ]; |
| 945 | boolean Riding = (u.usteed |
| 946 | /* if hero dies while dismounting, u.usteed will still |
| 947 | be set; we want to ignore steed in that situation */ |
| 948 | && !(final == ENL_GAMEOVERDEAD |
| 949 | && !strcmp(svk.killer.name, "riding accident"))); |
| 950 | const char *steedname = (!Riding ? (char *) 0 |
| 951 | : x_monnam(u.usteed, |
| 952 | u.usteed->mtame ? ARTICLE_YOUR : ARTICLE_THE, |
| 953 | (char *) 0, |
| 954 | (SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION), |
| 955 | FALSE)); |
| 956 | |
| 957 | /*\ |
| 958 | * Status (many are abbreviated on bottom line; others are or |
| 959 | * should be discernible to the hero hence to the player) |
| 960 | \*/ |
| 961 | enlght_out(""); /* separator after title or characteristics */ |
| 962 | enlght_out(final ? "Final Status:" : "Status:"); |
| 963 | |
| 964 | Strcpy(youtoo, You_); |
| 965 | /* not a traditional status but inherently obvious to player; more |
| 966 | detail given below (attributes section) for magic enlightenment */ |
| 967 | if (Upolyd) { |
| 968 | Strcpy(buf, "transformed"); |
| 969 | if (ugenocided()) |
| 970 | Sprintf(eos(buf), " and %s %s inside", |
| 971 | final ? "felt" : "feel", udeadinside()); |
| 972 | you_are(buf, ""); |
| 973 | } |
| 974 | /* not a trouble, but we want to display riding status before maybe |
| 975 | reporting steed as trapped or hero stuck to cursed saddle */ |
| 976 | if (Riding) { |
| 977 | Sprintf(buf, "riding %s", steedname); |
| 978 | you_are(buf, ""); |
| 979 | Sprintf(eos(youtoo), "and %s ", steedname); |
| 980 | } |
| 981 | /* other movement situations that hero should always know */ |
| 982 | if (Levitation) { |
| 983 | if (Lev_at_will && magic) |
| 984 | you_are("levitating, at will", ""); |
| 985 | else |
| 986 | enl_msg(youtoo, are, were, "levitating", from_what(LEVITATION)); |
| 987 | } else if (Flying) { /* can only fly when not levitating */ |
| 988 | enl_msg(youtoo, are, were, "flying", from_what(FLYING)); |
| 989 | } |
| 990 | if (Underwater) { |
| 991 | you_are("underwater", ""); |
| 992 | } else if (u.uinwater) { |
| 993 | you_are(Swimming ? "swimming" : "in water", from_what(SWIMMING)); |
| 994 | } else if (walking_on_water()) { |
| 995 | /* show active Wwalking here, potential Wwalking elsewhere */ |
| 996 | Sprintf(buf, "walking on %s", |
no test coverage detected