diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-25 10:13:49 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-25 10:13:49 +0000 |
commit | c5f945ee7a4616a77a568245ebb0fcd7c8b859b1 (patch) | |
tree | 6990a8687f28fe01b4232712c634a93f81c52b35 /crawl-ref/source/directn.cc | |
parent | 299e58e1cac6a28bde782516f08532f6fe08aec9 (diff) | |
download | crawl-ref-c5f945ee7a4616a77a568245ebb0fcd7c8b859b1.tar.gz crawl-ref-c5f945ee7a4616a77a568245ebb0fcd7c8b859b1.zip |
FR #2083661: when polymorphed, unique (and named) monsters now retain their
name (but not spells, yet), and use their old speech text if it makes sense
for them to be able to do so.
Polymorphed monsters now retain some of their old flags, like
MF_CREATED_FRIENDLY and MF_GOT_HALF_XP.
If the Royal Jelly is polymorphed into something else then the Slime:6 vaults
will unlock when that monster is killed.
If the Royal Jelly is banished the player will be given a hint that it's gone
and that the vaults will remain locked.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7970 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 335ce7d016..45c079f662 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1581,29 +1581,21 @@ std::string get_terse_square_desc(const coord_def &gc) { std::string desc; const char *unseen_desc = "[unseen terrain]"; - bool is_feature = false; if (gc == you.pos()) - { desc = you.your_name; - } else if (!map_bounds(gc)) - { desc = unseen_desc; - } else if (!see_grid(gc)) { if (is_terrain_seen(gc)) { desc = "[" + feature_description(gc, false, DESC_PLAIN, false) + "]"; - is_feature = true; } else - { desc = unseen_desc; - } } - else if (mgrd(gc) != NON_MONSTER) + else if (mgrd(gc) != NON_MONSTER && you.can_see(&menv[mgrd(gc)])) { const monsters &mons = menv[mgrd(gc)]; @@ -1614,24 +1606,12 @@ std::string get_terse_square_desc(const coord_def &gc) desc = item.name(DESC_PLAIN); } else - { - desc = mons.name(DESC_PLAIN); - if (mons.has_base_name()) - { - desc += ", "; - desc += mons.base_name(DESC_NOCAP_THE); - } - } + desc = mons.full_name(DESC_PLAIN, true); } else if (igrd(gc) != NON_ITEM) - { desc = mitm[igrd(gc)].name(DESC_PLAIN); - } else - { desc = feature_description(gc, false, DESC_PLAIN, false); - is_feature = true; - } return desc; } @@ -2899,14 +2879,7 @@ std::string get_monster_desc(const monsters *mon, bool full_desc, std::string desc = ""; if (mondtype != DESC_NONE) { - desc = mon->name(mondtype); - // For named monsters also mention the base type in the form of - // "Morbeogh the orc priest", "Sigmund the human zombie". - // Note that the only difference between DESC_BASENAME and DESC_PLAIN - // is that basename will ignore mname, so the monster _must_ be named - // for this to make any sense. - if (mon->has_base_name()) - desc += " the " + mon->name(DESC_BASENAME); + desc = mon->full_name(mondtype); if (print_attitude) { |