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-07-07 11:58:54 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 11:58:54 +0000
commit167ae03b160a0ccadd7934b2bfe557d491f1cb1f (patch)
treec1ee0ef626b416c5eee0f62082da72cb9f4137c3 /crawl-ref/source/items.cc
parent33dc7cedd5a65d3bd1ce8eff9006e4517a3390dd (diff)
downloadcrawl-ref-167ae03b160a0ccadd7934b2bfe557d491f1cb1f.tar.gz
crawl-ref-167ae03b160a0ccadd7934b2bfe557d491f1cb1f.zip
Another clean up, and add some new weapon speech.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index ff0731d68f..e373e6f93b 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -172,12 +172,12 @@ static int _cull_items(void)
int first_cleaned = NON_ITEM;
- // 2. avoid shops by avoiding (0,5..9)
- // 3. avoid monster inventory by iterating over the dungeon grid
+ // 2. Avoid shops by avoiding (0,5..9).
+ // 3. Avoid monster inventory by iterating over the dungeon grid.
for (int x = 5; x < GXM; x++)
for (int y = 5; y < GYM; y++)
{
- // 1. not near player!
+ // 1. Not near player!
if (x > you.x_pos - 9 && x < you.x_pos + 9
&& y > you.y_pos - 9 && y < you.y_pos + 9)
{
@@ -186,23 +186,23 @@ static int _cull_items(void)
int next;
- // iterate through the grids list of items:
+ // Iterate through the grids list of items.
for (int item = igrd[x][y]; item != NON_ITEM; item = next)
{
next = mitm[item].link; // in case we can't get it later.
- if (_item_ok_to_clean(item) && random2(100) < 15)
+ if (_item_ok_to_clean(item) && x_chance_in_y(15, 100))
{
const item_def& obj(mitm[item]);
if (is_fixed_artefact(obj))
{
- // 7. move uniques to abyss
+ // 7. Move uniques to abyss.
set_unique_item_status( OBJ_WEAPONS, obj.special,
UNIQ_LOST_IN_ABYSS );
}
else if (is_unrandom_artefact(obj))
{
- // 9. unmark unrandart
+ // 9. Unmark unrandart.
const int z = find_unrandart_index(obj);
if (z != -1)
set_unrandart_exist(z, false);
@@ -213,7 +213,7 @@ static int _cull_items(void)
if (first_cleaned == NON_ITEM)
first_cleaned = item;
}
- } // end for item
+ }
}