| 2833 | } |
| 2834 | |
| 2835 | boolean |
| 2836 | ureflects(const char *fmt, const char *str) |
| 2837 | { |
| 2838 | /* Check from outermost to innermost objects */ |
| 2839 | if (EReflecting & W_ARMS) { |
| 2840 | if (fmt && str) { |
| 2841 | pline(fmt, str, "shield"); |
| 2842 | makeknown(SHIELD_OF_REFLECTION); |
| 2843 | } |
| 2844 | return TRUE; |
| 2845 | } else if (EReflecting & W_WEP) { |
| 2846 | /* Due to wielded artifact weapon */ |
| 2847 | if (fmt && str) |
| 2848 | pline(fmt, str, "weapon"); |
| 2849 | return TRUE; |
| 2850 | } else if (EReflecting & W_AMUL) { |
| 2851 | if (fmt && str) { |
| 2852 | pline(fmt, str, "medallion"); |
| 2853 | makeknown(AMULET_OF_REFLECTION); |
| 2854 | } |
| 2855 | return TRUE; |
| 2856 | } else if (EReflecting & W_ARM) { |
| 2857 | if (fmt && str) |
| 2858 | pline(fmt, str, uskin ? "luster" : "armor"); |
| 2859 | return TRUE; |
| 2860 | } else if (gy.youmonst.data == &mons[PM_SILVER_DRAGON]) { |
| 2861 | if (fmt && str) |
| 2862 | pline(fmt, str, "scales"); |
| 2863 | return TRUE; |
| 2864 | } |
| 2865 | return FALSE; |
| 2866 | } |
| 2867 | |
| 2868 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 2869 |
no test coverage detected