From 9532fc897b8393170e25d0c7611020343f4a8750 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Sat, 25 Jul 2015 20:31:03 +0100 Subject: [PATCH] Remove the bleed-over-time effect from clawed attacks And from acid and Zin's recite - it dealt mostly insignificant damage while creating a bunch of message spam. Bleeding still exists as an immediate cosmetic effect on taking damage. --- crawl-ref/source/attack.cc | 23 +--------- crawl-ref/source/attack.h | 2 - crawl-ref/source/enum.h | 2 + crawl-ref/source/godabil.cc | 71 ++++++++++--------------------- crawl-ref/source/melee_attack.cc | 15 +------ crawl-ref/source/mon-ench.cc | 30 ++----------- crawl-ref/source/mon-info.cc | 6 --- crawl-ref/source/mon-info.h | 2 + crawl-ref/source/monster.cc | 27 +----------- crawl-ref/source/monster.h | 1 - crawl-ref/source/timed_effects.cc | 2 +- 11 files changed, 37 insertions(+), 144 deletions(-) diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc index 64c5c78b6af..ecc256d98ab 100644 --- a/crawl-ref/source/attack.cc +++ b/crawl-ref/source/attack.cc @@ -49,8 +49,7 @@ attack::attack(actor *attk, actor *defn, actor *blame) perceived_attack(false), obvious_effect(false), to_hit(0), damage_done(0), special_damage(0), aux_damage(0), min_delay(0), final_attack_delay(0), special_damage_flavour(BEAM_NONE), - stab_attempt(false), stab_bonus(0), apply_bleeding(false), - ev_margin(0), weapon(nullptr), + stab_attempt(false), stab_bonus(0), ev_margin(0), weapon(nullptr), damage_brand(SPWPN_NORMAL), wpn_skill(SK_UNARMED_COMBAT), shield(nullptr), art_props(0), unrand_entry(nullptr), attacker_to_hit_penalty(0), attack_verb("bug"), verb_degree(), @@ -103,21 +102,6 @@ bool attack::handle_phase_damaged() { if (damage_done) player_exercise_combat_skills(); - - if (defender->alive()) - { - // Actually apply the bleeding effect, this can come from an - // aux claw or a main hand claw attack and up to now has not - // actually happened. - const int degree = you.has_usable_claws(); - if (apply_bleeding && defender->can_bleed() - && degree > 0 && damage_done > 0) - { - defender->as_monster()->bleed(attacker, - 3 + roll_dice(degree, 3), - degree); - } - } } else { @@ -1343,12 +1327,9 @@ int attack::calc_base_unarmed_damage() int damage = get_form()->get_base_unarmed_damage(); + // Claw damage only applies for bare hands. if (you.has_usable_claws()) - { - // Claw damage only applies for bare hands. damage += you.has_claws(false) * 2; - apply_bleeding = true; - } if (you.form_uses_xl()) damage += you.experience_level; diff --git a/crawl-ref/source/attack.h b/crawl-ref/source/attack.h index 3601646c1ab..ded8c3d91c8 100644 --- a/crawl-ref/source/attack.h +++ b/crawl-ref/source/attack.h @@ -43,8 +43,6 @@ class attack bool stab_attempt; int stab_bonus; - bool apply_bleeding; - // Fetched/Calculated from the attacker, stored to save execution time int ev_margin; diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index b879685a9ed..c65b5e74eef 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1880,7 +1880,9 @@ enum enchant_type ENCH_SILENCE, ENCH_AWAKEN_FOREST, ENCH_EXPLODING, +#if TAG_MAJOR_VERSION == 34 ENCH_BLEED, +#endif ENCH_PORTAL_TIMER, ENCH_SEVERED, ENCH_ANTIMAGIC, diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index 1ef39381198..53409c647b6 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -608,7 +608,6 @@ enum zin_eff ZIN_DAZE, ZIN_CONFUSE, ZIN_PARALYSE, - ZIN_BLEED, ZIN_SMITE, ZIN_BLIND, ZIN_SILVER_CORONA, @@ -720,7 +719,7 @@ bool zin_recite_to_single_monster(const coord_def& where) if (check < 5) { if (coinflip()) - effect = ZIN_BLEED; + effect = ZIN_CONFUSE; else effect = ZIN_SMITE; } @@ -756,8 +755,8 @@ bool zin_recite_to_single_monster(const coord_def& where) if (check < 5) { // nastier -- fallthrough if immune - if (coinflip() && mon->can_bleed()) - effect = ZIN_BLEED; + if (coinflip() && mon->res_rotting() <= 1) + effect = ZIN_ROT; else effect = ZIN_SMITE; } @@ -785,15 +784,15 @@ bool zin_recite_to_single_monster(const coord_def& where) // immune, of course. if (check < 5) { - if (coinflip() && mon->can_bleed()) - effect = ZIN_BLEED; + if (coinflip() && mon->res_rotting() <= 1) + effect = ZIN_ROT; else effect = ZIN_SMITE; } else if (check < 10) { - if (coinflip() && mon->res_rotting() <= 1) - effect = ZIN_ROT; + if (coinflip()) + effect = ZIN_SMITE; else effect = ZIN_SILVER_CORONA; } @@ -880,42 +879,6 @@ bool zin_recite_to_single_monster(const coord_def& where) } break; - case ZIN_BLEED: - if (mon->can_bleed() - && mon->add_ench(mon_enchant(ENCH_BLEED, degree, &you, - (degree + random2(spellpower)) * BASELINE_DELAY))) - { - mon->add_ench(mon_enchant(ENCH_SICK, degree, &you, - (degree + random2(spellpower)) * BASELINE_DELAY)); - switch (prayertype) - { - case RECITE_HERETIC: - if (minor) - simple_monster_message(mon, "'s eyes and ears begin to bleed."); - else - { - mprf("%s bleeds profusely from %s eyes and ears.", - mon->name(DESC_THE).c_str(), - mon->pronoun(PRONOUN_POSSESSIVE).c_str()); - } - break; - case RECITE_CHAOTIC: - simple_monster_message(mon, - minor ? "'s chaotic flesh is covered in bleeding sores." - : "'s chaotic flesh erupts into weeping sores!"); - break; - case RECITE_IMPURE: - simple_monster_message(mon, - minor ? "'s impure flesh is covered in bleeding sores." - : "'s impure flesh erupts into weeping sores!"); - break; - default: - die("bad recite bleed"); - } - affected = true; - } - break; - case ZIN_SMITE: if (minor) simple_monster_message(mon, " is smitten by the wrath of Zin."); @@ -1020,15 +983,27 @@ bool zin_recite_to_single_monster(const coord_def& where) break; case ZIN_ROT: - ASSERT(prayertype == RECITE_IMPURE); if (mon->res_rotting() <= 1 && mon->rot(&you, 1 + roll_dice(2, degree), true)) { mon->add_ench(mon_enchant(ENCH_SICK, degree, &you, (degree + random2(spellpower)) * BASELINE_DELAY)); - simple_monster_message(mon, - minor ? "'s impure flesh rots away." - : "'s impure flesh sloughs off!"); + switch (prayertype) + { + case RECITE_CHAOTIC: + simple_monster_message(mon, + minor ? "'s chaotic flesh is covered in bleeding sores." + : "'s chaotic flesh erupts into weeping sores!"); + break; + case RECITE_IMPURE: + simple_monster_message(mon, + minor ? "'s impure flesh rots away." + : "'s impure flesh sloughs off!"); + break; + + default: + die("bad recite rot"); + } affected = true; } break; diff --git a/crawl-ref/source/melee_attack.cc b/crawl-ref/source/melee_attack.cc index eb1ba1ce64d..6314c3fb88d 100644 --- a/crawl-ref/source/melee_attack.cc +++ b/crawl-ref/source/melee_attack.cc @@ -1327,19 +1327,8 @@ bool melee_attack::player_aux_apply(unarmed_attack_type atk) aux_damage = inflict_damage(aux_damage, BEAM_MISSILE); damage_done = aux_damage; - switch (atk) - { - case UNAT_PUNCH: - apply_bleeding = true; - break; - - case UNAT_CONSTRICT: - attacker->start_constricting(*defender); - break; - - default: - break; - } + if (atk == UNAT_CONSTRICT) + attacker->start_constricting(*defender); if (damage_done > 0 || atk == UNAT_CONSTRICT) { diff --git a/crawl-ref/source/mon-ench.cc b/crawl-ref/source/mon-ench.cc index a1b68394c78..130f21c0d2c 100644 --- a/crawl-ref/source/mon-ench.cc +++ b/crawl-ref/source/mon-ench.cc @@ -825,11 +825,6 @@ void monster::remove_enchantment_effect(const mon_enchant &me, bool quiet) forest_message(pos(), "The forest calms down."); break; - case ENCH_BLEED: - if (!quiet) - simple_monster_message(this, " is no longer bleeding."); - break; - case ENCH_WITHDRAWN: if (!quiet) simple_monster_message(this, " emerges from its shell."); @@ -1894,26 +1889,6 @@ void monster::apply_enchantment(const mon_enchant &me) } break; - case ENCH_BLEED: - { - // 3, 6, 9% of current hp - int dam = div_rand_round(random2((1 + hit_points)*(me.degree * 3)),100); - - // location, montype, damage (1 hp = 5% chance), spatter, smell_alert - bleed_onto_floor(pos(), type, 20, false, true); - - if (dam < hit_points) - { - hurt(me.agent(), dam); - - dprf("hit_points: %d ; bleed damage: %d ; degree: %d", - hit_points, dam, me.degree); - } - - decay_enchantment(en, true); - break; - } - // This is like Corona, but if silver harms them, it has sticky // flame levels of damage. case ENCH_SILVER_CORONA: @@ -2232,7 +2207,10 @@ static const char *enchant_names[] = "slouch", #endif "swift", "tide", - "insane", "silenced", "awaken_forest", "exploding", "bleeding", + "insane", "silenced", "awaken_forest", "exploding", +#if TAG_MAJOR_VERSION == 34 + "bleeding", +#endif "tethered", "severed", "antimagic", #if TAG_MAJOR_VERSION == 34 "fading_away", "preparing_resurrect", diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc index f71270c3e48..e460f59f831 100644 --- a/crawl-ref/source/mon-info.cc +++ b/crawl-ref/source/mon-info.cc @@ -120,8 +120,6 @@ static monster_info_flags ench_to_mb(const monster& mons, enchant_type ench) return MB_FEAR_INSPIRING; case ENCH_WITHDRAWN: return MB_WITHDRAWN; - case ENCH_BLEED: - return MB_BLEEDING; case ENCH_DAZED: return MB_DAZED; case ENCH_MUTE: @@ -1307,8 +1305,6 @@ static string _verbose_info0(const monster_info& mi) return "wandering"; if (mi.is(MB_BURNING)) return "burning"; - if (mi.is(MB_BLEEDING)) - return "bleeding"; if (mi.is(MB_INVISIBLE)) return "invisible"; @@ -1507,8 +1503,6 @@ vector monster_info::attributes() const v.emplace_back("radiating silence"); if (is(MB_PARALYSED)) v.emplace_back("paralysed"); - if (is(MB_BLEEDING)) - v.emplace_back("bleeding"); if (is(MB_REPEL_MSL)) v.emplace_back("repelling missiles"); if (is(MB_DEFLECT_MSL)) diff --git a/crawl-ref/source/mon-info.h b/crawl-ref/source/mon-info.h index 51b810bd633..7328eab9718 100644 --- a/crawl-ref/source/mon-info.h +++ b/crawl-ref/source/mon-info.h @@ -47,7 +47,9 @@ enum monster_info_flags MB_SHAPESHIFTER, MB_CHAOTIC, MB_SUBMERGED, +#if TAG_MAJOR_VERSION == 34 MB_BLEEDING, +#endif MB_DEFLECT_MSL, #if TAG_MAJOR_VERSION == 34 MB_PREP_RESURRECT, diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 0b41de90baf..ce913894500 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -4516,25 +4516,13 @@ void monster::corrode_equipment(const char* corrosion_source, int degree) } /** - * Attempts to either apply corrosion to a monster or make it bleed from acid - * damage. + * Attempts to apply corrosion to a monster. */ void monster::splash_with_acid(const actor* evildoer, int /*acid_strength*/, bool /*allow_corrosion*/, const char* /*hurt_msg*/) { if (!one_chance_in(3)) corrode_equipment(); - else if (!one_chance_in(3) && can_bleed() && !res_acid()) - { - add_ench(mon_enchant(ENCH_BLEED, 3, evildoer, (5 + random2(5))*10)); - - if (you.can_see(*this)) - { - mprf("%s writhes in agony as %s flesh is eaten away!", - name(DESC_THE).c_str(), - pronoun(PRONOUN_POSSESSIVE).c_str()); - } - } } int monster::hurt(const actor *agent, int amount, beam_type flavour, @@ -5166,19 +5154,6 @@ bool monster::sicken(int amount) return true; } -bool monster::bleed(const actor* agent, int amount, int degree) -{ - if (!has_ench(ENCH_BLEED) && you.can_see(*this)) - { - mprf("%s begins to bleed from %s wounds!", name(DESC_THE).c_str(), - pronoun(PRONOUN_POSSESSIVE).c_str()); - } - - add_ench(mon_enchant(ENCH_BLEED, degree, agent, amount * BASELINE_DELAY)); - - return true; -} - // Recalculate movement speed. void monster::calc_speed() { diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 1d8813271ee..4b33b60e995 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -465,7 +465,6 @@ class monster : public actor bool poison(actor *agent, int amount = 1, bool force = false); bool sicken(int strength); - bool bleed(const actor *agent, int amount, int degree); void paralyse(actor *, int str, string source = ""); void petrify(actor *, bool force = false); bool fully_petrify(actor *foe, bool quiet = false); diff --git a/crawl-ref/source/timed_effects.cc b/crawl-ref/source/timed_effects.cc index 462d7808ce3..12d13a6f88b 100644 --- a/crawl-ref/source/timed_effects.cc +++ b/crawl-ref/source/timed_effects.cc @@ -1320,7 +1320,7 @@ void monster::timeout_enchantments(int levels) case ENCH_PARALYSIS: case ENCH_PETRIFYING: case ENCH_PETRIFIED: case ENCH_SWIFT: case ENCH_BATTLE_FRENZY: case ENCH_SILENCE: case ENCH_LOWERED_MR: - case ENCH_SOUL_RIPE: case ENCH_BLEED: case ENCH_ANTIMAGIC: + case ENCH_SOUL_RIPE: case ENCH_ANTIMAGIC: case ENCH_FEAR_INSPIRING: case ENCH_REGENERATION: case ENCH_RAISED_MR: case ENCH_MIRROR_DAMAGE: case ENCH_STONESKIN: case ENCH_LIQUEFYING: case ENCH_SILVER_CORONA: case ENCH_DAZED: case ENCH_FAKE_ABJURATION: