Initial stages of Omega being worked on - binding of human and demon at 5%.
This commit is contained in:
parent
c0abd69a2a
commit
316a79fab8
16 changed files with 348 additions and 49 deletions
|
@ -13,7 +13,9 @@ public class OmegaParadigm
|
|||
public OmegaArmour leggings;
|
||||
public OmegaArmour boots;
|
||||
|
||||
public OmegaParadigm(Reagent reagent, OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots)
|
||||
public ReagentRegenConfiguration config;
|
||||
|
||||
public OmegaParadigm(Reagent reagent, OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots, ReagentRegenConfiguration config)
|
||||
{
|
||||
this.helmet = helmet;
|
||||
this.chestPiece = chestPiece;
|
||||
|
@ -28,6 +30,8 @@ public class OmegaParadigm
|
|||
this.chestPiece.setReagent(reagent);
|
||||
this.leggings.setReagent(reagent);
|
||||
this.boots.setReagent(reagent);
|
||||
|
||||
this.config = new ReagentRegenConfiguration(20, 10, 1);
|
||||
}
|
||||
|
||||
public void convertPlayerArmour(EntityPlayer player)
|
||||
|
@ -52,4 +56,31 @@ public class OmegaParadigm
|
|||
armours[0] = omegaBootsStack;
|
||||
}
|
||||
}
|
||||
|
||||
public ReagentRegenConfiguration getRegenConfig(EntityPlayer player)
|
||||
{
|
||||
return this.config;
|
||||
}
|
||||
|
||||
public int getMaxAdditionalHealth()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
public float getCostPerTickOfUse(EntityPlayer player)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean isPlayerWearingFullSet(EntityPlayer player)
|
||||
{
|
||||
ItemStack[] armours = player.inventory.armorInventory;
|
||||
|
||||
ItemStack helmetStack = armours[3];
|
||||
ItemStack chestStack = armours[2];
|
||||
ItemStack leggingsStack = armours[1];
|
||||
ItemStack bootsStack = armours[0];
|
||||
|
||||
return helmetStack != null && helmetStack.getItem() == helmet && chestStack != null && chestStack.getItem() == chestPiece && leggingsStack != null && leggingsStack.getItem() == leggings && bootsStack != null && bootsStack.getItem() == boots;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package WayofTime.alchemicalWizardry.common.omega;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
||||
|
||||
public class OmegaParadigmWater extends OmegaParadigm
|
||||
{
|
||||
public OmegaParadigmWater(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots)
|
||||
{
|
||||
super(ReagentRegistry.aquasalusReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 10, 100));
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCostPerTickOfUse(EntityPlayer player)
|
||||
{
|
||||
if(player.isInWater())
|
||||
{
|
||||
return 0.5f;
|
||||
}else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,25 @@
|
|||
package WayofTime.alchemicalWizardry.common.omega;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
|
||||
public class OmegaRegistry
|
||||
{
|
||||
|
||||
public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap();
|
||||
|
||||
public static void registerParadigm(Reagent reagent, OmegaParadigm parad)
|
||||
{
|
||||
omegaList.put(reagent, parad);
|
||||
}
|
||||
|
||||
public static OmegaParadigm getParadigmForReagent(Reagent reagent)
|
||||
{
|
||||
return omegaList.get(reagent);
|
||||
}
|
||||
|
||||
public static boolean hasParadigm(Reagent reagent)
|
||||
{
|
||||
return omegaList.containsKey(reagent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.omega;
|
||||
|
||||
public class ReagentRegenConfiguration
|
||||
{
|
||||
public int tickRate;
|
||||
public int healPerTick;
|
||||
public float costPerPoint;
|
||||
|
||||
public ReagentRegenConfiguration(int tickRate, int healPerTick, float costPerPoint)
|
||||
{
|
||||
this.tickRate = tickRate;
|
||||
this.healPerTick = healPerTick;
|
||||
this.costPerPoint = costPerPoint;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue