package com.pesets.game.skills;

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

public class SkillComboStrike extends Skill {
	int hitCount = 0;
	
	@Override
	public void cast(Player player, Enemy target) {
		hitCount++;
		if (hitCount >= 3)
		{
			hitCount = 0;
			int damage = (int) (player.getAgility() * 0.2f * getLevel());
			target.skillHit(player, damage, 0, 0);
			ResourceManager.getInstance().playSound("sword.mp3");
		}
	}

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

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

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

	@Override
	public float getMaxColdown() {
		return 0;
	}
	
	@Override
	public String getDescription() {
		return "Each third attack deals additional (agility * 0.2 * level) damage";
	}

}
