public function regenerate(HealingPower $healingPower, WoundBoundary $woundBoundary): int
    {
        $this->checkIfNeedsToRollAgainstMalusFirst();
        // every wound becomes old after this
        $regeneratedAmount = 0;
        $remainingHealUpToWounds = $healingPower->getHealUpToWounds();
        foreach ($this->getUnhealedWounds() as $unhealedWound) {
            // wound is set as old internally, ALL OF THEM, even if no healing left
            $currentlyRegenerated = $unhealedWound->heal($remainingHealUpToWounds);
            $remainingHealUpToWounds -= $currentlyRegenerated;
            $regeneratedAmount += $currentlyRegenerated;
        }
        $this->treatmentBoundary = TreatmentBoundary::getIt($this->getUnhealedWoundsSum());
        $this->resolveMalusAfterHeal($regeneratedAmount, $woundBoundary);
        return $regeneratedAmount;
    }
public function regenerate(HealingPower $healingPower, WoundBoundary $woundBoundary): int
    {
        $this->checkIfNeedsToRollAgainstMalusFirst();
        // every wound becomes old after this
        $regeneratedAmount = 0;
        $remainingHealUpToWounds = $healingPower->getHealUpToWounds();
        foreach ($this->getUnhealedWounds() as $unhealedWound) {
            // wound is set as old internally, ALL OF THEM, even if no healing left
            $currentlyRegenerated = $unhealedWound->heal($remainingHealUpToWounds);
            $remainingHealUpToWounds -= $currentlyRegenerated;
            $regeneratedAmount += $currentlyRegenerated;
        }
        $this->treatmentBoundary = TreatmentBoundary::getIt($this->getUnhealedWoundsSum());
        $this->resolveMalusAfterHeal($regeneratedAmount, $woundBoundary);
        return $regeneratedAmount;
    }
public function regenerate ( HealingPower $ healingPower , WoundBoundary $ woundBoundary ) : int { $ this -> checkIfNeedsToRollAgainstMalusFirst ( ) ; // every wound becomes old after this $ regeneratedAmount = 0 ; $ remainingHealUpToWounds = $ healingPower -> getHealUpToWounds ( ) ; foreach ( $ this -> getUnhealedWounds ( ) as $ unhealedWound ) { // wound is set as old internally, ALL OF THEM, even if no healing left $ currentlyRegenerated = $ unhealedWound -> heal ( $ remainingHealUpToWounds ) ; $ remainingHealUpToWounds -= $ currentlyRegenerated ; $ regeneratedAmount += $ currentlyRegenerated ; } $ this -> treatmentBoundary = TreatmentBoundary :: getIt ( $ this -> getUnhealedWoundsSum ( ) ) ; $ this -> resolveMalusAfterHeal ( $ regeneratedAmount , $ woundBoundary ) ; return $ regeneratedAmount ; }
Regenerate any wound, both ordinary and serious, both new and old, by natural or unnatural way.

@param HealingPower $healingPower
@param WoundBoundary $woundBoundary
@return int actually regenerated amount
@throws \DrdPlus\Health\Exceptions\NeedsToRollAgainstMalusFromWoundsFirst
Regenerate any wound both ordinary and serious both new and old by natural or unnatural way .