package org.project.item.potions;

import org.project.entity.enemies.Enemy;
import org.project.entity.players.Player;

public class healthPotion extends Potion {
    public healthPotion(int number, int cost, int extraHP) {
        super(number, cost, extraHP, 0);
    }

    @Override
    public void consume(Enemy target, Player player) {
        if (player.isCHitOnNextTurn()) {
            target.takeDamage(player.getWeapon().getDamage() + 5);
            player.CHitOnNextTurn(false);
        }
        player.heal(target, getExtraHP());
        decreaseNum(1);
    }
}
