- 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

@ -1,18 +1,25 @@
package WayofTime.bloodmagic.livingArmour.upgrade;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.livingArmour.ILivingArmour;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.util.ChatUtil;
import WayofTime.bloodmagic.util.helper.TextHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade
{
public static final int[] costs = new int[] { 20, 50, 130, 270, 450, 580, 700, 800, 900, 1000 };
public static final int[] rebirthDelay = new int[] { 20 * 60 * 60, 20 * 60 * 50, 20 * 60 * 45, 20 * 60 * 40, 20 * 60 * 30, 20 * 60 * 25, 20 * 60 * 15, 20 * 60 * 10, 20 * 60 * 5, 20 * 60 };
public static final int[] strengthDuration = new int[] { 0, 0, 100, 100, 200, 200, 200, 300, 300, 400 };
public static final int[] strengthValue = new int[] { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3 };
public static final int[] resistanceDuration = new int[] { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
public static final int[] resistanceValue = new int[] { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3 };
public static final float[] healthOnRevive = new float[] { 0.2f, 0.2f, 0.3f, 0.3f, 0.4f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f };
public int deathTimer = 0;
@ -68,7 +75,20 @@ public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade
public void applyEffectOnRebirth(EntityPlayer player)
{
player.setHealth(player.getMaxHealth());
player.setHealth(player.getMaxHealth() * healthOnRevive[this.level]);
int strDur = strengthDuration[this.level];
if (strDur > 0)
{
player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, strDur, strengthValue[this.level]));
}
int resDur = resistanceDuration[this.level];
if (resDur > 0)
{
player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, resDur, resistanceValue[this.level]));
}
deathTimer = rebirthDelay[this.level];
ChatUtil.sendNoSpam(player, TextHelper.localizeEffect(chatBase + "grimReaper"));
}