diff options
author | elliptic <hyperelliptical@gmail.com> | 2011-12-03 18:30:29 -0500 |
---|---|---|
committer | elliptic <hyperelliptical@gmail.com> | 2011-12-03 18:47:58 -0500 |
commit | 7941f2ef976c30a34533ff85df1e0a8381d5dc0d (patch) | |
tree | fb02685535363709b44e66c4046a1390ccef2934 /crawl-ref/source/l_moninf.cc | |
parent | 6578c790d3051254aa607c646607fb0ca2c8ed9c (diff) | |
download | crawl-ref-7941f2ef976c30a34533ff85df1e0a8381d5dc0d.tar.gz crawl-ref-7941f2ef976c30a34533ff85df1e0a8381d5dc0d.zip |
Another player lua function, for checking whether a monster is sleeping or paralysed.
Diffstat (limited to 'crawl-ref/source/l_moninf.cc')
-rw-r--r-- | crawl-ref/source/l_moninf.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/l_moninf.cc b/crawl-ref/source/l_moninf.cc index 85c6f6ecac..ec8f470881 100644 --- a/crawl-ref/source/l_moninf.cc +++ b/crawl-ref/source/l_moninf.cc @@ -56,6 +56,14 @@ LUAFN(moninf_get_is) return (1); } +LUAFN(moninf_get_is_very_stabbable) +{ + MONINF(ls, 1, mi); + lua_pushboolean(ls, mi->is(MB_DORMANT) || mi->is(MB_SLEEPING) || + mi->is(MB_PARALYSED)); + return (1); +} + LUAFN(moninf_get_is_unique) { MONINF(ls, 1, mi); // XXX: A bit of a hack to prevent using this to determine which is fake. @@ -94,6 +102,7 @@ static const struct luaL_reg moninf_lib[] = MIREG(mname), MIREG(is), MIREG(is_safe), + MIREG(is_very_stabbable), MIREG(holiness), MIREG(attitude), MIREG(threat), |