game: Bewusstlos und getötet getrennt — Marken je Größe

This commit is contained in:
torsten 2026-11-17 16:08:17 +01:00
parent ea2944331b
commit b15fa65012
47 changed files with 736 additions and 15 deletions

View file

@ -59,3 +59,17 @@ es kompakte Körper, da trägt es.
- Neue Datei → Zeile in der Tabelle oben (Name, Seed, Rohdatei).
- Dunkle Sprites brauchen `--levels`: ohne Tonwertspreizung verschwinden sie
auf dunklem Grund. Hell-mittel bleibt ohne.
## Gefallen-Marken (17.11.2026)
Zwölf Bodenmarken, **prozedural** aus [`../../tools/gefallen.py`](../../tools/gefallen.py),
kein Modellaufruf:
| Satz | Bedeutung | Größen |
|---|---|---|
| `bewusstlos_<n>.png` | Partei bei 0 TP: neutraler Staubring mit „Zz" | 84, 108, 144, 288, 384, 480 |
| `gefallen_<n>.png` | Gegner bei 0 TP: Blutlache, Knochen, Schädel | 84, 108, 144, 288, 384, 480 |
Die Marken liegen unter dem umgelegten Sprite; die Größe folgt der
Kreatur-Klasse. Beleg: [`../../prep/kampf/`](../../prep/kampf/README.md).

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

View file

@ -8,6 +8,7 @@ Kreatur-Satz, Partei aus den HUD-Porträts.
|---|---|
| [`_kampf_1920x1080.png`](_kampf_1920x1080.png) | Runde 1, Partei links, drei Goblins rechts, aktiver Zug |
| [`_sieg_1920x1080.png`](_sieg_1920x1080.png) | Sieg-Panel mit Beute (12 Gold) |
| [`_zustand_1920x1080.png`](_zustand_1920x1080.png) | Dorn bewusstlos (Zz, Staubring), Goblin 1 getötet (Blut, Knochen) |
## Aufbau
@ -19,6 +20,12 @@ Kreatur-Satz, Partei aus den HUD-Porträts.
- **Partei-Token** auf dem Feld sind Abenteurer-Sprites (144 px, `held_*_144px`)
im `Kreatur`-Renderer: Footprint, TP-Balken und Goldrahmen wie bei den
Gegnern. Die Porträts bleiben in der Partei-Spalte.
- **Gefallen ≠ getötet:** Partei-Figuren mit 0 TP sind **bewusstlos** — das
Sprite liegt, darunter ein neutraler Staubring, darüber „Zz"; nach dem Sieg
stehen sie mit 1 TP auf, Marke und Zz verschwinden. Gegner mit 0 TP sind
**getötet** — Blutlache mit Knochen und Schädel, das Sprite bleibt liegen.
Beide Marken gibt es in sechs Größen (84–480) aus
[`../../tools/gefallen.py`](../../tools/gefallen.py).
- **Gegner** sind `Kreatur`-Knoten: Footprint, Anker, Schatten, TP-Balken und
Gold-Footprint beim aktiven Zug kommen aus dem bestehenden Renderer.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

128
art/tools/gefallen.py Normal file
View file

@ -0,0 +1,128 @@
#!/usr/bin/env python3
"""Gefallen-Marken in sechs Anzeigegrößen zeichnen (Blutlache, Knochen, Schädel).
Kein Modell: Die Marke ist ein Bodenzeichen wie Schatten oder Raster und muss
auf jede Klassengröße pixelgenau passen. Ausgabe nach `art/final/Objects/`;
`engine_assets.py` kopiert sie 1:1 in die Engine.
"""
from __future__ import annotations
import math
import random
from pathlib import Path
from PIL import Image, ImageDraw
ART = Path(__file__).resolve().parent.parent
ZIEL = ART / "final" / "Objects"
GROESSEN = (84, 108, 144, 288, 384, 480)
BLUT = (84, 26, 20, 225)
BLUT_DUNKEL = (54, 16, 12, 235)
KNOCHEN = (214, 199, 164, 255)
KNOCHEN_DUNKEL = (150, 132, 100, 255)
SCHATTEN = (24, 18, 14, 235)
def marke(groesse: int) -> Image.Image:
rnd = random.Random(groesse)
im = Image.new("RGBA", (groesse, groesse), (0, 0, 0, 0))
d = ImageDraw.Draw(im)
cx = cy = groesse / 2.0
rx = groesse * 0.37
ry = groesse * 0.24
# Unregelmäßige Lache
punkte = []
for i in range(24):
a = 2 * math.pi * i / 24
f = 0.82 + 0.26 * rnd.random()
punkte.append((cx + math.cos(a) * rx * f,
cy + math.sin(a) * ry * f))
d.polygon(punkte, fill=BLUT)
# dunkler Kern
d.ellipse((cx - rx * 0.62, cy - ry * 0.55,
cx + rx * 0.62, cy + ry * 0.55), fill=BLUT_DUNKEL)
# Spritzer
for _ in range(18):
a = 2 * math.pi * rnd.random()
dist = rx * (1.05 + 0.55 * rnd.random())
x = cx + math.cos(a) * dist
y = cy + math.sin(a) * dist * 0.62
r = max(1.0, groesse * 0.008 * (1 + rnd.random()))
d.ellipse((x - r, y - r, x + r, y + r), fill=BLUT)
# gekreuzte Knochen
lw = max(2, round(groesse * 0.035))
for dx, dy in ((-1, 1), (1, 1)):
x1 = cx - dx * rx * 0.55
y1 = cy - dy * ry * 0.55
x2 = cx + dx * rx * 0.55
y2 = cy + dy * ry * 0.55
d.line((x1, y1, x2, y2), fill=KNOCHEN_DUNKEL, width=lw + 2)
d.line((x1, y1, x2, y2), fill=KNOCHEN, width=lw)
for x, y in ((x1, y1), (x2, y2)):
rr = lw * 1.4
d.ellipse((x - rr, y - rr, x + rr, y + rr), fill=KNOCHEN)
# Schädel
sr = max(5.0, groesse * 0.075)
sx, sy = cx, cy - groesse * 0.02
d.ellipse((sx - sr, sy - sr, sx + sr, sy + sr), fill=KNOCHEN)
d.rectangle((sx - sr * 0.55, sy + sr * 0.35,
sx + sr * 0.55, sy + sr * 0.9), fill=KNOCHEN)
auge = max(1.5, sr * 0.27)
for ax in (-sr * 0.36, sr * 0.36):
d.ellipse((sx + ax - auge, sy - auge,
sx + ax + auge, sy + auge), fill=SCHATTEN)
d.line((sx - sr * 0.35, sy + sr * 0.72,
sx + sr * 0.35, sy + sr * 0.72), fill=SCHATTEN,
width=max(1, round(sr * 0.16)))
return im
def marke_bewusstlos(groesse: int) -> Image.Image:
"""Neutrale Marke für bewusstlose Helden: Staubring und Zz, kein Blut."""
rnd = random.Random(groesse + 7)
im = Image.new("RGBA", (groesse, groesse), (0, 0, 0, 0))
d = ImageDraw.Draw(im)
cx = cy = groesse / 2.0
rx = groesse * 0.35
ry = groesse * 0.23
# schwacher Staubring
d.ellipse((cx - rx, cy - ry, cx + rx, cy + ry),
fill=(86, 96, 112, 45), outline=(128, 140, 156, 170),
width=max(2, round(groesse * 0.018)))
for _ in range(14):
a = 2 * math.pi * rnd.random()
dist = rx * (1.02 + 0.28 * rnd.random())
x = cx + math.cos(a) * dist
y = cy + math.sin(a) * dist * 0.62
r = max(1.0, groesse * 0.006 * (1 + rnd.random()))
d.ellipse((x - r, y - r, x + r, y + r), fill=(128, 140, 156, 150))
# Zz
z = groesse * 0.11
lw = max(2, round(groesse * 0.018))
x0, y0 = cx - z * 0.5, cy - z * 0.5
for dx, dy in ((0, 0), (0.26, 0.30)):
ax, ay = x0 + z * dx, y0 + z * dy
d.line((ax, ay, ax + z * 0.6, ay), fill=(224, 214, 190, 230), width=lw)
d.line((ax + z * 0.6, ay, ax, ay + z * 0.6),
fill=(224, 214, 190, 230), width=lw)
d.line((ax, ay + z * 0.6, ax + z * 0.6, ay + z * 0.6),
fill=(224, 214, 190, 230), width=lw)
return im
def main() -> int:
ZIEL.mkdir(parents=True, exist_ok=True)
for g in GROESSEN:
for name, im in (("gefallen", marke(g)),
("bewusstlos", marke_bewusstlos(g))):
p = ZIEL / f"{name}_{g}.png"
im.save(p)
print(f"geschrieben: {p.relative_to(ART)} ({g}x{g})")
return 0
if __name__ == "__main__":
raise SystemExit(main())

