mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 21:54:08 +00:00
Fixes to some Logic and Debug Prints
This commit is contained in:
1 parent
efb11dd332
commit
6ad71a1ebf
5 files changed
+20
-5
No files matched your search
@@ -97,6 +97,7 @@ public class AbilityCharge extends AbilityMovement implements IAbilityCharge {
|
||||
}
|
||||
|
||||
if (movementDirection == null) {
|
||||
stopMomentum(caster);
|
||||
signalCompletion();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -173,6 +173,19 @@ public class AbilityEffect extends Ability implements IAbilityEffect {
|
||||
|
||||
if (tick >= durationTicks) {
|
||||
signalCompletion();
|
||||
return;
|
||||
}
|
||||
|
||||
// Early completion if all affected entities are dead
|
||||
boolean allDead = true;
|
||||
for (EntityLivingBase entity : getAffectedEntities()) {
|
||||
if (!entity.isDead) {
|
||||
allDead = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!getAffectedEntities().isEmpty() && allDead) {
|
||||
signalCompletion();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ public class AbilityGuard extends Ability implements IAbilityGuard {
|
||||
|
||||
if (tick >= durationTicks) {
|
||||
signalCompletion();
|
||||
return;
|
||||
}
|
||||
|
||||
// Just enough to see the counter animation
|
||||
|
||||
@@ -514,7 +514,6 @@ public class AbilitySlam extends Ability implements IAbilitySlam {
|
||||
float heightFactor = (float) Math.min(1.0, fallDistance / Math.max(1.0, leapHeight));
|
||||
heightMultiplier = Math.max(0.25f, heightFactor);
|
||||
effectiveDamage = damage * heightMultiplier;
|
||||
System.out.println("[Slam] LANDING AIR: airSlamStartY=" + airSlamStartY + " landY=" + caster.posY + " fallDist=" + fallDistance + " leapHeight=" + leapHeight + " heightFactor=" + heightFactor + " multiplier=" + heightMultiplier + " baseDmg=" + damage + " effectiveDmg=" + effectiveDamage);
|
||||
} else {
|
||||
// Ground slam: scale based on arc height reached
|
||||
double arcHeight = peakY - startY;
|
||||
@@ -523,10 +522,8 @@ public class AbilitySlam extends Ability implements IAbilitySlam {
|
||||
heightMultiplier = Math.max(0.25f, heightFactor);
|
||||
effectiveDamage = damage * heightMultiplier;
|
||||
}
|
||||
System.out.println("[Slam] LANDING GROUND: startY=" + startY + " peakY=" + peakY + " arcHeight=" + arcHeight + " leapHeight=" + leapHeight + " multiplier=" + heightMultiplier + " baseDmg=" + damage + " effectiveDmg=" + effectiveDamage);
|
||||
}
|
||||
|
||||
System.out.println("[Slam] DAMAGE MULTIPLIER SET: " + heightMultiplier);
|
||||
// Set multiplier so extenders (e.g. DBC Addon) can apply height scaling to their own damage calc
|
||||
setDamageMultiplier(heightMultiplier);
|
||||
|
||||
|
||||
@@ -153,6 +153,10 @@ public class AbilityVortex extends Ability implements IAbilityVortex {
|
||||
|
||||
boolean anyStillPulling = false;
|
||||
ticksSincePullDamage++;
|
||||
boolean shouldDealPullDamage = damageOnPull && pullDamage > 0 && ticksSincePullDamage >= 10;
|
||||
if (shouldDealPullDamage) {
|
||||
ticksSincePullDamage = 0;
|
||||
}
|
||||
|
||||
for (UUID uuid : new HashSet<>(getPulledEntities())) {
|
||||
EntityLivingBase entity = findEntity(caster, caster.worldObj, uuid);
|
||||
@@ -193,8 +197,7 @@ public class AbilityVortex extends Ability implements IAbilityVortex {
|
||||
entity.motionZ = nextZ;
|
||||
entity.velocityChanged = true;
|
||||
|
||||
if (damageOnPull && pullDamage > 0 && ticksSincePullDamage >= 10) {
|
||||
ticksSincePullDamage = 0;
|
||||
if (shouldDealPullDamage) {
|
||||
entity.hurtResistantTime = 0;
|
||||
applyAbilityDamage(caster, entity, pullDamage * 0.5f, 0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user