Kaynağa Gözat

Initial implementation of Renewal Homunculus stats and growth rates
-> Note: Formulas were derived from iRO and then modified to roughly match with data growth tables presented by players
-> Note2: ATK formula is currently being multiplied until renewal attack is implemented because they were too weak with normal formula
> Follow up to r17262 - Reverted Death Bound change - bugreport:7549
Pyroclastic doesn't give insane ATK bonuses anymore - bugreport:7526
Weapon Refine and Forging now get straight bonuses when used by Mechanic - bugreport:7509

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17270 54d463be-8e91-2dee-dedb-b68131a5f0ec

akinari1087 12 yıl önce
ebeveyn
işleme
72a99a1f54

+ 0 - 0
db/homunculus_db.txt → db/pre-re/homunculus_db.txt


+ 33 - 0
db/re/homunculus_db.txt

@@ -0,0 +1,33 @@
+// Homunculus Database
+//
+// Structure of Database:
+// Class,EvoClass,Name,FoodID,HungryDelay,BaseSize,EvoSize,Race,Element,bASPD,bHP,bSP,bSTR,bAGI,bVIT,bINT,bDEX,bLUK,gnHP,gxHP,gnSP,gxSP,gnSTR,gxSTR,gnAGI,gxAGI,gnVIT,gxVIT,gnINT,gxINT,gnDEX,gxDEX,gnLUK,gxLUK,enHP,exHP,enSP,exSP,enSTR,exSTR,enAGI,exAGI,enVIT,exVIT,enINT,exINT,enDEX,exDEX,enLUK,exLUK
+//
+// 01. Class        Homunculus ID.
+// 02. EvoClass     Homunculus ID of the evolved version.
+// 03. Name         Name of the homunculus.
+// 04. FoodID       Item ID of the homunuclus food.
+// 05. HungryDelay  Time interval in milliseconds after which the homunculus' hunger value is altered.
+// 06. BaseSize     Size of the base homunculus class (0 = small, 1 = normal, 2 = large).
+// 07. EvoSize      Size of the evolved homunculus class (0 = small, 1 = normal, 2 = large).
+// 08. Race         Race of the homunculus (0 = formless, 1 = undead, 2 = brute, 3 = plant, 4 = insect, 5 = fish, 6 = demon, 7 = demi-human, 8 = angel, 9 = dragon).
+// 09. Element      Element of the homunculus (0 = neutral, 1 = water, 2 = earth, 3 = fire, 4 = wind, 5 = poison, 6 = holy, 7 = dark, 8 = ghost, 9 = undead).
+//                  The element level is always 1.
+// ...
+//
+// Legend: b: base, gn: growth min, gx: growth max, en: evolution min, ex: evolution max
+// NOTE: Only the growth values are in a 1/10 scale, the other stats are 1/1 (eg: 5 gmAGI means 0.5 agi)
+
+6001,6009,Lif,537,60000,0,1,7,0,700,150,40,17,20,15,35,24,12,60,100,4,9,5,19,5,19,5,19,4,20,6,20,6,20,800,2400,220,480,10,30,10,30,20,40,30,50,20,50,10,30
+6002,6010,Amistr,912,60000,0,1,2,0,700,320,10,20,17,35,11,24,12,80,130,1,4,8,20,4,20,4,20,1,10,3,19,3,19,1600,3600,120,360,20,50,10,30,20,50,20,50,10,30,10,30
+6003,6011,Filir,910,60000,0,1,2,0,700,90,25,29,35,9,8,30,9,45,75,3,6,4,20,8,20,1,10,3,19,4,20,3,19,1200,3200,200,400,20,50,10,30,20,50,20,50,10,30,10,30
+6004,6012,Vanilmirth,911,60000,0,1,0,0,700,80,11,11,11,11,11,11,11,30,150,0,7,1,30,1,30,1,30,1,30,1,30,1,30,1200,4800,480,640,10,30,10,30,10,30,20,50,10,50,10,100
+6005,6013,Lif,537,60000,0,1,7,0,700,150,40,17,20,15,35,24,12,60,100,4,9,5,19,5,19,5,19,4,20,6,20,6,20,800,2400,220,480,10,30,10,30,20,40,30,50,20,50,10,30
+6006,6014,Amistr,912,60000,0,1,2,0,700,320,10,20,17,35,11,24,12,80,130,1,4,8,20,4,20,4,20,1,10,3,19,3,19,1600,3600,120,360,20,50,10,30,20,50,20,50,10,30,10,30
+6007,6015,Filir,910,60000,0,1,2,0,700,90,25,29,35,9,8,30,9,45,75,3,6,4,20,8,20,1,10,3,19,4,20,3,19,1200,3200,200,400,20,50,10,30,20,50,20,50,10,30,10,30
+6008,6016,Vanilmirth,911,60000,0,1,0,0,700,80,11,11,11,11,11,11,11,30,150,0,7,1,30,1,30,1,30,1,30,1,30,1,30,1200,4800,480,640,10,30,10,30,10,30,20,50,10,50,10,100
+6048,6048,Eira,6098,60000,1,1,7,0,700,150,40,17,20,15,35,24,12,40,160,20,42,13,39,28,42,15,25,14,48,16,36,9,18,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
+6049,6049,Bayeri,6112,60000,1,1,2,0,700,320,10,20,17,35,11,24,12,90,360,48,52,18,36,8,36,16,32,22,44,12,24,20,36,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
+6050,6050,Sera,6108,60000,1,1,4,0,700,90,25,29,35,9,8,30,9,60,240,36,64,10,25,16,32,5,25,7,35,28,40,20,40,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
+6051,6051,Dieter,6104,60000,1,1,0,0,700,80,11,11,11,11,11,11,11,240,480,40,120,20,40,13,26,18,36,15,40,16,32,4,16,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
+6052,6052,Eleanor,6115,60000,1,1,2,0,700,320,10,20,17,35,11,24,12,60,300,10,20,20,40,10,50,24,48,5,15,12,36,2,10,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10

