diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-23 23:30:51 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-23 23:30:51 -0700 |
commit | 5bb68970dece3052f5bf82d53bec8c6eeac60e15 (patch) | |
tree | c1ca7cf0d8f5f88f35b1bccdaf844e716066d62c /src/map/magic-expr.h | |
parent | 8678e872c4a8f5ce67f135bf2f5e6b44b4ba2997 (diff) | |
download | tmwa-5bb68970dece3052f5bf82d53bec8c6eeac60e15.tar.gz tmwa-5bb68970dece3052f5bf82d53bec8c6eeac60e15.tar.bz2 tmwa-5bb68970dece3052f5bf82d53bec8c6eeac60e15.tar.xz tmwa-5bb68970dece3052f5bf82d53bec8c6eeac60e15.zip |
Magic: looping over spells, spell field access, is-equipped check
Diffstat (limited to 'src/map/magic-expr.h')
-rw-r--r-- | src/map/magic-expr.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/magic-expr.h b/src/map/magic-expr.h index 5f58d3c..1a54293 100644 --- a/src/map/magic-expr.h +++ b/src/map/magic-expr.h @@ -89,4 +89,10 @@ magic_copy_var(val_t *dest, val_t *src); void magic_random_location(location_t *dest, area_t *area); -#endif /* !defined(MAGIC_EXPR_H_) */
\ No newline at end of file +int // ret -1: not a string, ret 1: no such item, ret 0: OK +magic_find_item(val_t *args, int index, struct item *item, int *stackable); + +#define GET_ARG_ITEM(index, dest, stackable) switch(magic_find_item(args, index, &dest, &stackable)) { case -1 : return 1; case 1 : return 0; } + + +#endif /* !defined(MAGIC_EXPR_H_) */ |