Joshie commit!
This commit is contained in:
parent
87dde1cbe8
commit
d7fa34f32e
7 changed files with 82 additions and 16 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue