summaryrefslogtreecommitdiff
path: root/src/map/magic-stmt.c
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-09-26 18:08:42 +0000
committerFate <fate-tmw@googlemail.com>2009-09-26 18:08:42 +0000
commit3ef2cb492970da40f82df9643c4cfc570bc3aa62 (patch)
tree16e071b00b764db07d60f7872756bf79c6044dfe /src/map/magic-stmt.c
parentf9f63203fb461e69a9a422d160986daa78eecc51 (diff)
downloadtmwa-3ef2cb492970da40f82df9643c4cfc570bc3aa62.tar.gz
tmwa-3ef2cb492970da40f82df9643c4cfc570bc3aa62.tar.bz2
tmwa-3ef2cb492970da40f82df9643c4cfc570bc3aa62.tar.xz
tmwa-3ef2cb492970da40f82df9643c4cfc570bc3aa62.zip
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.
Diffstat (limited to 'src/map/magic-stmt.c')
-rw-r--r--src/map/magic-stmt.c27
1 files changed, 21 insertions, 6 deletions
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);