diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-09 14:24:11 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-09 14:24:11 +0000 |
commit | f2a95ba0d453ba6685ed29201beda8a2f703ab79 (patch) | |
tree | e7201beb995472236921334a363644e5782d648b /crawl-ref/source/describe.cc | |
parent | 447bc8ac9d8557be01da02c40349e4301f42c089 (diff) | |
download | crawl-ref-f2a95ba0d453ba6685ed29201beda8a2f703ab79.tar.gz crawl-ref-f2a95ba0d453ba6685ed29201beda8a2f703ab79.zip |
Monsters get multilevel resists (incomplete). Monster data needs to be
adjusted per monster to hand out the right resists. The current
MR_RES_FIRE gives one level of resistance only.
Added a real ghost structure, discarded the old ghost values array.
Adjusted bones file format so bones will work out-of-the-box with
Hearse. Breaks bones format, older bones will be rejected.
Fixed some maps with bad DEPTHs.
Added more safe answers in Y/N prompts, added a check to make it less
likely that Crawl will spin in a tight loop reading input from a
closed tty.
(Experimental) !a will override existing foe of friendlies in LOS.
Blademasters no longer pick up stuff to throw (Erik).
Zombies of swimming things are also swimming things. Currently applies
only to zombies explicitly placed in .des files, since fish zombies
cannot be generated otherwise (can of worms).
Morgue is now saved before showing the inventory and other boring
end-of-game stuff.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3231 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 72382883b4..b53d77ac3b 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -40,6 +40,7 @@ #include "decks.h" #include "fight.h" #include "food.h" +#include "ghost.h" #include "it_use2.h" #include "itemname.h" #include "itemprop.h" @@ -589,17 +590,17 @@ static std::string describe_demon(const monsters &mons) description << "A powerful demon, " << ghost.name << " has a" << RANDOM_ELEMENT(body_descs) << "body"; - switch (ghost.values[GVAL_DEMONLORD_FLY]) + switch (ghost.fly) { - case 1: + case FL_FLY: description << RANDOM_ELEMENT(wing_names); break; - case 2: // levitation + case FL_LEVITATE: description << RANDOM_ELEMENT(lev_names); break; - default: // does not fly + case FL_NONE: // does not fly if ( !one_chance_in(4) ) description << RANDOM_ELEMENT(nonfly_names); break; @@ -2171,8 +2172,7 @@ std::string ghost_description(const monsters &mons, bool concise) const ghost_demon &ghost = *(mons.ghost); - const species_type gspecies = - static_cast<species_type>(ghost.values[GVAL_SPECIES]); + const species_type gspecies = ghost.species; // We're fudging stats so that unarmed combat gets based off // of the ghost's species, not the player's stats... exact @@ -2207,28 +2207,28 @@ std::string ghost_description(const monsters &mons, bool concise) } gstr << ghost.name << " the " - << skill_title( ghost.values[GVAL_BEST_SKILL], - ghost.values[GVAL_SKILL_LEVEL], + << skill_title( ghost.best_skill, + ghost.best_skill_level, gspecies, str, dex, GOD_NO_GOD ) << ", a" - << ((ghost.values[GVAL_EXP_LEVEL] < 4) ? " weakling" : - (ghost.values[GVAL_EXP_LEVEL] < 7) ? "n average" : - (ghost.values[GVAL_EXP_LEVEL] < 11) ? "n experienced" : - (ghost.values[GVAL_EXP_LEVEL] < 16) ? " powerful" : - (ghost.values[GVAL_EXP_LEVEL] < 22) ? " mighty" : - (ghost.values[GVAL_EXP_LEVEL] < 26) ? " great" : - (ghost.values[GVAL_EXP_LEVEL] < 27) ? "n awesomely powerful" - : " legendary") + << ((ghost.xl < 4) ? " weakling" : + (ghost.xl < 7) ? "n average" : + (ghost.xl < 11) ? "n experienced" : + (ghost.xl < 16) ? " powerful" : + (ghost.xl < 22) ? " mighty" : + (ghost.xl < 26) ? " great" : + (ghost.xl < 27) ? "n awesomely powerful" + : " legendary") << " "; if ( concise ) gstr << get_species_abbrev(gspecies) - << get_class_abbrev(ghost.values[GVAL_CLASS]); + << get_class_abbrev(ghost.job); else gstr << species_name(gspecies, - ghost.values[GVAL_EXP_LEVEL]) + ghost.xl) << " " - << get_class_name(ghost.values[GVAL_CLASS]); + << get_class_name(ghost.job); return gstr.str(); } |