added veteran banner and redid how points are awarded

This commit is contained in:
jenz 2024-01-25 19:47:39 +01:00
parent 99063d3de6
commit 31e0568705

View File

@ -306,6 +306,9 @@ public class Facade {
} else if (bannerID == 25) {
bannerName = "Event Manager";
bannerURL = "https://unloze.com/images/badges/Event-Manager.png";
} else if (bannerID == 29) {
bannerName = "Veteran Admin";
bannerURL = "https://unloze.com/images/badges/Veteran_Badge.png";
}
if (!bannerName.isEmpty() && !bannerURL.isEmpty()) {
urlBanners.add(new UrlBanners(bannerName, bannerURL));
@ -411,11 +414,31 @@ public class Facade {
for (MapBoard mapboard : mapBoardCache.values()) {
List<MapValues> mapvalues = mapboard.getMapvalues();
int playerCount = mapvalues.size();
//2024 edit, its been a damn long time ago this all was made
//editing so top 5% and top 1% of finisher each get an extra boost.
int FivePercent = 0;
int OnePercent = 0;
if (playerCount >= 100){
FivePercent = (int) Math.floor(playerCount * 0.05);
OnePercent = (int) Math.floor(playerCount * 0.01);
}
int position = 1;
for (MapValues mapvalue : mapvalues) {
mapvalue.setPosition(position);
float percentageSpreader = playerCount - position;
mapvalue.setMapPoints((int) Math.floor((percentageSpreader / playerCount) * playerCount /* 100 */));
int Points = playerCount - position;
if (playerCount <= 250)
{
//if less than 250 people finished a time i also want to give them each an additional 2500 points.
//that is to make up hard timers that not many people actually finish so they are considered worth more.
//for example race mode in mako and race timers in jump king should be rewarded a lot more due to their difficulties.
Points += 2500;
}
if (position <= OnePercent){
Points *= 4;
} else if (position <= FivePercent){
Points *= 2;
}
mapvalue.setMapPoints(Points);
position++;
}
}