forked from TAIGA/TAIGA
general code cleanup
try and add changes generation back into gradle again
This commit is contained in:
@@ -16,7 +16,7 @@ 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 - 1)));
|
||||
float calc = 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