Charakterverwalter: Fertigkeiten-Attribut für eigene Einträge, Stufe ohne Vorzeichen
- eigenedefinierte Fertigkeiten bekommen ein Bezugsattribut (STR…CHA) im Selektor und lassen es im Bearbeiten-Abschnitt korrigieren - neue Spalte character_skills.attribute (Migration 2, schema.sql angepasst); character_skills() nutzt COALESCE aus Zeilen- und Katalogattribut - Fertigkeitsstufe startet bei max(0, Attributsbonus) und wird in Formular, Update und Anzeige (Web-Bogen, PDF) nie negativ bzw. nie mit Vorzeichen gezeigt - MOD- und Stufe-Spalte im Bogen auf gemeinsame Grundlinie gezogen
This commit is contained in:
parent
b4d4c53dd4
commit
929aa52c73
10 changed files with 86 additions and 30 deletions
|
|
@ -87,7 +87,8 @@ $base = url('/characters/' . $cid);
|
|||
<section class="panel" id="fertigkeiten">
|
||||
<h2>Fertigkeiten</h2>
|
||||
<p class="muted">
|
||||
Startwert jeder Fertigkeit ist der Attributsbonus (Fertigkeitsstufe, Hausregel V1.1);
|
||||
Startwert jeder Fertigkeit ist der Attributsbonus (Fertigkeitsstufe, Hausregel V1.1),
|
||||
mindestens jedoch 0 – ein negativer Attributsmodifikator drückt die Stufe nie unter 0.
|
||||
Steigerungen trägst du rechts ein. Eigene Fertigkeiten sind zusätzlich erlaubt.
|
||||
</p>
|
||||
<form method="post" action="<?= e($base . '/skills/reset') ?>" class="inline-form" style="margin-bottom:.8rem">
|
||||
|
|
@ -124,9 +125,19 @@ $base = url('/characters/' . $cid);
|
|||
<div class="inline-form">
|
||||
<form method="post" action="<?= e($base . '/skills/' . (int) $skill['id']) ?>" class="inline-form">
|
||||
<?= csrf_field() ?>
|
||||
<?php if ((int) ($skill['skill_id'] ?? 0) === 0): ?>
|
||||
<label class="field" style="max-width:8rem">
|
||||
<span class="visually-quiet">Attribut</span>
|
||||
<select name="attribute">
|
||||
<?php foreach (WS_ATTRIBUTES as [$short, $label]): ?>
|
||||
<option value="<?= e($short) ?>"<?= strtoupper(trim((string) ($skill['attribute'] ?? ''))) === $short ? ' selected' : '' ?>><?= e($short) ?> · <?= e($label) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<label class="field" style="max-width:6rem">
|
||||
<span class="visually-quiet">Stufe</span>
|
||||
<input type="number" name="bonus" value="<?= (int) $skill['bonus'] ?>" min="-10" max="30">
|
||||
<input type="number" name="bonus" value="<?= (int) $skill['bonus'] ?>" min="0" max="30">
|
||||
</label>
|
||||
<label class="field grow">
|
||||
<span class="visually-quiet">Notiz</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue