Started working on allowing RitualDiviner to do directions.
Completed refactorization of spell system. Increased protection against void damage while void sigil is in Bound Armour. Added an OnRitualStop with an Enum input providing the action. Added more events.
This commit is contained in:
parent
69abce8f85
commit
beea2e875a
97 changed files with 4234 additions and 1414 deletions
|
@ -1,6 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class TEConduit extends TESpellBlock
|
||||
|
|
|
@ -2,8 +2,10 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
|
|||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -199,16 +201,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
return;
|
||||
}
|
||||
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(owner);
|
||||
worldSave.setItemData(owner, data);
|
||||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
|
||||
if (currentEssence < Rituals.getCostForActivation(testRitual))
|
||||
{
|
||||
|
@ -226,18 +219,29 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
return;
|
||||
} else
|
||||
{
|
||||
data.currentEssence = currentEssence - Rituals.getCostForActivation(testRitual);
|
||||
data.markDirty();
|
||||
|
||||
player.addChatMessage(new ChatComponentText("A rush of energy flows through the ritual!"));
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
int drain = SoulNetworkHandler.syphonFromNetwork(owner, Rituals.getCostForActivation(testRitual));
|
||||
|
||||
if(drain > 0)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord);
|
||||
player.addChatMessage(new ChatComponentText("A rush of energy flows through the ritual!"));
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord);
|
||||
}
|
||||
}else
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("Something stopped you in your tracks..."));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.currentRitualString.equals(""))
|
||||
{
|
||||
Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.ACTIVATE);
|
||||
}
|
||||
cooldown = Rituals.getInitialCooldown(testRitual);
|
||||
var1 = 0;
|
||||
currentRitualString = testRitual;
|
||||
|
@ -254,7 +258,12 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
public void useOnRitualBroken()
|
||||
{
|
||||
Rituals.onRitualBroken(this, this.currentRitualString);
|
||||
Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.BREAK_MRS);
|
||||
}
|
||||
|
||||
public void useOnRitualBrokenExplosion()
|
||||
{
|
||||
Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.EXPLOSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -287,7 +296,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
if (!testRunes)
|
||||
{
|
||||
Rituals.onRitualBroken(this, currentRitualString);
|
||||
Rituals.onRitualBroken(this, currentRitualString, RitualBreakMethod.BREAK_STONE);
|
||||
isActive = false;
|
||||
currentRitualString = "";
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
|
@ -299,9 +308,11 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
{
|
||||
if (isRunning)
|
||||
{
|
||||
Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.REDSTONE);
|
||||
isRunning = false;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
return;
|
||||
} else
|
||||
{
|
||||
|
@ -347,6 +358,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
public void setActive(boolean active)
|
||||
{
|
||||
Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.DEACTIVATE);
|
||||
this.isActive = active;
|
||||
this.isRunning = active;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellEffect;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.*;
|
||||
|
||||
public class TESpellEffectBlock extends TESpellBlock
|
||||
|
@ -17,15 +19,15 @@ public class TESpellEffectBlock extends TESpellBlock
|
|||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return new SpellEffectFire();
|
||||
return new SpellEffect(ComplexSpellType.FIRE);
|
||||
case 1:
|
||||
return new SpellEffectIce();
|
||||
return new SpellEffect(ComplexSpellType.ICE);
|
||||
case 2:
|
||||
return new SpellEffectWind();
|
||||
return new SpellEffect(ComplexSpellType.WIND);
|
||||
case 3:
|
||||
return new SpellEffectEarth();
|
||||
return new SpellEffect(ComplexSpellType.EARTH);
|
||||
}
|
||||
return new SpellEffectFire();
|
||||
return new SpellEffect(ComplexSpellType.FIRE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancementCost;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancementPotency;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.*;
|
||||
import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellModifierDefault;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellModifierDefensive;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellModifierEnvironmental;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellModifierOffensive;
|
||||
|
||||
public class TESpellModifierBlock extends TESpellBlock
|
||||
{
|
||||
|
@ -10,21 +15,21 @@ public class TESpellModifierBlock extends TESpellBlock
|
|||
parad.modifyBufferedEffect(this.getSpellModifier());
|
||||
}
|
||||
|
||||
public SpellModifier getSpellModifier()
|
||||
public ComplexSpellModifier getSpellModifier()
|
||||
{
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return new SpellModifierDefault();
|
||||
return ComplexSpellModifier.DEFAULT;
|
||||
case 1:
|
||||
return new SpellModifierOffensive();
|
||||
return ComplexSpellModifier.OFFENSIVE;
|
||||
case 2:
|
||||
return new SpellModifierDefensive();
|
||||
return ComplexSpellModifier.DEFENSIVE;
|
||||
case 3:
|
||||
return new SpellModifierEnvironmental();
|
||||
return ComplexSpellModifier.ENVIRONMENTAL;
|
||||
}
|
||||
return new SpellModifierDefault();
|
||||
return ComplexSpellModifier.DEFAULT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue