Class CavalryCombatAI
java.lang.Object
com.minecolonies.core.entity.ai.combat.TargetAI<EntityCitizen>
com.minecolonies.core.entity.ai.combat.AttackMoveAI<EntityCitizen>
com.minecolonies.core.entity.ai.workers.guard.MeleeCombatAI
com.minecolonies.core.entity.ai.workers.guard.CavalryCombatAI
- All Implemented Interfaces:
IStateAI
-
Field Summary
Fields inherited from class com.minecolonies.core.entity.ai.combat.AttackMoveAI
nextAttackTime -
Constructor Summary
ConstructorsConstructorDescriptionCavalryCombatAI(EntityCitizen owner, ITickRateStateMachine<?> stateMachine, AbstractEntityAIGuard<?, ?> parentAI) -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleCalculates the damage to dealprotected doubleGet the attack distance for cavalry units.protected VisibleCitizenStatusGet the icon to display when in combat.Gets the weapon type that the AI will look for when checking if it can attack.Methods inherited from class com.minecolonies.core.entity.ai.workers.guard.MeleeCombatAI
attackProtect, canAttack, doAttack, getAttackDelay, getCombatMovementSpeed, getSearchRange, isAttackableTarget, isHuscarl, isWithinPersecutionDistance, moveInAttackPosition, onTargetChange, onTargetDied, skipSearchMethods inherited from class com.minecolonies.core.entity.ai.combat.AttackMoveAI
isInAttackDistance, isInDistanceForAttack, resetTarget, tryAttackMethods inherited from class com.minecolonies.core.entity.ai.combat.TargetAI
checkForTarget, getSearchArea, getYSearchRange, isEntityValidTarget, searchNearbyTarget
-
Constructor Details
-
CavalryCombatAI
public CavalryCombatAI(EntityCitizen owner, ITickRateStateMachine<?> stateMachine, AbstractEntityAIGuard<?, ?> parentAI)
-
-
Method Details
-
getAttackDamage
protected double getAttackDamage()Description copied from class:MeleeCombatAICalculates the damage to deal- Overrides:
getAttackDamagein classMeleeCombatAI- Returns:
- attack damage
-
getWeaponType
Gets the weapon type that the AI will look for when checking if it can attack.- Overrides:
getWeaponTypein classMeleeCombatAI- Returns:
- the weapon type.
-
getAttackDistance
protected double getAttackDistance()Get the attack distance for cavalry units.- Overrides:
getAttackDistancein classMeleeCombatAI- Returns:
- the attack distance, increased by
.
invalid reference
#CAVALRY_RANGE_MULTIPLIER
-
getCombatStatus
Get the icon to display when in combat.- Overrides:
getCombatStatusin classMeleeCombatAI- Returns:
- the icon.
-