summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_item.cc
diff options
context:
space:
mode:
authorChris Oelmueller <chris.oelmueller@gmail.com>2014-04-11 04:44:42 +0200
committerNicholas Feinberg <pleasingfung@gmail.com>2014-06-14 23:00:53 -0700
commit6d2b5baa39ef7e2eb1e2a7b70d682991705ac1dc (patch)
treecf5ede71c900eb603f9b07eae42be4ecd563ffcc /crawl-ref/source/l_item.cc
parentccee9314cab70c44495d53600391b8ef0cee2e95 (diff)
downloadcrawl-ref-6d2b5baa39ef7e2eb1e2a7b70d682991705ac1dc.tar.gz
crawl-ref-6d2b5baa39ef7e2eb1e2a7b70d682991705ac1dc.zip
Plus2: Attempt to cleanup trove/lua handling of weapon plusses.
[Committer's note: removed handling of plus2 in lm_trove. This will need to be reverted if anyone ever wants to make troves ask for rods.]
Diffstat (limited to 'crawl-ref/source/l_item.cc')
-rw-r--r--crawl-ref/source/l_item.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc
index c0620cb0d8..bfb47913da 100644
--- a/crawl-ref/source/l_item.cc
+++ b/crawl-ref/source/l_item.cc
@@ -682,10 +682,7 @@ IDEF(plus2)
if (!item || !item->defined())
return 0;
- if (item_ident(*item, ISFLAG_KNOW_PLUSES) && item->base_type == OBJ_WEAPONS)
- lua_pushnumber(ls, item->plus2);
- else
- lua_pushnil(ls);
+ lua_pushnil(ls);
return 1;
}
@@ -704,10 +701,8 @@ static int l_item_do_pluses(lua_State *ls)
}
lua_pushnumber(ls, item->plus);
- // XXX: May cause issues on items that don't use plus2, ie ammunition.
- lua_pushnumber(ls, item->plus2);
- return 2;
+ return 1;
}
IDEFN(pluses, do_pluses)