From 29148e68da590ce351902fc493e7b58a38bf7346 Mon Sep 17 00:00:00 2001 From: Steve Melenchuk Date: Mon, 5 May 2014 20:36:13 -0600 Subject: Hacks to get Hellfire working as intended. About half of this code is to get the attack to show the flavour as "hellfire bolt". This could probably be redone by having the attack class have some kind of projectile name field. --- crawl-ref/source/attack.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'crawl-ref/source/attack.cc') diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc index e2a3aa23db..0727a3e8a7 100644 --- a/crawl-ref/source/attack.cc +++ b/crawl-ref/source/attack.cc @@ -1915,6 +1915,22 @@ bool attack::apply_damage_brand(const char *what) case SPWPN_ANTIMAGIC: antimagic_affects_defender(damage_done); break; + + default: + if (using_weapon() && is_unrandom_artefact(*weapon) + && weapon->special == UNRAND_HELLFIRE) + { + calc_elemental_brand_damage(BEAM_HELLFIRE, + defender->is_monster() + ? defender->as_monster()->res_hellfire() + : 0, + defender->is_icy() ? "melt" : "burn", + what); + defender->expose_to_element(BEAM_HELLFIRE); + attacker->god_conduct(DID_UNHOLY, 2 + random2(3)); + attacker->god_conduct(DID_FIRE, 10 + random2(5)); + } + break; } if (damage_brand == SPWPN_CHAOS && brand != SPWPN_CHAOS && !ret -- cgit v1.2.3-54-g00ecf