Added recipes to Shaped and Deforester charges.
Also fixed bug with Living Armour that prevented it from upgrading under certain conditions.
This commit is contained in:
parent
8e6f36d2a9
commit
b3af1b8e77
18 changed files with 104 additions and 37 deletions
|
@ -50,14 +50,23 @@ public class LivingUtil
|
|||
if (currentPoints >= stats.getMaxPoints())
|
||||
return stats;
|
||||
|
||||
int currentPointCost = upgrade.getLevelCost(upgrade.getLevel((int) currentExperience));
|
||||
int nextPointCost = upgrade.getLevelCost(upgrade.getLevel((int) currentExperience) + 1);
|
||||
|
||||
// System.out.println("Current point cost: " + currentPointCost + ", Next point cost: " + nextPointCost);
|
||||
// If there's no more levels in this upgrade, we don't want to add experience
|
||||
if (nextPointCost == -1)
|
||||
return stats;
|
||||
|
||||
int pointDif = nextPointCost - currentPointCost;
|
||||
if (pointDif < 0)
|
||||
{
|
||||
return stats;
|
||||
}
|
||||
|
||||
// If applying this new level will go over our cap, we don't want to add
|
||||
// experience
|
||||
if (currentPoints + nextPointCost > stats.getMaxPoints())
|
||||
if (currentPoints + pointDif > stats.getMaxPoints())
|
||||
return stats;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue