aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-11-11 23:18:02 +1000
committerAlkalus <draknyte1@hotmail.com>2017-11-11 23:18:02 +1000
commit9a0083c498a8014286fec71683c53b9ec797ee47 (patch)
treeb7098738737d53f6af9da14b4a948975c1e5c1e0 /src/Java/gtPlusPlus/core/item
parentb9168d6c0d36a0bc3aa1dab551f2bd2fdda1dc9b (diff)
downloadGT5-Unofficial-9a0083c498a8014286fec71683c53b9ec797ee47.tar.gz
GT5-Unofficial-9a0083c498a8014286fec71683c53b9ec797ee47.tar.bz2
GT5-Unofficial-9a0083c498a8014286fec71683c53b9ec797ee47.zip
$ Fixed HP boost not applying properly.
$ Fixed modifiers not stacking properly.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r--src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java b/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java
index ec3d9dca43..f20cfefb5e 100644
--- a/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java
+++ b/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java
@@ -9,6 +9,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.nbt.ModularArmourUtils;
import gtPlusPlus.core.util.nbt.ModularArmourUtils.BT;
import gtPlusPlus.core.util.nbt.ModularArmourUtils.Modifiers;
@@ -72,7 +73,7 @@ public class ModularBauble extends BaseBauble{
}
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0){
- if (mStatlevel > 0 && mStatlevel < 20){
+ /*if (mStatlevel > 0 && mStatlevel < 20){
attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "HP"+mStatlevel, 15, 0));
}
else if (mStatlevel > 20 && mStatlevel < 45){
@@ -86,7 +87,19 @@ public class ModularBauble extends BaseBauble{
}
else if (mStatlevel >= 100){
attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "HP"+mStatlevel, 40, 0));
- }
+ }*/
+
+ if (mStatlevel > 0 && mStatlevel <= 100){
+ int bonus = (int) (mStatlevel/5);
+ attributes.put(
+ SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),
+ new AttributeModifier(
+ getBaubleUUID(stack),
+ "HP"+mStatlevel,
+ bonus*2,
+ 0));
+ }
+
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0){
if (mStatlevel > 0 && mStatlevel < 20){
@@ -136,7 +149,7 @@ public class ModularBauble extends BaseBauble{
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0){
- list.add(EnumChatFormatting.GRAY+"Health Boost: "+EnumChatFormatting.RED+mStatlevel+EnumChatFormatting.GRAY+"/100.");
+ list.add(EnumChatFormatting.GRAY+"Health Boost: "+EnumChatFormatting.RED+mStatlevel+EnumChatFormatting.GRAY+"/100. Bonus "+((int) mStatlevel/5)+" hearts.");
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0){
list.add(EnumChatFormatting.GRAY+"Speed Boost: "+EnumChatFormatting.WHITE+mStatlevel+EnumChatFormatting.GRAY+"/100.");