Added self-sacrifice upgrade to living armour.
This commit is contained in:
parent
dceec15750
commit
b74ed8d431
|
@ -4,6 +4,7 @@ Version 2.0.0-3
|
||||||
- Fixed client-side issue when shift-clicking lava crystals into a furnace while on a server.
|
- Fixed client-side issue when shift-clicking lava crystals into a furnace while on a server.
|
||||||
- Added poison upgrade to Living Armour
|
- Added poison upgrade to Living Armour
|
||||||
- Fixed digging upgrade
|
- Fixed digging upgrade
|
||||||
|
- Added self sacrifice upgrade to Living Armour (Tough Palms)
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
|
@ -9,14 +9,16 @@ public class SacrificeKnifeUsedEvent extends Event
|
||||||
{
|
{
|
||||||
public final EntityPlayer player;
|
public final EntityPlayer player;
|
||||||
public final int healthDrained;
|
public final int healthDrained;
|
||||||
|
public int lpAdded;
|
||||||
public boolean shouldDrainHealth;
|
public boolean shouldDrainHealth;
|
||||||
public boolean shouldFillAltar;
|
public boolean shouldFillAltar;
|
||||||
|
|
||||||
public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp)
|
public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp, int lpAdded)
|
||||||
{
|
{
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.shouldDrainHealth = shouldDrainHealth;
|
this.shouldDrainHealth = shouldDrainHealth;
|
||||||
this.shouldFillAltar = shouldFillAltar;
|
this.shouldFillAltar = shouldFillAltar;
|
||||||
this.healthDrained = hp;
|
this.healthDrained = hp;
|
||||||
|
this.lpAdded = lpAdded;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,33 +1,30 @@
|
||||||
package WayofTime.bloodmagic.item;
|
package WayofTime.bloodmagic.item;
|
||||||
|
|
||||||
import WayofTime.bloodmagic.BloodMagic;
|
import java.util.Arrays;
|
||||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
import java.util.List;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
|
||||||
import WayofTime.bloodmagic.api.DamageSourceBloodMagic;
|
|
||||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
|
||||||
import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent;
|
|
||||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
|
||||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
|
||||||
import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper;
|
|
||||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.EnumParticleTypes;
|
import net.minecraft.util.EnumParticleTypes;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import WayofTime.bloodmagic.BloodMagic;
|
||||||
import java.util.Arrays;
|
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||||
import java.util.List;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||||
|
import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent;
|
||||||
|
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||||
|
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||||
|
import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper;
|
||||||
|
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||||
|
|
||||||
public class ItemSacrificialDagger extends Item
|
public class ItemSacrificialDagger extends Item
|
||||||
{
|
{
|
||||||
|
@ -94,9 +91,11 @@ public class ItemSacrificialDagger extends Item
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lpAdded = 200;
|
||||||
|
|
||||||
if (!player.capabilities.isCreativeMode)
|
if (!player.capabilities.isCreativeMode)
|
||||||
{
|
{
|
||||||
SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2);
|
SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2, lpAdded);
|
||||||
if (MinecraftForge.EVENT_BUS.post(evt))
|
if (MinecraftForge.EVENT_BUS.post(evt))
|
||||||
return stack;
|
return stack;
|
||||||
|
|
||||||
|
@ -108,6 +107,8 @@ public class ItemSacrificialDagger extends Item
|
||||||
|
|
||||||
if (!evt.shouldFillAltar)
|
if (!evt.shouldFillAltar)
|
||||||
return stack;
|
return stack;
|
||||||
|
|
||||||
|
lpAdded = evt.lpAdded;
|
||||||
}
|
}
|
||||||
|
|
||||||
double posX = player.posX;
|
double posX = player.posX;
|
||||||
|
@ -126,7 +127,7 @@ public class ItemSacrificialDagger extends Item
|
||||||
return stack;
|
return stack;
|
||||||
|
|
||||||
// TODO - Check if SoulFray is active
|
// TODO - Check if SoulFray is active
|
||||||
findAndFillAltar(world, player, 200);
|
findAndFillAltar(world, player, lpAdded);
|
||||||
|
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ItemLivingArmour extends ItemArmor
|
||||||
{
|
{
|
||||||
if (this == ModItems.livingArmourChest)
|
if (this == ModItems.livingArmourChest)
|
||||||
{
|
{
|
||||||
LivingArmour armour = this.getLivingArmour(stack);
|
LivingArmour armour = getLivingArmour(stack);
|
||||||
for (Entry<String, LivingArmourUpgrade> entry : armour.upgradeMap.entrySet())
|
for (Entry<String, LivingArmourUpgrade> entry : armour.upgradeMap.entrySet())
|
||||||
{
|
{
|
||||||
LivingArmourUpgrade upgrade = entry.getValue();
|
LivingArmourUpgrade upgrade = entry.getValue();
|
||||||
|
@ -117,7 +117,7 @@ public class ItemLivingArmour extends ItemArmor
|
||||||
return super.getUnlocalizedName(stack) + names[armorType];
|
return super.getUnlocalizedName(stack) + names[armorType];
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingArmour getLivingArmour(ItemStack stack)
|
public static LivingArmour getLivingArmour(ItemStack stack)
|
||||||
{
|
{
|
||||||
NBTTagCompound livingTag = getArmourTag(stack);
|
NBTTagCompound livingTag = getArmourTag(stack);
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ public class ItemLivingArmour extends ItemArmor
|
||||||
setArmourTag(stack, livingTag);
|
setArmourTag(stack, livingTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagCompound getArmourTag(ItemStack stack)
|
public static NBTTagCompound getArmourTag(ItemStack stack)
|
||||||
{
|
{
|
||||||
if (!stack.hasTagCompound())
|
if (!stack.hasTagCompound())
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ public class ItemLivingArmour extends ItemArmor
|
||||||
tag.setTag(Constants.NBT.LIVING_ARMOUR, livingTag);
|
tag.setTag(Constants.NBT.LIVING_ARMOUR, livingTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingArmourUpgrade getUpgrade(String uniqueIdentifier, ItemStack stack)
|
public static LivingArmourUpgrade getUpgrade(String uniqueIdentifier, ItemStack stack)
|
||||||
{
|
{
|
||||||
if (!armourMap.containsKey(stack))
|
if (!armourMap.containsKey(stack))
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
package WayofTime.bloodmagic.livingArmour;
|
||||||
|
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||||
|
|
||||||
|
public class LivingArmourUpgradeSelfSacrifice extends LivingArmourUpgrade
|
||||||
|
{
|
||||||
|
public static final int[] costs = new int[] { 10, 25, 50, 80, 120 };
|
||||||
|
public static final double[] sacrificeModifier = new double[] { 0.2, 0.4, 0.6, 0.8, 1.0 };
|
||||||
|
|
||||||
|
public LivingArmourUpgradeSelfSacrifice(int level)
|
||||||
|
{
|
||||||
|
super(level);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getSacrificeModifier()
|
||||||
|
{
|
||||||
|
return sacrificeModifier[this.level];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUniqueIdentifier()
|
||||||
|
{
|
||||||
|
return Constants.Mod.MODID + ".upgrade.selfSacrifice";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxTier()
|
||||||
|
{
|
||||||
|
return 5; // Set to here until I can add more upgrades to it.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCostOfUpgrade()
|
||||||
|
{
|
||||||
|
return costs[this.level];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
// EMPTY
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
// EMPTY
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName()
|
||||||
|
{
|
||||||
|
return tooltipBase + "selfSacrifice";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
package WayofTime.bloodmagic.livingArmour;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||||
|
import WayofTime.bloodmagic.api.livingArmour.StatTracker;
|
||||||
|
|
||||||
|
public class StatTrackerSelfSacrifice extends StatTracker
|
||||||
|
{
|
||||||
|
public static HashMap<LivingArmour, Integer> changeMap = new HashMap<LivingArmour, Integer>();
|
||||||
|
public static int[] sacrificesRequired = new int[] { 50, 200, 400, 600, 800 }; //testing
|
||||||
|
|
||||||
|
public int totalSacrifices = 0;
|
||||||
|
|
||||||
|
public static void incrementCounter(LivingArmour armour)
|
||||||
|
{
|
||||||
|
changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + 1 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUniqueIdentifier()
|
||||||
|
{
|
||||||
|
return Constants.Mod.MODID + ".tracker.selfSacrifice";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resetTracker()
|
||||||
|
{
|
||||||
|
this.totalSacrifices = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
totalSacrifices = tag.getInteger(Constants.Mod.MODID + ".tracker.selfSacrifice");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
tag.setInteger(Constants.Mod.MODID + ".tracker.selfSacrifice", totalSacrifices);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour)
|
||||||
|
{
|
||||||
|
if (changeMap.containsKey(livingArmour))
|
||||||
|
{
|
||||||
|
int change = Math.abs(changeMap.get(livingArmour));
|
||||||
|
if (change > 0)
|
||||||
|
{
|
||||||
|
totalSacrifices += Math.abs(changeMap.get(livingArmour));
|
||||||
|
|
||||||
|
changeMap.put(livingArmour, 0);
|
||||||
|
|
||||||
|
this.markDirty();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LivingArmourUpgrade> getUpgrades()
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
List<LivingArmourUpgrade> upgradeList = new ArrayList<LivingArmourUpgrade>();
|
||||||
|
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
if (totalSacrifices > sacrificesRequired[i])
|
||||||
|
{
|
||||||
|
upgradeList.add(new LivingArmourUpgradeSelfSacrifice(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return upgradeList;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,10 +3,12 @@ package WayofTime.bloodmagic.registry;
|
||||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
|
||||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeDigging;
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeDigging;
|
||||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradePoisonResist;
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradePoisonResist;
|
||||||
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeSelfSacrifice;
|
||||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeSpeed;
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeSpeed;
|
||||||
import WayofTime.bloodmagic.livingArmour.StatTrackerDigging;
|
import WayofTime.bloodmagic.livingArmour.StatTrackerDigging;
|
||||||
import WayofTime.bloodmagic.livingArmour.StatTrackerMovement;
|
import WayofTime.bloodmagic.livingArmour.StatTrackerMovement;
|
||||||
import WayofTime.bloodmagic.livingArmour.StatTrackerPoison;
|
import WayofTime.bloodmagic.livingArmour.StatTrackerPoison;
|
||||||
|
import WayofTime.bloodmagic.livingArmour.StatTrackerSelfSacrifice;
|
||||||
|
|
||||||
public class ModArmourTrackers
|
public class ModArmourTrackers
|
||||||
{
|
{
|
||||||
|
@ -15,9 +17,11 @@ public class ModArmourTrackers
|
||||||
LivingArmourHandler.registerStatTracker(StatTrackerMovement.class);
|
LivingArmourHandler.registerStatTracker(StatTrackerMovement.class);
|
||||||
LivingArmourHandler.registerStatTracker(StatTrackerDigging.class);
|
LivingArmourHandler.registerStatTracker(StatTrackerDigging.class);
|
||||||
LivingArmourHandler.registerStatTracker(StatTrackerPoison.class);
|
LivingArmourHandler.registerStatTracker(StatTrackerPoison.class);
|
||||||
|
LivingArmourHandler.registerStatTracker(StatTrackerSelfSacrifice.class);
|
||||||
|
|
||||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSpeed(1));
|
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSpeed(0));
|
||||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeDigging(0));
|
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeDigging(0));
|
||||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradePoisonResist(0));
|
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradePoisonResist(0));
|
||||||
|
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSelfSacrifice(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,9 @@ import WayofTime.bloodmagic.ConfigHandler;
|
||||||
import WayofTime.bloodmagic.api.BlockStack;
|
import WayofTime.bloodmagic.api.BlockStack;
|
||||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent;
|
||||||
import WayofTime.bloodmagic.api.event.TeleposeEvent;
|
import WayofTime.bloodmagic.api.event.TeleposeEvent;
|
||||||
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||||
import WayofTime.bloodmagic.block.BlockAltar;
|
import WayofTime.bloodmagic.block.BlockAltar;
|
||||||
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
||||||
|
@ -24,7 +26,9 @@ import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
||||||
import WayofTime.bloodmagic.item.gear.ItemPackSacrifice;
|
import WayofTime.bloodmagic.item.gear.ItemPackSacrifice;
|
||||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeDigging;
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeDigging;
|
||||||
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgradeSelfSacrifice;
|
||||||
import WayofTime.bloodmagic.livingArmour.StatTrackerDigging;
|
import WayofTime.bloodmagic.livingArmour.StatTrackerDigging;
|
||||||
|
import WayofTime.bloodmagic.livingArmour.StatTrackerSelfSacrifice;
|
||||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||||
import WayofTime.bloodmagic.registry.ModItems;
|
import WayofTime.bloodmagic.registry.ModItems;
|
||||||
import WayofTime.bloodmagic.util.ChatUtil;
|
import WayofTime.bloodmagic.util.ChatUtil;
|
||||||
|
@ -113,6 +117,15 @@ public class EventHandler
|
||||||
EntityPlayer player = event.getPlayer();
|
EntityPlayer player = event.getPlayer();
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
ItemStack stack = player.getCurrentArmor(i);
|
||||||
|
if (stack == null || !(stack.getItem() instanceof ItemLivingArmour))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack chestStack = player.getCurrentArmor(2);
|
ItemStack chestStack = player.getCurrentArmor(2);
|
||||||
if (chestStack != null && chestStack.getItem() instanceof ItemLivingArmour)
|
if (chestStack != null && chestStack.getItem() instanceof ItemLivingArmour)
|
||||||
{
|
{
|
||||||
|
@ -126,4 +139,34 @@ public class EventHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void selfSacrificeEvent(SacrificeKnifeUsedEvent event)
|
||||||
|
{
|
||||||
|
EntityPlayer player = event.player;
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
ItemStack stack = player.getCurrentArmor(i);
|
||||||
|
if (stack == null || !(stack.getItem() instanceof ItemLivingArmour))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack chestStack = player.getCurrentArmor(2);
|
||||||
|
LivingArmour armour = ItemLivingArmour.armourMap.get(chestStack);
|
||||||
|
if (armour != null)
|
||||||
|
{
|
||||||
|
StatTrackerSelfSacrifice.incrementCounter(armour);
|
||||||
|
LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.selfSacrifice", chestStack);
|
||||||
|
|
||||||
|
if (upgrade instanceof LivingArmourUpgradeSelfSacrifice)
|
||||||
|
{
|
||||||
|
double modifier = ((LivingArmourUpgradeSelfSacrifice) upgrade).getSacrificeModifier();
|
||||||
|
|
||||||
|
event.lpAdded = (int) (event.lpAdded * (1 + modifier));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,6 +226,7 @@ tooltip.BloodMagic.telepositionFocus.demonic=Used to move blocks in the world
|
||||||
tooltip.BloodMagic.livingArmour.upgrade.speed=Quick Feet
|
tooltip.BloodMagic.livingArmour.upgrade.speed=Quick Feet
|
||||||
tooltip.BloodMagic.livingArmour.upgrade.digging=Dwarven Might
|
tooltip.BloodMagic.livingArmour.upgrade.digging=Dwarven Might
|
||||||
tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Poison Resistance
|
tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Poison Resistance
|
||||||
|
tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Tough Palms
|
||||||
tooltip.BloodMagic.livingArmour.upgrade.level=(Level %d)
|
tooltip.BloodMagic.livingArmour.upgrade.level=(Level %d)
|
||||||
|
|
||||||
# Ritual
|
# Ritual
|
||||||
|
|
Loading…
Reference in a new issue