summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 },