Skip to content

Commit

Permalink
Make "Leech" a sloppy eater (tylertfb)
Browse files Browse the repository at this point in the history
A cosmetic addition: strong hits with Leech occasionally turn monsters
into large blood explosions.

Note from Floodkiller: Modified commit to also apply to Bloodbane since
it exists in Gooncrawl.
  • Loading branch information
ebering authored and Floodkiller committed May 11, 2020
1 parent 0bd08a0 commit 3ac1c30
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
27 changes: 27 additions & 0 deletions crawl-ref/source/art-func.h
Expand Up @@ -21,6 +21,7 @@
#define ART_FUNC_H

#include "beam.h" // For Lajatang of Order's silver damage
#include "bloodspatter.h" // For Leech
#include "cloud.h" // For storm bow's and robe of clouds' rain
#include "english.h" // For apostrophise
#include "exercise.h" // For practise_evoking
Expand All @@ -30,6 +31,8 @@
#include "god-conduct.h" // did_god_conduct
#include "god-passive.h" // passive_t::want_curses
#include "mgen-data.h" // For Sceptre of Asmodeus evoke
#include "message.h"
#include "monster.h"
#include "mon-death.h" // For demon axe's SAME_ATTITUDE
#include "mon-place.h" // For Sceptre of Asmodeus evoke
#include "nearby-danger.h" // For Zhor
Expand Down Expand Up @@ -1361,6 +1364,30 @@ static void _LEECH_equip(item_def *item, bool *show_msgs, bool unmeld)
// else let player-equip.cc handle message
}

// Big killing blows give a bloodsplosion effect sometimes
static void _LEECH_melee_effects(item_def* /*item*/, actor* attacker,
actor* defender, bool mondied, int dam)
{
if (attacker->is_player() && defender->can_bleed()
&& mondied && x_chance_in_y(dam, 729))
{
simple_monster_message(*(defender->as_monster()),
" liquefies into a cloud of blood!");
blood_spray(defender->pos(), defender->type, 50);
}
}

static void _BLOODBANE_melee_effects(item_def* /*item*/, actor* attacker,
actor* defender, bool mondied, int dam)
{
if (attacker->is_player() && defender->can_bleed()
&& mondied && x_chance_in_y(dam, 729))
{
simple_monster_message(*(defender->as_monster()),
" liquefies into a cloud of blood!");
blood_spray(defender->pos(), defender->type, 50);
}
}

///////////////////////////////////////////////////

Expand Down
8 changes: 5 additions & 3 deletions crawl-ref/source/dat/descript/unrand.txt
Expand Up @@ -100,7 +100,8 @@ the vividly coloured faerie dragons ever existed.
demon blade "Bloodbane"

A blade forged in Hell by the sacrifice of countless tortured souls. It
inflicts the rage and suffering of those souls upon its wielder.
inflicts the rage and suffering of those souls upon its wielder, leaving
behind a mess of blood and gore.
%%%%
scimitar of Flaming Death

Expand Down Expand Up @@ -768,8 +769,9 @@ reveals the machinations of those who would prefer to stay invisible.
%%%%
demon blade "Leech"

An unerringly vampiric blade which gorges itself on drained life force every
time it strikes.
An unerringly vampiric blade, forged in Hell by the sacrifice of countless
tortured souls. It gorges itself further on drained life force every time
it strikes, leaving behind a mess of blood and gore.
%%%%
dagger of Chilly Death

Expand Down

0 comments on commit 3ac1c30

Please sign in to comment.