package com.elmakers.mine.bukkit.spell.builtin;

import com.elmakers.mine.bukkit.action.builtin.CoverAction;
import com.elmakers.mine.bukkit.action.builtin.FreezeAction;
import com.elmakers.mine.bukkit.api.spell.SpellResult;
import com.elmakers.mine.bukkit.action.ActionHandler;
import com.elmakers.mine.bukkit.spell.BlockSpell;
import com.elmakers.mine.bukkit.utility.Target;
import org.bukkit.block.Block;
import org.bukkit.configuration.ConfigurationSection;

@Deprecated
public class FrostSpell extends BlockSpell
{
	@Override
	public SpellResult onCast(ConfigurationSection parameters) 
	{
        Target target = getTarget();
        if (target == null || !target.isValid())
        {
            return SpellResult.NO_TARGET;
        }

        Block targetBlock = target.getBlock();
        if (!hasBuildPermission(targetBlock))
        {
            return SpellResult.INSUFFICIENT_PERMISSION;
        }

        CoverAction cover = new CoverAction();
        cover.addAction(new FreezeAction());
        ActionHandler handler = new ActionHandler();
        handler.loadAction(cover);
        registerForUndo();
        return handler.perform(getCurrentCast(), parameters);
	}
}

@@ -149,22 +149,150 @@
 builtin.
-Freeze
+DamageAction;%0Aimport com.elmakers.mine.bukkit.action.builtin.FreezeAction;%0Aimport com.elmakers.mine.bukkit.action.builtin.PotionEffect
 Action;%0A
@@ -1127,16 +1127,112 @@
 ion());%0A
+        cover.addAction(new DamageAction());%0A        cover.addAction(new PotionEffectAction());%0A
         

Add damage and slow back to deprecated FrostSpell