summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-07 19:30:36 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-07 19:30:36 +0000
commita4bc53ca7167c06fd165cbf9a09d000c9f19c2cb (patch)
tree04921c25d05be84284fcfe5856500e9af14fb6ac /crawl-ref
parent423211fbca07241d7c628986d8075f4dccc5de36 (diff)
downloadcrawl-ref-a4bc53ca7167c06fd165cbf9a09d000c9f19c2cb.tar.gz
crawl-ref-a4bc53ca7167c06fd165cbf9a09d000c9f19c2cb.zip
Replace the conduct for killing a neutral monster with a conduct for
attacking a neutral monster. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4102 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/beam.cc4
-rw-r--r--crawl-ref/source/enum.h2
-rw-r--r--crawl-ref/source/monstuff.cc4
-rw-r--r--crawl-ref/source/player.cc2
-rw-r--r--crawl-ref/source/religion.cc44
-rw-r--r--crawl-ref/source/spells2.cc6
-rw-r--r--crawl-ref/source/spells3.cc4
7 files changed, 37 insertions, 29 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index abb0189e8f..a72562dac0 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3817,6 +3817,8 @@ static int _affect_monster(bolt &beam, monsters *mon)
if (mons_friendly( mon ) && beam.flavour != BEAM_CHARM)
did_god_conduct( DID_ATTACK_FRIEND, 5, true, mon );
+ else if (mons_neutral( mon ) && beam.flavour != BEAM_CHARM)
+ did_god_conduct( DID_ATTACK_NEUTRAL, 5, true, mon );
if (mons_is_holy( mon ))
did_god_conduct( DID_ATTACK_HOLY, mon->hit_dice, true, mon );
@@ -3988,6 +3990,8 @@ static int _affect_monster(bolt &beam, monsters *mon)
if (mons_friendly(mon))
conduct.set( DID_ATTACK_FRIEND, 5, !okay, mon );
+ else if (mons_neutral(mon))
+ conduct.set( DID_ATTACK_NEUTRAL, 5, !okay, mon );
if (mons_is_holy(mon))
conduct.set( DID_ATTACK_HOLY, mon->hit_dice, !okay, mon );
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 65d40e0af9..823a364f1c 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -628,6 +628,7 @@ enum conduct_type
DID_NECROMANCY = 1, // vamp/drain/pain wpns, Zong/Curses
DID_UNHOLY, // demon wpns, demon spells
DID_ATTACK_HOLY,
+ DID_ATTACK_NEUTRAL,
DID_ATTACK_FRIEND,
DID_FRIEND_DIES,
DID_STABBING,
@@ -642,7 +643,6 @@ enum conduct_type
DID_KILL_WIZARD,
DID_KILL_PRIEST,
DID_KILL_HOLY,
- DID_KILL_NEUTRAL,
DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
DID_LIVING_KILLED_BY_SERVANT,
DID_UNDEAD_KILLED_BY_SERVANT,
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 69e0cdfbb1..c87263f71e 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -907,10 +907,6 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
true, monster);
drop_items = false;
}
-
- if (was_neutral)
- did_god_conduct(DID_KILL_NEUTRAL, monster->hit_dice,
- true, monster);
}
// Divine health and mp restoration doesn't happen when killing
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 244e190f76..961705f1d8 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5847,6 +5847,8 @@ void player::attacking(actor *other)
const monsters *mons = dynamic_cast<monsters*>(other);
if (mons_friendly(mons))
did_god_conduct(DID_ATTACK_FRIEND, 5, true, mons);
+ else if (mons_neutral(mons))
+ did_god_conduct(DID_ATTACK_NEUTRAL, 5, true, mons);
else
pet_target = monster_index(mons);
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 2a5258e727..c17abd997d 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1730,6 +1730,21 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
}
break;
+ case DID_ATTACK_NEUTRAL:
+ switch (you.religion)
+ {
+ case GOD_ELYVILON:
+ simple_god_message(" did not appreciate that!");
+ ret = true;
+ piety_change = -(level/2 + 1);
+ penance = std::min(level, 5);
+ break;
+
+ default:
+ break;
+ }
+ break;
+
case DID_ATTACK_FRIEND:
if (god_hates_attacking_friend(you.religion, victim))
{
@@ -1785,21 +1800,6 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
}
break;
- case DID_KILL_NEUTRAL:
- switch (you.religion)
- {
- case GOD_ELYVILON:
- simple_god_message(" did not appreciate that!");
- ret = true;
- piety_change = -(level/2 + 1);
- penance = std::min(level, 5);
- break;
-
- default:
- break;
- }
- break;
-
case DID_KILL_LIVING:
switch (you.religion)
{
@@ -2185,15 +2185,15 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
static const char *conducts[] =
{
"",
- "Necromancy", "Unholy", "Attack Holy", "Attack Friend",
- "Friend Died", "Stab", "Poison", "Field Sacrifice",
+ "Necromancy", "Unholy", "Attack Holy", "Attack Neutral",
+ "Attack Friend", "Friend Died", "Stab", "Poison", "Field Sacrifice",
"Kill Living", "Kill Undead", "Kill Demon", "Kill Natural Evil",
"Kill Mutator Or Rotter", "Kill Wizard", "Kill Priest",
- "Kill Holy", "Kill Neutral", "Undead Slave Kill Living",
- "Servant Kill Living", "Servant Kill Undead", "Servant Kill Demon",
- "Servant Kill Natural Evil", "Servant Kill Holy",
- "Spell Memorise", "Spell Cast", "Spell Practise", "Spell Nonutility",
- "Cards", "Stimulants", "Drink Blood", "Cannibalism", "Eat Meat",
+ "Kill Holy", "Undead Slave Kill Living", "Servant Kill Living",
+ "Servant Kill Undead", "Servant Kill Demon",
+ "Servant Kill Natural Evil", "Servant Kill Holy", "Spell Memorise",
+ "Spell Cast", "Spell Practise", "Spell Nonutility", "Cards",
+ "Stimulants", "Drink Blood", "Cannibalism", "Eat Meat",
"Eat Souled Being", "Deliberate Mutation", "Cause Glowing",
"Create Life"
};
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index fa0cd9c2d8..6e621ed17e 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1166,7 +1166,7 @@ char burn_freeze(int pow, beam_type flavour)
: "______",
monster->name(DESC_NOCAP_THE).c_str());
- int hurted = roll_dice( 1, 3 + pow / 3 );
+ int hurted = roll_dice( 1, 3 + pow / 3 );
bolt beam;
@@ -1179,7 +1179,9 @@ char burn_freeze(int pow, beam_type flavour)
{
if (mons_friendly( monster ))
did_god_conduct( DID_ATTACK_FRIEND, 5, true, monster );
-
+ else if (mons_neutral( monster ))
+ did_god_conduct( DID_ATTACK_NEUTRAL, 5, true, monster );
+
if (mons_holiness( monster ) == MH_HOLY)
did_god_conduct( DID_ATTACK_HOLY, monster->hit_dice );
}
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 3c81ef5084..074a064c70 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -216,6 +216,8 @@ int cast_smiting(int power, dist &beam)
if (mons_friendly(monster))
did_god_conduct(DID_ATTACK_FRIEND, 5, true, monster);
+ else if (mons_neutral(monster))
+ did_god_conduct(DID_ATTACK_NEUTRAL, 5, true, monster);
behaviour_event( monster, ME_ANNOY, MHITYOU );
@@ -270,6 +272,8 @@ int airstrike(int power, dist &beam)
if (mons_friendly(monster))
did_god_conduct(DID_ATTACK_FRIEND, 5, true, monster);
+ else if (mons_neutral(monster))
+ did_god_conduct(DID_ATTACK_NEUTRAL, 5, true, monster);
behaviour_event(monster, ME_ANNOY, MHITYOU, you.x_pos, you.y_pos);