Package megamek.client.bot.princess
Class HonorUtil
java.lang.Object
megamek.client.bot.princess.HonorUtil
- All Implemented Interfaces:
IHonorUtil
- Since:
- 9/5/14 2:53 PM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckEnemyBroken(Targetable target, boolean forcedWithdrawal) Checks the givenTargetableto see if it should be counted as broken:
Forced Withdrawal is turned on
Given unit is CrippledbooleanbooleanisEnemyBroken(int entityId, int playerId, boolean forcedWithdrawal) Indicates whether the identified unit can be considered broken.booleanisEnemyDishonored(int playerId) Indicates whether the identified player is on the dishonored enemies list.voidsetEnemyDishonored(int playerId) Adds the identified player to the dishonored enemies list.voidsetIAmAPirate(boolean iAmAPirate)
-
Constructor Details
-
HonorUtil
public HonorUtil()
-
-
Method Details
-
checkEnemyBroken
Description copied from interface:IHonorUtilChecks the givenTargetableto see if it should be counted as broken:
Forced Withdrawal is turned on
Given unit is Crippled- Specified by:
checkEnemyBrokenin interfaceIHonorUtil- 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:IHonorUtilIndicates whether the identified unit can be considered broken.- Specified by:
isEnemyBrokenin interfaceIHonorUtil- 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:IHonorUtilIndicates whether the identified player is on the dishonored enemies list.- Specified by:
isEnemyDishonoredin interfaceIHonorUtil- 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:IHonorUtilAdds the identified player to the dishonored enemies list.- Specified by:
setEnemyDishonoredin interfaceIHonorUtil- Parameters:
playerId- The ID of the player to be added.
-
getDishonoredEnemies
- Specified by:
getDishonoredEnemiesin interfaceIHonorUtil
-
iAmAPirate
public boolean iAmAPirate()- Specified by:
iAmAPiratein interfaceIHonorUtil
-
setIAmAPirate
public void setIAmAPirate(boolean iAmAPirate)
-