package org.project.item.potions;

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

public class mixedPotion extends Potion{

    public mixedPotion(int number, int cost, int extraHP, int extraMP) {
        super(number, cost, extraHP, extraMP);
    }

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