package com.pesets.game.skills;

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

public class SkillFreeze extends Skill {

	@Override
	public void cast(Player player, Enemy target) {
		int damage = (int) (player.getIntelligence() * 0.12f * getLevel());
		target.skillHit(player, damage, EffectStun, 0.6f * getLevel());
		ResourceManager.getInstance().playSound("twinkle.mp3");
	}

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

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

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

	@Override
	public float getMaxColdown() {
		return 10;
	}

	@Override
	public boolean canBeCasted(Player player, Enemy target) {
		if (target.getEffectDuration(EffectStun) > 0)
			return false;
		return super.canBeCasted(player, target);
	}
	
	@Override
	public String getDescription() {
		return "Deals (intelligence * 0.12 * level) damage and stuns target for (0.6 * level) seconds\nColdown: 10 sec";
	}

}
