public PrincessBehaviorDialog(JFrame parent, BehaviorSettings princessBehavior, String name) { super(parent, null); try { this.princessBehavior = princessBehavior.getCopy(); } catch(Exception e) { handleError("PrincessBehaviorDialog", e); } this.setName(name); this.nameField.setText(name); super.setPrincessFields(); }
public BotForce() { this.entityList = new ArrayList<Entity>(); try { behaviorSettings = BehaviorSettingsFactory.getInstance().DEFAULT_BEHAVIOR.getCopy(); } catch (PrincessException ex) { MekHQ.getLogger().log(getClass(), "BotForce()", LogLevel.ERROR, //$NON-NLS-1$ "Error getting Princess default behaviors"); //$NON-NLS-1$ MekHQ.getLogger().error(getClass(), "BotForce()", ex); //$NON-NLS-1$ } };
public BotForce(String name, int team, int start, int home, ArrayList<Entity> entityList, String camoCategory, String camoFileName, int colorIndex) { final String METHOD_NAME = "BotForce(String,int,int,int,ArrayList<Entity>,String,String,int)"; //$NON-NLS-1$ this.name = name; this.team = team; this.start = start; this.entityList = entityList; this.camoCategory = camoCategory; this.camoFileName = camoFileName; this.colorIndex = colorIndex; try { behaviorSettings = BehaviorSettingsFactory.getInstance().DEFAULT_BEHAVIOR.getCopy(); } catch (PrincessException ex) { MekHQ.getLogger().log(getClass(), METHOD_NAME, LogLevel.ERROR, "Error getting Princess default behaviors"); //$NON-NLS-1$ MekHQ.getLogger().error(getClass(), METHOD_NAME, ex); } behaviorSettings.setRetreatEdge(CardinalEdge.NEAREST_OR_NONE); behaviorSettings.setDestinationEdge(CardinalEdge.NEAREST_OR_NONE); }
"\n" + behaviorSettings.toLog()); try { this.behaviorSettings = behaviorSettings.getCopy(); } catch (final PrincessException e) { log(getClass(),
if (isAttacker()) { BotForce bf = new BotForce("Civilians", 1, otherStart, playerHome, otherForce); bf.setBehaviorSettings(BehaviorSettingsFactory.getInstance().ESCAPE_BEHAVIOR.getCopy()); bf.setDestinationEdge(otherHome); bf.setBehaviorSettings(BehaviorSettingsFactory.getInstance().ESCAPE_BEHAVIOR.getCopy()); bf.setDestinationEdge(otherHome);