Add 1.5x progression modifier for tiers the player has already reached

This commit is contained in:
Electroblob77
2020-06-04 12:27:10 +01:00
parent e54453e6c6
commit 92b54edb4a
4 changed files with 58 additions and 9 deletions
@@ -52,6 +52,16 @@ public enum Tier {
throw new IllegalArgumentException("No such tier with unlocalised name: " + name);
}
/** Returns the tier above this one, or the same tier if this is the highest tier. */
public Tier next(){
return ordinal() + 1 < values().length ? values()[ordinal() + 1] : this;
}
/** Returns the tier below this one, or the same tier if this is the lowest tier. */
public Tier previous(){
return ordinal() > 0 ? values()[ordinal() - 1] : this;
}
/** Returns the translated display name of this tier, without formatting. */
public String getDisplayName(){
return Wizardry.proxy.translate("tier." + unlocalisedName);