Added Fire Resistance Living Armour Upgrade, "Gift of Ignis."
This commit is contained in:
parent
f864cbddf1
commit
6aff707708
|
@ -5,6 +5,7 @@ Version 2.0.2-45
|
|||
- Fixed the Routing system so that it properly eliminates the connection to the Master node when the Master node is broken.
|
||||
- Fixed an issue where the Spectral Blocks (from the Sigil of Suppression) would return the liquid on the client side before the sigil was deactivated.
|
||||
- Made it so that the bound tools are (supposedly more so) unbreakable. This will probably come bite me on the ehem later, but we'll see.
|
||||
- Added Fire Resistance Living Armour Upgrade, "Gift of Ignis."
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.2-44
|
||||
|
|
|
@ -87,6 +87,7 @@ public class Constants
|
|||
public static final String HELD_DOWN = "heldDown";
|
||||
|
||||
public static final String UPGRADE_POISON_TIMER = "poisonTimer";
|
||||
public static final String UPGRADE_FIRE_TIMER = "fireTimer";
|
||||
|
||||
public static final String SOULS = "souls";
|
||||
public static final String SOUL_SWORD_DAMAGE = "soulSwordDamage";
|
||||
|
@ -173,8 +174,12 @@ public class Constants
|
|||
BOUND_PICKAXE("ItemBoundPickaxe"),
|
||||
BOUND_SHOVEL("ItemBoundShovel"),
|
||||
BOUND_SWORD("ItemBoundSword"),
|
||||
/** @deprecated - Use {@code UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, BloodMagicAPI.getLifeEssence())} **/
|
||||
@Deprecated BUCKET_ESSENCE("ItemBucketEssence"),
|
||||
/**
|
||||
* @deprecated - Use
|
||||
* {@code UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, BloodMagicAPI.getLifeEssence())}
|
||||
**/
|
||||
@Deprecated
|
||||
BUCKET_ESSENCE("ItemBucketEssence"),
|
||||
COMPONENT("ItemComponent"),
|
||||
CUTTING_FLUID("ItemCuttingFluid"),
|
||||
DEMON_CRYSTAL("ItemDemonCrystal"),
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
package WayofTime.bloodmagic.livingArmour.tracker;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||
import WayofTime.bloodmagic.api.livingArmour.StatTracker;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFireResist;
|
||||
|
||||
public class StatTrackerFireResist extends StatTracker
|
||||
{
|
||||
public int totalFireTicks = 0;
|
||||
|
||||
public static int[] fireTicksRequired = new int[] { 60 * 20, 3 * 60 * 20, 10 * 60 * 20, 20 * 60 * 20, 25 * 60 * 20 };
|
||||
|
||||
@Override
|
||||
public String getUniqueIdentifier()
|
||||
{
|
||||
return Constants.Mod.MODID + ".tracker.fire";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetTracker()
|
||||
{
|
||||
this.totalFireTicks = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag)
|
||||
{
|
||||
totalFireTicks = tag.getInteger(Constants.Mod.MODID + ".tracker.fire");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag)
|
||||
{
|
||||
tag.setInteger(Constants.Mod.MODID + ".tracker.fire", totalFireTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour)
|
||||
{
|
||||
if (player.isBurning())
|
||||
{
|
||||
totalFireTicks++;
|
||||
this.markDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LivingArmourUpgrade> getUpgrades()
|
||||
{
|
||||
List<LivingArmourUpgrade> upgradeList = new ArrayList<LivingArmourUpgrade>();
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (totalFireTicks >= fireTicksRequired[i])
|
||||
{
|
||||
upgradeList.add(new LivingArmourUpgradeFireResist(i));
|
||||
}
|
||||
}
|
||||
|
||||
return upgradeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean providesUpgrade(String key)
|
||||
{
|
||||
return key.equals(Constants.Mod.MODID + ".upgrade.fireResist");
|
||||
}
|
||||
}
|
|
@ -67,7 +67,7 @@ public class StatTrackerPoison extends StatTracker
|
|||
{
|
||||
List<LivingArmourUpgrade> upgradeList = new ArrayList<LivingArmourUpgrade>();
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (totalPoisonTicks >= poisonTicksRequired[i])
|
||||
{
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
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;
|
||||
|
||||
public class LivingArmourUpgradeFireResist extends LivingArmourUpgrade
|
||||
{
|
||||
public static final int[] costs = new int[] { 2, 6, 14, 25, 40 };
|
||||
public static final int[] fireCooldownTime = new int[] { 5 * 60 * 20, 5 * 60 * 20, 4 * 60 * 20, 3 * 60 * 20, 2 * 60 * 20 };
|
||||
public static final int[] fireResistDuration = new int[] { 30 * 20, 30 * 20, 40 * 20, 50 * 20, 60 * 20 };
|
||||
|
||||
public int fireCooldown = 0;
|
||||
|
||||
public LivingArmourUpgradeFireResist(int level)
|
||||
{
|
||||
super(level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour)
|
||||
{
|
||||
if (player.isBurning() && fireCooldown <= 0)
|
||||
{
|
||||
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistDuration[this.level]));
|
||||
fireCooldown = fireCooldownTime[this.level];
|
||||
|
||||
ChatUtil.sendNoSpam(player, TextHelper.localizeEffect(chatBase + "fireRemove"));
|
||||
|
||||
} else if (fireCooldown > 0)
|
||||
{
|
||||
fireCooldown--;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueIdentifier()
|
||||
{
|
||||
return Constants.Mod.MODID + ".upgrade.fireResist";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxTier()
|
||||
{
|
||||
return 5; // Set to here until I can add more upgrades to it.
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCostOfUpgrade()
|
||||
{
|
||||
return costs[this.level];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag)
|
||||
{
|
||||
tag.setInteger(Constants.NBT.UPGRADE_FIRE_TIMER, fireCooldown);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag)
|
||||
{
|
||||
fireCooldown = tag.getInteger(Constants.NBT.UPGRADE_FIRE_TIMER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return tooltipBase + "fireResist";
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerCriticalStrike;
|
|||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerDigging;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerExperience;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFallProtect;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFireResist;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFood;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGraveDigger;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGrimReaperSprint;
|
||||
|
@ -25,6 +26,7 @@ import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeDigging;
|
|||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeElytra;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeExperience;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFallProtect;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFireResist;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGraveDigger;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGrimReaperSprint;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeHealthboost;
|
||||
|
@ -61,6 +63,7 @@ public class ModArmourTrackers
|
|||
LivingArmourHandler.registerStatTracker(StatTrackerStepAssist.class);
|
||||
LivingArmourHandler.registerStatTracker(StatTrackerSprintAttack.class);
|
||||
LivingArmourHandler.registerStatTracker(StatTrackerCriticalStrike.class);
|
||||
LivingArmourHandler.registerStatTracker(StatTrackerFireResist.class);
|
||||
|
||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSpeed(0));
|
||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeDigging(0));
|
||||
|
@ -81,5 +84,6 @@ public class ModArmourTrackers
|
|||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSprintAttack(0));
|
||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeCriticalStrike(0));
|
||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeElytra(0));
|
||||
LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeFireResist(0));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -345,6 +345,7 @@ tooltip.BloodMagic.telepositionFocus.demonic=Used to move blocks in the world
|
|||
tooltip.BloodMagic.livingArmour.upgrade.speed=Quick Feet
|
||||
tooltip.BloodMagic.livingArmour.upgrade.digging=Dwarven Might
|
||||
tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Poison Resistance
|
||||
tooltip.BloodMagic.livingArmour.upgrade.fireResist=Gift of Ignis
|
||||
tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Tough Palms
|
||||
tooltip.BloodMagic.livingArmour.upgrade.knockback=Body Builder
|
||||
tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=Tough Skin
|
||||
|
@ -523,6 +524,7 @@ chat.BloodMagic.ritual.activate=A rush of energy flows through the ritual!
|
|||
chat.BloodMagic.ritual.notValid=You feel that these runes are not configured correctly...
|
||||
|
||||
chat.BloodMagic.livingArmour.upgrade.poisonRemove=You are starting to feel better already!
|
||||
chat.BloodMagic.livingArmour.upgrade.fireRemove=&6A cool feeling envelopes you as the burning subsides.
|
||||
chat.BloodMagic.livingArmour.upgrade.grimReaper=&6A shadowy force pulls you from the brink of death!
|
||||
chat.BloodMagic.livingArmour.newUpgrade=&4Upgrade acquired!
|
||||
|
||||
|
|
Loading…
Reference in a new issue