summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--conf-tmpl/Changelog.txt4
-rw-r--r--conf-tmpl/battle/monster.conf4
-rw-r--r--conf-tmpl/battle/skill.conf5
-rw-r--r--src/map/skill.c7
5 files changed, 16 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 6ecdd4243..473b6618d 100644
--- a/Changelog-Trunk.txt
+++ b/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.
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt
index 231a5b49b..1f0eebe4b 100644
--- a/conf-tmpl/Changelog.txt
+++ b/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.
diff --git a/conf-tmpl/battle/monster.conf b/conf-tmpl/battle/monster.conf
index 99cf4e267..38369825c 100644
--- a/conf-tmpl/battle/monster.conf
+++ b/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
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
index 72ee2901b..23053b528 100644
--- a/conf-tmpl/battle/skill.conf
+++ b/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?
diff --git a/src/map/skill.c b/src/map/skill.c
index 254c89aa7..48c9240b1 100644
--- a/src/map/skill.c
+++ b/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);