From 3ef2cb492970da40f82df9643c4cfc570bc3aa62 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 26 Sep 2009 18:08:42 +0000 Subject: Initial support for skill pools (available via at commands and untested scripting commands.) These changes also affect the format of the skill_db.txt file. --- src/map/magic-stmt.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'src/map/magic-stmt.c') diff --git a/src/map/magic-stmt.c b/src/map/magic-stmt.c index 55e6133..65e0202 100644 --- a/src/map/magic-stmt.c +++ b/src/map/magic-stmt.c @@ -292,9 +292,8 @@ op_instaheal(env_t *env, int args_nr, val_t *args) if (caster->type == BL_PC && subject->type == BL_PC) { character_t *caster_pc = (character_t *) caster; character_t *subject_pc = (character_t *) subject; - MAP_LOG("PC%d %d:%d,%d SPELLHEAL-INSTA PC%d FOR %d", - caster_pc->status.char_id, caster->m, caster->x, caster->y, - subject_pc->status.char_id, ARGINT(1)); + MAP_LOG_PC(caster_pc, "SPELLHEAL-INSTA PC%d FOR %d", + subject_pc->status.char_id, ARGINT(1)); } battle_heal(caster, subject, ARGINT(1), ARGINT(2), 0); @@ -677,6 +676,22 @@ op_spawn(env_t *env, int args_nr, val_t *args) } +static char * +get_invocation_name(env_t *env) +{ + invocation_t *invocation; + + if (VAR(VAR_INVOCATION).ty != TY_INVOCATION) + return "?"; + invocation = (invocation_t *)map_id2bl(VAR(VAR_INVOCATION).v.v_int); + + if (invocation) + return invocation->spell->name; + else + return "??"; +} + + static int op_injure(env_t *env, int args_nr, val_t *args) { @@ -711,9 +726,9 @@ op_injure(env_t *env, int args_nr, val_t *args) if (target->type == BL_MOB) { struct mob_data *mob = (struct mob_data *) target; - MAP_LOG("PC%d %d:%d,%d SPELLDMG MOB%d %d FOR %d", - caster_pc->status.char_id, caster->m, caster->x, caster->y, - mob->bl.id, mob->class, damage_caused); + MAP_LOG_PC(caster_pc, "SPELLDMG MOB%d %d FOR %d BY %s", + mob->bl.id, mob->class, damage_caused, + get_invocation_name(env)); } } battle_damage(caster, target, damage_caused, mp_damage); -- cgit v1.2.3-60-g2f50