com.planet_ink.coffee_mud.Libraries.interfaces
Interface AchievementLibrary.Achievement

Enclosing interface:
AchievementLibrary

public static interface AchievementLibrary.Achievement

The achievement interface provides basic information about the specific achievement, as defined in the achievements.ini definition file. It also allows a tracker to be created for situation where progress in the event requires tracking each player event.


Method Summary
 AccountStats.Agent getAgent()
          Returns whether this is a player or account achievement.
 java.lang.String getDisplayStr()
          Returns the friendly display name of this achievement.
 AchievementLibrary.Event getEvent()
          Returns the event that defines the general type of this achievement.
 java.lang.String getRawParmVal(java.lang.String str)
          Allows access to the parameters passed into this achievement to create it.
 AchievementLibrary.Award[] getRewards()
          Returns the list of coded awards given to players who complete this achievement.
 int getTargetCount()
          For achievements that require tracking progress, this returns the target count that the tracker must report.
 java.lang.String getTattoo()
          Gets the tattoo that is added to players or accounts to designate that this achievement has been completed.
 AchievementLibrary.Tracker getTracker(int oldCount)
          Creates a new tracker object with the given progress count as the default/starting value.
 boolean isSavableTracker()
          Returns true if this achievement requires progress tracking, which means it must be saved with the player and/or account record to keep track of.
 boolean isTargetFloor()
          Returns true if this achievement is completed when the tracker count is > than the target count, and false if the opposite is true.
 java.lang.String parseParms(java.lang.String parms)
          Parses the parameters defined by the event type of this achievement to produce the unique achievement that this is.
 

Method Detail

getAgent

AccountStats.Agent getAgent()
Returns whether this is a player or account achievement.

Returns:
the agent type
See Also:
AccountStats.Agent

getEvent

AchievementLibrary.Event getEvent()
Returns the event that defines the general type of this achievement.

Returns:
the event that defines the general type of this achievement.
See Also:
AchievementLibrary.Event

getTattoo

java.lang.String getTattoo()
Gets the tattoo that is added to players or accounts to designate that this achievement has been completed. It is also the unique key for all achievements.

Returns:
the tattoo that is added to players or accounts

getTracker

AchievementLibrary.Tracker getTracker(int oldCount)
Creates a new tracker object with the given progress count as the default/starting value.

Parameters:
oldCount - the initial value for progress, if applicable
Returns:
a new tracker object with the given progress count
See Also:
getTargetCount()

parseParms

java.lang.String parseParms(java.lang.String parms)
Parses the parameters defined by the event type of this achievement to produce the unique achievement that this is. The parameters are in key=value pairs, space delimited.

Parameters:
parms - the parameter values to parse
Returns:
"" if all went well, or an error message
See Also:
AchievementLibrary.Event.getParameters(), getRawParmVal(String)

getDisplayStr

java.lang.String getDisplayStr()
Returns the friendly display name of this achievement.

Returns:
the friendly display name of this achievement.

getRewards

AchievementLibrary.Award[] getRewards()
Returns the list of coded awards given to players who complete this achievement. The format is a string with a number followed by a string of the type of thing to award, such as QP, XP, or a currency.

Returns:
the list of decoded awards given to players
See Also:
AchievementLibrary.Award

getTargetCount

int getTargetCount()
For achievements that require tracking progress, this returns the target count that the tracker must report.

Returns:
the target count that the tracker

isTargetFloor

boolean isTargetFloor()
Returns true if this achievement is completed when the tracker count is > than the target count, and false if the opposite is true.

Returns:
true for a > completion

isSavableTracker

boolean isSavableTracker()
Returns true if this achievement requires progress tracking, which means it must be saved with the player and/or account record to keep track of.

Returns:
true if this achievement requires progress

getRawParmVal

java.lang.String getRawParmVal(java.lang.String str)
Allows access to the parameters passed into this achievement to create it.

Parameters:
str - the name of the parameter to query
Returns:
the value of the parameter
See Also:
AchievementLibrary.Event.getParameters(), parseParms(String)