summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/attack.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-05 20:36:13 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-05 20:37:56 -0600
commit29148e68da590ce351902fc493e7b58a38bf7346 (patch)
tree702fc70fda67f495008e7c6adfbfdeaba3f4ee75 /crawl-ref/source/attack.cc
parent320abf6e435df7a6f2b5f4d475ca74adc65ea602 (diff)
downloadcrawl-ref-29148e68da590ce351902fc493e7b58a38bf7346.tar.gz
crawl-ref-29148e68da590ce351902fc493e7b58a38bf7346.zip
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.
Diffstat (limited to 'crawl-ref/source/attack.cc')
-rw-r--r--crawl-ref/source/attack.cc16
1 files changed, 16 insertions, 0 deletions
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