Browse Source

* Multiple autocasts can go off at a time now. [Inkfish]
* Splash damage doesn't get modified by percentual modifier now. [Inkfish]
* Monster's Spiral Pierce is again...non-elemental. [Inkfish]

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

Inkfish 16 năm trước cách đây
mục cha
commit
98cfff889a
3 tập tin đã thay đổi với 22 bổ sung23 xóa
  1. 3 0
      Changelog-Trunk.txt
  2. 16 20
      src/map/battle.c
  3. 3 3
      src/map/skill.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 09/05/30
+	* Multiple autocasts can go off at a time now. [Inkfish]
+	* Splash damage doesn't get modified by percentual modifier now. [Inkfish]
+	* Monster's Spiral Pierce is again...non-elemental. [Inkfish]
 	* Fixed Hocus-pocus always fails. (bugreport:3143, follow up to: r13815) [Inkfish]
 09/05/29
 	* Added new bonuses bHealPower and bHealPower2. [Inkfish]

+ 16 - 20
src/map/battle.c

@@ -896,6 +896,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 	short skill=0;
 	short s_ele, s_ele_, t_class;
 	int i, nk;
+	bool n_ele; // non-elemental
 
 	struct map_session_data *sd, *tsd;
 	struct Damage wd;
@@ -942,7 +943,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 	wd.flag |= (skill_num||wflag)?BF_SKILL:BF_NORMAL; // Baphomet card's splash damage is counted as a skill. [Inkfish]
 	wd.dmg_lv=ATK_DEF;	//This assumption simplifies the assignation later
 	nk = skill_get_nk(skill_num);
-	flag.hit	= nk&NK_IGNORE_FLEE?1:0;
+	if( !skill_num && wflag ) //If flag, this is splash damage from Baphomet Card and it always hits.
+		nk |= NK_NO_CARDFIX_ATK|NK_IGNORE_FLEE;
+	flag.hit = nk&NK_IGNORE_FLEE?1:0;
 	flag.idef = flag.idef2 = nk&NK_IGNORE_DEF?1:0;
 
 	if (sc && !sc->count)
@@ -1029,26 +1032,25 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 
 	t_class = status_get_class(target);
 	s_ele = s_ele_ = skill_get_ele(skill_num, skill_lv);
-	if (!skill_num || s_ele == -1) { //Take weapon's element
+	if( !skill_num || s_ele == -1 )
+	{ //Take weapon's element
 		s_ele = sstatus->rhw.ele;
 		s_ele_ = sstatus->lhw.ele;
-		if (flag.arrow && sd && sd->arrow_ele)
+		if( flag.arrow && sd && sd->arrow_ele )
 			s_ele = sd->arrow_ele;
-	} else if (s_ele == -2) { //Use enchantment's element
-		s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
+		if( battle_config.attack_attr_none&src->type )
+			n_ele = true; //Weapon's element is "not elemental"
 	}
-
-	switch(skill_num)
+	else if( s_ele == -2 ) //Use enchantment's element
+		s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
+	switch( skill_num )
 	{
 		case GS_GROUNDDRIFT:
 			s_ele = s_ele_ = wflag; //element comes in flag.
 			break;
-
-		// TODO: A patch here doesn't work anymore since mechanism has changed. 
-		//       If mob's spiral pierce is forced neutral is under investigation.
-		//case LK_SPIRALPIERCE:
-		//	if (!sd) nk &= ~NK_NO_ELEFIX; //forced neutral for monsters
-		//	break;
+		case LK_SPIRALPIERCE:
+			if (!sd) n_ele = false; //forced neutral for monsters
+			break;
 	}
 
 	if(!skill_num)
@@ -1131,10 +1133,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 					if( sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_CRUSADER )
 						flag.hit = 1;
 					break;
-				case 0:					
-					if( wflag ) //If flag, this is splash damage from Baphomet Card and it always hits.
-						flag.hit = 1;
-					break;
 			}
 		if (tsc && !flag.hit && tsc->opt1 && tsc->opt1 != OPT1_STONEWAIT)
 			flag.hit = 1;
@@ -1896,9 +1894,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 	if(skill_num==TF_POISON)
 		ATK_ADD(15*skill_lv);
 
-	if(!(nk&NK_NO_ELEFIX) &&
-	   !(battle_config.attack_attr_none&src->type && (skill_num == 0 || skill_get_ele(skill_num, skill_lv) == -1))
-	)
+	if( !(nk&NK_NO_ELEFIX) && !n_ele )
 	{	//Elemental attribute fix
 		if( wd.damage > 0 )
 		{

+ 3 - 3
src/map/skill.c

@@ -1030,7 +1030,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
 						clif_status_change(src, SI_ACTIONDELAY, 1, rate);
 				}
 			}
-			break; //Only one auto skill comes off at a time.
+			//break; //Only one auto skill comes off at a time.
 		}
 	}
 
@@ -1112,7 +1112,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
 			case CAST_NODAMAGE: skill_castend_nodamage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break;
 			case CAST_DAMAGE:   skill_castend_damage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break;
 		}
-		break;
+		//break;
 	}
 
 	if( sd->autoscript3[0].script )
@@ -1285,7 +1285,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
 						clif_status_change(bl, SI_ACTIONDELAY, 1, rate);
 				}
 			}
-			break; //trigger only one auto-spell per hit.
+			//break; //trigger only one auto-spell per hit.
 		}
 	}
 	//Auto-script when attacked