summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-06 12:54:36 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-06 12:54:36 +0000
commit8b4814cda94ce0ba5d627b4ae572077dcf55ccda (patch)
treead912dbac17407d32bdaab7fbe668513983cd752 /crawl-ref/source/fight.cc
parentb2ea4771ba60b92574d31a7cbb628323a5eb8897 (diff)
downloadcrawl-ref-8b4814cda94ce0ba5d627b4ae572077dcf55ccda.tar.gz
crawl-ref-8b4814cda94ce0ba5d627b4ae572077dcf55ccda.zip
Fix 1986252: double "Blech! You need xy!" message
Fix 1966204: make non-amphibious undead capable of drowning or the equivalent thereof When you see a weapon with the returning ego return (to you or a monster) set the properties known along with the brand (because artefacts can't be id'd by throwing alone, anyway). This helps alleviate BR 1958616, but doesn't solve the problem with the curse status being unknown. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5499 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 9b2a31a6ef..40de539dd2 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -674,7 +674,7 @@ static bool _vamp_wants_blood_from_monster(const monsters *mon)
const int chunk_type = mons_corpse_effect( mon->type );
- // don't drink poisonous or mutagenic blood
+ // Don't drink poisonous or mutagenic blood.
return (chunk_type == CE_CLEAN || chunk_type == CE_CONTAMINATED
|| chunk_type == CE_POISONOUS && player_res_poison());
}
@@ -2187,10 +2187,12 @@ bool melee_attack::apply_damage_brand()
case SPWPN_STAFF_OF_OLGREB:
if (!one_chance_in(4))
{
- int old_poison = 0;
+ int old_poison;
if (defender->atype() == ACT_PLAYER)
old_poison = you.duration[DUR_POISONING];
+ else
+ old_poison = (def->get_ench(ENCH_POISON)).degree;
// Poison monster message needs to arrive after hit message.
emit_nodmg_hit_message();
@@ -2200,7 +2202,9 @@ bool melee_attack::apply_damage_brand()
defender->poison( attacker, 2 );
if (defender->atype() == ACT_PLAYER
- && old_poison < you.duration[DUR_POISONING])
+ && old_poison < you.duration[DUR_POISONING]
+ || defender->atype() != ACT_PLAYER
+ && old_poison < (def->get_ench(ENCH_POISON)).degree)
{
obvious_effect = true;
}
@@ -2212,16 +2216,14 @@ bool melee_attack::apply_damage_brand()
drain_defender();
break;
- // 9 = speed - done before
case SPWPN_VORPAL:
special_damage = 1 + random2(damage_done) / 2;
- // note: leaving special_damage_message empty because there
- // isn't one.
+ // Note: Leaving special_damage_message empty because there isn't one.
break;
case SPWPN_VAMPIRICISM:
{
- // vampire bat form, why the special handling?
+ // Vampire bat form -- why the special handling?
if (attacker->atype() == ACT_PLAYER && you.species == SP_VAMPIRE
&& you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
@@ -2239,7 +2241,7 @@ bool melee_attack::apply_damage_brand()
obvious_effect = true;
- // handle weapon effects
+ // Handle weapon effects.
// We only get here if we've done base damage, so no
// worries on that score.
@@ -2261,7 +2263,7 @@ bool melee_attack::apply_damage_brand()
int hp_boost = 0;
- // thus is probably more valuable on larger weapons?
+ // Thus is probably more valuable on larger weapons?
if (weapon && is_fixed_artefact( *weapon )
&& weapon->special == SPWPN_VAMPIRES_TOOTH)
{