diff options
author | Fate <fate-tmw@googlemail.com> | 2008-12-05 19:32:59 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-12-05 19:32:59 -0700 |
commit | cc8781ddac1b0dd6d67182f3e9b553ea163e43b7 (patch) | |
tree | 1a8c6e99b5b2403bb1839fdf04103ff5582431ae | |
parent | 0bd5837c70dc4d1b8078c5262c87fc0204f41321 (diff) | |
download | tmwa-cc8781ddac1b0dd6d67182f3e9b553ea163e43b7.tar.gz tmwa-cc8781ddac1b0dd6d67182f3e9b553ea163e43b7.tar.bz2 tmwa-cc8781ddac1b0dd6d67182f3e9b553ea163e43b7.tar.xz tmwa-cc8781ddac1b0dd6d67182f3e9b553ea163e43b7.zip |
Added table of absolute change to ensure that mob stat mutations are significant before computing XP modifier
-rw-r--r-- | src/map/mob.c | 27 | ||||
-rw-r--r-- | src/map/npc.c | 56 |
2 files changed, 27 insertions, 56 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 26d04b2..1d29a22 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -152,6 +152,33 @@ mutation_scale[MOB_XP_BONUS] = }; +// The table below indicates the `average' value for each of the statistics, or -1 if there is none. +// This average is used to determine XP modifications for mutations. The experience point bonus is +// based on mutation_value and mutation_base as follows: +// (1) first, compute the percentage change of the attribute (p0) +// (2) second, determine the absolute stat change +// (3) third, compute the percentage stat change relative to mutation_base (p1) +// (4) fourth, compute the XP mofication based on the smaller of (p0, p1). +static int +mutation_base[MOB_XP_BONUS] = +{ + 30, // MOB_LV + -1, // MOB_MAX_HP + 20, // MOB_STR + 20, // MOB_AGI + 20, // MOB_VIT + 20, // MOB_INT + 20, // MOB_DEX + 20, // MOB_LUK + -1, // MOB_ATK1 + -1, // MOB_ATK2 + -1, // MOB_ADELAY + -1, // MOB_DEF + 20, // MOB_MDEF + -1, // MOB_SPEED +}; + + /*======================================== * Mutates a MOB. For large `direction' values, calling this multiple times will give bigger XP boni. *---------------------------------------- diff --git a/src/map/npc.c b/src/map/npc.c index 31a0c42..849030f 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -259,62 +259,6 @@ int npc_event_export(void *key,void *data,va_list ap) return 0; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*========================================== * 全てのNPCのOn*イベント実行 *------------------------------------------ |