summaryrefslogtreecommitdiff
path: root/src/map/magic-stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/magic-stmt.c')
-rw-r--r--src/map/magic-stmt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/magic-stmt.c b/src/map/magic-stmt.c
index 3422a1b..24b4c0f 100644
--- a/src/map/magic-stmt.c
+++ b/src/map/magic-stmt.c
@@ -761,6 +761,18 @@ op_drop_item_for(env_t *env, int args_nr, val_t *args)
return 0;
}
+static int
+op_gain_exp(env_t *env, int args_nr, val_t *args)
+{
+ character_t *c = (ETY(0) == BL_PC)? ARGPC(0) : NULL;
+
+ if (!c)
+ return 1;
+
+ pc_gainexp_reason(c, ARGINT(1), ARGINT(2), ARGINT(3));
+ return 0;
+}
+
static op_t operations[] =
{
{ "sfx", ".ii", op_sfx },
@@ -785,6 +797,7 @@ static op_t operations[] =
{ "set_hair_style", "ei", op_set_hair_style },
{ "drop_item", "l.ii", op_drop_item_for },
{ "drop_item_for", "l.iiei", op_drop_item_for },
+ { "gain_experience", "eiii", op_gain_exp },
{ NULL, NULL, NULL }
};