BloodMagic/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/SpellParadigmSelf.java

55 lines
1.2 KiB
Java
Raw Normal View History

2014-01-18 00:59:31 +00:00
package WayofTime.alchemicalWizardry.common.spell.complex;
2014-01-19 01:29:20 +00:00
import java.util.ArrayList;
import java.util.List;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
2014-01-19 02:03:14 +00:00
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ISelfSpellEffect;
2014-01-18 16:45:31 +00:00
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement;
2014-01-18 00:59:31 +00:00
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class SpellParadigmSelf extends SpellParadigm
{
2014-01-19 01:29:20 +00:00
public List<ISelfSpellEffect> selfSpellEffectList;
public SpellParadigmSelf()
{
selfSpellEffectList = new ArrayList();
}
2014-01-18 00:59:31 +00:00
@Override
public void enhanceParadigm(SpellEnhancement enh)
{
}
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
{
2014-01-19 01:29:20 +00:00
for(ISelfSpellEffect eff : selfSpellEffectList)
{
eff.onSelfUse(world, entityPlayer);
}
int cost = this.getTotalCost();
2014-01-18 00:59:31 +00:00
2014-01-19 01:29:20 +00:00
EnergyItems.syphonBatteries(itemStack, entityPlayer, cost);
2014-01-18 00:59:31 +00:00
}
2014-01-18 23:05:25 +00:00
2014-01-19 01:29:20 +00:00
public void addSelfSpellEffect(ISelfSpellEffect eff)
{
if(eff!=null)
{
this.selfSpellEffectList.add(eff);
}
}
2014-01-18 23:05:25 +00:00
@Override
public int getDefaultCost()
{
2014-01-19 02:27:08 +00:00
return 100;
2014-01-18 23:05:25 +00:00
}
2014-01-18 00:59:31 +00:00
}