Add bonus special upgrade slots to non-elemental wands

This commit is contained in:
Electroblob77
2020-07-03 12:30:40 +01:00
parent 399c3017ad
commit 3f19e89b91
2 changed files with 6 additions and 1 deletions
@@ -706,7 +706,10 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
// Special upgrades
Item specialUpgrade = upgrade.getItem();
if(WandHelper.getTotalUpgrades(wand) < this.tier.upgradeLimit
int maxUpgrades = this.tier.upgradeLimit;
if(this.element == Element.MAGIC) maxUpgrades += Constants.NON_ELEMENTAL_UPGRADE_BONUS;
if(WandHelper.getTotalUpgrades(wand) < maxUpgrades
&& WandHelper.getUpgradeLevel(wand, specialUpgrade) < Constants.UPGRADE_STACK_LIMIT){
// Used to preserve existing mana when upgrading storage rather than creating free mana.