summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeyorp <Freeyorp101@NOSPAM@hotmail.com>2009-07-15 11:29:37 +1200
committerJared Adams <jaxad0127@gmail.com>2009-07-15 22:02:00 -0600
commit84783931d0944049590dd8359770657ad971be25 (patch)
tree7fdf16996ede710b36717c661a01cd7b883a6958
parent7463b3e82a1480d8adeb9c39c9d592c1975d81b4 (diff)
downloadtmwa-84783931d0944049590dd8359770657ad971be25.tar.gz
tmwa-84783931d0944049590dd8359770657ad971be25.tar.bz2
tmwa-84783931d0944049590dd8359770657ad971be25.tar.xz
tmwa-84783931d0944049590dd8359770657ad971be25.zip
Add a function to the magic system, fun_is_gm_invisible
-rw-r--r--src/map/magic-expr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/magic-expr.c b/src/map/magic-expr.c
index 1f7f408..2f52be5 100644
--- a/src/map/magic-expr.c
+++ b/src/map/magic-expr.c
@@ -954,6 +954,13 @@ fun_running_status_update(env_t *env, int args_nr, val_t *result, val_t *args)
}
static int
+fun_is_gm_invisible(env_t *env, int args_nr, val_t *result, val_t *args)
+{
+ RESULTINT = ((((struct map_session_data *)ARGENTITY(0))->status.option & 4096) != 0);
+ return 0;
+}
+
+static int
fun_element(env_t *env, int args_nr, val_t *result, val_t *args)
{
RESULTINT = battle_get_element(ARGENTITY(0)) % 10;
@@ -1179,6 +1186,7 @@ static fun_t functions[] = {
{ "count_item", "e.", 'i', fun_count_item },
{ "line_of_sight", "ll", 'i', fun_line_of_sight },
{ "running_status_update", "ei", 'i', fun_running_status_update },
+ { "is_gm_invisible", "e", 'i', fun_is_gm_invisible },
{ "element", "e", 'i', fun_element },
{ "element_level", "e", 'i', fun_element_level },
{ "has_shroud", "e", 'i', fun_has_shroud },