diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-09 06:14:40 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-09 06:14:40 +0000 |
commit | 50190d04ab59d235a00ee5ea0b6e7211b0d93f4f (patch) | |
tree | 8e06a76d40243950888aa831f0ece1f5d16cfcf5 | |
parent | 1cd7372c0812c1316bd9fc7f04f9c454b87a5ef5 (diff) | |
download | hercules-50190d04ab59d235a00ee5ea0b6e7211b0d93f4f.tar.gz hercules-50190d04ab59d235a00ee5ea0b6e7211b0d93f4f.tar.bz2 hercules-50190d04ab59d235a00ee5ea0b6e7211b0d93f4f.tar.xz hercules-50190d04ab59d235a00ee5ea0b6e7211b0d93f4f.zip |
- Mob_ai update. The attacked checks will trigger even if the mob can't move. Being attacked while the mob can't move no longer will trigger rude-attacked skills.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5964 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/mob.c | 13 |
2 files changed, 6 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ffa317a2a..57be9ffe4 100644 --- a/Changelog-Trunk.txt +++ b/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.
2006/04/09
+ * Mob_ai update. The attacked checks will trigger even if the mob can't
+ move. Being attacked while the mob can't move no longer will trigger
+ rude-attacked skills. [Skotlex]
* Changed the default of multi_hit_delay from 230 to 80 which seems more
official. [Skotlex]
* Wedding recall skills are now blocked by the nomemo mapflag instead of
diff --git a/src/map/mob.c b/src/map/mob.c index f717f4f50..9e0c9b08a 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1130,15 +1130,17 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) }
// Check for target change.
- if (md->attacked_id && mode&MD_CANATTACK && can_walk)
+ if (md->attacked_id && mode&MD_CANATTACK)
{
if (md->attacked_id == md->target_id)
{
+ /* Currently being unable to move shouldn't trigger rude-attacked conditions.
if (!can_move && !battle_check_range (&md->bl, tbl, md->db->range))
{ //Rude-attacked.
if (md->attacked_count++ > 3)
mobskill_use(md, tick, MSC_RUDEATTACKED);
}
+ */
} else
if ((abl= map_id2bl(md->attacked_id)) && (!tbl || mob_can_changetarget(md, abl, mode))) {
if (md->bl.m != abl->m || abl->prev == NULL ||
@@ -1163,15 +1165,6 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) } else if (!(battle_config.mob_ai&2) && !status_check_skilluse(bl, abl, 0, 0)) {
//Can't attack back, but didn't invoke a rude attacked skill...
md->attacked_id = 0; //Simply unlock, shouldn't attempt to run away when in dumb_ai mode.
-/* Unneeded. Mobs use the min_chase parameter to chase back enemies once hit.
- } else if (dist > view_range) { //Out of view range, but can reach
- //Attempt to follow new target
- if (!md->target_id && can_move) { // why is it moving to the target when the mob can't see the player? o.o
- dx = abl->x - md->bl.x -1;
- dy = abl->y - md->bl.y -1;
- unit_walktoxy(&md->bl, md->bl.x+dx, md->bl.y+dy, 0);
- }
-*/
} else { //Attackable
if (!tbl || dist < md->db->range || !check_distance_bl(&md->bl, tbl, dist)
|| battle_gettarget(tbl) != md->bl.id)
|