import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Awesome laser beams.
 * Available in five beautiful colors: Red (weakest), Green, Blue, White, AWESOME RAINBOW COLORS (strongest)
 * 
 * @author Jannis Andrija Schnitzer, Martin Schend
 * @version 2011-01-21
 */
public class Laser  extends Missile
{
    public static final int BASE_DAMAGE = 20;
    
    /**
     * Creates a new laser beam, colored according to damage level.
     * 
     * @param level: the laser beam's level, set by the firing gun
     */
    public Laser(int level)
    {
        /* TODO: think of a function(level) that enables us to have a better (i. e. more balanced) increase
         * in damage. Imaginible would be a function that goes like sqrt(m*level) or even limited growth.
         */
        damage = BASE_DAMAGE * level;
        if (level > 5)
            level = 5;
        setImage("Laser"+level+".png");
    }
    
    public Laser()
    {
        this(1);
    }
    
    public void act() 
    {
        super.act();
    }    
}
