Package wizardquest.entity
Interface EntityAIInterface
public interface EntityAIInterface
Interface for the Entity AI.
-
Method Summary
Modifier and TypeMethodDescriptionpickAbility(EntityInterface self) Picks which ability to use and returns it, validating it has enough magic to do so in the case of a simulated player.pickTarget(EntityInterface[] enemies) Picks which enemy to target with an abilitypickUpgrade(UpgradeEnum[] upgrades, int coins) Called when an Entity AI attempts to purchase an upgrade from the shop between encounters.
-
Method Details
-
pickAbility
Picks which ability to use and returns it, validating it has enough magic to do so in the case of a simulated player.- Parameters:
self- the creature that will use the ability.- Returns:
- a reference to the chosen ability.
-
pickTarget
Picks which enemy to target with an ability- Parameters:
enemies- the enemies of the entity- Returns:
- a reference to the chosen target.
-
pickUpgrade
Called when an Entity AI attempts to purchase an upgrade from the shop between encounters.- Parameters:
upgrades- the array of upgrades available to the entity for purchase.coins- the total coins that the entity currently has. Each upgrade requires a specific total of coins, an entity may only purchase what they can afford.- Returns:
- the single selected upgrade.
-