Added several environmental-based abilities to the Wind and Fire armours. Tweaked the base armour penetration protection on the Omega armour to be a bit more balanced. Made the extra HP bar more fancy! :)

This commit is contained in:
WayofTime 2015-04-12 10:59:41 -04:00
parent 19d768bbfb
commit efa5d89539
8 changed files with 192 additions and 42 deletions

View file

@ -1,8 +1,11 @@
package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
@ -23,7 +26,31 @@ public class OmegaParadigmFire extends OmegaParadigm
@Override
public void onUpdate(World world, EntityPlayer player, ItemStack stack)
{
if(world.getWorldTime() % 100 == 0 && !world.isRemote)
{
boolean isInLava = player.isInsideOfMaterial(Material.lava);
if(player.isBurning() && player.getHealth() < player.getMaxHealth())
{
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, isInLava ? 1 : 0, true));
}
if(player.isBurning())
{
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, isInLava ? 400 : 200, isInLava ? 1 : 0, true));
}
if(player.isInWater())
{
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true));
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true));
player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true));
}
}
if(player.isBurning())
{
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 200, 0, true));
}
}
@Override