MCPcopy Create free account
hub / github.com/NetHack/NetHack / ureflects

Function ureflects

src/muse.c:2835–2866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2833}
2834
2835boolean
2836ureflects(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
2868RESTORE_WARNING_FORMAT_NONLITERAL
2869

Callers 5

passiveFunction · 0.85
mcast_lightningFunction · 0.85
god_zaps_youFunction · 0.85
dobuzzFunction · 0.85
gazemuFunction · 0.85

Calls 1

plineFunction · 0.70

Tested by

no test coverage detected