Class Achievement
java.lang.Object
games.stendhal.server.core.rp.achievement.Achievement
An Achievement a player can reach while playing the game.
Achievements are given for example for doing a certain number of quests or killing a number of special creatures
- Author:
- madmetzger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intbase score for easy achievementsstatic final intbase score for extreme achievementstatic final intbase score for difficult achievementsstatic final intbase score for achievements of medium difficulty -
Constructor Summary
ConstructorsConstructorDescriptionAchievement(String identifier, String title, Category category, String description, int baseScore, boolean active, ChatCondition condition) create a new achievement -
Method Summary
-
Field Details
-
EASY_BASE_SCORE
public static final int EASY_BASE_SCOREbase score for easy achievements- See Also:
-
MEDIUM_BASE_SCORE
public static final int MEDIUM_BASE_SCOREbase score for achievements of medium difficulty- See Also:
-
HARD_BASE_SCORE
public static final int HARD_BASE_SCOREbase score for difficult achievements- See Also:
-
EXTREME_BASE_SCORE
public static final int EXTREME_BASE_SCOREbase score for extreme achievement- See Also:
-
-
Constructor Details
-
Achievement
public Achievement(String identifier, String title, Category category, String description, int baseScore, boolean active, ChatCondition condition) create a new achievement- Parameters:
identifier-title-category-description-baseScore-active-condition-
-
-
Method Details
-
getCategory
- Returns:
- the category of this achievement
-
getIdentifier
- Returns:
- the identifying string
-
getTitle
- Returns:
- the title a player gets awarded for this achievement
-
getDescription
- Returns:
- the description of what to do to get this achievement
-
getBaseScore
public int getBaseScore()- Returns:
- the base score for this achievement
-
isActive
public boolean isActive()- Returns:
- true if the achievement is visible, false otherwise
-
isFulfilled
Check if a player has fulfilled this achievement- Parameters:
p- the player to check- Returns:
- true iff this achievement's condition evaluates to true
-
toString
-