Files
rustkeep/mods/core/floors.toml
MDietermann 197f62ce33 feat: m4 teil 1 — beute, inventar und affixe
- data/: [[loot_tables]] und [[affixes]] als Registries; LootEntry mit
  guaranteed, nothing, table-in-table, count und affixes
- game/loot.rs: EINE Ziehmaschinerie fuer Gegenstaende und Affixe,
  Tiefendeckel gegen wechselseitigen Bezug
- PickUp zieht erst beim Aufheben (Ticket 16) — moeglich nur, weil alle
  Haufen dasselbe Symbol zeigen
- UseItem/Equip/Unequip/Drop, Inventar-Screen als Registry-Schleife
- Affixe im Attributpfad, in der Resistenz und in der Trigger-Suche;
  item_label stellt Affixnamen voran, item_price multipliziert Faktoren
- Room haelt eine loot_table (nicht je Haufen eine), Prefab-loot
  ueberschreibt die Etagentabelle

53 Tests. Offen aus M4: Handel.
2026-08-12 17:56:28 +02:00

64 lines
2.2 KiB
TOML

# Etagen sind Registry-Eintraege (Ticket 10). Ausgewaehlt wird durchgehend
# ueber TAGS, nie ueber IDs — sonst kann ein Mod keinen eigenen Eingangsraum
# beisteuern, ohne die ganze Tabelle zu ueberschreiben.
#
# `core:merchant` steht unter `required`, nicht unter `prefabs`: Ticket 07 hat
# Backtracking ausgeschlossen, der Haendler muss also garantiert auftauchen.
#
# Es gibt keine Zahl "5" im Code — findet die Engine keine Etage mit der
# naechsten Nummer, ist der Lauf gewonnen.
[[floors]]
id = "floor_1"
number = 1
size = [72, 34]
rooms = 7
required = ["core:entrance", "core:stairs", "core:merchant"]
prefabs = [ { tag = "core:normal", weight = 10 } ]
creatures = [ { id = "core:rat", weight = 10 } ]
loot = "core:floor_1_table"
[[floors]]
id = "floor_2"
number = 2
size = [72, 34]
rooms = 8
required = ["core:entrance", "core:stairs", "core:merchant"]
prefabs = [ { tag = "core:normal", weight = 10 },
{ tag = "core:treasure", weight = 2 } ]
creatures = [ { id = "core:rat", weight = 6 }, { id = "core:skeleton", weight = 6 } ]
loot = "core:floor_1_table"
[[floors]]
id = "floor_3"
number = 3
size = [80, 38]
rooms = 9
required = ["core:entrance", "core:stairs", "core:merchant"]
prefabs = [ { tag = "core:normal", weight = 10 },
{ tag = "core:treasure", weight = 3 } ]
creatures = [ { id = "core:rat", weight = 3 }, { id = "core:skeleton", weight = 8 }, { id = "core:ghoul", weight = 3 } ]
loot = "core:floor_3_table"
[[floors]]
id = "floor_4"
number = 4
size = [80, 38]
rooms = 10
required = ["core:entrance", "core:stairs", "core:merchant"]
prefabs = [ { tag = "core:normal", weight = 10 },
{ tag = "core:treasure", weight = 3 } ]
creatures = [ { id = "core:skeleton", weight = 6 }, { id = "core:ghoul", weight = 8 } ]
loot = "core:floor_3_table"
[[floors]]
id = "floor_5"
number = 5
size = [88, 40]
rooms = 11
required = ["core:entrance", "core:stairs", "core:merchant"]
prefabs = [ { tag = "core:normal", weight = 10 },
{ tag = "core:treasure", weight = 4 } ]
creatures = [ { id = "core:ghoul", weight = 8 }, { id = "core:bone_lord", weight = 2 } ]
loot = "core:floor_5_table"