Add Custom Particle Handling and Preset Handling to Trap and Hazards

This commit is contained in:
Kam committed 2026-02-12 18:15:41 -05:00
1 parent bf3391a1a8
commit 6f9cafa141
13 files changed
+318 -79

No files matched your search

+12 -3
View File
@@ -197,8 +197,11 @@ public class DataAbilities {
telegraph.lockPosition();
}
// Remove telegraph - it has served its purpose
removeTelegraph(currentAbility);
// Remove telegraph unless the ability keeps it during active phase
// (e.g., sweeping attacks where the telegraph shows the ongoing danger zone)
if (!currentAbility.keepTelegraphDuringActive()) {
removeTelegraph(currentAbility);
}
// Handle rotation control transition from WINDUP to ACTIVE
if (currentAbility.isRotationLockedDuringActive()) {
@@ -224,7 +227,10 @@ public class DataAbilities {
}
// Play active sound and animation
playAbilitySound(currentAbility.getActiveSound());
// Abilities that keep telegraph during active manage their own sound timing
if (!currentAbility.keepTelegraphDuringActive()) {
playAbilitySound(currentAbility.getActiveSound());
}
playAbilityAnimation(currentAbility.getActiveAnimation());
// Snap NPC to face target before execute so startMoving() reads correct rotation
@@ -338,6 +344,9 @@ public class DataAbilities {
private void handleAbilityCompletion(EntityLivingBase target) {
if (currentAbility == null) return;
// Remove any remaining telegraphs (for abilities that keep telegraph during active)
removeTelegraph(currentAbility);
// Call onComplete callback
currentAbility.onComplete(npc, target);