feat(gameplay): implement hook sabotage, generator kick, jump listener, and boss bar UI
- Add HookSabotage system for survivors to disable hooks temporarily - Add GeneratorKick killer ability to regress generator progress - Add PlayerJumpListener to track survivor jump actions - Add BossBarManager for displaying game state and objectives - Update generator regression logic to support killer kick mechanic - Update KillerController to integrate generator kick ability - Update PlayerInteractListener to handle new interaction types - Refactor game phases to use BossBarManager for UI updates - Update .gitignore to exclude compiled bin/ directory - Simplify PLAN.md documentation for easier maintenance
This commit is contained in:
parent
3d6204cc83
commit
89dc9eb00d
78 changed files with 2293 additions and 1210 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package dev.loki.hook;
|
||||
|
||||
import dev.loki.config.GameConfig;
|
||||
import dev.loki.mdbd;
|
||||
import dev.loki.player.PlayerState;
|
||||
import dev.loki.player.Survivor;
|
||||
|
|
@ -15,14 +16,22 @@ public class HookStruggle {
|
|||
private final TitleUI titleUI;
|
||||
private final Map<UUID, BukkitTask> struggleTasks;
|
||||
private final Map<UUID, Integer> struggleProgress;
|
||||
private static final int STRUGGLE_INTERVAL_TICKS = 40;
|
||||
private final int struggleIntervalTicks;
|
||||
private static final int STRUGGLE_WINDOW_TICKS = 20;
|
||||
|
||||
public HookStruggle(mdbd plugin, TitleUI titleUI) {
|
||||
this(plugin, titleUI, null);
|
||||
}
|
||||
|
||||
public HookStruggle(mdbd plugin, TitleUI titleUI, GameConfig config) {
|
||||
this.plugin = plugin;
|
||||
this.titleUI = titleUI;
|
||||
this.struggleTasks = new HashMap<>();
|
||||
this.struggleProgress = new HashMap<>();
|
||||
// Читаем из конфига: struggle-interval в секундах → тики
|
||||
this.struggleIntervalTicks = (config != null)
|
||||
? config.getStruggleInterval() * 20
|
||||
: 40; // дефолт 2 сек
|
||||
}
|
||||
|
||||
public void startStruggle(Survivor survivor, Hook hook) {
|
||||
|
|
@ -32,8 +41,8 @@ public class HookStruggle {
|
|||
BukkitTask task = plugin.getServer().getScheduler().runTaskTimer(
|
||||
plugin,
|
||||
() -> triggerSkillCheck(survivor, hook),
|
||||
STRUGGLE_INTERVAL_TICKS,
|
||||
STRUGGLE_INTERVAL_TICKS
|
||||
struggleIntervalTicks,
|
||||
struggleIntervalTicks
|
||||
);
|
||||
struggleTasks.put(uuid, task);
|
||||
struggleProgress.put(uuid, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue