Class HonorUtil

java.lang.Object
megamek.client.bot.princess.HonorUtil
All Implemented Interfaces:
IHonorUtil

public class HonorUtil extends Object implements IHonorUtil
Since:
9/5/14 2:53 PM
  • Constructor Details

    • HonorUtil

      public HonorUtil()
  • Method Details

    • checkEnemyBroken

      public void checkEnemyBroken(Targetable target, boolean forcedWithdrawal)
      Description copied from interface: IHonorUtil
      Checks the given Targetable to see if it should be counted as broken:
      Forced Withdrawal is turned on
      Given unit is Crippled
      Specified by:
      checkEnemyBroken in interface IHonorUtil
      Parameters:
      target - The unit to be checked.
      forcedWithdrawal - Set TRUE if the Forced Withdrawal rule is in effect.
    • isEnemyBroken

      public boolean isEnemyBroken(int entityId, int playerId, boolean forcedWithdrawal)
      Description copied from interface: IHonorUtil
      Indicates whether the identified unit can be considered broken.
      Specified by:
      isEnemyBroken in interface IHonorUtil
      Parameters:
      entityId - The target to be checked.
      playerId - The ID of the player owning the target.
      Returns:
      TRUE if the unit is on the broken units list without being on the honor less enemies list.
    • isEnemyDishonored

      public boolean isEnemyDishonored(int playerId)
      Description copied from interface: IHonorUtil
      Indicates whether the identified player is on the dishonored enemies list.
      Specified by:
      isEnemyDishonored in interface IHonorUtil
      Parameters:
      playerId - The ID of the player to be checked.
      Returns:
      TRUE if the player is on the dishonored enemies list.
    • setEnemyDishonored

      public void setEnemyDishonored(int playerId)
      Description copied from interface: IHonorUtil
      Adds the identified player to the dishonored enemies list.
      Specified by:
      setEnemyDishonored in interface IHonorUtil
      Parameters:
      playerId - The ID of the player to be added.
    • getDishonoredEnemies

      public Set<Integer> getDishonoredEnemies()
      Specified by:
      getDishonoredEnemies in interface IHonorUtil
    • iAmAPirate

      public boolean iAmAPirate()
      Specified by:
      iAmAPirate in interface IHonorUtil
    • setIAmAPirate

      public void setIAmAPirate(boolean iAmAPirate)