mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
- Extend Energy Projectile Distance to 150 by Default
- Fix a bug with Wheel not Clearing for Adding / Removing Abilities - Fix a bug not being able to resolve Built In Abilities - Fix a Chained Ability Windup System
This commit is contained in:
1 parent
1de1c4e710
commit
1569204d83
7 files changed
+15
-8
No files matched your search
@@ -653,13 +653,20 @@ public class AbilityController implements IAbilityHandler {
|
||||
Ability builtIn = builtAbilities.get(key);
|
||||
if (builtIn != null) return builtIn.deepCopy();
|
||||
|
||||
// Built-in: case-insensitive name
|
||||
// Built-in: case-insensitive map key
|
||||
for (Map.Entry<String, Ability> entry : builtAbilities.entrySet()) {
|
||||
if (entry.getKey().equalsIgnoreCase(key)) {
|
||||
return entry.getValue().deepCopy();
|
||||
}
|
||||
}
|
||||
|
||||
// Built-in: by ability name (name may differ from map key, e.g. "Ki Fist" vs "ki_fist")
|
||||
for (Ability ability : builtAbilities.values()) {
|
||||
if (ability.getName() != null && ability.getName().equalsIgnoreCase(key)) {
|
||||
return ability.deepCopy();
|
||||
}
|
||||
}
|
||||
|
||||
// Built-in: registry key / ID
|
||||
for (Ability ability : builtAbilities.values()) {
|
||||
if (ability.getId() != null && ability.getId().equalsIgnoreCase(key)) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import noppes.npcs.api.ability.data.IEnergyLifespanData;
|
||||
* Used as a parameter object for entity constructors and ability configuration.
|
||||
*/
|
||||
public class EnergyLifespanData implements IEnergyLifespanData {
|
||||
public float maxDistance = 30.0f;
|
||||
public float maxDistance = 150.0f;
|
||||
public int maxLifetime = 200;
|
||||
|
||||
public EnergyLifespanData() {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AbilityBeam extends AbilityEnergyProjectile<EntityAbilityBeam> impl
|
||||
new EnergyDisplayData(0xFFFFFF, 0x00AAFF, true, 0.4f, 0.5f, 6.0f),
|
||||
new EnergyCombatData(10.0f, 1.5f, 0.2f, false, 4.0f, 0.5f),
|
||||
new EnergyHomingData(0.4f, true, 0.1f, 15.0f),
|
||||
new EnergyLifespanData(25.0f, 200)
|
||||
new EnergyLifespanData(150.0f, 200)
|
||||
);
|
||||
this.typeId = "ability.cnpc.beam";
|
||||
this.name = "Beam";
|
||||
|
||||
@@ -40,7 +40,7 @@ public class AbilityDisc extends AbilityEnergyProjectile<EntityAbilityDisc> impl
|
||||
new EnergyDisplayData(0xFFFFFF, 0xFF8800, true, 0.4f, 0.5f, 5.0f),
|
||||
new EnergyCombatData(8.0f, 1.2f, 0.15f, false, 3.0f, 0.5f),
|
||||
new EnergyHomingData(0.6f, true, 0.12f, 18.0f),
|
||||
new EnergyLifespanData(35.0f, 200)
|
||||
new EnergyLifespanData(150.0f, 200)
|
||||
);
|
||||
this.typeId = "ability.cnpc.disc";
|
||||
this.name = "Disc";
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class AbilityLaserShot extends AbilityEnergyProjectile<EntityAbilityLaser
|
||||
new EnergyDisplayData(0xFFFFFF, 0xFF0000, true, 0.4f, 0.5f, 0.0f),
|
||||
new EnergyCombatData(6.0f, 0.5f, 0.05f, false, 2.0f, 0.5f),
|
||||
new EnergyHomingData(),
|
||||
new EnergyLifespanData(40.0f, 100)
|
||||
new EnergyLifespanData(150.0f, 100)
|
||||
);
|
||||
this.typeId = "ability.cnpc.laser_shot";
|
||||
this.name = "Laser Shot";
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AbilitySlicer extends AbilityEnergyProjectile<EntityEnergySlicer> {
|
||||
new EnergyDisplayData(0xFF4444, 0xFF0000, true, 0.2f, 0.6f, 0.0f),
|
||||
new EnergyCombatData(12.0f, 0.5f, 0.0f, false, 3.0f, 0.5f),
|
||||
new EnergyHomingData(0.8f, false, 0.0f, 0.0f),
|
||||
new EnergyLifespanData(40.0f, 100)
|
||||
new EnergyLifespanData(150.0f, 100)
|
||||
);
|
||||
this.typeId = "ability.cnpc.slicer";
|
||||
this.name = "Slicer";
|
||||
|
||||
@@ -861,8 +861,8 @@ public abstract class AbstractDataAbilities {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If windUpAll=false, force windup to 0 (skip individual windups)
|
||||
if (!currentChain.isWindUpAll()) {
|
||||
// If windUpAll=false, only the first ability windups; subsequent abilities skip windup
|
||||
if (!currentChain.isWindUpAll() && chainEntryIndex > 0) {
|
||||
ability.setWindUpTicks(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user