mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-17 19:05:02 +00:00
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:
1 parent
69abce8f85
commit
beea2e875a
97 files changed
+4234
-1414
No files matched your search
@@ -0,0 +1,93 @@
|
||||
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;
|
||||
// }
|
||||
}
|
||||
Reference in new issue
Block a user