game: Titelschirm und Erstellungs-Feinschliff — Labels, Startausrüstung, RK
This commit is contained in:
parent
f8d8f56b86
commit
037a445e3c
33 changed files with 428 additions and 60 deletions
|
|
@ -149,9 +149,20 @@ func tp_max() -> int:
|
|||
return maxi(1, int(klasse.get("hit_die", 6)) + kon)
|
||||
|
||||
|
||||
## RK ohne Ausrüstung — Startausrüstung ist noch nicht entschieden.
|
||||
## RK mit der Startausrüstung der Klasse (docs/charaktererstellung.md).
|
||||
func rk() -> int:
|
||||
return 10 + Dice.modifier(endwert("dex"))
|
||||
var ac := 10 + Dice.modifier(endwert("dex"))
|
||||
var start := startausruestung()
|
||||
if start.has("armor"):
|
||||
ac += int(Content.entry("items", str(start["armor"])).get("ac_bonus", 0))
|
||||
if bool(start.get("shield", false)):
|
||||
ac += int(Content.entry("items", "schild").get("ac_bonus", 1))
|
||||
return ac
|
||||
|
||||
|
||||
## Startausrüstung steht in `classes.json`; die Engine liest dieselbe Quelle.
|
||||
func startausruestung() -> Dictionary:
|
||||
return Content.class_def(klasse_id).get("starting_equipment", {})
|
||||
|
||||
|
||||
func angriff() -> int:
|
||||
|
|
|
|||
|
|
@ -89,6 +89,13 @@ func neue_figur(id: String, vorgabe: Dictionary) -> Dictionary:
|
|||
for attribut in wahl:
|
||||
attrs[attribut] = int(attrs.get(attribut, 10)) + int(wahl_bonus.get("amount", 0))
|
||||
var hp_max := _hp_stufe1(klasse, attrs)
|
||||
var start: Dictionary = klasse.get("starting_equipment", {})
|
||||
var equipment := {}
|
||||
for feld in ["armor", "weapon"]:
|
||||
if start.has(feld):
|
||||
equipment[feld] = str(start[feld])
|
||||
if bool(start.get("shield", false)):
|
||||
equipment["shield"] = true
|
||||
return {
|
||||
"id": id, "name": vorgabe["name"],
|
||||
"race": vorgabe["race"], "class": vorgabe["class"],
|
||||
|
|
@ -98,7 +105,7 @@ func neue_figur(id: String, vorgabe: Dictionary) -> Dictionary:
|
|||
"hp": {"current": hp_max, "max": hp_max},
|
||||
"skills": _startfertigkeiten(klasse),
|
||||
"spells": {"known": [], "prepared": [], "slots": {}},
|
||||
"inventory": [], "equipment": {},
|
||||
"inventory": [], "equipment": equipment,
|
||||
"conditions": [],
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue