summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-17 01:36:13 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-17 01:36:13 +0000
commitded3b65a0dfd01a304e0b1c9f41c5d9fafc1d3f8 (patch)
tree9d6d2a77c39e986ffa86f8e094ec446deb3f742c
parent408f0d9ba4e28730d1bb388f8ed2f771c9d45155 (diff)
downloadcrawl-ref-ded3b65a0dfd01a304e0b1c9f41c5d9fafc1d3f8.tar.gz
crawl-ref-ded3b65a0dfd01a304e0b1c9f41c5d9fafc1d3f8.zip
For TSO, change the "stabbing" conduct to an "unchivalrous attack"
conduct, and exercise it on every stabbing attempt, whether it succeeds or not (and also whether the player is berserk or not, since a berserk player trying to stab seems unchivalrous to me). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5093 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/enum.h2
-rw-r--r--crawl-ref/source/fight.cc18
-rw-r--r--crawl-ref/source/religion.cc18
-rw-r--r--crawl-ref/source/religion.h2
4 files changed, 16 insertions, 24 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 7335e88de7..48b990a984 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -637,7 +637,7 @@ enum conduct_type
DID_ATTACK_NEUTRAL,
DID_ATTACK_FRIEND,
DID_FRIEND_DIES,
- DID_STABBING,
+ DID_UNCHIVALRIC_ATTACK,
DID_POISON,
DID_DEDICATED_BUTCHERY,
// killings need no longer be dedicated (JPEG)
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index a120e06740..ae8885f921 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1424,9 +1424,6 @@ int melee_attack::player_stab(int damage)
stab_message( def, stab_bonus );
exercise(SK_STABBING, 1 + random2avg(5, 4));
-
- if (!tso_stab_safe_monster(defender))
- did_god_conduct(DID_STABBING, 4);
}
else
{
@@ -2776,7 +2773,7 @@ int melee_attack::player_to_hit(bool random_factor)
void melee_attack::player_stab_check()
{
bool roll_needed = true;
- int roll = 155;
+ int roll = 155;
// This ordering is important!
// not paying attention (but not batty)
@@ -2835,26 +2832,21 @@ void melee_attack::player_stab_check()
stab_bonus = 0;
}
- // no stabs while berserk
- if (you.duration[DUR_BERSERKER])
- {
- stab_attempt = false;
- stab_bonus = 0;
- }
-
if (stab_attempt && you.religion == GOD_SHINING_ONE)
{
// check for the would-be-stabbed monster's being alive, in case
// it was abjured as a result of the attack
bool cancel_stab = !defender->alive() ||
- (!tso_stab_safe_monster(defender)
+ (!tso_unchivalric_attack_safe_monster(defender)
&& !yesno("Really attack this helpless creature?", false, 'n'));
if (cancel_stab)
{
- stab_attempt = false;
+ stab_attempt = false;
cancel_attack = true;
}
+ else
+ did_god_conduct(DID_UNCHIVALRIC_ATTACK, 4);
}
// see if we need to roll against dexterity / stabbing
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index fa118ea910..ff5e28e4b6 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1893,7 +1893,7 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
}
break;
- case DID_STABBING:
+ case DID_UNCHIVALRIC_ATTACK:
case DID_POISON:
if (you.religion == GOD_SHINING_ONE)
{
@@ -2373,11 +2373,11 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
{
"",
"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", "Undead Slave Kill Living", "Servant Kill Living",
- "Servant Kill Undead", "Servant Kill Demon",
+ "Attack Friend", "Friend Died", "Unchivalric Attack", "Poison",
+ "Field Sacrifice", "Kill Living", "Kill Undead", "Kill Demon",
+ "Kill Natural Evil", "Kill Mutator Or Rotter", "Kill Wizard",
+ "Kill Priest", "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",
@@ -5356,9 +5356,9 @@ int piety_breakpoint(int i)
return breakpoints[i];
}
-// Returns true if the Shining One doesn't mind your stabbing this
-// creature.
-bool tso_stab_safe_monster(const actor *act)
+// Returns true if the Shining One doesn't mind your using unchivalric
+// attacks on this creature.
+bool tso_unchivalric_attack_safe_monster(const actor *act)
{
const mon_holy_type holy = act->holiness();
return (holy != MH_NATURAL && holy != MH_HOLY);
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index e870841980..d8123df39a 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -73,7 +73,7 @@ void beogh_convert_orc(monsters *orc, bool emergency,
bool is_evil_item(const item_def& item);
bool ely_destroy_weapons();
bool trog_burn_books();
-bool tso_stab_safe_monster(const actor *act);
+bool tso_unchivalric_attack_safe_monster(const actor *act);
bool is_good_follower(const monsters* mon);
bool is_orcish_follower(const monsters* mon);