summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-22 09:21:32 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-22 09:21:32 +0000
commitfaa6d08c428ad8280f84707fa8d4586440b98631 (patch)
tree9efc32b7df06c6ecc579766f5b0a7ab24c4a73d1 /crawl-ref/source/externs.h
parentcce90fadce5dca04e3000cf488e619975bddd8ae (diff)
downloadcrawl-ref-faa6d08c428ad8280f84707fa8d4586440b98631.tar.gz
crawl-ref-faa6d08c428ad8280f84707fa8d4586440b98631.zip
Added additional optional parameter to item_def::name(), ignore_flags,
which will cause the name to be constructed as if those item flags had been unset. Give an auxiliary cause of death for a stat going below 1. (Death by stat loss is already pretty rare, and death by stat loss with confusion as to what caused the stat loss must be *really* rare, but still, if you were confused about what caused the stat loss that lead to death, that'd be pretty frustrating) ouch() is now called from within modify_stat() and lose_stat() right after the stat is lowered, rather than when the stat is updated on the screen. This incidentally fixes the minor annoyance of saying "no" to stat loss death in wizard mode, only to be asked if you want to die every time the screen is updated until you fix having a non-positive stat. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2179 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 526bf96b92..09104bd3d2 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -124,7 +124,7 @@ public:
virtual void confuse(int strength) = 0;
virtual void rot(actor *attacker, int rotlevel, int immediate_rot) = 0;
virtual void expose_to_element(beam_type element, int strength = 0) = 0;
- virtual void drain_stat(int stat, int amount) { }
+ virtual void drain_stat(int stat, int amount, actor* attacker) { }
virtual bool wearing_light_armour(bool = false) const { return (true); }
virtual int skill(skill_type sk, bool skill_bump = false) const
@@ -354,7 +354,8 @@ public:
std::string name(description_level_type descrip,
bool terse = false, bool ident = false,
bool with_inscription = true,
- bool quantity_in_words = false) const;
+ bool quantity_in_words = false,
+ unsigned long ignore_flags = 0x0) const;
bool has_spells() const;
bool cursed() const;
int book_number() const;
@@ -371,7 +372,8 @@ public:
}
private:
std::string name_aux( description_level_type desc,
- bool terse, bool ident ) const;
+ bool terse, bool ident,
+ unsigned long ignore_flags ) const;
};
class runrest
@@ -742,7 +744,7 @@ public:
void banish(const std::string &who = "");
void blink();
void teleport(bool right_now = false, bool abyss_shift = false);
- void drain_stat(int stat, int amount);
+ void drain_stat(int stat, int amount, actor* attacker);
void expose_to_element(beam_type element, int strength = 0);
void god_conduct(conduct_type thing_done, int level);