Add IceMage kit and playstyle support
Introduce a new IceMage kit and wire playstyle support across the plugin. Changes include: - Add IceMageKit with aggressive/defensive active & passive abilities, item distribution, and lifecycle hooks; caches ability instances and given items to reduce allocations. - Register IceMageKit in SpeedHG on plugin startup. - Update KitCommand to require a playstyle argument, validate it, select the kit's playstyle, and provide tab-completion for playstyles. - Extend KitEventDispatcher with IceMage-specific handlers: spawn a circular volley of snowballs on ability use (cancelling the original projectile), mark spawned snowballs with persistent data, and apply freeze/slow effects on hit. - Adjust GoblinKit to use a plugin getter and make inner ability classes static to avoid capturing the outer instance. - Update language lines and plugin.yml usage to reflect the new /kit <kitName> <playstyle> usage. These changes implement the IceMage feature and ensure proper playstyle selection and event handling while keeping allocations low and behavior consistent.
This commit is contained in:
@@ -6,6 +6,7 @@ import club.mcscrims.speedhg.game.GameManager
|
||||
import club.mcscrims.speedhg.game.modules.AntiRunningManager
|
||||
import club.mcscrims.speedhg.kit.KitManager
|
||||
import club.mcscrims.speedhg.kit.impl.GoblinKit
|
||||
import club.mcscrims.speedhg.kit.impl.IceMageKit
|
||||
import club.mcscrims.speedhg.kit.listener.KitEventDispatcher
|
||||
import club.mcscrims.speedhg.listener.ConnectListener
|
||||
import club.mcscrims.speedhg.listener.GameStateListener
|
||||
@@ -53,6 +54,7 @@ class SpeedHG : JavaPlugin() {
|
||||
kitManager = KitManager( this )
|
||||
// Register kits
|
||||
kitManager.registerKit( GoblinKit() )
|
||||
kitManager.registerKit( IceMageKit() )
|
||||
|
||||
registerCommands()
|
||||
registerListener()
|
||||
|
||||
Reference in New Issue
Block a user