Browse Source

AI info dev command updated.

feature-workorder
MagicBot 1 year ago
parent
commit
3e1a79c248
  1. 25
      src/engine/devcmd/cmds/aiInfoCmd.java

25
src/engine/devcmd/cmds/aiInfoCmd.java

@ -9,6 +9,7 @@ @@ -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; @@ -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 { @@ -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 { @@ -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);

Loading…
Cancel
Save