summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-05-24 16:05:39 +0000
committerFate <fate-tmw@googlemail.com>2009-05-24 16:05:39 +0000
commit0298e319dc3c3715cc42029609e2ab3abd122560 (patch)
treec1e54a64723c5791288619afebe6393e414ca3a5
parent75584894a3459149bb92213b9282a101dbb4b879 (diff)
downloadtmwa-0298e319dc3c3715cc42029609e2ab3abd122560.tar.gz
tmwa-0298e319dc3c3715cc42029609e2ab3abd122560.tar.bz2
tmwa-0298e319dc3c3715cc42029609e2ab3abd122560.tar.xz
tmwa-0298e319dc3c3715cc42029609e2ab3abd122560.zip
Added and documented stop_status_change command for magic language
-rw-r--r--doc/spell-language3
-rw-r--r--src/map/magic-stmt.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/spell-language b/doc/spell-language
index 68c15c8..c7094f7 100644
--- a/doc/spell-language
+++ b/doc/spell-language
@@ -631,6 +631,9 @@ This section documents the operations API.
ATEND can therefore be used to notify the caster that the status
change has finished.
+ + stop_status_change : entity * int
+ Stops a status change
+
+ override_attack : entity * int * int
* int * int *int * int -> ()
override_attack(entity, charges, delay, range, icon, animation, stop)
diff --git a/src/map/magic-stmt.c b/src/map/magic-stmt.c
index d89a01e..0d4b4b7 100644
--- a/src/map/magic-stmt.c
+++ b/src/map/magic-stmt.c
@@ -488,6 +488,16 @@ op_status_change(env_t *env, int args_nr, val_t *args)
}
static int
+op_stop_status_change(env_t *env, int args_nr, val_t *args)
+{
+ entity_t *subject = ARGENTITY(0);
+
+ skill_status_change_end(subject, ARGINT(1), -1);
+
+ return 0;
+}
+
+static int
op_override_attack(env_t *env, int args_nr, val_t *args)
{
entity_t *psubject = ARGENTITY(0);
@@ -794,6 +804,7 @@ static op_t operations[] =
{ "warp", "el", op_warp },
{ "banish", "e", op_banish },
{ "status_change", "eiiiiii", op_status_change },
+ { "stop_status_change", "ei", op_stop_status_change },
{ "override_attack", "eiiiiii", op_override_attack },
{ "create_item", "e.i", op_create_item },
{ "aggravate", "eie", op_aggravate },