View file

@ -554,7 +554,8 @@ Struktur, Datenmodell und Effekt-Vokabel stehen in [`engine.md`](engine.md).
Initiative, 4 Felder Bewegung + Aktion, Angriff/Verteidigen/Rennen,
Treffer/RK/kritisch, TP, einfache Gegner-KI, Sieg mit Beute, Niederlage.
Partei-Token sind Abenteurer-Sprites (`held_*_144px`, Klassen × Körperbau),
die Porträts bleiben in der Spalte. Einstieg vorerst über den KAMPF-Knopf
die Porträts bleiben in der Spalte. **Bewusstlos ≠ getötet:** Partei liegt
mit Zz/Staubring und steht auf, Gegner mit Blut/Knochen bleiben liegen. Einstieg vorerst über den KAMPF-Knopf
der Stadt. Belege: `prep/kampf/`, `prep/helden-serie/`.
Offen: Zauber, Fernkampf, Deckung, Kartenbegegnungen.
- [ ] **Kartenwechsel** (Overland ↔ Stadt ↔ Dungeon).

View file

@ -26,7 +26,7 @@ bespielbar (Ortsbild → Gebiet → zurück).
|---|---|
| `python3 game/tools/validate_data.py` | grün (Daten, ids, Verweise) |
| `godot --headless --path game -- --check` | grün (Daten, Würfel, Effekt, Spielstand, Font, Theme, Shader, Schatten) |
| `python3 art/tools/engine_assets.py --check` | grün (97 Dateien) |
| `python3 art/tools/engine_assets.py --check` | grün (138 Dateien) |
| `python3 art/tools/pruefe_terrain.py` | grün (39 Kacheln pixelgleich) |
| `godot --path game res://tools/probe_schleife.tscn` | Hotspot → Gebiet → Ausgang, alles drei bestätigt |
| `godot --path game res://tools/probe_kreaturen.tscn -- --check` | Bericht: sechs Klassen mit Footprint, Anker, Schatten, TP-Balken; lädt die echten Zeichnungen |
@ -81,7 +81,7 @@ bespielbar (Ortsbild → Gebiet → zurück).
| `game/assets/gemalt/` | **gemalte Assets** (Hintergrund, Figuren, Props, Porträts, Ortsbild) |
| `game/assets/{terrain,npcs,objects,players}` | Pixel-Satz, erzeugt von `art/tools/engine_assets.py` |
| `art/final/` | Master des Pixel-Satzes (96 px) + `Font/` |
| `art/tools/` | `boden.py` (Böden zeichnen), `dach.py` (Haus), `uebergaenge.py`, `freistellen.py`, `font16.py`, `font_export.py`, `engine_assets.py`, `falgen.py`, `pruefe_terrain.py`, `sync_workbench.sh` |
| `art/tools/` | `boden.py` (Böden), `dach.py` (Haus), `uebergaenge.py`, `freistellen.py`, `font16.py`, `font_export.py`, `gefallen.py` (Gefallen-Marken), `engine_assets.py`, `falgen.py`, `pruefe_terrain.py`, `sync_workbench.sh` |
| `art/prep/` | Beweise: Kacheln, Kacheltest, gemalte Szene, Stilvergleich, Schleife |
| `game/tools/` | `probe_lauf.tscn`, `probe_schleife.tscn`, `probe_wechsel.tscn` (Blende), `probe_kreaturen.tscn` (Klassen/Footprint/Dither), `schuss.tscn` (Screenshot einer Szene), `validate_data.py` |

