diff options
author | elliptic <hyperelliptical@gmail.com> | 2011-12-10 03:50:15 -0500 |
---|---|---|
committer | elliptic <hyperelliptical@gmail.com> | 2011-12-10 03:50:15 -0500 |
commit | bd741b0dd7feb329b1fac954884e9bb93402d21c (patch) | |
tree | 2e20f99f71b43fa9e574de5b6de34c5a983b58be /crawl-ref/source/l_moninf.cc | |
parent | 843efcf063bdf07e097bacc232d88a0bfb4c477a (diff) | |
download | crawl-ref-bd741b0dd7feb329b1fac954884e9bb93402d21c.tar.gz crawl-ref-bd741b0dd7feb329b1fac954884e9bb93402d21c.zip |
Improve autofight handling of "safe" monsters by checking for firewood instead.
Previously some monsters were still not being attacked because they were
treated as safe. Checking mons_is_firewood() is better for determining which
monsters to ignore, though ballistomycetes and butterflies still need to be
special-cased.
Diffstat (limited to 'crawl-ref/source/l_moninf.cc')
-rw-r--r-- | crawl-ref/source/l_moninf.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/l_moninf.cc b/crawl-ref/source/l_moninf.cc index ec8f470881..3e22a040d1 100644 --- a/crawl-ref/source/l_moninf.cc +++ b/crawl-ref/source/l_moninf.cc @@ -39,6 +39,7 @@ void lua_push_moninf(lua_State *ls, monster_info *mi) MIRET1(number, damage_level, dam) MIRET1(boolean, is_safe, is(MB_SAFE)) +MIRET1(boolean, is_firewood, is(MB_FIREWOOD)) MIRET1(number, holiness, holi) MIRET1(number, attitude, attitude) MIRET1(number, threat, threat) @@ -102,6 +103,7 @@ static const struct luaL_reg moninf_lib[] = MIREG(mname), MIREG(is), MIREG(is_safe), + MIREG(is_firewood), MIREG(is_very_stabbable), MIREG(holiness), MIREG(attitude), |