From 4fd10b2406b092d42d3e485950ba68bddd90cdc3 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 25 May 2015 00:01:08 +0200 Subject: 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 --- src/map/status.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map') 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); -- cgit v1.2.3-60-g2f50