summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc43
1 files changed, 43 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 181dd8f2a3..18316ca38f 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2895,3 +2895,46 @@ void reveal_secret_door(int x, int y)
grd[x][y] = grid_is_opaque(door) ?
DNGN_CLOSED_DOOR : DNGN_OPEN_DOOR;
}
+
+// A feeble attempt at Nethack-like completeness for cute messages.
+std::string your_hand(bool plural)
+{
+ std::string result;
+
+ switch (you.attribute[ATTR_TRANSFORMATION])
+ {
+ default:
+ mpr("ERROR: unknown transformation in your_hand() (spells4.cc)");
+ case TRAN_NONE:
+ case TRAN_STATUE:
+ case TRAN_LICH:
+ if (you.has_usable_claws())
+ {
+ result = "claw";
+ break;
+ }
+ // deliberate fall through
+ case TRAN_ICE_BEAST:
+ result = "hand";
+ break;
+ case TRAN_SPIDER:
+ result = "front leg";
+ break;
+ case TRAN_SERPENT_OF_HELL:
+ case TRAN_DRAGON:
+ case TRAN_BAT:
+ result = "foreclaw";
+ break;
+ case TRAN_BLADE_HANDS:
+ result = "scythe-like blade";
+ break;
+ case TRAN_AIR:
+ result = "misty tendril";
+ break;
+ }
+
+ if (plural)
+ result += 's';
+
+ return result;
+}