summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-19 21:01:43 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-19 21:01:43 +0000
commitd7b8e0e0ad2514d2a0027a3e87641f1fb9f33663 (patch)
tree3c87c38b2ff8a19c92d991fbbff3f8d9023d86e3
parent0896310d744261401822f9ae37b4d0e221c1566f (diff)
downloadcrawl-ref-d7b8e0e0ad2514d2a0027a3e87641f1fb9f33663.tar.gz
crawl-ref-d7b8e0e0ad2514d2a0027a3e87641f1fb9f33663.zip
Add more holiness-related cleanups. Notably, the ANGEL-related conducts
have been renamed to HOLY-related conducts, since they apply to all holy beings, not just angels. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3732 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/enum.h4
-rw-r--r--crawl-ref/source/fight.cc2
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/religion.cc12
-rw-r--r--crawl-ref/source/view.cc10
5 files changed, 16 insertions, 18 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 78476d2940..08defe609e 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -641,14 +641,14 @@ enum conduct_type
DID_KILL_MUTATOR_OR_ROTTER, // Zin
DID_KILL_WIZARD,
DID_KILL_PRIEST,
- DID_KILL_ANGEL,
+ DID_KILL_HOLY,
DID_KILL_NEUTRAL, // unused
DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
DID_LIVING_KILLED_BY_SERVANT,
DID_UNDEAD_KILLED_BY_SERVANT,
DID_DEMON_KILLED_BY_SERVANT,
DID_NATURAL_EVIL_KILLED_BY_SERVANT, // TSO
- DID_ANGEL_KILLED_BY_SERVANT,
+ DID_HOLY_KILLED_BY_SERVANT,
DID_SPELL_MEMORISE,
DID_SPELL_CASTING,
DID_SPELL_PRACTISE,
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index b6202ed5c6..cf79b80318 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1583,7 +1583,7 @@ void melee_attack::player_check_weapon_effects()
bool melee_attack::player_monattk_hit_effects(bool mondied)
{
if (mons_holiness(def) == MH_HOLY)
- did_god_conduct(mondied? DID_KILL_ANGEL : DID_ATTACK_HOLY, 1,
+ did_god_conduct(mondied? DID_KILL_HOLY : DID_ATTACK_HOLY, 1,
true, def);
player_check_weapon_effects();
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2800fd1794..118371c4c5 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -720,7 +720,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
monster->hit_dice, true, monster);
if (mons_is_holy(monster))
- did_god_conduct(DID_KILL_ANGEL, monster->hit_dice,
+ did_god_conduct(DID_KILL_HOLY, monster->hit_dice,
true, monster);
if (created_friendly)
@@ -849,10 +849,10 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
}
- // Angel kills are always noticed.
+ // Holy kills are always noticed.
if (targ_holy == MH_HOLY)
{
- notice |= did_god_conduct( DID_ANGEL_KILLED_BY_SERVANT,
+ notice |= did_god_conduct( DID_HOLY_KILLED_BY_SERVANT,
monster->hit_dice );
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index c4e9c552cf..1a23fab492 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1441,10 +1441,10 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
}
break;
- // Note that Angel deaths are special, they are always noticed...
+ // Note that holy deaths are special, they are always noticed...
// if you or any friendly kills one you'll get the credit or the blame.
- case DID_ANGEL_KILLED_BY_SERVANT:
- case DID_KILL_ANGEL:
+ case DID_HOLY_KILLED_BY_SERVANT:
+ case DID_KILL_HOLY:
switch (you.religion)
{
case GOD_ZIN:
@@ -1465,7 +1465,7 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
case GOD_MAKHLEB:
case GOD_LUGONU:
snprintf( info, INFO_SIZE, " accepts your %skill.",
- (thing_done == DID_KILL_ANGEL) ? "" : "collateral " );
+ (thing_done == DID_KILL_HOLY) ? "" : "collateral " );
simple_god_message( info );
@@ -1683,9 +1683,9 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
"Friend Died", "Stab", "Poison", "Field Sacrifice",
"Kill Living", "Kill Undead", "Kill Demon", "Kill Natural Evil",
"Kill Mutator Or Rotter", "Kill Wizard", "Kill Priest",
- "Kill Angel", "Kill Neutral", "Undead Slave Kill Living",
+ "Kill Holy", "Kill Neutral", "Undead Slave Kill Living",
"Servant Kill Living", "Servant Kill Undead", "Servant Kill Demon",
- "Servant Kill Natural Evil", "Servant Kill Angel",
+ "Servant Kill Natural Evil", "Servant Kill Holy",
"Spell Memorise", "Spell Cast", "Spell Practise", "Spell Nonutility",
"Cards", "Stimulants", "Drink Blood", "Cannibalism", "Eat Meat",
"Eat Souled Beings", "Create Life", "Deliberate Mutation"
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 4a3c4bfc38..9df1b0f555 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -748,13 +748,12 @@ static void good_god_follower_attitude_change(monsters *monster)
if (you.is_undead || you.species == SP_DEMONSPAWN)
return;
- const bool is_holy = mons_class_holiness(monster->type) == MH_HOLY;
// for followers of good gods, decide whether holy beings will be
// neutral towards you
if (is_good_god(you.religion)
&& monster->foe == MHITYOU
&& !(monster->flags & MF_ATT_CHANGE_ATTEMPT)
- && is_holy
+ && mons_is_holy(monster)
&& !mons_neutral(monster)
&& !mons_friendly(monster)
&& mons_player_visible(monster) && !mons_is_sleeping(monster)
@@ -779,8 +778,8 @@ static void good_god_follower_attitude_change(monsters *monster)
stop_running();
}
}
- else if (is_holy
- && !is_good_god(you.religion)
+ else if (!is_good_god(you.religion)
+ && mons_is_holy(monster)
&& monster->attitude != ATT_HOSTILE
&& (monster->flags & MF_ATT_CHANGE_ATTEMPT)
&& mons_player_visible(monster) && !mons_is_sleeping(monster)
@@ -807,12 +806,11 @@ void beogh_follower_convert(monsters *monster, bool orc_hit)
if (you.species != SP_HILL_ORC)
return;
- const bool is_orc = mons_species(monster->type) == MONS_ORC;
// for followers of Beogh, decide whether orcs will join you
if (you.religion == GOD_BEOGH
&& monster->foe == MHITYOU
&& !(monster->flags & MF_ATT_CHANGE_ATTEMPT)
- && is_orc
+ && mons_species(monster->type) == MONS_ORC
&& !mons_friendly(monster)
&& mons_player_visible(monster) && !mons_is_sleeping(monster)
&& !mons_is_confused(monster) && !mons_is_paralysed(monster))