- Added a potion effect called "(-) Immunity", which allows the training of Living Armour Downgrades. This potion is crafted using a Draft of Angelus with a potion flask. Check the uses of the flask!

- Added some more framework for the Living Armour Downgrades.
- Modified the Grim Reaper's Sprint so it is better at later levels.
This commit is contained in:
WayofTime 2016-10-02 15:03:31 -04:00
parent e5276fba6f
commit 6ea17510b7
12 changed files with 348 additions and 11 deletions

View file

@ -20,6 +20,7 @@ import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.api.livingArmour.StatTracker;
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
import WayofTime.bloodmagic.registry.ModPotions;
import WayofTime.bloodmagic.util.ChatUtil;
import WayofTime.bloodmagic.util.helper.TextHelper;
@ -108,7 +109,7 @@ public class LivingArmour implements ILivingArmour
if (nextLevel > currentLevel)
{
int upgradePointDifference = upgrade.getCostOfUpgrade() - upgradeMap.get(key).getCostOfUpgrade();
if (upgradePointDifference >= 0 && totalUpgradePoints + upgradePointDifference <= maxUpgradePoints)
if (Math.abs(upgradePointDifference) >= 0 && totalUpgradePoints + upgradePointDifference <= maxUpgradePoints)
{
upgradeMap.put(key, upgrade);
totalUpgradePoints += upgradePointDifference;
@ -190,6 +191,8 @@ public class LivingArmour implements ILivingArmour
}
}
boolean allowOnlyDowngrades = player.isPotionActive(ModPotions.immuneSuppress);
for (Entry<String, StatTracker> entry : trackerMap.entrySet())
{
StatTracker tracker = entry.getValue();
@ -219,6 +222,12 @@ public class LivingArmour implements ILivingArmour
}
}
if ((allowOnlyDowngrades != tracker.isTrackerDowngrade()))
{
tracker.onDeactivatedTick(world, player, this);
continue;
}
if (tracker.onTick(world, player, this))
{
List<LivingArmourUpgrade> upgradeList = tracker.getUpgrades();