mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 21:54:08 +00:00
Gear!
This commit is contained in:
1 parent
e3fad91547
commit
8bcdaf5f11
2 files changed
+4
-5
No files matched your search
+2
-2
@@ -29,7 +29,7 @@ public class PlayerAttributeTracker {
|
||||
private PlayerAttributeMap playerAttributes = new PlayerAttributeMap();
|
||||
|
||||
public float extraHealth = 0;
|
||||
public float maximumOutput = 0.0f;
|
||||
public float gearOutput = 0.0f;
|
||||
|
||||
public final Map<Integer, Float> magicDamage = new HashMap<>();
|
||||
public final Map<Integer, Float> magicBoost = new HashMap<>();
|
||||
@@ -116,7 +116,7 @@ public class PlayerAttributeTracker {
|
||||
}
|
||||
}
|
||||
equipmentTracker = currentEquip;
|
||||
maximumOutput = AttributeAttackUtil.calculateMaximumOutput(this);
|
||||
gearOutput = AttributeAttackUtil.calculateGearOutput(this);
|
||||
extraHealth = getAttributeValue(CustomAttributes.HEALTH);
|
||||
|
||||
updatePlayerMaxHealth(player);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package kamkeel.npcs.util;
|
||||
|
||||
import kamkeel.npcs.CustomAttributes;
|
||||
import kamkeel.npcs.controllers.AttributeController;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import kamkeel.npcs.controllers.data.attribute.tracker.PlayerAttributeTracker;
|
||||
import noppes.npcs.config.ConfigMain;
|
||||
@@ -213,7 +212,7 @@ public class AttributeAttackUtil {
|
||||
/**
|
||||
* Calculates a player's maximum output ignoring defensive modifiers.
|
||||
*/
|
||||
public static float calculateMaximumOutput(PlayerAttributeTracker attacker) {
|
||||
public static float calculateGearOutput(PlayerAttributeTracker attacker) {
|
||||
float neutralDamage = attacker.getAttributeValue(CustomAttributes.NEUTRAL_ATTACK);
|
||||
float neutralBoost = attacker.getAttributeValue(CustomAttributes.NEUTRAL_BOOST) + 1;
|
||||
float neutralTotal = neutralDamage * neutralBoost;
|
||||
@@ -239,7 +238,7 @@ public class AttributeAttackUtil {
|
||||
PlayerAttributeTracker attacker = getTracker(entityPlayer);
|
||||
float mainAttack = attacker.getAttributeValue(CustomAttributes.MAIN_ATTACK);
|
||||
float mainBoost = attacker.getAttributeValue(CustomAttributes.MAIN_BOOST) + 1;
|
||||
return attacker.maximumOutput + (baseDamage * mainBoost) + mainAttack;
|
||||
return attacker.gearOutput + (baseDamage * mainBoost) + mainAttack;
|
||||
}
|
||||
return baseDamage;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user