diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-24 09:35:03 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-24 09:35:03 +0000 |
commit | 904a64bbcff41f7ecde8de133ddf68eeb2a8959f (patch) | |
tree | 0ed2875917488e791faadd9d7fb629d62b8594ee /crawl-ref/source/directn.cc | |
parent | 49271d835b9ebb39bcfdae8acbc644aeff6f2f3c (diff) | |
download | crawl-ref-904a64bbcff41f7ecde8de133ddf68eeb2a8959f.tar.gz crawl-ref-904a64bbcff41f7ecde8de133ddf68eeb2a8959f.zip |
* Add a wizard function apply_monster_blessing to allow for easy testing
of dolorous' fabulous blessing routines.
* Allow the possibility of naming monsters:
A monster's random name seed is stored in its number property, and the
actual name gets picked from randname.txt. (Once this leaves the
experimental stage I'll move them into a file of their own.)
This means that monster types that already use number for something
else (hydras for #heads, manticores for #spikes, or zombies for
monster type) cannot be named.
Use the new functions for naming orcs blessed by Beogh. Only
non-generic orcs may get named, e.g. orcs promoted to priesthood or orc
warriors that get their weapon enchanted.
I tried to come up with a number of thematic orcish names, and if
anyone would like to contribute, they're welcome to do so.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4586 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 95df12ab38..e850614da4 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -862,12 +862,22 @@ void direction(dist& moves, targeting_type restricts, } // To update visual branding of friendlies. Only - // seem capabable of adding bolding, not removing it, + // seems capabable of adding bolding, not removing it, // though. viewwindow(true, false); } break; + case CMD_TARGET_WIZARD_BLESS_MONSTER: + if (!you.wizard || !in_bounds(moves.tx, moves.ty)) + break; + mid = mgrd[moves.tx][moves.ty]; + if (mid == NON_MONSTER) // can put in terrain description here + break; + + debug_apply_monster_blessing(&menv[mid]); + break; + case CMD_TARGET_WIZARD_MAKE_SHOUT: // Maybe we can skip this check...but it can't hurt if (!you.wizard || !in_bounds(moves.tx, moves.ty)) @@ -2001,11 +2011,15 @@ static std::string describe_monster_weapon(const monsters *mons) const item_def *alt = mons->mslot_item(MSLOT_ALT_WEAPON); if (weap) + { name1 = weap->name(DESC_NOCAP_A, false, false, true, false, ISFLAG_KNOW_CURSE); + } if (alt && (!weap || mons_wields_two_weapons(mons))) + { name2 = alt->name(DESC_NOCAP_A, false, false, true, false, ISFLAG_KNOW_CURSE); + } if (name1.empty() && !name2.empty()) name1.swap(name2); @@ -2151,7 +2165,10 @@ static void describe_monster(const monsters *mon) std::string get_monster_desc(const monsters *mon, bool full_desc, description_level_type mondtype) { - std::string desc = mon->name(mondtype); + std::string desc = get_unique_monster_name(mon); + + if (desc.empty()) + desc = mon->name(mondtype); const int mon_arm = mon->inv[MSLOT_ARMOUR]; const int mon_shd = mon->inv[MSLOT_SHIELD]; @@ -2385,6 +2402,7 @@ command_type targeting_behaviour::get_command(int key) #ifdef WIZARD case 'F': return CMD_TARGET_WIZARD_MAKE_FRIENDLY; + case 'P': return CMD_TARGET_WIZARD_BLESS_MONSTER; case 's': return CMD_TARGET_WIZARD_MAKE_SHOUT; case 'g': return CMD_TARGET_WIZARD_GIVE_ITEM; #endif |