Allow slight configuration of Coat of Arms conversion
Gives modpacks control while still retaining a bit of balance.
This commit is contained in:
parent
b8079bb509
commit
3920e0926f
|
@ -94,6 +94,8 @@ public class ConfigHandler
|
||||||
public static boolean vanillaPotionHealthBoostEnabled;
|
public static boolean vanillaPotionHealthBoostEnabled;
|
||||||
public static boolean vanillaPotionAbsorptionEnabled;
|
public static boolean vanillaPotionAbsorptionEnabled;
|
||||||
|
|
||||||
|
public static int sacrificialPackConversion;
|
||||||
|
|
||||||
// Compat
|
// Compat
|
||||||
public static int wailaAltarDisplayMode;
|
public static int wailaAltarDisplayMode;
|
||||||
|
|
||||||
|
@ -191,6 +193,7 @@ public class ConfigHandler
|
||||||
category = "General";
|
category = "General";
|
||||||
config.addCustomCategoryComment(category, "General settings");
|
config.addCustomCategoryComment(category, "General settings");
|
||||||
BloodMagicAPI.setLoggingEnabled(config.getBoolean("enableLogging", category, true, "Allows logging information to the console. Fatal errors will bypass this"));
|
BloodMagicAPI.setLoggingEnabled(config.getBoolean("enableLogging", category, true, "Allows logging information to the console. Fatal errors will bypass this"));
|
||||||
|
sacrificialPackConversion = config.getInt("sacrificialPackConversion", category, 20, 0, 100, "Base multiplier for the Coat of Arms. DamageDealt * sacrificialPackConversion");
|
||||||
|
|
||||||
category = "Compatibility";
|
category = "Compatibility";
|
||||||
config.addCustomCategoryComment(category, "Compatibility settings");
|
config.addCustomCategoryComment(category, "Compatibility settings");
|
||||||
|
|
|
@ -18,7 +18,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator
|
public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator
|
||||||
{
|
{
|
||||||
public final int CONVERSION = 20; // How much LP per heart
|
|
||||||
public final int CAPACITY = 10000; // Max LP storage
|
public final int CAPACITY = 10000; // Max LP storage
|
||||||
|
|
||||||
public ItemPackSacrifice()
|
public ItemPackSacrifice()
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class EventHandler
|
||||||
|
|
||||||
boolean shouldSyphon = pack.getStoredLP(player.getCurrentArmor(chestIndex)) < pack.CAPACITY;
|
boolean shouldSyphon = pack.getStoredLP(player.getCurrentArmor(chestIndex)) < pack.CAPACITY;
|
||||||
float damageDone = event.entityLiving.getHealth() < event.ammount ? event.ammount - event.entityLiving.getHealth() : event.ammount;
|
float damageDone = event.entityLiving.getHealth() < event.ammount ? event.ammount - event.entityLiving.getHealth() : event.ammount;
|
||||||
int totalLP = Math.round(damageDone * pack.CONVERSION);
|
int totalLP = Math.round(damageDone * ConfigHandler.sacrificialPackConversion);
|
||||||
|
|
||||||
if (shouldSyphon)
|
if (shouldSyphon)
|
||||||
pack.addLP(player.getCurrentArmor(chestIndex), totalLP);
|
pack.addLP(player.getCurrentArmor(chestIndex), totalLP);
|
||||||
|
|
Loading…
Reference in a new issue