diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-29 19:27:13 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-29 19:27:13 -0700 |
commit | 41ad58a56c0f9d27ca61709141115981520fc9ea (patch) | |
tree | d5e1fcf4449710514f3392cd598161f61124843c /src/map | |
parent | 5eef103593c0fc649ed3db92fa104b1f7e5906d3 (diff) | |
download | tmwa-41ad58a56c0f9d27ca61709141115981520fc9ea.tar.gz tmwa-41ad58a56c0f9d27ca61709141115981520fc9ea.tar.bz2 tmwa-41ad58a56c0f9d27ca61709141115981520fc9ea.tar.xz tmwa-41ad58a56c0f9d27ca61709141115981520fc9ea.zip |
Added SLang function `is_dead'
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/magic-expr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/magic-expr.c b/src/map/magic-expr.c index 0c5b9ce..7840941 100644 --- a/src/map/magic-expr.c +++ b/src/map/magic-expr.c @@ -723,6 +723,14 @@ fun_is_married(env_t *env, int args_nr, val_t *result, val_t *args) } static int +fun_is_dead(env_t *env, int args_nr, val_t *result, val_t *args) +{ + RESULTINT = (ETY(0) == BL_PC + && pc_isdead(ARGPC(0))); + return 0; +} + +static int fun_partner(env_t *env, int args_nr, val_t *result, val_t *args) { if (ETY(0) == BL_PC @@ -1164,6 +1172,7 @@ static fun_t functions[] = { { "map_level", "l", 'i', fun_map_level }, { "map_nr", "l", 'i', fun_map_nr }, { "dir_towards", "lli", 'd', fun_dir_towards }, + { "is_dead", "e", 'i', fun_is_dead }, { NULL, NULL, '.', NULL } }; |