AI info dev command updated.

This commit is contained in:
2023-09-02 15:11:17 -04:00
parent 73a1ce083a
commit 3e1a79c248
+24 -1
View File
@@ -9,6 +9,7 @@
package engine.devcmd.cmds;
import engine.Enum;
import engine.Enum.GameObjectType;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.PowersManager;
@@ -17,6 +18,7 @@ import engine.objects.Mob;
import engine.objects.PlayerCharacter;
import engine.powers.RunePowerEntry;
import java.util.ArrayList;
import java.util.Map;
@@ -58,6 +60,8 @@ public class aiInfoCmd extends AbstractDevCmd {
Mob mob = (Mob) target;
output = "Mob AI Information:" + newline;
output += mob.getName() + newline;
output += mob.agentType.toString() + newline;
if (mob.behaviourType != null) {
output += "BehaviourType: " + mob.behaviourType.toString() + newline;
if (mob.behaviourType.BehaviourHelperType != null) {
@@ -91,7 +95,26 @@ public class aiInfoCmd extends AbstractDevCmd {
output += "Powers:" + newline;
for (RunePowerEntry runePowerEntry : PowersManager.getPowersForRune(mob.getMobBaseID()))
ArrayList<RunePowerEntry> powerEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.getMobBaseID()));
// Additional powers may come from the contract ID. This is to support
// powers for player guards irrespective of the mobbase used.
if (mob.isPlayerGuard()) {
ArrayList<RunePowerEntry> contractEntries = new ArrayList<>();
if (mob.contract != null)
contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.contractUUID));
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION))
contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.guardCaptain.contractUUID));
powerEntries.addAll(contractEntries);
}
for (RunePowerEntry runePowerEntry : powerEntries)
output += PowersManager.getPowerByToken(runePowerEntry.token).getName() + newline;
throwbackInfo(playerCharacter, output);