mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-18 10:19:13 +00:00
IAbilityAction for Abilities and Chained Actions
This commit is contained in:
1 parent
010849fe8f
commit
28c0ca840f
4 files changed
+77
-1
No files matched your search
@@ -6,7 +6,7 @@ import noppes.npcs.api.INbt;
|
||||
* Interface for NPC abilities.
|
||||
* Abilities are special attacks or actions that NPCs can perform during combat.
|
||||
*/
|
||||
public interface IAbility {
|
||||
public interface IAbility extends IAbilityAction {
|
||||
|
||||
/**
|
||||
* Get the unique ID (UUID for custom abilities, registry key for built-in).
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package noppes.npcs.api.ability;
|
||||
|
||||
/**
|
||||
* Common API interface for all combat actions (abilities and chained abilities).
|
||||
* Both {@link IAbility} and {@link IChainedAbility} extend this interface.
|
||||
*/
|
||||
public interface IAbilityAction {
|
||||
|
||||
String getName();
|
||||
|
||||
boolean isEnabled();
|
||||
|
||||
int getWeight();
|
||||
|
||||
int getCooldownTicks();
|
||||
|
||||
float getMinRange();
|
||||
|
||||
float getMaxRange();
|
||||
|
||||
/**
|
||||
* Whether this action is a chained ability (sequence) vs an individual ability.
|
||||
*/
|
||||
boolean isChain();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package noppes.npcs.api.ability;
|
||||
|
||||
/**
|
||||
* API interface for chained abilities - ordered sequences of ability references
|
||||
* that execute one after another with configurable delays.
|
||||
*/
|
||||
public interface IChainedAbility extends IAbilityAction {
|
||||
|
||||
boolean isWindUpAll();
|
||||
|
||||
int getEntryCount();
|
||||
|
||||
String getEntryReference(int index);
|
||||
|
||||
int getEntryDelay(int index);
|
||||
|
||||
boolean isEntryInline(int index);
|
||||
}
|
||||
Reference in new issue
Block a user