make events more balanced

This commit is contained in:
Xander 2024-09-23 09:27:44 +02:00
parent 160eb45f8d
commit 231c1e4935
No known key found for this signature in database
GPG key ID: 79979C7BA303E003
7 changed files with 30 additions and 19 deletions

View file

@ -15,7 +15,7 @@ import gent.zeus.mc13dtl.MC13DTL;
public class EventRunner implements Runnable { public class EventRunner implements Runnable {
static List<Event> currentEvents = new ArrayList<>(); static List<Event> currentEvents = new ArrayList<>();
public static List<Integer> startTimes = List.of(5000, 13000, 1000, 1000, 13000, 100, 1000, 500, 10000, 5000, 13000, 13000, 100); public static List<Integer> startTimes = List.of(4000, 13000, 4000, 5000, 14000, 100, 1000, 500, 10000, 5000, 13000, 13000, 5000);
private final List<Integer> dayScores = List.of(10, 20, 50, 100, 150, 250, 400, 600, 850, 1150, 1500, 2000, 3000); private final List<Integer> dayScores = List.of(10, 20, 50, 100, 150, 250, 400, 600, 850, 1150, 1500, 2000, 3000);
@ -45,8 +45,8 @@ public class EventRunner implements Runnable {
Event event = switch ((int) day) { Event event = switch ((int) day) {
case 0 -> new SuicideEvent(team, difficulty, dayScore); case 0 -> new SuicideEvent(team, difficulty, dayScore);
case 1 -> new KillMobs1Event(team, difficulty, dayScore); case 1 -> new KillMobs1Event(team, difficulty, dayScore);
case 2 -> new CraftEvent(team, difficulty, dayScore); case 2 -> new MineEvent(team, difficulty, dayScore);
case 3 -> new MineEvent(team, difficulty, dayScore); case 3 -> new CraftEvent(team, difficulty, dayScore);
case 4 -> new ClimbEvent(team, difficulty, dayScore); case 4 -> new ClimbEvent(team, difficulty, dayScore);
case 5 -> new FallEvent(team, difficulty, dayScore); case 5 -> new FallEvent(team, difficulty, dayScore);
case 6 -> new KillPlayerEvent(team, difficulty, dayScore); case 6 -> new KillPlayerEvent(team, difficulty, dayScore);

View file

@ -17,10 +17,10 @@ public class CraftEvent extends Event {
super(team, difficulty, scoreOnSuccess); super(team, difficulty, scoreOnSuccess);
item = switch (difficulty) { item = switch (difficulty) {
case BABY -> Material.SHIELD; case BABY -> Material.SHIELD;
case EASY -> Material.ENCHANTING_TABLE; case EASY -> Material.COMPASS;
case MEDIUM -> Material.REDSTONE_LAMP; case MEDIUM -> Material.REDSTONE_LAMP;
case HARD -> Material.BREWING_STAND; case HARD -> Material.BREWING_STAND;
case SWEAT -> Material.STICKY_PISTON; case SWEAT -> Material.RESPAWN_ANCHOR;
case IMPOSSIBLE -> Material.BEACON; case IMPOSSIBLE -> Material.BEACON;
}; };
} }

View file

@ -25,6 +25,7 @@ public class KillMobs1Event extends Event {
Difficulty.EASY, new Pair<>(EntityType.ZOMBIE, 3), Difficulty.EASY, new Pair<>(EntityType.ZOMBIE, 3),
Difficulty.MEDIUM, new Pair<>(EntityType.ZOMBIE, 6), Difficulty.MEDIUM, new Pair<>(EntityType.ZOMBIE, 6),
Difficulty.HARD, new Pair<>(EntityType.SKELETON, 4), Difficulty.HARD, new Pair<>(EntityType.SKELETON, 4),
Difficulty.SWEAT, new Pair<>(EntityType.CREEPER, 6),
Difficulty.IMPOSSIBLE, new Pair<>(EntityType.ENDERMAN, 4)); Difficulty.IMPOSSIBLE, new Pair<>(EntityType.ENDERMAN, 4));
monster = monsters.get(difficulty).getFirst(); monster = monsters.get(difficulty).getFirst();
killsLeft = monsters.get(difficulty).getSecond(); killsLeft = monsters.get(difficulty).getSecond();

View file

@ -23,9 +23,10 @@ public class KillMobs2Event extends Event {
Map<Difficulty, Pair<EntityType, Integer>> monsters = Map.of( Map<Difficulty, Pair<EntityType, Integer>> monsters = Map.of(
Difficulty.BABY, new Pair<>(EntityType.CREEPER, 3), Difficulty.BABY, new Pair<>(EntityType.CREEPER, 3),
Difficulty.EASY, new Pair<>(EntityType.PIGLIN, 3), Difficulty.EASY, new Pair<>(EntityType.PIGLIN, 3),
Difficulty.MEDIUM, new Pair<>(EntityType.GHAST, 2), Difficulty.MEDIUM, new Pair<>(EntityType.GHAST, 1),
Difficulty.HARD, new Pair<>(EntityType.BLAZE, 3), Difficulty.HARD, new Pair<>(EntityType.HOGLIN, 4),
Difficulty.IMPOSSIBLE, new Pair<>(EntityType.WITHER, 1)); Difficulty.SWEAT, new Pair<>(EntityType.WITHER, 4),
Difficulty.IMPOSSIBLE, new Pair<>(EntityType.WARDEN, 1));
monster = monsters.get(difficulty).getFirst(); monster = monsters.get(difficulty).getFirst();
killsLeft = monsters.get(difficulty).getSecond(); killsLeft = monsters.get(difficulty).getSecond();
} }

View file

@ -52,6 +52,6 @@ public class KillPlayerEvent extends Event {
@Override @Override
protected String getMessage() { protected String getMessage() {
return "Your team has to kill another player in team " + huntingTeam.getName() + " before dawn"; return "Your team has to kill another player in team " + huntingTeam.getName() + " before next dawn";
} }
} }

View file

@ -13,7 +13,7 @@ import org.bukkit.util.StructureSearchResult;
public class StructureEvent extends Event { public class StructureEvent extends Event {
enum StructureType { enum StructureType {
RUINED_PORTAL, VILLAGE, PYRAMID, SWAMP_HUT, FORTRESS, END_CITY RUINED_PORTAL, VILLAGE, PYRAMID, SWAMP_HUT, STRONGHOLD, END_CITY
} }
private final StructureType structure; private final StructureType structure;
@ -25,7 +25,7 @@ public class StructureEvent extends Event {
case EASY -> StructureType.VILLAGE; case EASY -> StructureType.VILLAGE;
case MEDIUM -> StructureType.PYRAMID; case MEDIUM -> StructureType.PYRAMID;
case HARD -> StructureType.SWAMP_HUT; case HARD -> StructureType.SWAMP_HUT;
case SWEAT -> StructureType.FORTRESS; case SWEAT -> StructureType.STRONGHOLD;
case IMPOSSIBLE -> StructureType.END_CITY; case IMPOSSIBLE -> StructureType.END_CITY;
}; };
} }
@ -33,13 +33,15 @@ public class StructureEvent extends Event {
@Override @Override
public void run() { public void run() {
Structure[] structures = switch (structure) { Structure[] structures = switch (structure) {
case RUINED_PORTAL -> new Structure[] { Structure.RUINED_PORTAL, Structure.RUINED_PORTAL_DESERT, Structure.RUINED_PORTAL_JUNGLE, Structure.RUINED_PORTAL_MOUNTAIN, Structure.RUINED_PORTAL_NETHER, case RUINED_PORTAL ->
new Structure[]{Structure.RUINED_PORTAL, Structure.RUINED_PORTAL_DESERT, Structure.RUINED_PORTAL_JUNGLE, Structure.RUINED_PORTAL_MOUNTAIN, Structure.RUINED_PORTAL_NETHER,
Structure.RUINED_PORTAL_OCEAN, Structure.RUINED_PORTAL_SWAMP}; Structure.RUINED_PORTAL_OCEAN, Structure.RUINED_PORTAL_SWAMP};
case END_CITY -> new Structure[]{Structure.END_CITY}; case END_CITY -> new Structure[]{Structure.END_CITY};
case FORTRESS -> new Structure[] { Structure.FORTRESS }; case STRONGHOLD -> new Structure[]{Structure.STRONGHOLD};
case PYRAMID -> new Structure[]{Structure.DESERT_PYRAMID, Structure.JUNGLE_PYRAMID}; case PYRAMID -> new Structure[]{Structure.DESERT_PYRAMID, Structure.JUNGLE_PYRAMID};
case SWAMP_HUT -> new Structure[]{Structure.SWAMP_HUT}; case SWAMP_HUT -> new Structure[]{Structure.SWAMP_HUT};
case VILLAGE -> new Structure[] { Structure.VILLAGE_DESERT, Structure.VILLAGE_PLAINS, Structure.VILLAGE_SAVANNA, Structure.VILLAGE_SNOWY, Structure.VILLAGE_TAIGA }; case VILLAGE ->
new Structure[]{Structure.VILLAGE_DESERT, Structure.VILLAGE_PLAINS, Structure.VILLAGE_SAVANNA, Structure.VILLAGE_SNOWY, Structure.VILLAGE_TAIGA};
}; };
for (Player player : MC13DTL.board.getPlayers(team)) { for (Player player : MC13DTL.board.getPlayers(team)) {

View file

@ -15,7 +15,14 @@ public class SuicideEvent extends Event {
public SuicideEvent(Team team, Difficulty difficulty, int scoreOnSuccess) { public SuicideEvent(Team team, Difficulty difficulty, int scoreOnSuccess) {
super(team, difficulty, scoreOnSuccess); super(team, difficulty, scoreOnSuccess);
timeLeft = ((Difficulty.IMPOSSIBLE.ordinal() + 1) - difficulty.ordinal()) * 10; timeLeft = switch (difficulty) {
case BABY -> 300;
case EASY -> 240;
case MEDIUM -> 100;
case HARD -> 60;
case SWEAT -> 30;
case IMPOSSIBLE -> 10;
};
} }
@Override @Override