diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-22 09:55:33 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-22 09:55:33 +0000 |
commit | b8de126c48c92c44136567bcca4b85b35d34b9e2 (patch) | |
tree | d9f0470b7fe690b2ac3ac68a27bd89c987689b8d /src/map | |
parent | f17d2bce48c612644e5621b0303f983bedbc26d7 (diff) | |
download | hercules-b8de126c48c92c44136567bcca4b85b35d34b9e2.tar.gz hercules-b8de126c48c92c44136567bcca4b85b35d34b9e2.tar.bz2 hercules-b8de126c48c92c44136567bcca4b85b35d34b9e2.tar.xz hercules-b8de126c48c92c44136567bcca4b85b35d34b9e2.zip |
Updated Mob AI's target check with new status effects: SC_BITE, SC_VACUUM_EXTREME, SC_CRYSTALIZE, SC_THORNSTRAP and SC__MANHOLE.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15918 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mob.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 896b97103..a32ba3c64 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1440,10 +1440,12 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) if( md->attacked_id == md->target_id ) { //Rude attacked check. if( !battle_check_range(&md->bl, tbl, md->status.rhw.range) - && ( //Can't attack back and can't reach back. - (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1))) - || !mob_can_reach(md, tbl, md->min_chase, MSS_RUSH) - ) + && ( //Can't attack back and can't reach back. + (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1) + || md->sc.data[SC_BITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_CRYSTALIZE] || md->sc.data[SC_THORNSTRAP] + || md->sc.data[SC__MANHOLE])) // Not yet confirmed if boss will teleport once it can't reach target. + || !mob_can_reach(md, tbl, md->min_chase, MSS_RUSH) + ) && md->state.attacked_count++ >= RUDE_ATTACKED_COUNT && !mobskill_use(md, tick, MSC_RUDEATTACKED) // If can't rude Attack && can_move && unit_escape(&md->bl, tbl, rnd()%10 +1)) // Attempt escape @@ -1461,9 +1463,11 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick) || (battle_config.mob_ai&0x2 && !status_check_skilluse(&md->bl, abl, 0, 0)) // Cannot normal attack back to Attacker || (!battle_check_range(&md->bl, abl, md->status.rhw.range) // Not on Melee Range and ... && ( // Reach check - (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1))) + (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1) + || md->sc.data[SC_BITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_CRYSTALIZE] || md->sc.data[SC_THORNSTRAP] + || md->sc.data[SC__MANHOLE])) // Not yet confirmed if boss will teleport once it can't reach target. || !mob_can_reach(md, abl, dist+md->db->range3, MSS_RUSH) - ) + ) ) ) { // Rude attacked if (md->state.attacked_count++ >= RUDE_ATTACKED_COUNT |