Tweak difficulty
This commit is contained in:
parent
db0469dd57
commit
03eae3ecc9
2 changed files with 10 additions and 2 deletions
|
@ -21,7 +21,7 @@ import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
|
||||||
public class EndEvent extends Event {
|
public class EndEvent extends Event {
|
||||||
private PotionEffectType[] effects;
|
private PotionEffectType[] effects;
|
||||||
private int livesLeft = 5;
|
private int livesLeft;
|
||||||
|
|
||||||
public EndEvent(Team team, Difficulty difficulty, int scoreOnSuccess) {
|
public EndEvent(Team team, Difficulty difficulty, int scoreOnSuccess) {
|
||||||
super(team, difficulty, scoreOnSuccess);
|
super(team, difficulty, scoreOnSuccess);
|
||||||
|
@ -33,6 +33,14 @@ public class EndEvent extends Event {
|
||||||
case SWEAT -> new PotionEffectType[] { PotionEffectType.HUNGER };
|
case SWEAT -> new PotionEffectType[] { PotionEffectType.HUNGER };
|
||||||
case IMPOSSIBLE -> new PotionEffectType[] { PotionEffectType.HUNGER, PotionEffectType.WEAKNESS };
|
case IMPOSSIBLE -> new PotionEffectType[] { PotionEffectType.HUNGER, PotionEffectType.WEAKNESS };
|
||||||
};
|
};
|
||||||
|
livesLeft = switch (difficulty) {
|
||||||
|
case BABY -> 50;
|
||||||
|
case EASY -> 20;
|
||||||
|
case MEDIUM -> 10;
|
||||||
|
case HARD -> 5;
|
||||||
|
case SWEAT -> 3;
|
||||||
|
case IMPOSSIBLE -> 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class FallEvent extends Event {
|
||||||
Player player = MC13DTL.board.getPlayers(team).getFirst();
|
Player player = MC13DTL.board.getPlayers(team).getFirst();
|
||||||
Location location = player.getLocation();
|
Location location = player.getLocation();
|
||||||
location.setX(((int) location.getX()) + 0.5);
|
location.setX(((int) location.getX()) + 0.5);
|
||||||
location.setZ(((int) location.getX()) + 0.5);
|
location.setZ(((int) location.getZ()) + 0.5);
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
location.setY(world.getHighestBlockYAt(location));
|
location.setY(world.getHighestBlockYAt(location));
|
||||||
targetHeight = (int) location.getY() + 5;
|
targetHeight = (int) location.getY() + 5;
|
||||||
|
|
Loading…
Reference in a new issue