From 0298e319dc3c3715cc42029609e2ab3abd122560 Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 24 May 2009 16:05:39 +0000 Subject: Added and documented stop_status_change command for magic language --- doc/spell-language | 3 +++ src/map/magic-stmt.c | 11 +++++++++++ 2 files changed, 14 insertions(+) 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 @@ -487,6 +487,16 @@ op_status_change(env_t *env, int args_nr, val_t *args) return 0; } +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) { @@ -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 }, -- cgit v1.2.3-60-g2f50