Burst and Dual Mode + Variant Ability Support

This commit is contained in:
Kam committed 2026-02-06 20:25:52 -05:00
1 parent af02b0ab1d
commit 74cae17ebd
27 files changed
+2055 -2982

No files matched your search

@@ -0,0 +1,39 @@
package kamkeel.npcs.controllers.data.ability;
import java.util.function.Consumer;
/**
* Represents a variant/template for an ability type.
* When a user creates an ability that has registered variants,
* they are presented with a selection dialog before the ability is created.
*
* Each variant has a display name (lang key) and a configurator that
* applies preset values to the newly created ability.
*/
public class AbilityVariant {
private final String displayKey;
private final Consumer<Ability> configurator;
/**
* @param displayKey Lang key for the variant display name (e.g., "ability.variant.dual")
* @param configurator Lambda that configures the ability with preset values
*/
public AbilityVariant(String displayKey, Consumer<Ability> configurator) {
this.displayKey = displayKey;
this.configurator = configurator;
}
public String getDisplayKey() {
return displayKey;
}
/**
* Apply this variant's preset configuration to the given ability.
*/
public void apply(Ability ability) {
if (configurator != null) {
configurator.accept(ability);
}
}
}