Bläddra i källkod

- Corrected the attack_attr_none setting to behave as it should: for those whom it is set, their "innate" attack element is "not elemental", meaning it deals 100% against all elements (rather than making only NEUTRAL attacks become not elemental).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13676 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 16 år sedan
förälder
incheckning
3db650ec38
2 ändrade filer med 6 tillägg och 5 borttagningar
  1. 3 3
      conf/battle/battle.conf
  2. 3 2
      src/map/battle.c

+ 3 - 3
conf/battle/battle.conf

@@ -130,10 +130,10 @@ vit_penalty_count_lv: 3
 // Change attacker's direction to face opponent on every attack? (Note 3)
 attack_direction_change: 15
 
-// For those who is set, attacks of Neutral element will not get any elemental
-// adjustment (100% versus on all defense-elements) (Note 3)
+// For those who is set, their innate attack element is "not elemental"
+// (100% versus on all defense-elements) (Note 3)
 // NOTE: This is the setting that makes it so non-players can hit for full
-// damage against Ghost-type targets (eg: Ghostring wearing players).
+// damage against Ghost-type targets with normal attacks (eg: vs. Ghostring).
 attack_attr_none: 14
 
 // Rate at which equipment can break (base rate before it's modified by any skills)

+ 3 - 2
src/map/battle.c

@@ -1030,6 +1030,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 		s_ele_ = sstatus->lhw.ele;
 		if (flag.arrow && sd && sd->arrow_ele)
 			s_ele = sd->arrow_ele;
+		if (battle_config.attack_attr_none&src->type)
+			nk|=NK_NO_ELEFIX; //Weapon's element is "not elemental"
 	} else if (s_ele == -2) { //Use enchantment's element
 		s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
 	}
@@ -1886,8 +1888,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 || (s_ele == ELE_NEUTRAL &&
-		battle_config.attack_attr_none&src->type)))
+	if(!(nk&NK_NO_ELEFIX))
 	{	//Elemental attribute fix
 		if (wd.damage > 0)
 		{