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:
parent
19d768bbfb
commit
efa5d89539
8 changed files with 192 additions and 42 deletions
|
@ -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
|
||||
|
|
|
@ -3,6 +3,8 @@ package WayofTime.alchemicalWizardry.common.omega;
|
|||
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;
|
||||
|
@ -11,7 +13,7 @@ public class OmegaParadigmWind extends OmegaParadigm
|
|||
{
|
||||
public OmegaParadigmWind(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots)
|
||||
{
|
||||
super(ReagentRegistry.aetherReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 10, 100));
|
||||
super(ReagentRegistry.aetherReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -29,7 +31,12 @@ public class OmegaParadigmWind extends OmegaParadigm
|
|||
@Override
|
||||
public void onUpdate(World world, EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
|
||||
if(world.getWorldTime() % 100 == 0 && !world.isRemote && player.posY > 128 && player.getHealth() < player.getMaxHealth())
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, player.posY > 128 + 64 ? 1 : 0, true));
|
||||
}
|
||||
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue