Trefferpunkte: Konstitutionsbonus als eigener Summand in der Rechenkette
This commit is contained in:
parent
38ad53254c
commit
ca27992621
3 changed files with 22 additions and 6 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue