diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java index 9b41c684..743dfb5d 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java @@ -5,6 +5,8 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IProjectileUpdateEffect; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IMeleeSpellEntityEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IMeleeSpellEntityEffect.java deleted file mode 100644 index 0ab028f8..00000000 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IMeleeSpellEntityEffect.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -import net.minecraft.entity.Entity; -import net.minecraft.world.World; - -public interface IMeleeSpellEntityEffect -{ - public void onEntityImpact(World world, Entity entity); -} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java index b4185dfa..b1cac7de 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java @@ -6,6 +6,9 @@ import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IMeleeSpellEntityEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.IMeleeSpellWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; public class SpellParadigmMelee extends SpellParadigm @@ -22,15 +25,25 @@ public class SpellParadigmMelee extends SpellParadigm @Override public void enhanceParadigm(SpellEnhancement enh) { - // TODO Auto-generated method stub } @Override public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) { - // TODO Auto-generated method stub + for(IMeleeSpellEntityEffect effect : entityEffectList) + { + effect.onEntityImpact(world, entityPlayer); + } + for(IMeleeSpellWorldEffect effect : worldEffectList) + { + effect.onWorldEffect(world, entityPlayer); + } + + int cost = this.getTotalCost(); + + EnergyItems.syphonBatteries(itemStack, entityPlayer, cost); } public void addEntityEffect(IMeleeSpellEntityEffect eff) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java index b170b635..c0be55c6 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java @@ -10,6 +10,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; 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; public class SpellParadigmProjectile extends SpellParadigm diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java index 6538c59b..97f766ed 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ISelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java new file mode 100644 index 00000000..eaa460ab --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java @@ -0,0 +1,177 @@ +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; + +public class SpellEffectFire extends SpellEffect +{ + + @Override + public void defaultModificationProjectile(SpellParadigmProjectile parad) + { + + } + + @Override + public void offensiveModificationProjectile(SpellParadigmProjectile parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void defensiveModificationProjectile(SpellParadigmProjectile parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void environmentalModificationProjectile(SpellParadigmProjectile parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void defaultModificationSelf(SpellParadigmSelf parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void offensiveModificationSelf(SpellParadigmSelf parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void defensiveModificationSelf(SpellParadigmSelf parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void environmentalModificationSelf(SpellParadigmSelf parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void defaultModificationMelee(SpellParadigmMelee parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void offensiveModificationMelee(SpellParadigmMelee parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void defensiveModificationMelee(SpellParadigmMelee parad) + { + // TODO Auto-generated method stub + + } + + @Override + public void environmentalModificationMelee(SpellParadigmMelee parad) + { + // TODO Auto-generated method stub + + } + + @Override + protected int getCostForDefaultProjectile() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForOffenseProjectile() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForDefenseProjectile() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForEnvironmentProjectile() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForDefaultSelf() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForOffenseSelf() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForDefenseSelf() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForEnvironmentSelf() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForDefaultMelee() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForOffenseMelee() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForDefenseMelee() + { + // TODO Auto-generated method stub + return 0; + } + + @Override + protected int getCostForEnvironmentMelee() + { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ExtrapolatedMeleeEntityEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ExtrapolatedMeleeEntityEffect.java new file mode 100644 index 00000000..fffd0f2b --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ExtrapolatedMeleeEntityEffect.java @@ -0,0 +1,53 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntityEffect +{ + protected float range; + protected float radius; + + public ExtrapolatedMeleeEntityEffect(int range, int radius) + { + this.range = range; + this.radius = radius; + } + + @Override + public void onEntityImpact(World world, EntityPlayer entityPlayer) + { + Vec3 lookVec = entityPlayer.getLook(range); + double x = entityPlayer.posX + lookVec.xCoord; + double y = entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord; + double z = entityPlayer.posZ + lookVec.zCoord; + + List entities = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x-0.5f, y-0.5f, z-0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius)); + + if(entities!=null) + { + for(Entity entity : entities) + { + this.entityEffect(world, entity); + } + } + } + + protected abstract void entityEffect(World world, Entity entity); + + public void setRange(float range) + { + this.range = range; + } + + public void setRadius(float radius) + { + this.radius = radius; + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IMeleeSpellEntityEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IMeleeSpellEntityEffect.java new file mode 100644 index 00000000..a0f78df2 --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IMeleeSpellEntityEffect.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +public interface IMeleeSpellEntityEffect +{ + public void onEntityImpact(World world, EntityPlayer entityPlayer); +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IMeleeSpellWorldEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IMeleeSpellWorldEffect.java similarity index 74% rename from BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IMeleeSpellWorldEffect.java rename to BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IMeleeSpellWorldEffect.java index 23905916..05ab0bf7 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IMeleeSpellWorldEffect.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IMeleeSpellWorldEffect.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.Vec3; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IProjectileImpactEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java similarity index 73% rename from BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IProjectileImpactEffect.java rename to BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java index 6fd0ff30..d2b347ad 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IProjectileImpactEffect.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; import net.minecraft.entity.Entity; import net.minecraft.util.MovingObjectPosition; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IProjectileUpdateEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileUpdateEffect.java similarity index 62% rename from BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IProjectileUpdateEffect.java rename to BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileUpdateEffect.java index bd8b7939..07bcd0a3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/IProjectileUpdateEffect.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileUpdateEffect.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; import net.minecraft.entity.Entity; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/ISelfSpellEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ISelfSpellEffect.java similarity index 69% rename from BM_src/WayofTime/alchemicalWizardry/common/spell/complex/ISelfSpellEffect.java rename to BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ISelfSpellEffect.java index 7b37a0f6..0c13bca0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/ISelfSpellEffect.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ISelfSpellEffect.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World;