diff options
-rw-r--r-- | crawl-ref/source/spells2.cc | 23 | ||||
-rw-r--r-- | crawl-ref/source/spells2.h | 2 |
2 files changed, 22 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index b29ad1bcaa..4fde90899e 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -375,7 +375,7 @@ bool brand_weapon(brand_type which_brand, int power) return (true); } -void brand_ammo(special_missile_type which_type) +bool brand_ammo(special_missile_type which_type) { const int ammo = you.equip[EQ_WEAPON]; @@ -385,9 +385,10 @@ void brand_ammo(special_missile_type which_type) || you.inv[ammo].sub_type == MI_THROWING_NET) { canned_msg(MSG_NOTHING_HAPPENS); - return; + return (false); } + bool retval = false; preserve_quiver_slots q; const char *old_desc = you.inv[ammo].name(DESC_CAP_YOUR).c_str(); @@ -401,6 +402,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -414,6 +417,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -427,6 +432,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -440,6 +447,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -453,6 +462,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -466,6 +477,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -479,6 +492,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -492,6 +507,8 @@ void brand_ammo(special_missile_type which_type) if (ammo == you.equip[EQ_WEAPON]) you.wield_change = true; + + retval = true; } else canned_msg(MSG_NOTHING_HAPPENS); @@ -501,6 +518,8 @@ void brand_ammo(special_missile_type which_type) canned_msg(MSG_NOTHING_HAPPENS); break; } + + return (retval); } // Restore the stat in which_stat by the amount in stat_gain, displaying diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h index fa3965d7b5..03cd40eaa5 100644 --- a/crawl-ref/source/spells2.h +++ b/crawl-ref/source/spells2.h @@ -13,7 +13,7 @@ struct dist; bool brand_weapon(brand_type which_brand, int power); -void brand_ammo(special_missile_type which_brand); +bool brand_ammo(special_missile_type which_brand); bool burn_freeze(int pow, beam_type flavour, monsters *monster); void corpse_rot(); |