diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 22:59:32 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 22:59:32 +0000 |
commit | 5381635abae0b75987bce01bb596b35fc11bb529 (patch) | |
tree | b80128f4c1d8259f40fd9402d564031226ace5bc /crawl-ref/source | |
parent | c067a7b8496eedb4b1b06f16bfc70c333a9a823a (diff) | |
download | crawl-ref-5381635abae0b75987bce01bb596b35fc11bb529.tar.gz crawl-ref-5381635abae0b75987bce01bb596b35fc11bb529.zip |
[1747353] Allies shouldn't be noted as "defeated" by you.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1739 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/beam.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/notes.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 2 |
7 files changed, 19 insertions, 13 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b2d69ba53a..bb28e53645 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -4464,7 +4464,7 @@ bolt::bolt() : range(0), rangeMax(0), type(SYM_ZAP), colour(BLACK), chose_ray(false) { } -int bolt::killer() const +killer_type bolt::killer() const { if (flavour == BEAM_BANISH) return (KILL_RESET); diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 4a5f2ada90..095a3f3b9c 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -460,7 +460,7 @@ public: void set_target(const dist &); // Returns YOU_KILL or MON_KILL, depending on the source of the beam. - int killer() const; + killer_type killer() const; coord_def target() const { @@ -942,7 +942,7 @@ struct mon_enchant { } - int killer() const; + killer_type killer() const; int kill_agent() const; operator std::string () const; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 8d94b508f5..9f8f9716b7 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4240,7 +4240,7 @@ mon_enchant mon_enchant::operator + (const mon_enchant &other) const return (tmp); } -int mon_enchant::killer() const +killer_type mon_enchant::killer() const { return (who == KC_YOU? KILL_YOU : who == KC_FRIENDLY? KILL_MON : diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 455e61160a..8f89045e8c 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -341,12 +341,13 @@ static void tutorial_inspect_kill() } #ifdef DGL_MILESTONES -static std::string milestone_kill_verb(int killer) +static std::string milestone_kill_verb(killer_type killer) { return (killer == KILL_RESET? "banished " : "killed "); } -static void check_kill_milestone(const monsters *mons, int killer, int i) +static void check_kill_milestone(const monsters *mons, + killer_type killer, int i) { if (mons->type == MONS_PLAYER_GHOST) { @@ -365,7 +366,7 @@ static void check_kill_milestone(const monsters *mons, int killer, int i) } #endif // DGL_MILESTONES -void monster_die(monsters *monster, char killer, int i, bool silent) +void monster_die(monsters *monster, killer_type killer, int i, bool silent) { if (monster->type == -1) return; @@ -388,7 +389,8 @@ void monster_die(monsters *monster, char killer, int i, bool silent) monster->type == MONS_PLAYER_GHOST || monster->type == MONS_PANDEMONIUM_DEMON ) { - take_note(Note(NOTE_KILL_MONSTER, monster->type, 0, + take_note(Note(NOTE_KILL_MONSTER, + monster->type, mons_friendly(monster), str_monam(*monster, DESC_NOCAP_A, true).c_str())); } } @@ -4145,7 +4147,7 @@ static void do_move_monster(monsters *monster, int xi, int yi) mons_check_pool(monster); } -void mons_check_pool(monsters *mons, int killer) +void mons_check_pool(monsters *mons, killer_type killer) { // Levitating/flying monsters don't make contact with the terrain. const int lev = mons->levitates(); diff --git a/crawl-ref/source/monstuff.h b/crawl-ref/source/monstuff.h index e9edad576b..b3bf8eb035 100644 --- a/crawl-ref/source/monstuff.h +++ b/crawl-ref/source/monstuff.h @@ -47,9 +47,10 @@ bool monster_polymorph(monsters *monster, monster_type targetc, * called from: bang - beam - effects - fight - misc - monstuff - mstuff2 - * spells1 - spells2 - spells3 - spells4 * *********************************************************************** */ -void monster_die(monsters *monster, char killer, int i, bool silent = false); +void monster_die(monsters *monster, killer_type killer, + int i, bool silent = false); -void mons_check_pool(monsters *monster, int killer = KILL_MISC); +void mons_check_pool(monsters *monster, killer_type killer = KILL_MISC); // last updated: 17dec2000 {gdl} /* *********************************************************************** diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc index bf3ddd10c8..8658c33ab3 100644 --- a/crawl-ref/source/notes.cc +++ b/crawl-ref/source/notes.cc @@ -286,7 +286,10 @@ std::string Note::describe( bool when, bool where, bool what ) const result << "Noticed " << name; break; case NOTE_KILL_MONSTER: - result << "Defeated " << name; + if ( second ) + result << name << " (ally) was defeated"; + else + result << "Defeated " << name; break; case NOTE_POLY_MONSTER: result << name << " changed form"; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 46a3a4053a..06498fa3a3 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1897,7 +1897,7 @@ void divine_retribution( god_type god ) { snprintf(info, INFO_SIZE, "Mortal, I have averted the wrath " "of %s... this time.", god_name(GOD_BEOGH)); - god_speaks(you.religion, info); + god_speaks(you.religion, info); } else { |