Trefferpunkte: Konstitutionsbonus als eigener Summand in der Rechenkette

This commit is contained in:
torsten 2026-11-22 19:20:36 +01:00
parent 38ad53254c
commit ca27992621
3 changed files with 22 additions and 6 deletions

View file

@ -81,9 +81,16 @@ $hpSlotValue = static fn (int $slot): string => ((int) ($hpRolls[$slot] ?? 0)) >
<small class="muted">bearbeiten</small>
</button>
<small class="muted">
<?= $hp['complete']
? ((int) $hp['con'] === 0 ? '' : 'Konstitutionsbonus ' . e(signed((int) $hp['con'])) . ' eingerechnet')
: 'fehlende Würfe zählen nicht mit' ?>
<?php
$hints = [];
if ((int) $hp['con'] !== 0) {
$hints[] = 'KON ' . signed((int) $hp['con']) . ' einmal eingerechnet';
}
if (!$hp['complete']) {
$hints[] = 'fehlende Würfe zählen nicht mit';
}
echo e(implode(' · ', $hints));
?>
</small>
</div>
<label class="field">