forked from TAIGA/TAIGA
Final adjustments, 2 additional traits, 1 trait rewritten. Liquids + textures included. German and english translation added.
This commit is contained in:
@@ -19,8 +19,8 @@ public class TraitHeroic extends AbstractTrait {
|
||||
public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
|
||||
int durability = ToolHelper.getCurrentDurability(tool);
|
||||
int durabilitymax = ToolHelper.getMaxDurability(tool);
|
||||
float calc = (float) (newDamage + (newDamage / 2) / (durability * durabilitymax / (durabilitymax - durability)));
|
||||
if ((float) durability < (float) (0.12 * durabilitymax)) {
|
||||
float calc = (float) (newDamage + (newDamage / 2) / (durability * durabilitymax / (durabilitymax - durability - 1)));
|
||||
if ((float) durability < (float) (0.10 * durabilitymax) || player.getHealth() < player.getMaxHealth() / 8 || (target.getHealth() == target.getMaxHealth() && random.nextFloat() > 0.8)) {
|
||||
return super.damage(tool, player, target, damage, calc, isCritical);
|
||||
} else return super.damage(tool, player, target, damage, newDamage, isCritical);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user