Index: src/map/status.c
===================================================================
--- src/map/status.c (revision 17269)
+++ src/map/status.c (working copy)
@@ -1893,10 +1893,19 @@
//Normally only players have base-atk, but homunc have a different batk
// equation, hinting that perhaps non-players should use this for batk.
// [Skotlex]
- dstr = str/10;
- str += dstr*dstr;
- if (bl->type == BL_PC)
+ if (bl->type == BL_HOM) {
#ifdef RENEWAL
+ //str = ((rstr + dex + status->luk) / 3) + (((TBL_HOM*)bl)->homunculus.level / 10);
+ str = ((rstr + dex + status->luk) / 3) + (((TBL_HOM*)bl)->homunculus.level / 10)*3; //Because Renewal ATK isn't implemented we adjust the actual ATK until it is
+#else
+ dstr = str/10;
+ str += dstr*dstr;
+#endif
+ } else if (bl->type != BL_PC) {
+ dstr = str/10;
+ str += dstr*dstr;
+ } else
+#ifdef RENEWAL
str = (rstr*10 + dex*10/5 + status->luk*10/3 + ((TBL_PC*)bl)->status.base_level*10/4)/10;
#else
str+= dex/5 + status->luk/5;
@@ -1925,6 +1934,9 @@
if (bl->type == BL_MOB) {
status->hit += level + status->dex + 175;
status->flee += level + status->agi + 100;
+ } else if (bl->type == BL_HOM) {
+ status->hit = level + status->dex + 150; //base level + dex + 150
+ status->flee = level + status->agi + level/10; //base level + agi + base level/10
} else {
status->hit += level + status->dex + status->luk/3 + 175; //base level + ( every 1 dex = +1 hit ) + (every 3 luk = +1 hit) + 175
status->flee += level + status->agi + status->luk/5 + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
@@ -3188,12 +3200,27 @@
status->hp = 1;
status->sp = 1;
}
+
+ status->aspd_rate = 1000;
+
+#ifdef RENEWAL
+ status->def = (status->vit + (hom->level / 10)) + ((status->agi + (hom->level / 10)) / 2);
+ status->mdef = status->int_ + ((status->int_ + status->dex + status->luk) / 3) + (hom->level / 10) * 2;
+
+ amotion = (1000 -2*status->agi -status->dex) * hd->homunculusDB->baseASPD/1000;
+#else
skill = hom->level/10 + status->vit/5;
status->def = cap_value(skill, 0, 99);
skill = hom->level/10 + status->int_/5;
status->mdef = cap_value(skill, 0, 99);
+ amotion = (1000 -4*status->agi -status->dex) * hd->homunculusDB->baseASPD/1000;
+#endif
+
+ status->amotion = cap_value(amotion,battle_config.max_aspd,2000);
+ status->adelay = status->amotion; //It seems adelay = amotion for Homunculus.
+
status->max_hp = hom->max_hp ;
status->max_sp = hom->max_sp ;
@@ -3221,15 +3248,11 @@
sc_start(&hd->bl,&hd->bl, SC_STYLE_CHANGE, 100, MH_MD_FIGHTING, -1);
}
+#ifndef RENEWAL
status->rhw.atk = status->dex;
status->rhw.atk2 = status->str + hom->level;
+#endif
- status->aspd_rate = 1000;
-
- amotion = (1000 -4*status->agi -status->dex) * hd->homunculusDB->baseASPD/1000;
- status->amotion = cap_value(amotion,battle_config.max_aspd,2000);
- status->adelay = status->amotion; //It seems adelay = amotion for Homunculus.
-
status_calc_misc(&hd->bl, status, hom->level);
#ifdef RENEWAL
@@ -3946,8 +3975,7 @@
if(flag&SCB_ASPD) {
int amotion;
- if( bl->type&BL_PC )
- {
+ if( bl->type&BL_PC ) {
amotion = status_base_amotion_pc(sd,status);
#ifndef RENEWAL_ASPD
status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
@@ -3969,11 +3997,12 @@
status->amotion = cap_value(amotion,((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd),2000);
status->adelay = 2*status->amotion;
- }
- else
- if( bl->type&BL_HOM )
- {
+ } else if( bl->type&BL_HOM ) {
+#ifdef RENEWAL
+ amotion = (1000 -2*status->agi -status->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000;
+#else
amotion = (1000 -4*status->agi -status->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000;
+#endif
status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
if(status->aspd_rate != 1000)
@@ -3983,9 +4012,7 @@
status->amotion = cap_value(amotion,battle_config.max_aspd,2000);
status->adelay = status->amotion;
- }
- else // mercenary and mobs
- {
+ } else { // mercenary and mobs
amotion = b_status->amotion;
status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
@@ -8724,7 +8751,7 @@
val2 = 3*val1; //activation chance
break;
case SC_PYROCLASTIC:
- val2 += 10*val1*status_get_lv(src); //atk bonus
+ val2 += 10*val1+status_get_lv(src); //atk bonus
val3 = 2*val1;//Chance To AutoCast Hammer Fall %
break;
case SC_PARALYSIS: //[Lighta] need real info