From 9e2960c3a8067a5365a1261209528a1ee79b7b6d Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 15 Jan 2010 19:07:58 +1000 Subject: Fix bugs involving branded ammunition and their messages. This fix multiple bugs, including one reported on SourceForge that Poison Weapon wasn't working properly for any launchers; that has now been fixed. This commit should also solve the issue with "poisoned poison arrow" and "arrow of flame of flame". Hopefully we won't see any more of them. --- crawl-ref/source/item_use.cc | 46 +++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index ac4953d619..4e345054cb 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2112,30 +2112,6 @@ bool setup_missile_beam(const actor *agent, bolt &beam, item_def &item, bow_brand = get_weapon_brand(*launcher); int ammo_brand = get_ammo_brand(item); - bool poisoned = ammo_brand == SPMSL_POISONED; - - const bool exploding = ammo_brand == SPMSL_EXPLODING; - const bool penetrating = (!exploding - && (bow_brand == SPWPN_PENETRATION - || ammo_brand == SPMSL_PENETRATION)); - const bool silver = (ammo_brand == SPMSL_SILVER); - const bool disperses = (ammo_brand == SPMSL_DISPERSAL); - const bool reaping = (bow_brand == SPWPN_REAPING - || ammo_brand == SPMSL_REAPING) - && bow_brand != SPWPN_HOLY_WRATH; - const bool charged = bow_brand == SPWPN_ELECTROCUTION; - const bool blessed = bow_brand == SPWPN_HOLY_WRATH - && ammo_brand != SPMSL_REAPING; - - const bool paralysis = ammo_brand == SPMSL_PARALYSIS; - const bool slow = ammo_brand == SPMSL_SLOW; - const bool sleep = ammo_brand == SPMSL_SLEEP; - const bool confusion = ammo_brand == SPMSL_CONFUSION; - const bool sickness = ammo_brand == SPMSL_SICKNESS; - const bool rage = ammo_brand == SPMSL_RAGE; - - - ASSERT(!exploding || !is_artefact(item)); // Launcher brand does not affect ammunition. if (ammo_brand != SPMSL_NORMAL && bow_brand != SPWPN_NORMAL) @@ -2151,6 +2127,28 @@ bool setup_missile_beam(const actor *agent, bolt &beam, item_def &item, bow_brand = SPWPN_NORMAL; } + bool poisoned = (bow_brand == SPWPN_VENOM + || ammo_brand == SPMSL_POISONED); + + const bool exploding = (ammo_brand == SPMSL_EXPLODING); + const bool penetrating = (bow_brand == SPWPN_PENETRATION + || ammo_brand == SPMSL_PENETRATION); + const bool silver = (ammo_brand == SPMSL_SILVER); + const bool disperses = (ammo_brand == SPMSL_DISPERSAL); + const bool reaping = (bow_brand == SPWPN_REAPING + || ammo_brand == SPMSL_REAPING); + const bool charged = bow_brand == SPWPN_ELECTROCUTION; + const bool blessed = bow_brand == SPWPN_HOLY_WRATH; + + const bool paralysis = ammo_brand == SPMSL_PARALYSIS; + const bool slow = ammo_brand == SPMSL_SLOW; + const bool sleep = ammo_brand == SPMSL_SLEEP; + const bool confusion = ammo_brand == SPMSL_CONFUSION; + const bool sickness = ammo_brand == SPMSL_SICKNESS; + const bool rage = ammo_brand == SPMSL_RAGE; + + ASSERT(!exploding || !is_artefact(item)); + beam.name = item.name(DESC_PLAIN, false, false, false); // Print type of item as influenced by launcher. -- cgit v1.2.3-54-g00ecf