RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
ClanAchievement.java
1package com.osroyale.content.clanchannel.content;
2
3import com.osroyale.util.Difficulty;
4
5import java.util.Optional;
6
45
46public enum ClanAchievement {
47 /* Easy */
48 CLAN_MEMBERS_I("Have 10 members in your clan", 10, Difficulty.EASY),
49 TASKS_I("Complete 10 clan tasks", 10, Difficulty.EASY),
50 PLAYER_KILLER_I("Kill 25 wilderness players", 25, Difficulty.EASY),
51
52 /* Medium */
53 CLAN_MEMBERS_II("Have 50 members in your clan", 50, Difficulty.MEDIUM),
54 TASKS_II("Complete 100 clan tasks", 100, Difficulty.MEDIUM),
55 PLAYER_KILLER_II("Kill 150 wilderness players", 150, Difficulty.MEDIUM),
56
57 /* Hard */
58 CLAN_MEMBERS_III("Have 150 members in your clan", 150, Difficulty.HARD),
59 TASKS_III("Complete 500 clan tasks", 500, Difficulty.HARD),
60 PLAYER_KILLER_III("Kill 750 wilderness players", 750, Difficulty.HARD),
61 ;
62
64 public final String details;
65
67 public final int amount;
68
70 public final Difficulty difficulty;
71
74 this.details = details;
75 this.amount = amount;
76 this.difficulty = difficulty;
77 }
78
80 public int getPoints() {
81 switch (difficulty) {
82 case EASY:
83 return 3;
84 case MEDIUM:
85 return 5;
86 case HARD:
87 return 8;
88 }
89 return 0;
90 }
91
93 public double getExperience() {
94 switch (difficulty) {
95 case EASY:
96 return 2500;
97 case MEDIUM:
98 return 5000;
99 case HARD:
100 return 10000;
101 }
102 return 0;
103 }
104
106 public static Optional<ClanAchievement> forOrdinal(int ordinal) {
107 for (ClanAchievement achievement : values()) {
108 if (achievement.ordinal() == ordinal)
109 return Optional.of(achievement);
110 }
111 return Optional.empty();
112 }
113}
ClanAchievement(String details, int amount, Difficulty difficulty)
static Optional< ClanAchievement > forOrdinal(int ordinal)