package com.pesets.game.skills;

import com.pesets.game.Enemy;
import com.pesets.game.Player;
import com.pesets.resources.ResourceManager;

public class SkillBerserk extends Skill {

	@Override
	public void cast(Player player, Enemy target) {
		player.setBerserkTime(10f);
		ResourceManager.getInstance().playSound("sword.mp3");
	}

	@Override
	public String getName() {
		return "Berserk";
	}

	@Override
	public ActEvent getEvent() {
		return ActEvent.Cast;
	}

	@Override
	public int getIcon() {
		return 5;
	}

	@Override
	public float getMaxColdown() {
		return 55f - getLevel() * 5f;
	}
	
	@Override
	public String getDescription() {
		return "Increase attack speed by 50%\nColdown: (55 - level * 5) sec";
	}

	@Override
	public boolean canBeCasted(Player player, Enemy target) {
		if (player.getBerserkTime() > 0)
			return false;
		return super.canBeCasted(player, target);
	}

	
}
