Added Ritual: Ritual of Living Evolution, which is used to set the living armour's max upgrade points to 300.

This commit is contained in:
WayofTime 2016-02-15 17:13:50 -05:00
parent 7610329d0a
commit db4c68e5f3
8 changed files with 124 additions and 2 deletions

View file

@ -5,6 +5,8 @@ Version 2.0.0-18
- Added upgrade trainer
- Fixed step height issue with C&B stuff. Apparently step height is now 0.6 by default instead of 0.5.
- Added Ritual: Song of the Cleansing Soul to remove Living Armour upgrades from the armour.
- Added Ritual: Ritual of Living Evolution, which is used to set the living armour's max upgrade points to 300.
- Added tooltip to living armour to show the current upgrade points of the armour.
------------------------------------------------------
Version 2.0.0-17

View file

@ -57,6 +57,7 @@ public class ConfigHandler
public static boolean ritualWellOfSuffering;
public static boolean ritualZephyr;
public static boolean ritualUpgradeRemove;
public static boolean ritualArmourEvolve;
// Imperfect Rituals
public static boolean imperfectRitualNight;
@ -236,6 +237,7 @@ public class ConfigHandler
ritualWellOfSuffering = config.get(category, "ritualWellOfSuffering", true).getBoolean();
ritualZephyr = config.get(category, "ritualZephyr", true).getBoolean();
ritualUpgradeRemove = config.get(category, "ritualRemove", true).getBoolean();
ritualArmourEvolve = config.get(category, "ritualArmourEvolve", true).getBoolean();
category = "Rituals.Imperfect";
imperfectRitualNight = config.get(category, "imperfectRitualNight", true).getBoolean();

View file

@ -187,6 +187,8 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IRevea
tooltip.add(TextHelper.localize("tooltip.BloodMagic.livingArmour.upgrade.level", TextHelper.localize(upgrade.getUnlocalizedName()), (upgrade.getUpgradeLevel() + 1)));
}
}
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmour.upgrade.points", armour.totalUpgradePoints, armour.maxUpgradePoints));
}
super.addInformation(stack, player, tooltip, advanced);

View file

