From 12246839e2efa9f89e5c246cdcb5f0ba4037c4fe Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 4 Mar 2007 10:36:54 +0000 Subject: Give transformed players appropriate shouts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@977 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 2b38d25339..cb44baa336 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4610,6 +4610,29 @@ size_type player::body_size(int psize, bool base) const return (ret); } +bool player::cannot_speak() const +{ + if (silenced(x_pos, y_pos)) + return (true); + + // No transform that prevents the player from speaking yet. + return (false); +} + +std::string player::shout_verb() const +{ + const int transform = attribute[ATTR_TRANSFORMATION]; + switch (transform) + { + case TRAN_DRAGON: + return "roar"; + case TRAN_SPIDER: + return "hiss"; + default: + return "yell"; + } +} + int player::damage_type(int) { const int wpn = equip[ EQ_WEAPON ]; -- cgit v1.2.3-54-g00ecf