package com.pesets.game.skills;

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

public class SkillVamp extends Skill {

	@Override
	public void cast(Player player, Enemy target) {
		player.setHP(Math.min(player.getMaxHP(), player.getHP() + getAmount(player, target)));
	}

	private float getAmount(Player player, Enemy target) {
		return target.getRawDamage(player) * 0.2f * getLevel();
	}

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

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

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

	@Override
	public float getMaxColdown() {
		return 0;
	}
	
	@Override
	public String getDescription() {
		return "Each attack player heals for (20 * level)% of dealt melee damage";
	}

}
