package xyz.illuc.neuralgiacore.items;

import net.adinvas.prototype_pain.limbs.Limb;
import net.adinvas.prototype_pain.limbs.PlayerHealthData;
import net.minecraft.world.entity.player.Player;

public class LinenBandage extends NeuralgiaBandage {
    public LinenBandage() {

    }

    @Override
    public void healActions(float scalableAmount, PlayerHealthData target, Limb limb, Player player){
        target.addDelayedChange(0.01F * scalableAmount / 20.0F / 60.0F, 200, limb);
        float painRed = Math.max(0.0F, 1.0F - 0.025F * scalableAmount);
        target.setLimbPain(limb, target.getLimbPain(limb) * painRed);
        target.setLimbSkinHealth(limb, target.getLimbSkinHealth(limb) + 0.3F * scalableAmount);
        float fractRed = Math.max(0.0F, 1.0F - 0.001F * scalableAmount);
        target.setLimbFracture(limb, target.getLimbFracture(limb) * fractRed);
        target.setLimbDislocation(limb, target.getLimbDislocated(limb) * fractRed);
    }
}

