diff --git a/build.properties b/build.properties index cb34ef24..8a40e51d 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,5 @@ # -#Sat Nov 01 19:24:52 EDT 2014 +#Tue Nov 11 17:52:50 EST 2014 mod_name=BloodMagic forge_version=10.13.2.1232 ccc_version=1.0.4.29 @@ -8,5 +8,5 @@ nei_version=1.0.3.64 package_group=com.wayoftime.bloodmagic mod_version=1.2.0 minetweaker_version=Dev-1.7.10-3.0.9B -build_number=2 mc_version=1.7.10 +build_number=3 diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 618ef3f6..9be19365 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -11,6 +11,7 @@ import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; +import WayofTime.alchemicalWizardry.api.spell.SpellEffectRegistry; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; import WayofTime.alchemicalWizardry.common.*; import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; @@ -31,6 +32,74 @@ import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; import WayofTime.alchemicalWizardry.common.potion.*; import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; import WayofTime.alchemicalWizardry.common.rituals.*; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeDefaultEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeDefensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeEnvironmentalEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeOffensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileDefaultEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileDefensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileEnvironmentalEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileOffensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfDefaultEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfDefensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfEnvironmentalEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfOffensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolDefaultEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolDefensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolEnvironmentalEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolOffensiveEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeDefaultFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeDefensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeEnvironmentalFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeOffensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileDefaultFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileDefensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileEnvironmentalFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileOffensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfDefaultFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfDefensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfEnvironmentalFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfOffensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolDefaultFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolDefensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolEnvironmentalFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolOffensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeDefaultIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeDefensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeEnvironmentalIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeOffensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileDefaultIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileDefensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileEnvironmentalIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileOffensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfDefaultIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfDefensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfEnvironmentalIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfOffensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolDefaultIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolDefensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolEnvironmentalIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolOffensiveIce; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeDefaultWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeDefensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeEnvironmentalWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeOffensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileDefaultWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileDefensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileEnvironmentalWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileOffensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfDefaultWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfDefensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfEnvironmentalWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfOffensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolDefaultWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolDefensiveWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolEnvironmentalWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolOffensiveWind; import WayofTime.alchemicalWizardry.common.spell.simple.*; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; @@ -571,6 +640,7 @@ public class AlchemicalWizardry this.initReagentRegistries(); this.initDemonPacketRegistiry(); + this.initiateRegistry(); MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent()); proxy.InitRendering(); @@ -1054,4 +1124,78 @@ public class AlchemicalWizardry { DemonPacketRegistry.registerDemonPacket("angel", new DemonPacketAngel()); } + + public static void initiateRegistry() + { + SpellEffectRegistry.initiateRegistry(); + + + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileEnvironmentalFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefaultFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfOffensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfEnvironmentalFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefaultFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeOffensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeEnvironmentalFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefaultFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolOffensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveFire()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalFire()); + + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileEnvironmentalIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefaultIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfOffensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfEnvironmentalIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefaultIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeOffensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeEnvironmentalIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefaultIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolOffensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveIce()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalIce()); + + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileEnvironmentalWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefaultWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfOffensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfEnvironmentalWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefaultWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeOffensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeEnvironmentalWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefaultWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolOffensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveWind()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalWind()); + + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileEnvironmentalEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefaultEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfOffensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfDefensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmSelf.class, new CSESelfEnvironmentalEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefaultEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeOffensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeDefensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmMelee.class, new CSEMeleeEnvironmentalEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefaultEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolOffensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveEarth()); + SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalEarth()); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java new file mode 100644 index 00000000..a705056a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java @@ -0,0 +1,11 @@ +package WayofTime.alchemicalWizardry.api.rituals; + +public enum RitualBreakMethod +{ + REDSTONE, + BREAK_MRS, + BREAK_STONE, + ACTIVATE, //When an activation crystal activates the MRS, overwriting the current ritual + DEACTIVATE, + EXPLOSION, //When the MRS is destroyed by an explosion +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java index bbd10f7d..6e896e0b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java @@ -38,16 +38,34 @@ public class RitualComponent public int getX(int direction) { - return this.x; + switch(direction) + { + case 2: + return -this.getZ(); + case 3: + return -this.getX(); + case 4: + return this.getZ(); + default: return this.getX(); + } } public int getZ(int direction) { - return this.z; + switch(direction) + { + case 2: + return this.getX(); + case 3: + return -this.getZ(); + case 4: + return -this.getX(); + default: return this.getZ(); + } } public int getStoneType() { return this.stoneType; } -} +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java index c8eb97cb..498c803a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.api.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.common.util.ForgeDirection; - -import java.util.List; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; public abstract class RitualEffect { @@ -16,7 +16,7 @@ public abstract class RitualEffect return true; } - public void onRitualBroken(IMasterRitualStone ritualStone) + public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) { } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java index 5bba3266..9f6ad207 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java @@ -324,16 +324,18 @@ public class Rituals return false; } - public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID) + public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID, RitualBreakMethod method) { if (ritualMap.containsKey(ritualID)) { Rituals ritual = ritualMap.get(ritualID); if (ritual != null && ritual.effect != null) { - ritual.effect.onRitualBroken(ritualStone); + ritual.effect.onRitualBroken(ritualStone, method); } } + + System.out.println(method); } public static int getNumberOfRituals() diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java new file mode 100644 index 00000000..07b85b6d --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java @@ -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; +// } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java new file mode 100644 index 00000000..537a5e2b --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.api.spell; + +public class ComplexSpellModifier +{ + public static ComplexSpellModifier DEFAULT = new ComplexSpellModifier(); + public static ComplexSpellModifier OFFENSIVE = new ComplexSpellModifier(); + public static ComplexSpellModifier DEFENSIVE = new ComplexSpellModifier(); + public static ComplexSpellModifier ENVIRONMENTAL = new ComplexSpellModifier(); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java new file mode 100644 index 00000000..1c308a81 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.api.spell; + +public class ComplexSpellType +{ + public static ComplexSpellType FIRE = new ComplexSpellType(); + public static ComplexSpellType ICE = new ComplexSpellType(); + public static ComplexSpellType EARTH = new ComplexSpellType(); + public static ComplexSpellType WIND = new ComplexSpellType(); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java new file mode 100644 index 00000000..5123d0d6 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java @@ -0,0 +1,501 @@ +package WayofTime.alchemicalWizardry.api.spell; + +import net.minecraft.nbt.NBTTagCompound; +import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; + +/** + * New wrapper class to enclose the ComplexSpellEffect + */ +public class SpellEffect +{ + public ComplexSpellType type; + public ComplexSpellModifier modifier; + + protected int powerEnhancement; + protected int costEnhancement; + protected int potencyEnhancement; + + public SpellEffect() + { + this(ComplexSpellType.FIRE); + } + + public SpellEffect(ComplexSpellType type) + { + this(type, ComplexSpellModifier.DEFAULT); + } + + public SpellEffect(ComplexSpellType type, ComplexSpellModifier modifier) + { + this.type = type; + this.modifier = modifier; + + this.powerEnhancement = 0; + this.potencyEnhancement = 0; + this.costEnhancement = 0; + } + + public void enhanceEffect(SpellEnhancement enh) + { + if (enh != null) + { + switch (enh.getState()) + { + case SpellEnhancement.POWER: + this.powerEnhancement++; + break; + case SpellEnhancement.EFFICIENCY: + this.costEnhancement++; + break; + case SpellEnhancement.POTENCY: + this.potencyEnhancement++; + break; + } + } + } + + public void modifyEffect(ComplexSpellModifier mod) + { + if(mod != null) + { + this.modifier = mod; + } + } + + public void modifyParadigm(SpellParadigm parad) //When modifying the paradigm it will instead get the class name and ask the registry + { + if(parad == null) + { + return; + } + + Class paraClass = parad.getClass(); + + ComplexSpellEffect effect = SpellEffectRegistry.getSpellEffect(paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); + + if(effect != null) + { + effect.modifyParadigm(parad); + } + } + + public int getCostOfEffect(SpellParadigm parad) + { + if(parad == null) + { + return 0; + } + + Class paraClass = parad.getClass(); + + ComplexSpellEffect effect = SpellEffectRegistry.getSpellEffect(paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); + + if(effect == null) + { + return 0; + } + + return effect.getCostOfEffect(); + } + + public NBTTagCompound getTag() + { + NBTTagCompound tag = new NBTTagCompound(); + + tag.setString("Class", this.getClass().getName()); + tag.setString("type", SpellEffectRegistry.getKeyForType(type)); + tag.setString("modifier", SpellEffectRegistry.getKeyForModifier(modifier)); + 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.type = SpellEffectRegistry.getTypeForKey(tag.getString("type")); + eff.modifier = SpellEffectRegistry.getModifierForKey(tag.getString("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; + } + + public int getPowerEnhancements() + { + return this.powerEnhancement; + } + + public int getPotencyEnhancements() + { + return this.potencyEnhancement; + } + + public int getCostEnhancements() + { + return this.costEnhancement; + } +} + +//package WayofTime.alchemicalWizardry.common.spell.complex.effect; +// +//import WayofTime.alchemicalWizardry.common.spell.complex.*; +//import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; +//import net.minecraft.nbt.NBTTagCompound; +// +//public abstract class SpellEffect +//{ +// protected int modifierState; +// protected int powerEnhancement; +// protected int costEnhancement; +// protected int potencyEnhancement; +// +// public SpellEffect() +// { +// this.modifierState = SpellModifier.DEFAULT; +// this.powerEnhancement = 0; +// this.costEnhancement = 0; +// this.potencyEnhancement = 0; +// } +// +// public void enhanceEffect(SpellEnhancement enh) +// { +// if (enh != null) +// { +// switch (enh.getState()) +// { +// case SpellEnhancement.POWER: +// this.powerEnhancement++; +// break; +// case SpellEnhancement.EFFICIENCY: +// this.costEnhancement++; +// break; +// case SpellEnhancement.POTENCY: +// this.potencyEnhancement++; +// break; +// } +// } +// } +// +// public void modifyEffect(SpellModifier mod) +// { +// if (mod != null) +// modifierState = mod.getModifier(); +// } +// +// public void modifyParadigm(SpellParadigm parad) //When modifying the paradigm it will instead get the class name and ask the registry +// { +// if (parad instanceof SpellParadigmProjectile) +// { +// this.modifyProjectileParadigm((SpellParadigmProjectile) parad); +// } +// if (parad instanceof SpellParadigmSelf) +// { +// this.modifySelfParadigm((SpellParadigmSelf) parad); +// } +// if (parad instanceof SpellParadigmMelee) +// { +// this.modifyMeleeParadigm((SpellParadigmMelee) parad); +// } +// if (parad instanceof SpellParadigmTool) +// { +// this.modifyToolParadigm((SpellParadigmTool) parad); +// } +// } +// +// public void modifyProjectileParadigm(SpellParadigmProjectile parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationProjectile(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationProjectile(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationProjectile(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationProjectile(parad); +// break; +// } +// } +// +// public abstract void defaultModificationProjectile(SpellParadigmProjectile parad); +// +// public abstract void offensiveModificationProjectile(SpellParadigmProjectile parad); +// +// public abstract void defensiveModificationProjectile(SpellParadigmProjectile parad); +// +// public abstract void environmentalModificationProjectile(SpellParadigmProjectile parad); +// +// public void modifySelfParadigm(SpellParadigmSelf parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationSelf(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationSelf(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationSelf(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationSelf(parad); +// break; +// } +// } +// +// public abstract void defaultModificationSelf(SpellParadigmSelf parad); +// +// public abstract void offensiveModificationSelf(SpellParadigmSelf parad); +// +// public abstract void defensiveModificationSelf(SpellParadigmSelf parad); +// +// public abstract void environmentalModificationSelf(SpellParadigmSelf parad); +// +// public void modifyMeleeParadigm(SpellParadigmMelee parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationMelee(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationMelee(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationMelee(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationMelee(parad); +// break; +// } +// } +// +// public abstract void defaultModificationMelee(SpellParadigmMelee parad); +// +// public abstract void offensiveModificationMelee(SpellParadigmMelee parad); +// +// public abstract void defensiveModificationMelee(SpellParadigmMelee parad); +// +// public abstract void environmentalModificationMelee(SpellParadigmMelee parad); +// +// public void modifyToolParadigm(SpellParadigmTool parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationTool(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationTool(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationTool(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationTool(parad); +// break; +// } +// } +// +// public abstract void defaultModificationTool(SpellParadigmTool parad); +// +// public abstract void offensiveModificationTool(SpellParadigmTool parad); +// +// public abstract void defensiveModificationTool(SpellParadigmTool parad); +// +// public abstract void environmentalModificationTool(SpellParadigmTool parad); +// +// public int getCostForProjectile() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultProjectile(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseProjectile(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseProjectile(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentProjectile(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultProjectile(); +// +// protected abstract int getCostForOffenseProjectile(); +// +// protected abstract int getCostForDefenseProjectile(); +// +// protected abstract int getCostForEnvironmentProjectile(); +// +// public int getCostForSelf() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultSelf(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseSelf(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseSelf(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentSelf(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultSelf(); +// +// protected abstract int getCostForOffenseSelf(); +// +// protected abstract int getCostForDefenseSelf(); +// +// protected abstract int getCostForEnvironmentSelf(); +// +// public int getCostForMelee() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultMelee(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseMelee(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseMelee(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentMelee(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultMelee(); +// +// protected abstract int getCostForOffenseMelee(); +// +// protected abstract int getCostForDefenseMelee(); +// +// protected abstract int getCostForEnvironmentMelee(); +// +// public int getCostForTool() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultTool(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseTool(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseTool(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentTool(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultTool(); +// +// protected abstract int getCostForOffenseTool(); +// +// protected abstract int getCostForDefenseTool(); +// +// protected abstract int getCostForEnvironmentTool(); +// +// public int getPowerEnhancements() +// { +// return this.powerEnhancement; +// } +// +// public int getCostEnhancements() +// { +// return this.costEnhancement; +// } +// +// public int getPotencyEnhancements() +// { +// return this.potencyEnhancement; +// } +// +// 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; +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java new file mode 100644 index 00000000..9d60722a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java @@ -0,0 +1,159 @@ +package WayofTime.alchemicalWizardry.api.spell; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +public class SpellEffectRegistry +{ + public static Map, List> effectRegistry = new HashMap(); + public static Map typeRegistry = new HashMap(); + public static Map modifierRegistry = new HashMap(); + + public static void registerSpellEffect(Class paraClass, ComplexSpellEffect effect) + { + if(paraClass == null || effect == null) + { + return; + } + + if(effectRegistry.containsKey(paraClass)) + { + List effectList = effectRegistry.get(paraClass); + ComplexSpellType type = effect.getType(); + ComplexSpellModifier modifier = effect.getModifier(); + + if(type == null || modifier == null) + { + return; + } + + for(ComplexSpellEffect eff : effectList) + { + if(type.equals(eff.getType()) && modifier.equals(eff.getModifier())) + { + effectList.remove(eff); + effectList.add(effect); + return; + } + } + + effectList.add(effect); + }else + { + List effectList = new LinkedList(); + effectList.add(effect); + effectRegistry.put(paraClass, effectList); + } + } + + /** + * + * @param paraClass + * @param type + * @param mod + * @return A copy of the spell effect + */ + public static ComplexSpellEffect getSpellEffect(Class paraClass, ComplexSpellType type, ComplexSpellModifier mod) + { + return SpellEffectRegistry.getSpellEffect(paraClass, type, mod, 0, 0, 0); + } + + public static ComplexSpellEffect getSpellEffect(Class paraClass, ComplexSpellType type, ComplexSpellModifier mod, int power, int potency, int cost) + { + System.out.println("Debuging"); + + if(paraClass == null || type == null || mod == null) + { + return null; + } + + List list = effectRegistry.get(paraClass); + + if(list == null || list.isEmpty()) + { + return null; + } + + for(ComplexSpellEffect effect : list) + { + if(effect != null && type.equals(effect.type) && mod.equals(effect.modifier)) + { + return effect.copy(power, cost, potency); + } + } + + return null; + } + + public static void registerSpellType(String key, ComplexSpellType type) + { + typeRegistry.put(key, type); + } + + public static void registerSpellModifier(String key, ComplexSpellModifier modifier) + { + modifierRegistry.put(key, modifier); + } + + public static ComplexSpellType getTypeForKey(String key) + { + return typeRegistry.get(key); + } + + public static String getKeyForType(ComplexSpellType type) + { + if(type == null) + { + return ""; + } + + for(Entry entry : typeRegistry.entrySet()) + { + if(type.equals(entry.getValue())) + { + return entry.getKey(); + } + } + + return ""; + } + + public static ComplexSpellModifier getModifierForKey(String key) + { + return modifierRegistry.get(key); + } + + public static String getKeyForModifier(ComplexSpellModifier modifier) + { + if(modifier == null) + { + return ""; + } + + for(Entry entry : modifierRegistry.entrySet()) + { + if(modifier.equals(entry.getValue())) + { + return entry.getKey(); + } + } + + return ""; + } + + public static void initiateRegistry() + { + SpellEffectRegistry.registerSpellType("FIRE", ComplexSpellType.FIRE); + SpellEffectRegistry.registerSpellType("WATER", ComplexSpellType.ICE); + SpellEffectRegistry.registerSpellType("EARTH", ComplexSpellType.EARTH); + SpellEffectRegistry.registerSpellType("AIR", ComplexSpellType.WIND); + + SpellEffectRegistry.registerSpellModifier("DEFAULT", ComplexSpellModifier.DEFAULT); + SpellEffectRegistry.registerSpellModifier("OFFENSIVE", ComplexSpellModifier.OFFENSIVE); + SpellEffectRegistry.registerSpellModifier("DEFENSIVE", ComplexSpellModifier.DEFENSIVE); + SpellEffectRegistry.registerSpellModifier("ENVIRONMENTAL", ComplexSpellModifier.ENVIRONMENTAL); + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java similarity index 67% rename from src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java rename to src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java index 52b1fe2f..e0c8e13f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java @@ -1,37 +1,31 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; +package WayofTime.alchemicalWizardry.api.spell; import java.util.LinkedList; import java.util.List; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; + public abstract class SpellParadigm { protected List bufferedEffectList = new LinkedList(); - public List effectList = new LinkedList(); public void addBufferedEffect(SpellEffect effect) { if (effect != null) { this.bufferedEffectList.add(effect); - - effectList.add(effect.getClass().getName()); } } - public void modifyBufferedEffect(SpellModifier modifier) + public void modifyBufferedEffect(ComplexSpellModifier modifier) { SpellEffect effect = this.getBufferedEffect(); if (effect != null) { effect.modifyEffect(modifier); - - effectList.add(modifier.getClass().getName()); } } @@ -50,8 +44,6 @@ public abstract class SpellParadigm effect.enhanceEffect(enh); } } - - effectList.add(enh.getClass().getName()); } } @@ -89,31 +81,10 @@ public abstract class SpellParadigm int cost = 0; if (this.bufferedEffectList != null && !this.bufferedEffectList.isEmpty()) { - if (this instanceof SpellParadigmProjectile) - { - for (SpellEffect effect : bufferedEffectList) - { - cost += effect.getCostForProjectile(); - } - } else if (this instanceof SpellParadigmSelf) - { - for (SpellEffect effect : bufferedEffectList) - { - cost += effect.getCostForSelf(); - } - } else if (this instanceof SpellParadigmMelee) - { - for (SpellEffect effect : bufferedEffectList) - { - cost += effect.getCostForMelee(); - } - } else if (this instanceof SpellParadigmTool) - { - for (SpellEffect effect : bufferedEffectList) - { - cost += effect.getCostForTool(); - } - } + for(SpellEffect effect : bufferedEffectList) + { + cost += effect.getCostOfEffect(this); + } return (int) (cost * Math.sqrt(this.bufferedEffectList.size())); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java index b426f08f..5529bb12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java @@ -12,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.Explosion; import net.minecraft.world.World; public class BlockMasterStone extends BlockContainer @@ -43,6 +44,17 @@ public class BlockMasterStone extends BlockContainer super.onBlockHarvested(world, x, y, z, meta, player); } + + @Override + public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) + { + super.onBlockDestroyedByExplosion(world, x, y, z, explosion); + TileEntity tile = world.getTileEntity(x, y, z); + if (tile instanceof TEMasterStone) + { + ((TEMasterStone) tile).useOnRitualBrokenExplosion(); + } + } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java index 51f5efc6..7ccb07bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java @@ -199,7 +199,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (isImmuneToVoid(armor)) { - return new ArmorProperties(-1, damageAmount, maxAbsorption); + return new ArmorProperties(-1, damageAmount * 1000 , maxAbsorption); } else { return new ArmorProperties(-1, 0, 0); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java index 7b266395..22305f9a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java @@ -56,63 +56,74 @@ public class ItemRitualDiviner extends EnergyItems { par3List.add("Can not place Dusk runes"); } + + par3List.add("Ritual tuned to face: " + this.getNameForDirection(this.getDirection(par1ItemStack))); - if (!(par1ItemStack.stackTagCompound == null)) + boolean sneaking = true; + + if(sneaking) { - String ritualID = this.getCurrentRitual(par1ItemStack); - //TODO - par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName")); - par3List.add("RitualID: " + ritualID); - List ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack)); - if (ritualList == null) + if (!(par1ItemStack.stackTagCompound == null)) { - return; - } - - int blankStones = 0; - int airStones = 0; - int waterStones = 0; - int fireStones = 0; - int earthStones = 0; - int duskStones = 0; - - for (RitualComponent rc : ritualList) - { - switch (rc.getStoneType()) + String ritualID = this.getCurrentRitual(par1ItemStack); + //TODO + par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName")); + par3List.add("RitualID: " + ritualID); + List ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack)); + if (ritualList == null) { - case RitualComponent.BLANK: - blankStones++; - break; - - case RitualComponent.AIR: - airStones++; - break; - - case RitualComponent.WATER: - waterStones++; - break; - - case RitualComponent.FIRE: - fireStones++; - break; - - case RitualComponent.EARTH: - earthStones++; - break; - - case RitualComponent.DUSK: - duskStones++; - break; + return; } - } - par3List.add("Blank stones: " + blankStones); - par3List.add(EnumChatFormatting.AQUA + "Air stones: " + airStones); - par3List.add(EnumChatFormatting.BLUE + "Water stones: " + waterStones); - par3List.add(EnumChatFormatting.RED + "Fire stones: " + fireStones); - par3List.add(EnumChatFormatting.DARK_GREEN + "Earth stones: " + earthStones); - par3List.add(EnumChatFormatting.BOLD + "Dusk stones: " + duskStones); + int blankStones = 0; + int airStones = 0; + int waterStones = 0; + int fireStones = 0; + int earthStones = 0; + int duskStones = 0; + + for (RitualComponent rc : ritualList) + { + switch (rc.getStoneType()) + { + case RitualComponent.BLANK: + blankStones++; + break; + + case RitualComponent.AIR: + airStones++; + break; + + case RitualComponent.WATER: + waterStones++; + break; + + case RitualComponent.FIRE: + fireStones++; + break; + + case RitualComponent.EARTH: + earthStones++; + break; + + case RitualComponent.DUSK: + duskStones++; + break; + } + } + + par3List.add("Blank stones: " + blankStones); + par3List.add(EnumChatFormatting.AQUA + "Air stones: " + airStones); + par3List.add(EnumChatFormatting.BLUE + "Water stones: " + waterStones); + par3List.add(EnumChatFormatting.RED + "Fire stones: " + fireStones); + par3List.add(EnumChatFormatting.DARK_GREEN + "Earth stones: " + earthStones); + par3List.add(EnumChatFormatting.BOLD + "Dusk stones: " + duskStones); + } + }else + { + par3List.add(EnumChatFormatting.AQUA + "-Press shift for extended information-"); } + } @Override @@ -135,7 +146,7 @@ public class ItemRitualDiviner extends EnergyItems @Override public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { - int direction = 1; + int direction = this.getDirection(par1ItemStack); EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer); ItemStack[] playerInventory = par2EntityPlayer.inventory.mainInventory; @@ -248,6 +259,9 @@ public class ItemRitualDiviner extends EnergyItems IChatComponent chatmessagecomponent = new ChatComponentText("Current Ritual: " + Rituals.getNameOfRitual(this.getCurrentRitual(par1ItemStack))); par3EntityPlayer.addChatComponentMessage(chatmessagecomponent); } + }else if(!par3EntityPlayer.isSwingInProgress) + { + this.cycleDirection(par1ItemStack); } return par1ItemStack; @@ -327,4 +341,61 @@ public class ItemRitualDiviner extends EnergyItems ((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1); list.add(duskRitualDivinerStack); } -} + + public int getDirection(ItemStack itemStack) + { + if(itemStack.stackTagCompound == null) + { + itemStack.setTagCompound(new NBTTagCompound()); + } + + return itemStack.stackTagCompound.getInteger("direction"); + } + + public void setDirection(ItemStack itemStack, int direction) + { + if(itemStack.stackTagCompound == null) + { + itemStack.setTagCompound(new NBTTagCompound()); + } + + itemStack.stackTagCompound.setInteger("direction", direction); + } + + public void cycleDirection(ItemStack itemStack) + { + int direction = this.getDirection(itemStack); + + if(direction < 4) + { + direction = Math.max(1, direction + 1); + }else + { + direction = 1; + } + + this.setDirection(itemStack, direction); + } + + public String getNameForDirection(int direction) + { + String dir = ""; + switch(direction) + { + case 0: + case 1: + dir = "NORTH"; + break; + case 2: + dir = "EAST"; + break; + case 3: + dir = "SOUTH"; + break; + case 4: + dir = "WEST"; + } + + return dir; + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/spell/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/spell/ItemSpellMultiTool.java index 6664a019..73adf060 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/spell/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/spell/ItemSpellMultiTool.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.spell; +import WayofTime.alchemicalWizardry.api.spell.SpellEffect; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; import net.minecraft.block.material.Material; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java index 186d1722..25ed12ae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java @@ -1,6 +1,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellEffect; +import WayofTime.alchemicalWizardry.api.spell.SpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IProjectileUpdateEffect; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java index 181c9a4b..ffe8d51e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IMeleeSpellEntityEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IMeleeSpellWorldEffect; @@ -37,7 +38,7 @@ public class SpellParadigmMelee extends SpellParadigm { return; } - + for (IMeleeSpellEntityEffect effect : entityEffectList) { effect.onEntityImpact(world, entityPlayer); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java index 728d03a7..3fbcf2e8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java @@ -1,7 +1,8 @@ package WayofTime.alchemicalWizardry.common.spell.complex; +import WayofTime.alchemicalWizardry.api.spell.SpellEffect; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java index 623ae78b..0ba36234 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ISelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmTool.java index a4635f40..ac9951b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmTool.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex; import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.spell.SpellEffect; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.spell.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.*; import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java deleted file mode 100644 index cf17a98f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java +++ /dev/null @@ -1,334 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -import WayofTime.alchemicalWizardry.common.spell.complex.*; -import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; -import net.minecraft.nbt.NBTTagCompound; - -public abstract class SpellEffect -{ - protected int modifierState; - protected int powerEnhancement; - protected int costEnhancement; - protected int potencyEnhancement; - - public SpellEffect() - { - this.modifierState = SpellModifier.DEFAULT; - this.powerEnhancement = 0; - this.costEnhancement = 0; - this.potencyEnhancement = 0; - } - - public void enhanceEffect(SpellEnhancement enh) - { - if (enh != null) - { - switch (enh.getState()) - { - case SpellEnhancement.POWER: - this.powerEnhancement++; - break; - case SpellEnhancement.EFFICIENCY: - this.costEnhancement++; - break; - case SpellEnhancement.POTENCY: - this.potencyEnhancement++; - break; - } - } - } - - public void modifyEffect(SpellModifier mod) - { - if (mod != null) - modifierState = mod.getModifier(); - } - - public void modifyParadigm(SpellParadigm parad) - { - if (parad instanceof SpellParadigmProjectile) - { - this.modifyProjectileParadigm((SpellParadigmProjectile) parad); - } - if (parad instanceof SpellParadigmSelf) - { - this.modifySelfParadigm((SpellParadigmSelf) parad); - } - if (parad instanceof SpellParadigmMelee) - { - this.modifyMeleeParadigm((SpellParadigmMelee) parad); - } - if (parad instanceof SpellParadigmTool) - { - this.modifyToolParadigm((SpellParadigmTool) parad); - } - } - - public void modifyProjectileParadigm(SpellParadigmProjectile parad) - { - switch (modifierState) - { - case SpellModifier.DEFAULT: - this.defaultModificationProjectile(parad); - break; - case SpellModifier.OFFENSIVE: - this.offensiveModificationProjectile(parad); - break; - case SpellModifier.DEFENSIVE: - this.defensiveModificationProjectile(parad); - break; - case SpellModifier.ENVIRONMENTAL: - this.environmentalModificationProjectile(parad); - break; - } - } - - public abstract void defaultModificationProjectile(SpellParadigmProjectile parad); - - public abstract void offensiveModificationProjectile(SpellParadigmProjectile parad); - - public abstract void defensiveModificationProjectile(SpellParadigmProjectile parad); - - public abstract void environmentalModificationProjectile(SpellParadigmProjectile parad); - - public void modifySelfParadigm(SpellParadigmSelf parad) - { - switch (modifierState) - { - case SpellModifier.DEFAULT: - this.defaultModificationSelf(parad); - break; - case SpellModifier.OFFENSIVE: - this.offensiveModificationSelf(parad); - break; - case SpellModifier.DEFENSIVE: - this.defensiveModificationSelf(parad); - break; - case SpellModifier.ENVIRONMENTAL: - this.environmentalModificationSelf(parad); - break; - } - } - - public abstract void defaultModificationSelf(SpellParadigmSelf parad); - - public abstract void offensiveModificationSelf(SpellParadigmSelf parad); - - public abstract void defensiveModificationSelf(SpellParadigmSelf parad); - - public abstract void environmentalModificationSelf(SpellParadigmSelf parad); - - public void modifyMeleeParadigm(SpellParadigmMelee parad) - { - switch (modifierState) - { - case SpellModifier.DEFAULT: - this.defaultModificationMelee(parad); - break; - case SpellModifier.OFFENSIVE: - this.offensiveModificationMelee(parad); - break; - case SpellModifier.DEFENSIVE: - this.defensiveModificationMelee(parad); - break; - case SpellModifier.ENVIRONMENTAL: - this.environmentalModificationMelee(parad); - break; - } - } - - public abstract void defaultModificationMelee(SpellParadigmMelee parad); - - public abstract void offensiveModificationMelee(SpellParadigmMelee parad); - - public abstract void defensiveModificationMelee(SpellParadigmMelee parad); - - public abstract void environmentalModificationMelee(SpellParadigmMelee parad); - - public void modifyToolParadigm(SpellParadigmTool parad) - { - switch (modifierState) - { - case SpellModifier.DEFAULT: - this.defaultModificationTool(parad); - break; - case SpellModifier.OFFENSIVE: - this.offensiveModificationTool(parad); - break; - case SpellModifier.DEFENSIVE: - this.defensiveModificationTool(parad); - break; - case SpellModifier.ENVIRONMENTAL: - this.environmentalModificationTool(parad); - break; - } - } - - public abstract void defaultModificationTool(SpellParadigmTool parad); - - public abstract void offensiveModificationTool(SpellParadigmTool parad); - - public abstract void defensiveModificationTool(SpellParadigmTool parad); - - public abstract void environmentalModificationTool(SpellParadigmTool parad); - - public int getCostForProjectile() - { - switch (this.modifierState) - { - case SpellModifier.DEFAULT: - return this.getCostForDefaultProjectile(); - case SpellModifier.OFFENSIVE: - return this.getCostForOffenseProjectile(); - case SpellModifier.DEFENSIVE: - return this.getCostForDefenseProjectile(); - case SpellModifier.ENVIRONMENTAL: - return this.getCostForEnvironmentProjectile(); - } - return 0; - } - - protected abstract int getCostForDefaultProjectile(); - - protected abstract int getCostForOffenseProjectile(); - - protected abstract int getCostForDefenseProjectile(); - - protected abstract int getCostForEnvironmentProjectile(); - - public int getCostForSelf() - { - switch (this.modifierState) - { - case SpellModifier.DEFAULT: - return this.getCostForDefaultSelf(); - case SpellModifier.OFFENSIVE: - return this.getCostForOffenseSelf(); - case SpellModifier.DEFENSIVE: - return this.getCostForDefenseSelf(); - case SpellModifier.ENVIRONMENTAL: - return this.getCostForEnvironmentSelf(); - } - return 0; - } - - protected abstract int getCostForDefaultSelf(); - - protected abstract int getCostForOffenseSelf(); - - protected abstract int getCostForDefenseSelf(); - - protected abstract int getCostForEnvironmentSelf(); - - public int getCostForMelee() - { - switch (this.modifierState) - { - case SpellModifier.DEFAULT: - return this.getCostForDefaultMelee(); - case SpellModifier.OFFENSIVE: - return this.getCostForOffenseMelee(); - case SpellModifier.DEFENSIVE: - return this.getCostForDefenseMelee(); - case SpellModifier.ENVIRONMENTAL: - return this.getCostForEnvironmentMelee(); - } - return 0; - } - - protected abstract int getCostForDefaultMelee(); - - protected abstract int getCostForOffenseMelee(); - - protected abstract int getCostForDefenseMelee(); - - protected abstract int getCostForEnvironmentMelee(); - - public int getCostForTool() - { - switch (this.modifierState) - { - case SpellModifier.DEFAULT: - return this.getCostForDefaultTool(); - case SpellModifier.OFFENSIVE: - return this.getCostForOffenseTool(); - case SpellModifier.DEFENSIVE: - return this.getCostForDefenseTool(); - case SpellModifier.ENVIRONMENTAL: - return this.getCostForEnvironmentTool(); - } - return 0; - } - - protected abstract int getCostForDefaultTool(); - - protected abstract int getCostForOffenseTool(); - - protected abstract int getCostForDefenseTool(); - - protected abstract int getCostForEnvironmentTool(); - - public int getPowerEnhancements() - { - return this.powerEnhancement; - } - - public int getCostEnhancements() - { - return this.costEnhancement; - } - - public int getPotencyEnhancements() - { - return this.potencyEnhancement; - } - - 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; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java deleted file mode 100644 index 1fde92cd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java +++ /dev/null @@ -1,267 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.*; - -public class SpellEffectEarth extends SpellEffect -{ - @Override - public void defaultModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationProjectile(SpellParadigmProjectile parad) - { - parad.addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - protected int getCostForDefaultProjectile() - { - return (int) (10 * Math.pow((0.5 * (this.powerEnhancement) + 1) * 2 + 1, 3) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseProjectile() - { - - return (int) (10 * (1.5 * this.potencyEnhancement + 1) * (Math.pow(1 * this.powerEnhancement + 1, 2)) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseProjectile() - { - return (int) (3 * Math.pow((this.powerEnhancement * 2 + 1), 2) * (this.potencyEnhancement * 2 + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentProjectile() - { - return (int) (10 * 2 * (0.1d * (this.potencyEnhancement + 1)) * Math.pow(3.47, this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultSelf() - { - return (int) (20 * Math.pow(1.5 * powerEnhancement + 1, 2) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseSelf() - { - return (int) (10 * Math.pow(2 * this.powerEnhancement + 1, 2) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseSelf() - { - return (int) (750 * (1.1 * this.powerEnhancement + 1) * (0.5 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentSelf() - { - return (int) (250 * (1.2 * this.potencyEnhancement + 1) * (3 * this.powerEnhancement + 2.5) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultMelee() - { - return (int) (50 * Math.pow(1.5 * this.potencyEnhancement + 1, 3) * (0.5 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseMelee() - { - return (int) (20 * Math.pow(1.5 * this.powerEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseMelee() - { - return (int) (5 * (1.2 * this.powerEnhancement + 1) * (1.0f / 3.0f * Math.pow(this.potencyEnhancement, 2) + 2 + 1.0f / 2.0f * this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentMelee() - { - return (int) (500 * Math.pow(2 * this.potencyEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - public void defaultModificationTool(SpellParadigmTool parad) - { - String toolClass = "pickaxe"; - - - float digSpeed = 7.0f; - - - switch (this.powerEnhancement) - { - case 1: - digSpeed = 9.0f; - break; - case 2: - digSpeed = 12.0f; - break; - case 3: - digSpeed = 16.0f; - break; - case 4: - digSpeed = 21.0f; - break; - case 5: - digSpeed = 27.0f; - break; - } - - - parad.setDigSpeed(toolClass, digSpeed); - - - int hlvl = this.potencyEnhancement + 2; - parad.setHarvestLevel(toolClass, hlvl); - } - - - @Override - public void offensiveModificationTool(SpellParadigmTool parad) - { - parad.addItemManipulatorEffect(new ToolOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationTool(SpellParadigmTool parad) - { - String toolClass = "shovel"; - - - float digSpeed = 7.0f; - - - switch (this.powerEnhancement) - { - case 1: - digSpeed = 9.0f; - break; - case 2: - digSpeed = 12.0f; - break; - case 3: - digSpeed = 16.0f; - break; - case 4: - digSpeed = 21.0f; - break; - case 5: - digSpeed = 27.0f; - break; - } - - - parad.setDigSpeed(toolClass, digSpeed); - - - int hlvl = this.potencyEnhancement + 2; - parad.setHarvestLevel(toolClass, hlvl); - } - - - @Override - public void environmentalModificationTool(SpellParadigmTool parad) - { - parad.addDigAreaEffect(new ToolEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - - @Override - protected int getCostForDefaultTool() - { - return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); - } - - - @Override - protected int getCostForOffenseTool() - { - return 1000; - } - - @Override - protected int getCostForDefenseTool() - { - return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentTool() - { - return (int) (10 * (1 + this.potencyEnhancement * 0.8) * Math.pow(1.5 * this.powerEnhancement + 3, 2) * Math.pow(0.85, this.costEnhancement)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java deleted file mode 100644 index cb5e8a73..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java +++ /dev/null @@ -1,211 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.*; - -public class SpellEffectFire extends SpellEffect -{ - @Override - public void defaultModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - parad.damage += this.potencyEnhancement; - } - - @Override - public void offensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileOffensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileDefensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationProjectile(SpellParadigmProjectile parad) - { - parad.addUpdateEffect(new ProjectileEnvironmentalFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - - @Override - public void offensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - - @Override - public void defensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - - @Override - public void environmentalModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - - @Override - public void defaultModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeDefaultFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeOffensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeDefensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeEnvironmentalFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - protected int getCostForDefaultProjectile() - { - return (int) ((5 * Math.pow(1.5 * this.powerEnhancement + 1, 2) * (1.5 * this.potencyEnhancement + 1) + this.potencyEnhancement * 15) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseProjectile() - { - return (int) (10 * Math.pow((this.powerEnhancement) * 1.3 + 1, 2) * ((1.5 * this.potencyEnhancement + 1)) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseProjectile() - { - return (int) (25 * Math.pow(1 * this.powerEnhancement + 1, 2) * (1 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentProjectile() - { - return (int) (75 * (0.5 * this.powerEnhancement + 1) * (0.5 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultSelf() - { - return 10 * (int) (10 * Math.pow(1.5, this.powerEnhancement + 1.5 * this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseSelf() - { - return (int) (300 * (3 * powerEnhancement + 1) * (2 * potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseSelf() - { - return (int) (25 * (3 * this.potencyEnhancement + 1) * (2 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentSelf() - { - return (int) ((15 * Math.pow(1.7, powerEnhancement) + 10 * Math.pow(potencyEnhancement, 1.8)) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultMelee() - { - return (int) (25 * (1.2 * this.potencyEnhancement + 1) * (2.5 * this.powerEnhancement + 2) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseMelee() - { - return (int) (500 * (1 + this.potencyEnhancement) * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseMelee() - { - return (int) (30 * (1.5 * potencyEnhancement + 1) * (3 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentMelee() - { - return (int) (25 * Math.pow(1.5 * this.powerEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - public void defaultModificationTool(SpellParadigmTool parad) - { - parad.addItemManipulatorEffect(new ToolDefaultFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationTool(SpellParadigmTool parad) - { - parad.addLeftClickEffect(new ToolOffensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - parad.addToolString("offFire", "Fire Aspect" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - - @Override - public void defensiveModificationTool(SpellParadigmTool parad) - { - parad.addCritChance("defFire", this.potencyEnhancement); - - parad.addDuration("defFire", 1200 * this.powerEnhancement); - - parad.addToolString("defFire", "Unbreaking" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - - @Override - public void environmentalModificationTool(SpellParadigmTool parad) - { - parad.addBlockBreakEffect(new ToolEnvironmentalFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - parad.addToolString("envFire", "Magma Plume" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - - @Override - protected int getCostForDefaultTool() - { - return 1000; - } - - @Override - protected int getCostForOffenseTool() - { - return (int) (1000 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseTool() - { - return (int) (500 * (1 + this.powerEnhancement * 0.5f) * (1 + this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentTool() - { - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectIce.java deleted file mode 100644 index 2ab1b5cd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectIce.java +++ /dev/null @@ -1,228 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.*; - -public class SpellEffectIce extends SpellEffect -{ - @Override - public void defaultModificationProjectile(SpellParadigmProjectile parad) - { - parad.damage += this.potencyEnhancement; - parad.addImpactEffect(new ProjectileDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.damage += 2; - parad.addImpactEffect(new ProjectileOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - } - - @Override - public void environmentalModificationProjectile(SpellParadigmProjectile parad) - { - parad.addUpdateEffect(new ProjectileEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - protected int getCostForDefaultProjectile() - { - return (int) ((30) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseProjectile() - { - return (int) ((60) * (this.powerEnhancement + 1) * (3 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseProjectile() - { - return (int) (75 * (2 * this.powerEnhancement + 1) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentProjectile() - { - return (int) (200 * (2 * this.powerEnhancement + 1) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultSelf() - { - return (int) (20 * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseSelf() - { - return (int) (100 * (2 * this.powerEnhancement + 1) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseSelf() - { - return (int) (200 * (3 * powerEnhancement + 1) * (2 * potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentSelf() - { - return (int) (10 * (1.5 * potencyEnhancement + 1) * (3 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultMelee() - { - return (int) (250 * (potencyEnhancement + 1) * (1.5 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseMelee() - { - return (int) (40 * (1.5 * potencyEnhancement + 1) * Math.pow(1.5, powerEnhancement) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseMelee() - { - return (int) (50 * (0.5 * potencyEnhancement + 1) * (0.7 * powerEnhancement + 1) * (0.5 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentMelee() - { - return (int) (20 * (0.5 * potencyEnhancement + 1) * (0 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - public void defaultModificationTool(SpellParadigmTool parad) - { - parad.addLeftClickEffect(new ToolDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - - parad.addToolString("FrostTouch", "FrostTouch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); - - - parad.addCritChance("FrostCrit", this.potencyEnhancement * 0.5f); - } - - - @Override - public void offensiveModificationTool(SpellParadigmTool parad) - { - parad.addDamageToHash("Sharpness", (this.powerEnhancement + 1) * 1.5f); - - - parad.addToolString("Sharpness", "Sharpness" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); - - - parad.addCritChance("SharpCrit", this.potencyEnhancement); - } - - - @Override - public void defensiveModificationTool(SpellParadigmTool parad) - { - parad.addToolSummonEffect(new ToolDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - - @Override - public void environmentalModificationTool(SpellParadigmTool parad) - { - parad.addToolString("SilkTouch", "Silk Touch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); - - - parad.setSilkTouch(true); - } - - - @Override - protected int getCostForDefaultTool() - { - return (int) (500 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.1f) * Math.pow(0.85, costEnhancement)); - } - - - @Override - protected int getCostForOffenseTool() - { - return (int) (1000 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); - } - - - @Override - protected int getCostForDefenseTool() - { - return (int) (500 * (1 + this.powerEnhancement * 0.2) * (1 + this.potencyEnhancement * 0.5) * Math.pow(0.85, costEnhancement)); - } - - - @Override - protected int getCostForEnvironmentTool() - { - return (int) (1000 * Math.pow(0.85, costEnhancement)); - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java deleted file mode 100644 index 2d661892..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java +++ /dev/null @@ -1,229 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; -import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.*; - -public class SpellEffectWind extends SpellEffect -{ - @Override - public void defaultModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.addImpactEffect(new ProjectileOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationProjectile(SpellParadigmProjectile parad) - { - parad.isSilkTouch = true; - } - - @Override - public void environmentalModificationProjectile(SpellParadigmProjectile parad) - { - parad.addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationSelf(SpellParadigmSelf parad) - { - parad.addSelfSpellEffect(new SelfEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defaultModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void offensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationMelee(SpellParadigmMelee parad) - { - parad.addEntityEffect(new MeleeDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void environmentalModificationMelee(SpellParadigmMelee parad) - { - parad.addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - protected int getCostForDefaultProjectile() - { - return (int) (100 * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseProjectile() - { - return (int) (100 * (0.5 * this.potencyEnhancement + 1) * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseProjectile() - { - return (int) (100 * (this.potencyEnhancement + 1)); - } - - @Override - protected int getCostForEnvironmentProjectile() - { - return (int) (50 * (this.powerEnhancement + 1) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultSelf() - { - return (int) (100 * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseSelf() - { - return (int) (100 * (0.5 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseSelf() - { - return (int) (500 * (0.7d * this.powerEnhancement + 1) * (0.8 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentSelf() - { - return (int) (500 * (0.7d * this.powerEnhancement + 1) * (0.2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefaultMelee() - { - return (int) (350 * (1.0 * this.potencyEnhancement + 1) * (1.2 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseMelee() - { - return (int) (250 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForDefenseMelee() - { - return (int) (150 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentMelee() - { - return (int) (100 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } - - @Override - public void defaultModificationTool(SpellParadigmTool parad) - { - String toolClass = "axe"; - - float digSpeed = 7.0f; - - switch (this.powerEnhancement) - { - case 1: - digSpeed = 9.0f; - break; - case 2: - digSpeed = 12.0f; - break; - case 3: - digSpeed = 16.0f; - break; - case 4: - digSpeed = 21.0f; - break; - case 5: - digSpeed = 27.0f; - break; - } - - parad.setDigSpeed(toolClass, digSpeed); - - int hlvl = this.potencyEnhancement + 2; - parad.setHarvestLevel(toolClass, hlvl); - } - - @Override - public void offensiveModificationTool(SpellParadigmTool parad) - { - parad.addLeftClickEffect(new ToolOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - public void defensiveModificationTool(SpellParadigmTool parad) - { - parad.addLeftClickEffect(new ToolDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - parad.addToolString("DefWind", "Knockback" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - - @Override - public void environmentalModificationTool(SpellParadigmTool parad) - { - parad.addBlockBreakEffect(new ToolEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - - @Override - protected int getCostForDefaultTool() - { - return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForOffenseTool() - { - return 0; //Cost is on the attack method - } - - @Override - protected int getCostForDefenseTool() - { - return (int) (150 * (1 + this.powerEnhancement * 0.4f) * (1 + this.potencyEnhancement * 0.3f) * Math.pow(0.85, costEnhancement)); - } - - @Override - protected int getCostForEnvironmentTool() - { - return (int) (150 * (1 + this.powerEnhancement) * Math.pow(0.85, costEnhancement)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java new file mode 100644 index 00000000..8b844296 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth; + +public class CSEMeleeDefaultEarth extends ComplexSpellEffect +{ + public CSEMeleeDefaultEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); + } + + public CSEMeleeDefaultEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addWorldEffect(new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefaultEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (50 * Math.pow(1.5 * this.potencyEnhancement + 1, 3) * (0.5 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java new file mode 100644 index 00000000..b31930fc --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefensiveEarth; + +public class CSEMeleeDefensiveEarth extends ComplexSpellEffect +{ + public CSEMeleeDefensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); + } + + public CSEMeleeDefensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (5 * (1.2 * this.powerEnhancement + 1) * (1.0f / 3.0f * Math.pow(this.potencyEnhancement, 2) + 2 + 1.0f / 2.0f * this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java new file mode 100644 index 00000000..52981962 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeEnvironmentalEarth; + +public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect +{ + public CSEMeleeEnvironmentalEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEMeleeEnvironmentalEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeEnvironmentalEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * Math.pow(2 * this.potencyEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java new file mode 100644 index 00000000..2d947895 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeOffensiveEarth; + +public class CSEMeleeOffensiveEarth extends ComplexSpellEffect +{ + public CSEMeleeOffensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); + } + + public CSEMeleeOffensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeOffensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (20 * Math.pow(1.5 * this.powerEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java new file mode 100644 index 00000000..c2a0cb57 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth; + +public class CSEProjectileDefaultEarth extends ComplexSpellEffect +{ + public CSEProjectileDefaultEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); + } + + public CSEProjectileDefaultEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefaultEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * Math.pow((0.5 * (this.powerEnhancement) + 1) * 2 + 1, 3) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java new file mode 100644 index 00000000..01e0e12c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth; + +public class CSEProjectileDefensiveEarth extends ComplexSpellEffect +{ + public CSEProjectileDefensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); + } + + public CSEProjectileDefensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (3 * Math.pow((this.powerEnhancement * 2 + 1), 2) * (this.potencyEnhancement * 2 + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java new file mode 100644 index 00000000..7ee74eb4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth; + +public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect +{ + public CSEProjectileEnvironmentalEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEProjectileEnvironmentalEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileEnvironmentalEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * 2 * (0.1d * (this.potencyEnhancement + 1)) * Math.pow(3.47, this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java new file mode 100644 index 00000000..f0fd1be9 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth; + +public class CSEProjectileOffensiveEarth extends ComplexSpellEffect +{ + public CSEProjectileOffensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); + } + + public CSEProjectileOffensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileOffensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * (1.5 * this.potencyEnhancement + 1) * (Math.pow(1 * this.powerEnhancement + 1, 2)) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java new file mode 100644 index 00000000..8acc0b28 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefaultEarth; + +public class CSESelfDefaultEarth extends ComplexSpellEffect +{ + public CSESelfDefaultEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); + } + + public CSESelfDefaultEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefaultEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (20 * Math.pow(1.5 * powerEnhancement + 1, 2) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java new file mode 100644 index 00000000..501c2032 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefensiveEarth; + +public class CSESelfDefensiveEarth extends ComplexSpellEffect +{ + public CSESelfDefensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); + } + + public CSESelfDefensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (750 * (1.1 * this.powerEnhancement + 1) * (0.5 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java new file mode 100644 index 00000000..a285fd3a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfEnvironmentalEarth; + +public class CSESelfEnvironmentalEarth extends ComplexSpellEffect +{ + public CSESelfEnvironmentalEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSESelfEnvironmentalEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfEnvironmentalEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (250 * (1.2 * this.potencyEnhancement + 1) * (3 * this.powerEnhancement + 2.5) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java new file mode 100644 index 00000000..c242560b --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfOffensiveEarth; + +public class CSESelfOffensiveEarth extends ComplexSpellEffect +{ + public CSESelfOffensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); + } + + public CSESelfOffensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfOffensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * Math.pow(2 * this.powerEnhancement + 1, 2) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java new file mode 100644 index 00000000..5afd351c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java @@ -0,0 +1,75 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; + +public class CSEToolDefaultEarth extends ComplexSpellEffect +{ + public CSEToolDefaultEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); + } + + public CSEToolDefaultEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + String toolClass = "pickaxe"; + + + float digSpeed = 7.0f; + + + switch (this.powerEnhancement) + { + case 1: + digSpeed = 9.0f; + break; + case 2: + digSpeed = 12.0f; + break; + case 3: + digSpeed = 16.0f; + break; + case 4: + digSpeed = 21.0f; + break; + case 5: + digSpeed = 27.0f; + break; + } + + + ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); + + + int hlvl = this.potencyEnhancement + 2; + ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefaultEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java new file mode 100644 index 00000000..854f41b0 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java @@ -0,0 +1,75 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; + +public class CSEToolDefensiveEarth extends ComplexSpellEffect +{ + public CSEToolDefensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); + } + + public CSEToolDefensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + String toolClass = "shovel"; + + + float digSpeed = 7.0f; + + + switch (this.powerEnhancement) + { + case 1: + digSpeed = 9.0f; + break; + case 2: + digSpeed = 12.0f; + break; + case 3: + digSpeed = 16.0f; + break; + case 4: + digSpeed = 21.0f; + break; + case 5: + digSpeed = 27.0f; + break; + } + + + ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); + + + int hlvl = this.potencyEnhancement + 2; + ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java new file mode 100644 index 00000000..d7167e9b --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ToolEnvironmentalEarth; + +public class CSEToolEnvironmentalEarth extends ComplexSpellEffect +{ + public CSEToolEnvironmentalEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEToolEnvironmentalEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addDigAreaEffect(new ToolEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolEnvironmentalEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * (1 + this.potencyEnhancement * 0.8) * Math.pow(1.5 * this.powerEnhancement + 3, 2) * Math.pow(0.85, this.costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java new file mode 100644 index 00000000..c402c3ec --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ToolOffensiveEarth; + +public class CSEToolOffensiveEarth extends ComplexSpellEffect +{ + public CSEToolOffensiveEarth() + { + super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); + } + + public CSEToolOffensiveEarth(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addItemManipulatorEffect(new ToolOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolOffensiveEarth(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return 1000; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java new file mode 100644 index 00000000..63e571f4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeDefaultFire; + +public class CSEMeleeDefaultFire extends ComplexSpellEffect +{ + public CSEMeleeDefaultFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); + } + + public CSEMeleeDefaultFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee) parad).addEntityEffect(new MeleeDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefaultFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (25 * (1.2 * this.potencyEnhancement + 1) * (2.5 * this.powerEnhancement + 2) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java new file mode 100644 index 00000000..0f351c10 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeDefensiveFire; + +public class CSEMeleeDefensiveFire extends ComplexSpellEffect +{ + public CSEMeleeDefensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); + } + + public CSEMeleeDefensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee) parad).addWorldEffect(new MeleeDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (30 * (1.5 * potencyEnhancement + 1) * (3 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java new file mode 100644 index 00000000..d337c63f --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeEnvironmentalFire; + +public class CSEMeleeEnvironmentalFire extends ComplexSpellEffect +{ + public CSEMeleeEnvironmentalFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEMeleeEnvironmentalFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee) parad).addWorldEffect(new MeleeEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeEnvironmentalFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (25 * Math.pow(1.5 * this.powerEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java new file mode 100644 index 00000000..2d0a2fe3 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeOffensiveFire; + +public class CSEMeleeOffensiveFire extends ComplexSpellEffect +{ + public CSEMeleeOffensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); + } + + public CSEMeleeOffensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee) parad).addEntityEffect(new MeleeOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeOffensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * (1 + this.potencyEnhancement) * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java new file mode 100644 index 00000000..37a6bd2e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire; + +public class CSEProjectileDefaultFire extends ComplexSpellEffect +{ + public CSEProjectileDefaultFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); + } + + public CSEProjectileDefaultFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile) parad).addImpactEffect(new ProjectileDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); + ((SpellParadigmProjectile) parad).damage += this.potencyEnhancement; + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefaultFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) ((5 * Math.pow(1.5 * this.powerEnhancement + 1, 2) * (1.5 * this.potencyEnhancement + 1) + this.potencyEnhancement * 15) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java new file mode 100644 index 00000000..01c60055 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefensiveFire; + +public class CSEProjectileDefensiveFire extends ComplexSpellEffect +{ + public CSEProjectileDefensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); + } + + public CSEProjectileDefensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile) parad).addImpactEffect(new ProjectileDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (25 * Math.pow(1 * this.powerEnhancement + 1, 2) * (1 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java new file mode 100644 index 00000000..c9c22e91 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileEnvironmentalFire; + +public class CSEProjectileEnvironmentalFire extends ComplexSpellEffect +{ + public CSEProjectileEnvironmentalFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEProjectileEnvironmentalFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile) parad).addUpdateEffect(new ProjectileEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileEnvironmentalFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (75 * (0.5 * this.powerEnhancement + 1) * (0.5 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java new file mode 100644 index 00000000..836149c5 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileOffensiveFire; + +public class CSEProjectileOffensiveFire extends ComplexSpellEffect +{ + public CSEProjectileOffensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); + } + + public CSEProjectileOffensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile) parad).addImpactEffect(new ProjectileOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileOffensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * Math.pow((this.powerEnhancement) * 1.3 + 1, 2) * ((1.5 * this.potencyEnhancement + 1)) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java new file mode 100644 index 00000000..341dbecb --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefaultFire; + +public class CSESelfDefaultFire extends ComplexSpellEffect +{ + public CSESelfDefaultFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); + } + + public CSESelfDefaultFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefaultFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return 10 * (int) (10 * Math.pow(1.5, this.powerEnhancement + 1.5 * this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java new file mode 100644 index 00000000..8ad4da33 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefensiveFire; + +public class CSESelfDefensiveFire extends ComplexSpellEffect +{ + public CSESelfDefensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); + } + + public CSESelfDefensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (25 * (3 * this.potencyEnhancement + 1) * (2 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java new file mode 100644 index 00000000..a9d52848 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfEnvironmentalFire; + +public class CSESelfEnvironmentalFire extends ComplexSpellEffect +{ + public CSESelfEnvironmentalFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSESelfEnvironmentalFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfEnvironmentalFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) ((15 * Math.pow(1.7, powerEnhancement) + 10 * Math.pow(potencyEnhancement, 1.8)) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java new file mode 100644 index 00000000..b65d262e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfOffensiveFire; + +public class CSESelfOffensiveFire extends ComplexSpellEffect +{ + public CSESelfOffensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); + } + + public CSESelfOffensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfOffensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (300 * (3 * powerEnhancement + 1) * (2 * potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java new file mode 100644 index 00000000..8f9afbce --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ToolDefaultFire; + +public class CSEToolDefaultFire extends ComplexSpellEffect +{ + public CSEToolDefaultFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); + } + + public CSEToolDefaultFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool) parad).addItemManipulatorEffect(new ToolDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefaultFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return 1000; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java new file mode 100644 index 00000000..29f893e9 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java @@ -0,0 +1,50 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +public class CSEToolDefensiveFire extends ComplexSpellEffect +{ + public CSEToolDefensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); + } + + public CSEToolDefensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addCritChance("defFire", this.potencyEnhancement); + + ((SpellParadigmTool)parad).addDuration("defFire", 1200 * this.powerEnhancement); + + ((SpellParadigmTool)parad).addToolString("defFire", "Unbreaking" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * (1 + this.powerEnhancement * 0.5f) * (1 + this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java new file mode 100644 index 00000000..9ef67f07 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java @@ -0,0 +1,49 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ToolEnvironmentalFire; + +public class CSEToolEnvironmentalFire extends ComplexSpellEffect +{ + public CSEToolEnvironmentalFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEToolEnvironmentalFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addBlockBreakEffect(new ToolEnvironmentalFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + + ((SpellParadigmTool)parad).addToolString("envFire", "Magma Plume" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolEnvironmentalFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return 0; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java new file mode 100644 index 00000000..cceb913f --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java @@ -0,0 +1,49 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ToolOffensiveFire; + +public class CSEToolOffensiveFire extends ComplexSpellEffect +{ + public CSEToolOffensiveFire() + { + super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); + } + + public CSEToolOffensiveFire(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addLeftClickEffect(new ToolOffensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + + ((SpellParadigmTool)parad).addToolString("offFire", "Fire Aspect" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolOffensiveFire(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (1000 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java new file mode 100644 index 00000000..0fcd08e4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeDefaultIce; + +public class CSEMeleeDefaultIce extends ComplexSpellEffect +{ + public CSEMeleeDefaultIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); + } + + public CSEMeleeDefaultIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addEntityEffect(new MeleeDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefaultIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (250 * (potencyEnhancement + 1) * (1.5 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java new file mode 100644 index 00000000..0b87f726 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeDefensiveIce; + +public class CSEMeleeDefensiveIce extends ComplexSpellEffect +{ + public CSEMeleeDefensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); + } + + public CSEMeleeDefensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addWorldEffect(new MeleeDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (50 * (0.5 * potencyEnhancement + 1) * (0.7 * powerEnhancement + 1) * (0.5 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java new file mode 100644 index 00000000..1ed57699 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeEnvironmentalIce; + +public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect +{ + public CSEMeleeEnvironmentalIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEMeleeEnvironmentalIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addEntityEffect(new MeleeEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeEnvironmentalIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (20 * (0.5 * potencyEnhancement + 1) * (0 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java new file mode 100644 index 00000000..44054b4f --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeOffensiveIce; + +public class CSEMeleeOffensiveIce extends ComplexSpellEffect +{ + public CSEMeleeOffensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); + } + + public CSEMeleeOffensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addEntityEffect(new MeleeOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeOffensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (40 * (1.5 * potencyEnhancement + 1) * Math.pow(1.5, powerEnhancement) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java new file mode 100644 index 00000000..8bf28c25 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java @@ -0,0 +1,48 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileDefaultIce; + +public class CSEProjectileDefaultIce extends ComplexSpellEffect +{ + public CSEProjectileDefaultIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); + } + + public CSEProjectileDefaultIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).damage += this.potencyEnhancement; + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefaultIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) ((30) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java new file mode 100644 index 00000000..c4cc4670 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileDefensiveIce; + +public class CSEProjectileDefensiveIce extends ComplexSpellEffect +{ + public CSEProjectileDefensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); + } + + public CSEProjectileDefensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (75 * (2 * this.powerEnhancement + 1) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java new file mode 100644 index 00000000..a1f78db7 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileEnvironmentalIce; + +public class CSEProjectileEnvironmentalIce extends ComplexSpellEffect +{ + public CSEProjectileEnvironmentalIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEProjectileEnvironmentalIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addUpdateEffect(new ProjectileEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileEnvironmentalIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (200 * (2 * this.powerEnhancement + 1) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java new file mode 100644 index 00000000..f3741e3d --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileOffensiveIce; + +public class CSEProjectileOffensiveIce extends ComplexSpellEffect +{ + public CSEProjectileOffensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); + } + + public CSEProjectileOffensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileOffensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) ((60) * (this.powerEnhancement + 1) * (3 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java new file mode 100644 index 00000000..d995000a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfDefaultIce; + +public class CSESelfDefaultIce extends ComplexSpellEffect +{ + public CSESelfDefaultIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); + } + + public CSESelfDefaultIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefaultIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (20 * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java new file mode 100644 index 00000000..a11fe463 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfDefensiveIce; + +public class CSESelfDefensiveIce extends ComplexSpellEffect +{ + public CSESelfDefensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); + } + + public CSESelfDefensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (200 * (3 * powerEnhancement + 1) * (2 * potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java new file mode 100644 index 00000000..d802c6ed --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfEnvironmentalIce; + +public class CSESelfEnvironmentalIce extends ComplexSpellEffect +{ + public CSESelfEnvironmentalIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSESelfEnvironmentalIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfEnvironmentalIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (10 * (1.5 * potencyEnhancement + 1) * (3 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java new file mode 100644 index 00000000..0f24f7ae --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfOffensiveIce; + +public class CSESelfOffensiveIce extends ComplexSpellEffect +{ + public CSESelfOffensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); + } + + public CSESelfOffensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfOffensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * (2 * this.powerEnhancement + 1) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java new file mode 100644 index 00000000..139935de --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java @@ -0,0 +1,51 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ToolDefaultIce; + +public class CSEToolDefaultIce extends ComplexSpellEffect +{ + public CSEToolDefaultIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); + } + + public CSEToolDefaultIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addLeftClickEffect(new ToolDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + + ((SpellParadigmTool)parad).addToolString("FrostTouch", "FrostTouch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); + + ((SpellParadigmTool)parad).addCritChance("FrostCrit", this.potencyEnhancement * 0.5f); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefaultIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.1f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java new file mode 100644 index 00000000..56dbec98 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ToolDefensiveIce; + +public class CSEToolDefensiveIce extends ComplexSpellEffect +{ + public CSEToolDefensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); + } + + public CSEToolDefensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addToolSummonEffect(new ToolDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * (1 + this.powerEnhancement * 0.2) * (1 + this.potencyEnhancement * 0.5) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java new file mode 100644 index 00000000..d82019a8 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java @@ -0,0 +1,48 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +public class CSEToolEnvironmentalIce extends ComplexSpellEffect +{ + public CSEToolEnvironmentalIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEToolEnvironmentalIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addToolString("SilkTouch", "Silk Touch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); + + ((SpellParadigmTool)parad).setSilkTouch(true); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolEnvironmentalIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (1000 * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java new file mode 100644 index 00000000..9a975538 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java @@ -0,0 +1,50 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +public class CSEToolOffensiveIce extends ComplexSpellEffect +{ + public CSEToolOffensiveIce() + { + super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); + } + + public CSEToolOffensiveIce(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addDamageToHash("Sharpness", (this.powerEnhancement + 1) * 1.5f); + + ((SpellParadigmTool)parad).addToolString("Sharpness", "Sharpness" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); + + ((SpellParadigmTool)parad).addCritChance("SharpCrit", this.potencyEnhancement); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolOffensiveIce(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (1000 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java new file mode 100644 index 00000000..f2eec8c7 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeDefaultWind; + +public class CSEMeleeDefaultWind extends ComplexSpellEffect +{ + public CSEMeleeDefaultWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); + } + + public CSEMeleeDefaultWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addEntityEffect(new MeleeDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefaultWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (350 * (1.0 * this.potencyEnhancement + 1) * (1.2 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java new file mode 100644 index 00000000..e987fd78 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeDefensiveWind; + +public class CSEMeleeDefensiveWind extends ComplexSpellEffect +{ + public CSEMeleeDefensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); + } + + public CSEMeleeDefensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addEntityEffect(new MeleeDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeDefensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (150 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java new file mode 100644 index 00000000..2dfc91a3 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeEnvironmentalWind; + +public class CSEMeleeEnvironmentalWind extends ComplexSpellEffect +{ + public CSEMeleeEnvironmentalWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEMeleeEnvironmentalWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeEnvironmentalWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java new file mode 100644 index 00000000..cb6ed1e2 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeOffensiveWind; + +public class CSEMeleeOffensiveWind extends ComplexSpellEffect +{ + public CSEMeleeOffensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); + } + + public CSEMeleeOffensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmMelee) + { + ((SpellParadigmMelee)parad).addEntityEffect(new MeleeOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEMeleeOffensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (250 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java new file mode 100644 index 00000000..709f5e99 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileDefaultWind; + +public class CSEProjectileDefaultWind extends ComplexSpellEffect +{ + public CSEProjectileDefaultWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); + } + + public CSEProjectileDefaultWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefaultWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java new file mode 100644 index 00000000..e44976f8 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java @@ -0,0 +1,45 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; + +public class CSEProjectileDefensiveWind extends ComplexSpellEffect +{ + public CSEProjectileDefensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); + } + + public CSEProjectileDefensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).isSilkTouch = true; + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileDefensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * (this.potencyEnhancement + 1)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java new file mode 100644 index 00000000..11d638a4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind; + +public class CSEProjectileEnvironmentalWind extends ComplexSpellEffect +{ + public CSEProjectileEnvironmentalWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEProjectileEnvironmentalWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileEnvironmentalWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (50 * (this.powerEnhancement + 1) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java new file mode 100644 index 00000000..b5973db4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileOffensiveWind; + +public class CSEProjectileOffensiveWind extends ComplexSpellEffect +{ + public CSEProjectileOffensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); + } + + public CSEProjectileOffensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmProjectile) + { + ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEProjectileOffensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * (0.5 * this.potencyEnhancement + 1) * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java new file mode 100644 index 00000000..4f98bfca --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefaultWind; + +public class CSESelfDefaultWind extends ComplexSpellEffect +{ + public CSESelfDefaultWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); + } + + public CSESelfDefaultWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefaultWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java new file mode 100644 index 00000000..7887f3c0 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefensiveWind; + +public class CSESelfDefensiveWind extends ComplexSpellEffect +{ + public CSESelfDefensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); + } + + public CSESelfDefensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfDefensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * (0.7d * this.powerEnhancement + 1) * (0.8 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java new file mode 100644 index 00000000..c9169e26 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfEnvironmentalWind; + +public class CSESelfEnvironmentalWind extends ComplexSpellEffect +{ + public CSESelfEnvironmentalWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSESelfEnvironmentalWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfEnvironmentalWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (500 * (0.7d * this.powerEnhancement + 1) * (0.2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java new file mode 100644 index 00000000..bd6a985e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfOffensiveWind; + +public class CSESelfOffensiveWind extends ComplexSpellEffect +{ + public CSESelfOffensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); + } + + public CSESelfOffensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmSelf) + { + ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSESelfOffensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (100 * (0.5 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java new file mode 100644 index 00000000..af38ff5e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java @@ -0,0 +1,71 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; + +public class CSEToolDefaultWind extends ComplexSpellEffect +{ + public CSEToolDefaultWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); + } + + public CSEToolDefaultWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + String toolClass = "axe"; + + float digSpeed = 7.0f; + + switch (this.powerEnhancement) + { + case 1: + digSpeed = 9.0f; + break; + case 2: + digSpeed = 12.0f; + break; + case 3: + digSpeed = 16.0f; + break; + case 4: + digSpeed = 21.0f; + break; + case 5: + digSpeed = 27.0f; + break; + } + + ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); + + int hlvl = this.potencyEnhancement + 2; + ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefaultWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java new file mode 100644 index 00000000..51d562e0 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java @@ -0,0 +1,48 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ToolDefensiveWind; + +public class CSEToolDefensiveWind extends ComplexSpellEffect +{ + public CSEToolDefensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); + } + + public CSEToolDefensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addLeftClickEffect(new ToolDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool)parad).addToolString("DefWind", "Knockback" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolDefensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (150 * (1 + this.powerEnhancement * 0.4f) * (1 + this.potencyEnhancement * 0.3f) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java new file mode 100644 index 00000000..e6e0316f --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ToolEnvironmentalWind; + +public class CSEToolEnvironmentalWind extends ComplexSpellEffect +{ + public CSEToolEnvironmentalWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); + } + + public CSEToolEnvironmentalWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addBlockBreakEffect(new ToolEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolEnvironmentalWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return (int) (150 * (1 + this.powerEnhancement) * Math.pow(0.85, costEnhancement)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java new file mode 100644 index 00000000..4bf9c2a2 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java @@ -0,0 +1,46 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; + +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; +import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ToolOffensiveWind; + +public class CSEToolOffensiveWind extends ComplexSpellEffect +{ + public CSEToolOffensiveWind() + { + super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); + } + + public CSEToolOffensiveWind(int power, int cost, int potency) + { + this(); + + this.powerEnhancement = power; + this.costEnhancement = cost; + this.potencyEnhancement = potency; + } + + @Override + public void modifyParadigm(SpellParadigm parad) + { + if(parad instanceof SpellParadigmTool) + { + ((SpellParadigmTool)parad).addLeftClickEffect(new ToolOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + } + } + + @Override + public ComplexSpellEffect copy(int power, int cost, int potency) + { + return new CSEToolOffensiveWind(power, cost, potency); + } + + @Override + public int getCostOfEffect() + { + return 0; //Cost is on the attack method + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index ee1268d6..3c09f67a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -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 diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index a56ee1b1..94446c79 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -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); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java index adc23e99..b3657dcd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java @@ -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; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java index f5ca5813..824d1872 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java @@ -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 diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java index 50d6be8d..04eb0208 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java @@ -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; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java index f7032b52..47aaab77 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java @@ -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 diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java index 79fced74..13d7f43b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java @@ -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;