View file

@ -151,9 +151,12 @@ maßgeblich.
- **Sicht:** keine Sonderregel. Verdeckung ist eine Frage der Darstellung
([`darstellung.md`](darstellung.md) §9), nicht der Regeln.
**Besiegt:** 0 TP = bewusstlos, nicht tot. Nach dem Kampf steht die Figur mit
1 TP auf; fällt die ganze Gruppe, wird geladen. Kein permanenter Tod in der
ersten Scheibe.
**Besiegt — zwei Zustände.** Partei-Figuren mit 0 TP sind **bewusstlos**
(neutraler Staubring, „Zz") und stehen nach dem Sieg mit 1 TP wieder auf;
fällt die ganze Gruppe, wird geladen. Gegner mit 0 TP gelten als **getötet**
(Blut-/Knochenmarke) und bleiben liegen. Kein permanenter Tod der Partei in
der ersten Scheibe. Ein „nur besiegt" für Tiere oder Questgegner braucht
später ein eigenes Datenfeld.
## 7. Magie

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b7kiov7igbh7w"
path="res://.godot/imported/bewusstlos_108.png-69beb2eadd70a73da6545222d26d46b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/bewusstlos_108.png"
dest_files=["res://.godot/imported/bewusstlos_108.png-69beb2eadd70a73da6545222d26d46b1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://baqnwve6ekiu8"
path="res://.godot/imported/bewusstlos_144.png-0ab7425b00dc7bcb4fbb65e65016bb66.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/bewusstlos_144.png"
dest_files=["res://.godot/imported/bewusstlos_144.png-0ab7425b00dc7bcb4fbb65e65016bb66.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bpgkp3tsiekue"
path="res://.godot/imported/bewusstlos_288.png-1e507f5354ceadb573156180e3229cce.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/bewusstlos_288.png"
dest_files=["res://.godot/imported/bewusstlos_288.png-1e507f5354ceadb573156180e3229cce.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://6ophs78xyo67"
path="res://.godot/imported/bewusstlos_384.png-7796d267a0973deeb993ab62445794d5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/bewusstlos_384.png"
dest_files=["res://.godot/imported/bewusstlos_384.png-7796d267a0973deeb993ab62445794d5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c68iknkjj1c4u"
path="res://.godot/imported/bewusstlos_480.png-fe618cd2119ff4061eceb9ff1801bdc7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/bewusstlos_480.png"
dest_files=["res://.godot/imported/bewusstlos_480.png-fe618cd2119ff4061eceb9ff1801bdc7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxvr0rujhadiw"
path="res://.godot/imported/bewusstlos_84.png-7fa11722e5100985ec1a2615d226ca44.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/bewusstlos_84.png"
dest_files=["res://.godot/imported/bewusstlos_84.png-7fa11722e5100985ec1a2615d226ca44.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwx3wdrfig2lw"
path="res://.godot/imported/gefallen_108.png-0aaf919c48e0f835805ba415d4654d00.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/gefallen_108.png"
dest_files=["res://.godot/imported/gefallen_108.png-0aaf919c48e0f835805ba415d4654d00.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsyp033ibubyq"
path="res://.godot/imported/gefallen_144.png-8c83fe16cf057cfbc6e9204152bbfac0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/gefallen_144.png"
dest_files=["res://.godot/imported/gefallen_144.png-8c83fe16cf057cfbc6e9204152bbfac0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4g8eiis0c2hi"
path="res://.godot/imported/gefallen_288.png-d04ba639eb7fb09fd727cbddd83d08ac.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/gefallen_288.png"
dest_files=["res://.godot/imported/gefallen_288.png-d04ba639eb7fb09fd727cbddd83d08ac.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cug1836j43dvx"
path="res://.godot/imported/gefallen_384.png-3d214e67e7544ea6c25e86d11201e8e6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/gefallen_384.png"
dest_files=["res://.godot/imported/gefallen_384.png-3d214e67e7544ea6c25e86d11201e8e6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8515pddv8rdi"
path="res://.godot/imported/gefallen_480.png-d54a2336447419b60fef457524493935.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/gefallen_480.png"
dest_files=["res://.godot/imported/gefallen_480.png-d54a2336447419b60fef457524493935.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bp7a10c1vohei"
path="res://.godot/imported/gefallen_84.png-8263b8f1c29e19ffb831e170e0c498d0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/objects/gefallen_84.png"
dest_files=["res://.godot/imported/gefallen_84.png-8263b8f1c29e19ffb831e170e0c498d0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -26,6 +26,7 @@ var _einheiten: Array = []
var _belegung: Dictionary = {}
var _feld: Node2D
var _marker: Node2D
var _leichen: Node2D
var _ui: Control
var _party_box: Control
var _status: Label
@ -61,11 +62,27 @@ func _ready() -> void:
_marker.name = "Marker"
_marker.z_index = -1
add_child(_marker)
_leichen = Node2D.new()
_leichen.name = "Gefallene"
_leichen.z_index = -2
add_child(_leichen)
_partei_setzen()
_monster_setzen()
_ui_bauen()
_initiative()
_log("Kampf: " + str(_encounter.get("name", encounter_id)))
if OS.get_cmdline_user_args().has("--gefallen"):
var p := -1
var m := -1
for i in _einheiten.size():
if _einheiten[i]["team"] == "partei" and p < 0:
p = i
if _einheiten[i]["team"] == "monster" and m < 0:
m = i
if p >= 0:
_todesfall(p)
if m >= 0:
_todesfall(m)
call_deferred("_naechster_zug")
if OS.get_cmdline_user_args().has("--sieg"):
for e in _einheiten:
@ -134,7 +151,7 @@ func _partei_setzen() -> void:
"damage": KAMPF_REGELN.waffe(figur), "move": 4,
"dex_mod": Dice.modifier(int(figur["attributes"].get("dex", 10))),
"init": 0, "alive": true, "verteidigen": false, "figur": figur,
"slot": i,
"slot": i, "klasse": "mittel",
}
einheit["init"] = KAMPF_REGELN.initiative(int(einheit["dex_mod"]))
_einheiten.append(einheit)
@ -170,6 +187,7 @@ func _monster_setzen() -> void:
"damage": str(daten.get("damage", "1d4")),
"move": int(daten.get("move", 4)), "dex_mod": 0, "init": 0,
"alive": true, "verteidigen": false, "monster": daten,
"klasse": klasse,
}
einheit["init"] = KAMPF_REGELN.initiative(0)
_einheiten.append(einheit)
@ -379,6 +397,14 @@ func _partei_ui() -> void:
portrait.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
if not bool(e["alive"]):
portrait.modulate = Color(0.5, 0.45, 0.45)
var zz := Label.new()
zz.text = "Zz"
zz.position = Vector2(126, 2)
zz.size = Vector2(52, 32)
zz.add_theme_color_override("font_color", Color(0.76, 0.84, 0.96))
zz.add_theme_color_override("font_outline_color", UiTheme.INK)
zz.add_theme_constant_override("outline_size", 6)
p.add_child(zz)
p.add_child(portrait)
var name := Label.new()
@ -635,13 +661,67 @@ func _todesfall(index: int) -> void:
return
e["alive"] = false
_entbelegen(index)
e["node"].set("tp", 0)
e["node"].set("balken", false)
e["node"].set("ausgewaehlt", false)
e["node"].set("name_text", "")
e["node"].modulate = Color(0.62, 0.55, 0.50)
e["getoetet"] = e["team"] == "monster"
_niederlegen(e)
if e["team"] == "partei":
e["node"].modulate = Color(0.5, 0.45, 0.45)
e["node"].set("tp", 0)
_log("%s geht zu Boden." % e["name"])
_log("%s ist bewusstlos." % e["name"])
else:
e["node"].queue_free()
_log("%s fällt." % e["name"])
_log("%s wird getötet." % e["name"])
func _niederlegen(e: Dictionary) -> void:
var node: Node2D = e["node"]
var sprite := node.get_node_or_null("Zeichnung") as Sprite2D
var anzeige := KREATUR.anzeige_fuer(str(e.get("klasse", "mittel")))
if sprite != null:
sprite.rotation = -PI / 2.0
sprite.position = Vector2(0, -anzeige * 0.22)
if e["team"] == "partei":
var zz := Label.new()
zz.text = "Zz"
zz.position = Vector2(-52, -164)
zz.size = Vector2(104, 40)
zz.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
zz.add_theme_color_override("font_color", Color(0.76, 0.84, 0.96))
zz.add_theme_color_override("font_outline_color", UiTheme.INK)
zz.add_theme_constant_override("outline_size", 6)
node.add_child(zz)
e["zz"] = zz
var prefix := "bewusstlos" if e["team"] == "partei" else "gefallen"
var pool_pfad := "res://assets/objects/%s_%d.png" % [prefix, anzeige]
if ResourceLoader.exists(pool_pfad):
var pool := Sprite2D.new()
pool.texture = load(pool_pfad)
pool.centered = true
pool.position = _position(e) + Vector2(0, -anzeige * 0.16)
pool.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
_leichen.add_child(pool)
e["pool"] = pool
func _wieder_aufstehen(e: Dictionary) -> void:
e["alive"] = true
e["hp"] = 1
var node: Node2D = e["node"]
var sprite := node.get_node_or_null("Zeichnung") as Sprite2D
if sprite != null and sprite.texture != null:
sprite.rotation = 0.0
sprite.position = Vector2(0, -sprite.texture.get_height() * 0.5)
node.modulate = Color(1, 1, 1)
node.set("balken", true)
node.set("name_text", str(e["name"]))
node.set("tp", 1)
if e.has("pool") and is_instance_valid(e["pool"]):
e["pool"].queue_free()
e.erase("pool")
if e.has("zz") and is_instance_valid(e["zz"]):
e["zz"].queue_free()
e.erase("zz")
func _sieg_pruefen() -> bool:
@ -802,14 +882,13 @@ func _ende(sieg: bool) -> void:
e["hp"] = 1
var figur: Dictionary = e["figur"]
figur["hp"]["current"] = 1
e["node"].modulate = Color(1, 1, 1)
e["node"].set("tp", 1)
_wieder_aufstehen(e)
Game.notiz("Sieg: %s (+%d Gold)" % [str(_encounter.get("name", "")), gold])
_ergebnis("SIEG", "Beute: %d Gold%s" % [
gold, "" if beute.is_empty() else " und " + ", ".join(beute)], true)
else:
Game.notiz("Niederlage: " + str(_encounter.get("name", "")))
_ergebnis("NIEDERLAGE", "Die Gruppe ist gefallen.", false)
_ergebnis("NIEDERLAGE", "Die Gruppe ist bewusstlos — kein permanenter Tod.", false)
func _ergebnis(titel: String, text: String, sieg: bool) -> void:

View file

@ -63,6 +63,15 @@ func _ready() -> void:
ok("Angriff tötet und entfernt die Belegung",
not bool(e[monster_idx]["alive"]))
# Bewusstlos vs. getötet: Partei bekommt Zz und neutralen Marker, steht auf.
k.call("_todesfall", partei_idx)
var pdown: Dictionary = e[partei_idx]
ok("Bewusstlos: Zz und Marker", pdown.has("zz") and pdown.has("pool"))
k.call("_wieder_aufstehen", pdown)
ok("Aufstehen: Zz/Marker weg, 1 TP", not pdown.has("zz")
and not pdown.has("pool") and bool(pdown["alive"])
and int(pdown["hp"]) == 1)
var gold_vorher := Game.gold
for i in e.size():
if e[i]["team"] == "monster" and bool(e[i]["alive"]):