/** * Princess's home edge. * * @param destinationEdge the index of the {@link CardinalEdge} princess should flee to. See {@link CardinalEdge#getIndex()} */ public void setDestinationEdge(final String destinationEdge) throws PrincessException { try { setDestinationEdge(Integer.parseInt(destinationEdge.trim())); } catch (final NumberFormatException e) { throw new PrincessException("Invalid destinationEdge value.", e); } }
/** * How close to I want to get to my enemies? * * @param index The index ["0"-"10"] of the hyper aggression value to be used. */ public void setHyperAggressionIndex(final String index) throws PrincessException { try { setHyperAggressionIndex(Integer.parseInt(index)); } catch (final NumberFormatException ex) { throw new PrincessException(ex); } }
/** * @param index The index of my current {@link #FALL_SHAME_VALUES}. */ public void setFallShameIndex(final String index) throws PrincessException { try { setFallShameIndex(Integer.parseInt(index)); } catch (final NumberFormatException ex) { throw new PrincessException(ex); } }
/** * Princess's home edge. * * @param retreatEdge the index of the {@link CardinalEdge} princess should flee to. See {@link CardinalEdge#getIndex()} */ public void setRetreatEdge(final String retreatEdge) throws PrincessException { try { setRetreatEdge(Integer.parseInt(retreatEdge.trim())); } catch (final NumberFormatException e) { throw new PrincessException("Invalid retreatEdge value.", e); } }
/** * Sets the name for this type of behavior. Must be unique in order to save. * * @param description The name to be used. */ public void setDescription(final String description) throws PrincessException { if (StringUtil.isNullOrEmpty(description)) { throw new PrincessException("Description is required!"); } this.description = description.trim(); }
/** * How quickly will I try to escape once damaged? * * @param index The index of the Bravery modifier to be used. */ public void setBraveryIndex(final String index) throws PrincessException { try { setBraveryIndex(Integer.parseInt(index)); } catch (final NumberFormatException ex) { throw new PrincessException(ex); } }
/** * How close do I want to stick to my teammates? * * @param index The index ["0"-"10"] of the herd mentality value that should be used. */ public void setHerdMentalityIndex(final String index) throws PrincessException { try { setHerdMentalityIndex(Integer.parseInt(index)); } catch (final NumberFormatException ex) { throw new PrincessException(ex); } }
/** * How worried about enemy damage am I? * * @param index The index ["0"-"10"] of the self preservation value to be used. */ public void setSelfPreservationIndex(final String index) throws PrincessException { try { setSelfPreservationIndex(Integer.parseInt(index)); } catch (final NumberFormatException ex) { throw new PrincessException(ex); } }