소스 검색

- All mob casted skills have a fixed range of 9 now. You can use monster_ai&0x400 to disable this and make the old skill range rules apply.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10331 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 년 전
부모
커밋
51a49aadf7
5개의 변경된 파일16개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 0
      Changelog-Trunk.txt
  2. 3 1
      conf-tmpl/Changelog.txt
  3. 3 1
      conf-tmpl/battle/monster.conf
  4. 3 2
      conf-tmpl/battle/skill.conf
  5. 6 1
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ 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.
 
 2007/04/24
+	* All mob casted skills have a fixed range of 9 now.
 	* Pressure no longer vaporizes plants.
 2007/04/23
 	* Fixed bug which totally broke item group bonuses.

+ 3 - 1
conf-tmpl/Changelog.txt

@@ -1,5 +1,7 @@
 Date	Added
-
+2007/04/24
+	* monster_ai&0x400 disables all mob-casted skills having a range of 9
+	  (monster.conf) [Skotlex]
 2007/04/23
 	* Debuff on logout&2 is again set to default, instead of removing food
 	  bonuses now it removes Maximize Power, Maximum Overthrust and Steel Body.

+ 3 - 1
conf-tmpl/battle/monster.conf

@@ -66,7 +66,9 @@ monster_max_aspd: 199
 // 0x200: When set, a mob's skill re-use delay will be applied to all entries of
 //        the same skill, instead of only that particular entry (eg: Mob has heal
 //        on six lines for different conditions, when set, whenever one of the six 
-//        trigger, all of them will share the delay)
+//        trigger, all of them will share the delay
+// 0x400: By default mobs have a range of 9 for all skills. Set this to enforce
+//        the normal skill range rules on them.
 // Example: 0x140 -> Chase players through warps + use skills in random order.
 monster_ai: 0
 

+ 3 - 2
conf-tmpl/battle/skill.conf

@@ -75,12 +75,13 @@ skill_out_range_consume: no
 
 // Does the distance between caster and target define if the skill is a ranged skill? (Note 4)
 // If set, when the distance between caster and target is greater than 3 the skill is considered long-range, otherwise it's a melee range.
-// If not set, then the range is determined by the skill (eg: Double Strafe is always long-ranged). 
+// If not set, then the range is determined by the skill's range (if it is above 5, the skill is ranged).
 // Default 14 (mobs + pets + homun)
 skillrange_by_distance: 14
 
 // Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 4)
-// NOTE: Skills affected by this option are those whose range in the skill_db are negative.
+// NOTE: Skills affected by this option are those whose range in the skill_db are negative. Note that unless monster_ai&0x400 is
+// set, the range of all skills is 9 for monsters.
 skillrange_from_weapon: 14
 
 // Should a check on the caster's status be performed in all skill attacks?

+ 6 - 1
src/map/skill.c

@@ -751,7 +751,12 @@ int skill_get_casttype (int id)
 //Returns actual skill range taking into account attack range and AC_OWL [Skotlex]
 int skill_get_range2 (struct block_list *bl, int id, int lv)
 {
-	int range = skill_get_range(id, lv);
+	int range;
+	if(bl->type == BL_MOB && !(battle_config.mob_ai&0x400))
+		return 9; //Mobs have a range of 9 regardless of skill used.
+
+	range = skill_get_range(id, lv);
+
 	if(range < 0) {
 		if (battle_config.use_weapon_skill_range&bl->type)
 			return status_get_range(bl);