summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-22 15:53:37 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-22 15:53:37 +0000
commit2a73bdc6a3be5efa46dfdf32bb86edfcf5d0bd4c (patch)
tree8f0fc9dad7bcda05c27e23aca77ec987ed21c8c5 /crawl-ref/source/items.cc
parent9a1e7565ec8802a38a9649744920923fc262dff7 (diff)
downloadcrawl-ref-2a73bdc6a3be5efa46dfdf32bb86edfcf5d0bd4c.tar.gz
crawl-ref-2a73bdc6a3be5efa46dfdf32bb86edfcf5d0bd4c.zip
Improve player beam tracer for firing through friendlies:
* name the monster you're firing through ("your goblin zombie") * use maximum possible range * make it work for spells and abilities, as well Still todo: * apply the same logic to firing missiles * don't prompt for monsters that wouldn't be harmed (e.g. living allies for Dispel Undead, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5177 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 7652cff35d..f1f2915a0a 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2492,7 +2492,7 @@ bool item_def::launched_by(const item_def &launcher) const
int item_def::zap() const
{
if (base_type != OBJ_WANDS)
- return ZAP_DEBUGGING_RAY;
+ return (ZAP_DEBUGGING_RAY);
zap_type result;
switch (sub_type)
@@ -2503,9 +2503,9 @@ int item_def::zap() const
case WAND_RANDOM_EFFECTS:
result = static_cast<zap_type>(random2(16));
- if ( one_chance_in(20) )
+ if (one_chance_in(20))
result = ZAP_NEGATIVE_ENERGY;
- if ( one_chance_in(17) )
+ if (one_chance_in(17))
result = ZAP_ENSLAVEMENT;
break;
@@ -2513,7 +2513,7 @@ int item_def::zap() const
result = static_cast<zap_type>(sub_type);
break;
}
- return result;
+ return (result);
}
int item_def::index() const