mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 20:49:05 +00:00
Counter, Dodge, Guard Abilities
This commit is contained in:
1 parent
fc71fb5a33
commit
b49316d9bb
7 files changed
+99
-4
No files matched your search
@@ -2,6 +2,7 @@ package noppes.npcs;
|
||||
|
||||
import kamkeel.npcs.controllers.AbilityController;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.type.AbilityDefend;
|
||||
import kamkeel.npcs.controllers.data.ability.enums.AbilityPhase;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ChainedAbility;
|
||||
import kamkeel.npcs.controllers.data.ability.data.entry.ChainedAbilityEntry;
|
||||
@@ -317,6 +318,19 @@ public abstract class AbstractDataAbilities {
|
||||
return currentAbility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the active defend ability if one is currently defending.
|
||||
*/
|
||||
public AbilityDefend getActiveDefend() {
|
||||
if (currentAbility instanceof AbilityDefend) {
|
||||
AbilityDefend defend = (AbilityDefend) currentAbility;
|
||||
if (defend.isDefending()) {
|
||||
return defend;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a chained ability is currently executing.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user