- Mobs will now always chase players using hard-path seeks.
- monster_ai&1 now only signals whether mobs should update their target cell while chasing more frequently (rather than being state-driven like Aegis) - Changed the defaults of view_range_rate and chase_range_rate to 120 to aproximate better Aegis's view ranges (which are square areas and not circles) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8536 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
af62ef9e0d
commit
499e88f059
@ -4,6 +4,13 @@ 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.
|
||||
|
||||
2006/08/29
|
||||
* Mobs will now always chase players using hard-path seeks. [Skotlex]
|
||||
* monster_ai&1 now only signals whether mobs should update their target
|
||||
cell while chasing more frequently (rather than being state-driven like
|
||||
Aegis) [Skotlex]
|
||||
* Changed the defaults of view_range_rate and chase_range_rate to 120 to
|
||||
aproximate better Aegis's view ranges (which are square areas and not
|
||||
circles) [Skotlex]
|
||||
* Applied Mpeg's work on GS [Toms]
|
||||
( http://gpegon.free.fr/ea/gunslinger_08-29-06_mpeg.txt )
|
||||
* Fixed a syntax error in @showmobs [Toms]
|
||||
|
@ -1,5 +1,15 @@
|
||||
Date Added
|
||||
|
||||
2006/08/29
|
||||
* monster_ai&1 now only signals whether mobs should update their target
|
||||
cell while chasing more frequently (rather than being state-driven like
|
||||
Aegis) [Skotlex]
|
||||
* Changed the defaults of view_range_rate and chase_range_rate to 120 to
|
||||
aproximate better Aegis's view ranges (which are square areas and not
|
||||
circles), so eA's default of 100 leads to a circular area contained
|
||||
within a 21x21 square zone (what Aegis uses), by using 20%, the circular
|
||||
area increases range to 12, which better approximates Aegis's 21x21 area.
|
||||
[Skotlex]
|
||||
2006/08/24
|
||||
* Changed the default of clear_skills_on_death to 0 [Skotlex]
|
||||
* Added setting clear_skills_on_warp to specify when a character's
|
||||
|
@ -37,10 +37,9 @@ monster_hp_rate: 100
|
||||
monster_max_aspd: 199
|
||||
|
||||
// Defines various mob AI related settings. The mask bits are (add to include multiple settings)
|
||||
// 1: If disabled, mobs use Aegis-type path searching, that is, they only move on straight
|
||||
// lines, and will only change their destination tile after arriving to the previous one.
|
||||
// When enabled mobs use more dynamic and complex path searching to chase a player
|
||||
// (they still must be within line of sight to start chasing)
|
||||
// 1: When enabled mobs will update their target cell every few iterations
|
||||
// (normally they never update their target cell until they reach it while
|
||||
// chasing)
|
||||
// 2: Makes mob use their "rude attack" skill (usually warping away) if they are attacked and they
|
||||
// can't attack back regardless of how they were attacked (eg: GrimTooth), otherwise, their
|
||||
// rude attack" is only activated if they can't melee reach the target (eg: sniping)
|
||||
@ -68,12 +67,14 @@ monster_ai: 0
|
||||
mob_warp: 0
|
||||
|
||||
// Mobs and Pets view-range adjustment (range2 column in the mob_db) (Note 2)
|
||||
view_range_rate: 100
|
||||
// NOTE: 100 is not used by default since in Aegis the view range is 21x21
|
||||
// (square with half side of 10) while eAthena uses circular areas with radio 10
|
||||
view_range_rate: 120
|
||||
|
||||
// Chase Range is the base minimum-chase that a mob gives before giving up
|
||||
// (as long as the target is outside their field of view). This is the range3
|
||||
// column in the mob_db. (Note 2)
|
||||
chase_range_rate: 100
|
||||
chase_range_rate: 120
|
||||
|
||||
// Allow monsters to be aggresive and attack first? (Note 1)
|
||||
monster_active_enable: yes
|
||||
|
@ -525,8 +525,8 @@ int mob_spawn_guardian(struct map_session_data *sd,char *mapname,
|
||||
* Reachability to a Specification ID existence place
|
||||
* state indicates type of 'seek' mob should do:
|
||||
* - MSS_LOOT: Looking for item, path must be easy.
|
||||
* - MSS_RUSH: Chasing attacking player, path is determined by mob_ai&1
|
||||
* - MSS_FOLLOW: Initiative/support seek, path must be easy.
|
||||
* - MSS_RUSH: Chasing attacking player, path is complex
|
||||
* - MSS_FOLLOW: Initiative/support seek, path is complex
|
||||
*------------------------------------------
|
||||
*/
|
||||
int mob_can_reach(struct mob_data *md,struct block_list *bl,int range, int state)
|
||||
@ -537,10 +537,10 @@ int mob_can_reach(struct mob_data *md,struct block_list *bl,int range, int state
|
||||
nullpo_retr(0, bl);
|
||||
switch (state) {
|
||||
case MSS_RUSH:
|
||||
easy = (battle_config.mob_ai&1?0:1);
|
||||
case MSS_FOLLOW:
|
||||
easy = 0; //(battle_config.mob_ai&1?0:1);
|
||||
break;
|
||||
case MSS_LOOT:
|
||||
case MSS_FOLLOW:
|
||||
default:
|
||||
easy = 1;
|
||||
break;
|
||||
@ -785,7 +785,8 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
|
||||
if (!(battle_config.mob_ai&128) && (*target) && (*target)->type == BL_HOM && bl->type != BL_HOM)
|
||||
return 0; //For some reason Homun targets are never overriden.
|
||||
|
||||
if((dist=distance_bl(&md->bl, bl)) < md->db->range2 &&
|
||||
dist = distance_bl(&md->bl, bl);
|
||||
if(dist < md->db->range2 &&
|
||||
((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) &&
|
||||
battle_check_range(&md->bl,bl,md->db->range2)
|
||||
) { //Pick closest target?
|
||||
@ -1215,14 +1216,14 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
|
||||
md->state.skillstate = md->state.aggressive?MSS_FOLLOW:MSS_RUSH;
|
||||
if (md->ud.walktimer != -1 && md->ud.target == tbl->id &&
|
||||
(
|
||||
!battle_config.mob_ai&1 ||
|
||||
!(battle_config.mob_ai&1) ||
|
||||
check_distance_blxy(tbl, md->ud.to_x, md->ud.to_y, md->status.rhw.range)
|
||||
)) //Current target tile is still within attack range.
|
||||
return 0;
|
||||
|
||||
//Follow up
|
||||
if (!mob_can_reach(md, tbl, md->min_chase, MSS_RUSH) ||
|
||||
!unit_walktobl(&md->bl, tbl, md->status.rhw.range, 2|(!battle_config.mob_ai&1)))
|
||||
!unit_walktobl(&md->bl, tbl, md->status.rhw.range, 2))
|
||||
//Give up.
|
||||
mob_unlocktarget(md,tick);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user