diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-07-13 03:50:44 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-07-13 03:54:39 +0200 |
commit | ec6ae37857d63a49fed8dcc6c123a3c1a48b0d75 (patch) | |
tree | 40933740d526c20f40deb93092ccbcbf1cb1f442 /crawl-ref/source/l_mons.cc | |
parent | 5deb02cc05f05478753c24f8f8404a4fc4153b02 (diff) | |
download | crawl-ref-ec6ae37857d63a49fed8dcc6c123a3c1a48b0d75.tar.gz crawl-ref-ec6ae37857d63a49fed8dcc6c123a3c1a48b0d75.zip |
dlua function mons.wont_attack
It'd be better to have attitude as well, but that'd require passing all
enums, and I'm not going to code this at 4am. Also, we'd still need a list
of friendly enough attitudes, so wont_attack remains useful.
Diffstat (limited to 'crawl-ref/source/l_mons.cc')
-rw-r--r-- | crawl-ref/source/l_mons.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/l_mons.cc b/crawl-ref/source/l_mons.cc index 7bcf275a33..756f7bb538 100644 --- a/crawl-ref/source/l_mons.cc +++ b/crawl-ref/source/l_mons.cc @@ -206,6 +206,13 @@ MDEF(dancing_weapon) return (1); } +MDEF(wont_attack) +{ + ASSERT_DLUA; + lua_pushboolean(ls, mons->wont_attack()); + return (1); +} + static const char *_monuse_names[] = { "nothing", "open_doors", "starting_equipment", "weapons_armour" @@ -516,6 +523,7 @@ static MonsAccessor mons_attrs[] = { "shapeshifter", l_mons_shapeshifter }, { "mimic", l_mons_mimic }, { "dancing_weapon", l_mons_dancing_weapon }, + { "wont_attack", l_mons_wont_attack }, { "x" , l_mons_x }, { "y" , l_mons_y }, |