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())