This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.hyperion.rs2.pf; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import org.hyperion.rs2.model.Location; | |
| /** | |
| * An implementation of a <code>PathFinder</code> which uses the A* search | |
| * algorithm. Unlike the <code>DumbPathFinder</code>, this will attempt to find |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******************************************************************************* | |
| * Azureify Revision 498 RuneScape Emulator | |
| * Copyright (C) 2012 Ryan ryry-@sympatico.ca | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static boolean combatFollow(Mob mob, Mob other, CombatType type) { | |
| mob.turnTo(other); | |
| int distance = mob.getLocation().getDistance(other.getLocation()); | |
| if (distance > 17) { | |
| mob.getCombatExecutor().reset(); | |
| return false; | |
| } | |
| if ((type == CombatType.MELEE || type == CombatType.DEFAULT) && canMelee(mob, other)) { | |
| if (diagonal(mob.getLocation(), other.getLocation())) { | |
| mob.requestClippedWalk(other.getLocation().getX(), mob.getLocation().getY()); |
OlderNewer