Reformat and clean up "server" package

This commit is contained in:
P0nk
2021-09-09 23:27:38 +02:00
parent d389665bd7
commit e8ef3a492c
80 changed files with 2104 additions and 2087 deletions

View File

@@ -31,7 +31,6 @@ import tools.PacketCreator;
import java.util.concurrent.ScheduledFuture;
/**
*
* @author kevintjuh93
*/
public class Pyramid extends PartyQuest {
@@ -82,7 +81,9 @@ public class Pyramid extends PartyQuest {
count = 0;
gaugeSchedule = TimerManager.getInstance().register(() -> {
gauge -= decrease;
if (gauge <= 0) warp(926010001);
if (gauge <= 0) {
warp(926010001);
}
}, 1000);
}
@@ -90,23 +91,31 @@ public class Pyramid extends PartyQuest {
public void kill() {
kill++;
if (gauge < 100) count++;
if (gauge < 100) {
count++;
}
gauge++;
broadcastInfo("hit", kill);
if (gauge >= 100) gauge = 100;
if (gauge >= 100) {
gauge = 100;
}
checkBuffs();
}
public void cool() {
cool++;
int plus = coolAdd;
if ((gauge + coolAdd) > 100) plus -= ((gauge + coolAdd) - 100);
if ((gauge + coolAdd) > 100) {
plus -= ((gauge + coolAdd) - 100);
}
gauge += plus;
count += plus;
if (gauge >= 100) gauge = 100;
if (gauge >= 100) {
gauge = 100;
}
broadcastInfo("cool", cool);
checkBuffs();
}
public void miss() {
@@ -118,10 +127,11 @@ public class Pyramid extends PartyQuest {
public int timer() {
int value;
if (stage > 0)
if (stage > 0) {
value = 180;
else
} else {
value = 120;
}
timer = TimerManager.getInstance().schedule(() -> {
stage++;
@@ -146,7 +156,9 @@ public class Pyramid extends PartyQuest {
gaugeSchedule = null;
timer.cancel(false);
timer = null;
} else stage = 0;
} else {
stage = 0;
}
}
public void broadcastInfo(String info, int amount) {
@@ -157,7 +169,9 @@ public class Pyramid extends PartyQuest {
}
public boolean useSkill() {
if (skill < 1) return false;
if (skill < 1) {
return false;
}
skill--;
broadcastInfo("skill", skill);
@@ -169,8 +183,9 @@ public class Pyramid extends PartyQuest {
if (buffcount == 0 && total >= 250) {
buffcount++;
ItemInformationProvider ii = ItemInformationProvider.getInstance();
for (Character chr : getParticipants())
for (Character chr : getParticipants()) {
ii.getItemEffect(2022585).applyTo(chr);
}
} else if (buffcount == 1 && total >= 500) {
buffcount++;
@@ -212,20 +227,34 @@ public class Pyramid extends PartyQuest {
if (exp == 0) {
int totalkills = (kill + cool);
if (stage == 5) {
if (totalkills >= 3000) rank = 0;
else if (totalkills >= 2000) rank = 1;
else if (totalkills >= 1500) rank = 2;
else if(totalkills >= 500) rank = 3;
else rank = 4;
if (totalkills >= 3000) {
rank = 0;
} else if (totalkills >= 2000) {
rank = 1;
} else if (totalkills >= 1500) {
rank = 2;
} else if (totalkills >= 500) {
rank = 3;
} else {
rank = 4;
}
} else {
if (totalkills >= 2000) rank = 3;
else rank = 4;
if (totalkills >= 2000) {
rank = 3;
} else {
rank = 4;
}
}
if (rank == 0) exp = (60500 + (5500 * mode.getMode()));
else if(rank == 1) exp = (55000 + (5000 * mode.getMode()));
else if (rank == 2) exp = (46750 + (4250 * mode.getMode()));
else if (rank == 3) exp = (22000 + (2000 * mode.getMode()));
if (rank == 0) {
exp = (60500 + (5500 * mode.getMode()));
} else if (rank == 1) {
exp = (55000 + (5000 * mode.getMode()));
} else if (rank == 2) {
exp = (46750 + (4250 * mode.getMode()));
} else if (rank == 3) {
exp = (22000 + (2000 * mode.getMode()));
}
exp += ((kill * 2) + (cool * 10));
}