summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-05-25 00:01:08 +0200
committerHaru <haru@dotalux.com>2015-05-25 00:52:05 +0200
commit4fd10b2406b092d42d3e485950ba68bddd90cdc3 (patch)
tree3a9a2b132cf1d373dcc61771d42c124e5e8288da
parentb2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a (diff)
downloadhercules-4fd10b2406b092d42d3e485950ba68bddd90cdc3.tar.gz
hercules-4fd10b2406b092d42d3e485950ba68bddd90cdc3.tar.bz2
hercules-4fd10b2406b092d42d3e485950ba68bddd90cdc3.tar.xz
hercules-4fd10b2406b092d42d3e485950ba68bddd90cdc3.zip
Corrected homunculus defense growing too much on level up
- Caused by a variable not correctly re-initialized on level up. - Special thanks to Michieru, Malufett. Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/map/status.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index c93ea183f..b0ae7d261 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3081,6 +3081,8 @@ int status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) {
hstatus->aspd_rate = 1000;
#ifdef RENEWAL
+ hstatus->def = 0;
+
amotion = hd->homunculusDB->baseASPD;
amotion = amotion - amotion * (hstatus->dex + hom->dex_value) / 1000 - (hstatus->agi + hom->agi_value) * amotion / 250;
#else
@@ -3095,7 +3097,6 @@ int status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) {
hstatus->amotion = cap_value(amotion, battle_config.max_aspd, 2000);
hstatus->adelay = hstatus->amotion; //It seems adelay = amotion for Homunculus.
-
hstatus->max_hp = hom->max_hp;
hstatus->max_sp = hom->max_sp;
@@ -4048,7 +4049,7 @@ void status_calc_misc(struct block_list *bl, struct status_data *st, int level)
if ( bl->type == BL_HOM ) {
st->def2 = status_get_homvit(bl) + status_get_homagi(bl) / 2;
st->mdef2 = (status_get_homvit(bl) + status_get_homint(bl)) / 2;
- st->def += status_get_homvit(bl) + level / 2;
+ st->def += status_get_homvit(bl) + level / 2; // Increase. Already initialized in status_calc_homunculus_
st->mdef = (int)(((float)status_get_homvit(bl) + level) / 4 + (float)status_get_homint(bl) / 2);
st->hit = level + st->dex + 150;
st->flee = level + status_get_homagi(bl);