kampf: Niederlage heißt Tod — sind alle bewusstlos, gilt die ganze Gruppe als tot
This commit is contained in:
parent
46a8c1199f
commit
6a8644d8d0
5 changed files with 73 additions and 12 deletions
|
|
@ -75,6 +75,26 @@ func party_bereit() -> bool:
|
|||
return party.size() >= 1 and party.size() <= PARTY_MAX
|
||||
|
||||
|
||||
## Regel (docs/systeme.md §6): Sind im Kampf **alle** Mitglieder der Gruppe
|
||||
## bewusstlos geschlagen worden, gelten alle als tot. Markiert jede Figur mit
|
||||
## 0 TP und `tot` — nur ein früherer Spielstand hilft danach weiter.
|
||||
func partei_faellt() -> void:
|
||||
for figur in party:
|
||||
figur["hp"]["current"] = 0
|
||||
figur["tot"] = true
|
||||
flags["gruppe_gefallen"] = true
|
||||
|
||||
|
||||
## Alle Figuren der Gruppe gelten als tot (nach einer Niederlage im Kampf).
|
||||
func gruppe_tot() -> bool:
|
||||
if party.is_empty():
|
||||
return false
|
||||
for figur in party:
|
||||
if not bool(figur.get("tot", false)):
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
## Die vier Papierprobe-Figuren als Schnellstart (Titelschirm/Erstellung).
|
||||
func party_schnellstart() -> void:
|
||||
_neue_party()
|
||||
|
|
@ -603,6 +623,8 @@ func truhe_nehmen(container: Dictionary) -> String:
|
|||
|
||||
|
||||
func _heilen(figur: Dictionary, id: String, wurfel: String, name: String) -> String:
|
||||
if bool(figur.get("tot", false)):
|
||||
return "%s ist tot." % name
|
||||
var tp: Dictionary = figur.get("hp", {})
|
||||
if int(tp.get("current", 0)) >= int(tp.get("max", 0)):
|
||||
return "TP sind voll."
|
||||
|
|
@ -653,6 +675,8 @@ func rasten(im_freien: bool) -> Dictionary:
|
|||
verbraucht += n
|
||||
|
||||
for figur in party:
|
||||
if bool(figur.get("tot", false)):
|
||||
continue # Tote stehen nicht wieder auf.
|
||||
var tp: Dictionary = figur.get("hp", {})
|
||||
if voll:
|
||||
tp["current"] = int(tp.get("max", 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue