Added WoS reagent use, general touch ups.

This commit is contained in:
WayofTime 2015-04-13 13:10:10 -04:00
parent efa5d89539
commit f2b4f3db9e
11 changed files with 166 additions and 27 deletions

View file

@ -28,6 +28,7 @@ public class OmegaArmourEarth extends OmegaArmour
public OmegaArmourEarth(int armorType)
{
super(armorType);
this.storeYLevel = true;
}
@Override
@ -89,10 +90,14 @@ public class OmegaArmourEarth extends OmegaArmour
}
@Override
public Multimap getItemAttributeModifiers()
public Multimap getAttributeModifiers(ItemStack stack)
{
Multimap map = HashMultimap.create();
map.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(179618 /** Random number **/, armorType), "Armor modifier" + armorType, getKnockbackResist(), 0));
int yLevel = this.getYLevelStored(stack);
map.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(179618 /** Random number **/, armorType), "Knockback modifier" + armorType, getKnockbackResist(), 0));
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(80532 /** Random number **/, armorType), "Health modifier" + armorType, getDefaultArmourBoost()*getHealthBoostModifierForLevel(yLevel), 1));
map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85112 /** Random number **/, armorType), "Damage modifier" + armorType, getDefaultArmourBoost()*getDamageModifierForLevel(yLevel), 2));
return map;
}
@ -100,4 +105,30 @@ public class OmegaArmourEarth extends OmegaArmour
{
return 0.25f;
}
public float getDefaultArmourBoost()
{
switch(this.armorType)
{
case 0:
return 2.5f;
case 1:
return 4;
case 2:
return 3.5f;
case 3:
return 2;
}
return 0.25f;
}
public float getHealthBoostModifierForLevel(int yLevel)
{
return (float) (0.05 * Math.max(-0.5, -((float)yLevel)/64f * 1.5f + 5.5f));
}
public float getDamageModifierForLevel(int yLevel)
{
return 0.02f * ((((float)yLevel)/64f) * 1.5f - 1);
}
}

View file

@ -97,12 +97,13 @@ public class OmegaArmourWater extends OmegaArmour
BiomeGenBase biome = BiomeGenBase.getBiome(biomeID);
if(biome != null)
{
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85312 /** Random number **/, armorType), "Armor modifier" + armorType, getDefaultHealthBoost()*getHealthBoostModifierForBiome(biome), 0));
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85312 /** Random number **/, armorType), "Health modifier" + armorType, getDefaultArmourBoost()*getHealthBoostModifierForBiome(biome), 2));
map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85432 /** Random number **/, armorType), "Damage modifier" + armorType, getDefaultArmourBoost()*getDamageModifierForBiome(biome), 2));
}
return map;
}
public float getDefaultHealthBoost()
public float getDefaultArmourBoost()
{
switch(this.armorType)
{
@ -120,21 +121,44 @@ public class OmegaArmourWater extends OmegaArmour
public float getHealthBoostModifierForBiome(BiomeGenBase biome)
{
float modifier = 0.05f;
if(biome.isEqualTo(BiomeGenBase.hell))
{
return -0.5f;
return modifier * -0.5f;
}
if(biome.isEqualTo(BiomeGenBase.ocean))
if(biome.isEqualTo(BiomeGenBase.ocean) || biome.isEqualTo(BiomeGenBase.river))
{
return 2.0f;
return modifier * 2.0f;
}
if(biome.isHighHumidity())
{
return 1.5f;
return modifier * 1.5f;
}
return 0.5f;
return modifier * 0.5f;
}
public float getDamageModifierForBiome(BiomeGenBase biome)
{
float modifier = 0.03f;
if(biome.isEqualTo(BiomeGenBase.hell))
{
return modifier * -0.5f;
}
if(biome.isEqualTo(BiomeGenBase.ocean) || biome.isEqualTo(BiomeGenBase.river))
{
return modifier * 2.0f;
}
if(biome.isHighHumidity())
{
return modifier * 1.5f;
}
return modifier * 0.5f;
}
}