Bugs fixes to Abilities

- Add Hit Scan to Laser
- Switching Dimensions Ability fix
- Chained Ability Targeting Conditions Fix
- Chained Ability Previewing
- Lang Keys Added
This commit is contained in:
Kam committed 2026-02-18 14:10:55 -05:00
1 parent 1569204d83
commit 48f6c162d5
9 files changed
+343 -76

No files matched your search

@@ -581,6 +581,51 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
interruptCurrentAbility(null, 0);
}
// ═══════════════════════════════════════════════════════════════════
// DIMENSION CHANGE RESET
// ═══════════════════════════════════════════════════════════════════
/**
* Fully reset ability state when changing dimensions.
* Unlike interruptCurrentAbility(), this does NOT roll any cooldowns
* and ensures the player can immediately use abilities in the new dimension.
* Also re-syncs to client since the entity may be re-created.
*/
public void resetOnDimensionChange() {
// Clean up any executing ability without rolling cooldowns
if (currentAbility != null && currentAbility.isExecuting()) {
removeTelegraph(currentAbility);
currentAbility.cleanup();
currentAbility.interrupt();
stopAbilityAnimation();
releaseRotationControl();
releaseLockedPosition();
}
// Clear chain state
currentChain = null;
chainEntryIndex = -1;
chainDelayRemaining = -1;
// Clear all transient state
currentAbility = null;
currentAbilityKey = null;
currentTarget = null;
// Reset cooldowns completely
cooldownEndTime = 0;
interruptCooldownRolled = false;
// Sync cleared state to client
EntityPlayer player = playerData.player;
if (player != null) {
syncAbilityStateClear(player);
}
// Re-sync ability data (unlocked list, selection) to client
syncToClient();
}
// ═══════════════════════════════════════════════════════════════════
// DAMAGE HANDLING
// ═══════════════════════════════════════════════════════════════════