Files
BloodMagic/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java
T
WayofTime beea2e875a 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.
2014-11-12 17:14:43 -05:00

93 lines
2.6 KiB
Java

package WayofTime.alchemicalWizardry.api.spell;
import net.minecraft.nbt.NBTTagCompound;
public abstract class ComplexSpellEffect
{
public final ComplexSpellType type;
public final ComplexSpellModifier modifier;
protected int powerEnhancement;
protected int costEnhancement;
protected int potencyEnhancement;
public ComplexSpellEffect(ComplexSpellType type, ComplexSpellModifier modifier)
{
this.type = type;
this.modifier = modifier;
}
public ComplexSpellEffect(ComplexSpellType type, ComplexSpellModifier modifier, int power, int cost, int potency)
{
this(type, modifier);
this.powerEnhancement = power;
this.costEnhancement = cost;
this.potencyEnhancement = potency;
}
public abstract void modifyParadigm(SpellParadigm parad);
public ComplexSpellType getType()
{
return this.type;
}
public ComplexSpellModifier getModifier()
{
return this.modifier;
}
public abstract ComplexSpellEffect copy(int power, int cost, int potency);
public abstract int getCostOfEffect();
// public NBTTagCompound getTag()
// {
// NBTTagCompound tag = new NBTTagCompound();
//
// tag.setString("Class", this.getClass().getName());
// tag.setInteger("modifier", modifierState);
// tag.setInteger("power", powerEnhancement);
// tag.setInteger("cost", costEnhancement);
// tag.setInteger("potency", potencyEnhancement);
//
// return tag;
// }
//
// public static SpellEffect getEffectFromTag(NBTTagCompound tag)
// {
// try
// {
// Class clazz = Class.forName(tag.getString("Class"));
// if (clazz != null)
// {
// try
// {
// Object obj = clazz.newInstance();
// if (obj instanceof SpellEffect)
// {
// SpellEffect eff = (SpellEffect) obj;
//
// eff.modifierState = tag.getInteger("modifier");
// eff.powerEnhancement = tag.getInteger("power");
// eff.costEnhancement = tag.getInteger("cost");
// eff.potencyEnhancement = tag.getInteger("potency");
//
// return eff;
// }
// } catch (InstantiationException e)
// {
// e.printStackTrace();
// } catch (IllegalAccessException e)
// {
// e.printStackTrace();
// }
// }
// } catch (ClassNotFoundException e)
// {
// e.printStackTrace();
// }
// return null;
// }
}