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

All Superinterfaces:
java.lang.Cloneable
Enclosing interface:
AchievementLibrary

public static interface AchievementLibrary.Tracker
extends java.lang.Cloneable

A tracker object assigned to a particular player or account for a particular achievement, allowing the achievement to track progress if it needs to, or just providing a way to quickly query completion otherwise.


Method Summary
 AchievementLibrary.Tracker copyOf()
          Returns a copy of this tracker, unattached to the tracker it is a copy of.
 AchievementLibrary.Achievement getAchievement()
          The achievement to which this tracker belongs.
 int getCount(MOB mob)
          Returns the count/score to show for the given mob.
 boolean isAchieved(MOB mob)
          Returns true if the given mob has completed this achievement, even if the tattoo has not yet been assigned.
 boolean testBump(MOB mob, int bumpNum, java.lang.Object... parms)
          For events which require tracked progress, this method is called to give this tracker a potential bump, after testing the given mob and the given arguments to see if the achievement deserves a bump in progress.
 

Method Detail

getAchievement

AchievementLibrary.Achievement getAchievement()
The achievement to which this tracker belongs.

Returns:
achievement to which this tracker belongs.

isAchieved

boolean isAchieved(MOB mob)
Returns true if the given mob has completed this achievement, even if the tattoo has not yet been assigned.

Parameters:
mob - the player being checked
Returns:
true if completion has happened, false otherwise

testBump

boolean testBump(MOB mob,
                 int bumpNum,
                 java.lang.Object... parms)
For events which require tracked progress, this method is called to give this tracker a potential bump, after testing the given mob and the given arguments to see if the achievement deserves a bump in progress.

Parameters:
mob - the player who did something trackable
bumpNum - the amount to bump the progress by
parms - optional arguments unique to the Event
Returns:
true if a bump occurred, false otherwise

getCount

int getCount(MOB mob)
Returns the count/score to show for the given mob. If the achievement of this tracker is Savable, then the mob may be null, since the count would then be internally stored.

Parameters:
mob - the mob to get a count for -- required ONLY for unsavable
Returns:
the score for this achievement and this mob

copyOf

AchievementLibrary.Tracker copyOf()
Returns a copy of this tracker, unattached to the tracker it is a copy of.

Returns:
a copy of this tracker