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

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"]):