@ -181,6 +181,8 @@ public class LivingArmour implements ILivingArmour
@Override
public void readFromNBT(NBTTagCompound tag)
{
maxUpgradePoints = Math.max(100, tag.getInteger("maxUpgradePoints"));
NBTTagList upgradeTags = tag.getTagList("upgrades", 10);
if (upgradeTags != null)
{
@ -227,6 +229,8 @@ public class LivingArmour implements ILivingArmour
@Override
public void writeToNBT(NBTTagCompound tag, boolean forceWrite)
{
tag.setInteger("maxUpgradePoints", maxUpgradePoints);
NBTTagList tags = new NBTTagList();
for (Entry<String, LivingArmourUpgrade> entry : upgradeMap.entrySet())

View file

@ -9,6 +9,7 @@ import WayofTime.bloodmagic.api.registry.RitualRegistry;
import WayofTime.bloodmagic.api.ritual.Ritual;
import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual;
import WayofTime.bloodmagic.ritual.RitualAnimalGrowth;
import WayofTime.bloodmagic.ritual.RitualArmourEvolve;
import WayofTime.bloodmagic.ritual.RitualContainment;
import WayofTime.bloodmagic.ritual.RitualCrushing;
import WayofTime.bloodmagic.ritual.RitualExpulsion;
@ -56,6 +57,7 @@ public class ModRituals
public static Ritual expulsionRitual;
public static Ritual zephyrRitual;
public static Ritual upgradeRemoveRitual;
public static Ritual armourEvolveRitual;
public static ImperfectRitual imperfectNight;
public static ImperfectRitual imperfectRain;
@ -103,6 +105,8 @@ public class ModRituals
RitualRegistry.registerRitual(expulsionRitual, ConfigHandler.ritualExpulsion);
upgradeRemoveRitual = new RitualUpgradeRemove();
RitualRegistry.registerRitual(upgradeRemoveRitual, ConfigHandler.ritualUpgradeRemove);
armourEvolveRitual = new RitualArmourEvolve();
RitualRegistry.registerRitual(armourEvolveRitual, ConfigHandler.ritualArmourEvolve);
}
public static void initImperfectRituals()

View file

@ -0,0 +1,106 @@
package WayofTime.bloodmagic.ritual;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.ritual.AreaDescriptor;
import WayofTime.bloodmagic.api.ritual.EnumRuneType;
import WayofTime.bloodmagic.api.ritual.IMasterRitualStone;
import WayofTime.bloodmagic.api.ritual.Ritual;
import WayofTime.bloodmagic.api.ritual.RitualComponent;
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
import WayofTime.bloodmagic.livingArmour.LivingArmour;
public class RitualArmourEvolve extends Ritual
{
public static final String CHECK_RANGE = "fillRange";
public RitualArmourEvolve()
{
super("ritualArmourEvolve", 0, 50000, "ritual." + Constants.Mod.MODID + ".armourEvolveRitual");
addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1));
}
@Override
public void performRitual(IMasterRitualStone masterRitualStone)
{
World world = masterRitualStone.getWorldObj();
if (world.isRemote)
{
return;
}
BlockPos pos = masterRitualStone.getBlockPos();
AreaDescriptor checkRange = getBlockRange(CHECK_RANGE);
List<EntityPlayer> playerList = world.getEntitiesWithinAABB(EntityPlayer.class, checkRange.getAABB(pos));
for (EntityPlayer player : playerList)
{
if (LivingArmour.hasFullSet(player))
{
ItemStack chestStack = player.getCurrentArmor(2);
LivingArmour armour = ItemLivingArmour.armourMap.get(chestStack);
if (armour != null)
{
if (armour.maxUpgradePoints < 300)
{
armour.maxUpgradePoints = 300;
((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true);
masterRitualStone.setActive(false);
world.spawnEntityInWorld(new EntityLightningBolt(world, pos.getX(), pos.getY() - 1, pos.getZ()));
}
}
}
}
}
@Override
public int getRefreshTime()
{
return 1;
}
@Override
public int getRefreshCost()
{
return 0;
}
@Override
public ArrayList<RitualComponent> getComponents()
{
ArrayList<RitualComponent> components = new ArrayList<RitualComponent>();
this.addCornerRunes(components, 1, 0, EnumRuneType.DUSK);
this.addCornerRunes(components, 2, 0, EnumRuneType.FIRE);
this.addOffsetRunes(components, 1, 2, 0, EnumRuneType.FIRE);
this.addCornerRunes(components, 1, 1, EnumRuneType.DUSK);
this.addParallelRunes(components, 4, 0, EnumRuneType.EARTH);
this.addCornerRunes(components, 1, 3, EnumRuneType.DUSK);
this.addParallelRunes(components, 1, 4, EnumRuneType.EARTH);
for (int i = 0; i < 4; i++)
{
this.addCornerRunes(components, 3, i, EnumRuneType.EARTH);
}
return components;
}
@Override
public Ritual getNewCopy()
{
return new RitualArmourEvolve();
}
}

View file

@ -30,7 +30,7 @@ public class RitualUpgradeRemove extends Ritual
public RitualUpgradeRemove()
{
super("ritualUpgradeRemove", 0, 25000, "ritual." + Constants.Mod.MODID + ".fullUpgradeRemove");
super("ritualUpgradeRemove", 0, 25000, "ritual." + Constants.Mod.MODID + ".upgradeRemoveRitual");
addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1));
}

View file

@ -291,6 +291,7 @@ tooltip.BloodMagic.livingArmour.upgrade.solarPowered=Solar Powered
tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=Runic Shielding
tooltip.BloodMagic.livingArmour.upgrade.revealing=Revealing
tooltip.BloodMagic.livingArmour.upgrade.level=%s (Level %d)
tooltip.BloodMagic.livingArmour.upgrade.points=&6Upgrade points: %s / %s
tooltip.BloodMagic.will=Will Quality: %1$,.2f
tooltip.BloodMagic.sentientSword.desc=Uses demon will to unleash its full potential.
@ -325,7 +326,8 @@ ritual.BloodMagic.speedRitual=Ritual of Speed
ritual.BloodMagic.suppressionRitual=Ritual of Suppression
ritual.BloodMagic.expulsionRitual=Aura of Expulsion
ritual.BloodMagic.zephyrRitual=Call of the Zephyr
ritual.BloodMagic.fullUpgradeRemove=Sound of the Cleansing Soul
ritual.BloodMagic.upgradeRemoveRitual=Sound of the Cleansing Soul
ritual.BloodMagic.armourEvolveRitual=Ritual of Living Evolution
# Chat
chat.BloodMagic.altarMaker.setTier=Set Tier to: %d