+ 1 - 1
db/re/skill_db.txt

@@ -692,7 +692,7 @@
 //****
 2001,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,	RK_ENCHANTBLADE,Enchant Blade
 2002,7:8:9:10:11,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,	RK_SONICWAVE,Sonic Wave
-2003,0,6,4,0,0x1,0,10,1,no,0,0x200,0,weapon,0,	RK_DEATHBOUND,Death Bound
+2003,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,	RK_DEATHBOUND,Death Bound
 2004,5,8,1,-1,0,0,10,-5,no,0,0,0,weapon,0,	RK_HUNDREDSPEAR,Hundred Spear
 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,	RK_WINDCUTTER,Wind Cutter
 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,	RK_IGNITIONBREAK,Ignition Break

+ 1 - 1
src/map/homunculus.c

@@ -1152,7 +1152,7 @@ static bool read_homunculusdb_sub(char* str[], int columns, int current)
 int read_homunculusdb(void)
 {
 	int i;
-	const char *filename[]={"homunculus_db.txt","homunculus_db2.txt"};
+	const char *filename[]={DBPATH"homunculus_db.txt","homunculus_db2.txt"};
 
 	memset(homunculus_db,0,sizeof(homunculus_db));
 	for(i = 0; i<ARRAYLENGTH(filename); i++)

+ 5 - 3
src/map/skill.c

@@ -14481,9 +14481,11 @@ void skill_weaponrefine (struct map_session_data *sd, int idx)
 				clif_skill_fail(sd,sd->menuskill_id,USESKILL_FAIL_LEVEL,0);
 				return;
 			}
-
 			per = status_get_refine_chance(ditem->wlv, (int)item->refine);
-			per += (((signed int)sd->status.job_level)-50)/2; //Updated per the new kro descriptions. [Skotlex]
+			if( sd->class_&JOBL_THIRD )
+				per += 10;
+			else
+				per += (((signed int)sd->status.job_level)-50)/2; //Updated per the new kro descriptions. [Skotlex]
 
 			pc_delitem(sd, i, 1, 0, 0, LOG_TYPE_OTHER);
 			if (per > rnd() % 100) {
@@ -16474,7 +16476,7 @@ int skill_produce_mix (struct map_session_data *sd, uint16 skill_id, int nameid,
 				break;
 		}
 	} else { // Weapon Forging - skill bonuses are straight from kRO website, other things from a jRO calculator [DracoRPG]
-		make_per = 5000 + sd->status.job_level*20 + status->dex*10 + status->luk*10; // Base
+		make_per = 5000 + ((sd->class_&JOBL_THIRD)?1400:sd->status.job_level*20) + status->dex*10 + status->luk*10; // Base
 		make_per += pc_checkskill(sd,skill_id)*500; // Smithing skills bonus: +5/+10/+15
 		make_per += pc_checkskill(sd,BS_WEAPONRESEARCH)*100 +((wlv >= 3)? pc_checkskill(sd,BS_ORIDEOCON)*100:0); // Weaponry Research bonus: +1/+2/+3/+4/+5/+6/+7/+8/+9/+10, Oridecon Research bonus (custom): +1/+2/+3/+4/+5
 		make_per -= (ele?2000:0) + sc*1500 + (wlv>1?wlv*1000:0); // Element Stone: -20%, Star Crumb: -15% each, Weapon level malus: -0/-20/-30

+ 40 - 19
src/map/status.c

@@ -1893,9 +1893,18 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct
 	//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))*2; //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
@@ -1925,6 +1934,9 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
 	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 @@ int status_calc_homunculus_(struct homun_data *hd, bool first)
 		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,14 +3248,10 @@ int status_calc_homunculus_(struct homun_data *hd, bool first)
 			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;
-
-	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.
+#endif
 
 	status_calc_misc(&hd->bl, status, hom->level);
 
@@ -3946,8 +3969,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
 
 	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 +3991,12 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
 			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 +4006,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
 			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 +8745,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			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