From d7fa34f32e458f985179e812777f5e665b81c7a6 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sat, 18 Jan 2014 18:05:25 -0500 Subject: [PATCH] Joshie commit! --- .../common/alchemy/AlchemyRecipe.java | 5 +++ .../common/spell/complex/SpellModifier.java | 2 +- .../common/spell/complex/SpellParadigm.java | 33 +++++++++++++++++ .../spell/complex/SpellParadigmMelee.java | 7 ++++ .../complex/SpellParadigmProjectile.java | 7 ++++ .../spell/complex/SpellParadigmSelf.java | 7 ++++ .../spell/complex/effect/SpellEffect.java | 37 +++++++++++-------- 7 files changed, 82 insertions(+), 16 deletions(-) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java index be25dac6..fe60ae4e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java @@ -173,4 +173,9 @@ public class AlchemyRecipe { return this.recipe; } + + public int getOrbLevel() + { + return this.bloodOrbLevel; + } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java index e25d6643..39297530 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java @@ -9,7 +9,7 @@ public class SpellModifier private int modifier; - public SpellModifier(int modifier) + protected SpellModifier(int modifier) { this.modifier = modifier; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java index d83f7b91..59307d57 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigm.java @@ -85,4 +85,37 @@ public abstract class SpellParadigm return bufferedEffectList.get(bufferedEffectList.size()-1); } } + + public int getTotalCost() + { + 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(); + } + } + + + } + + return cost; + } + + public abstract int getDefaultCost(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java index c967ff6c..8c1eedbf 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmMelee.java @@ -22,4 +22,11 @@ public class SpellParadigmMelee extends SpellParadigm } + @Override + public int getDefaultCost() + { + // TODO Auto-generated method stub + return 0; + } + } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java index b88be812..6d9e39f3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmProjectile.java @@ -90,5 +90,12 @@ public class SpellParadigmProjectile extends SpellParadigm proj.setEffectList(effectList); proj.setRicochetMax(ricochetMax); } + + @Override + public int getDefaultCost() + { + // TODO Auto-generated method stub + return 50; + } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java index e65cd0d9..69881f77 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java @@ -19,4 +19,11 @@ public class SpellParadigmSelf extends SpellParadigm // TODO Auto-generated method stub } + + @Override + public int getDefaultCost() + { + + return 0; + } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java index 5a02f0e2..043a11a5 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffect.java @@ -9,9 +9,16 @@ import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhanc public abstract class SpellEffect { - public int modifierState = SpellModifier.DEFAULT; - public int powerEnhancement = 0; - public int costEnhancement = 0; + protected int modifierState; + protected int powerEnhancement; + protected int costEnhancement; + + public SpellEffect() + { + this.modifierState = SpellModifier.DEFAULT; + this.powerEnhancement = 0; + this.costEnhancement = 0; + } public void enhanceEffect(SpellEnhancement enh) { @@ -99,10 +106,10 @@ public abstract class SpellEffect return 0; } - public abstract int getCostForDefaultProjectile(); - public abstract int getCostForOffenseProjectile(); - public abstract int getCostForDefenseProjectile(); - public abstract int getCostForEnvironmentProjectile(); + protected abstract int getCostForDefaultProjectile(); + protected abstract int getCostForOffenseProjectile(); + protected abstract int getCostForDefenseProjectile(); + protected abstract int getCostForEnvironmentProjectile(); public int getCostForSelf() { @@ -116,10 +123,10 @@ public abstract class SpellEffect return 0; } - public abstract int getCostForDefaultSelf(); - public abstract int getCostForOffenseSelf(); - public abstract int getCostForDefenseSelf(); - public abstract int getCostForEnvironmentSelf(); + protected abstract int getCostForDefaultSelf(); + protected abstract int getCostForOffenseSelf(); + protected abstract int getCostForDefenseSelf(); + protected abstract int getCostForEnvironmentSelf(); public int getCostForMelee() { @@ -133,8 +140,8 @@ public abstract class SpellEffect return 0; } - public abstract int getCostForDefaultMelee(); - public abstract int getCostForOffenseMelee(); - public abstract int getCostForDefenseMelee(); - public abstract int getCostForEnvironmentMelee(); + protected abstract int getCostForDefaultMelee(); + protected abstract int getCostForOffenseMelee(); + protected abstract int getCostForDefenseMelee(); + protected abstract int getCostForEnvironmentMelee(); }