package com.elmakers.mine.bukkit.plugins.magic.spells;

import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.util.Vector;

import com.elmakers.mine.bukkit.plugins.magic.Spell;
import com.elmakers.mine.bukkit.utilities.borrowed.ConfigurationNode;

public class GrenadeSpell extends Spell
{
    @Override
    public boolean onCast(ConfigurationNode parameters) 
    {
        Block target = getNextBlock();
        Location loc = target.getLocation();
        TNTPrimed grenade = (TNTPrimed)player.getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);
        
        Vector aim = getAimVector();
        grenade.setVelocity(aim);
        grenade.setYield(6);
        grenade.setFuseTicks(80);
        
        return true;
    }
}

@@ -379,16 +379,41 @@
 Spell%0A%7B%0A
+%09int defaultSize = 6;%0A%09 %0A
     @Ove
@@ -481,16 +481,179 @@
  %0A    %7B%0A
+    %09int size = parameters.getInt(%22size%22, defaultSize);%0A    %09int fuse = parameters.getInt(%22fuse%22, 80);%0A%09%09boolean useFire = parameters.getBoolean(%22fire%22, true);%0A%09%09%0A
         
@@ -931,17 +931,20 @@
 etYield(
-6
+size
 );%0A     
@@ -967,18 +967,62 @@
 seTicks(
-80
+fuse);%0A        grenade.setIsIncendiary(useFire
 );%0A     

Add parameters to grenade spell.