Initial commit: DOOM x MATRIX System Failure text adventure
Modulares Python-Textadventure mit Kampfsystem (Stagger, Bullet Time, Glory Kills, Hacking-Skill-Checks), Hub-Raum-Navigation, prozeduralen Encountern, 3 Charakterklassen, mehreren Enden und Story-Elementen (weißer Hase, Orakel, schwarze-Katze-Deja-vu-Glitch).
This commit is contained in:
commit
46116f7f4b
25 files changed
+2594
No files matched your search
@@ -0,0 +1,134 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Mehrere Enden je nach Corruption, Entscheidungen und Layer-0-Status."""
|
||||
|
||||
from doom_matrix.engine.ui import Colors, slow_print, dramatic_pause, clear_screen, menu
|
||||
from doom_matrix.world.layers import layer_zero_unlocked
|
||||
|
||||
|
||||
def determine_ending(player):
|
||||
if layer_zero_unlocked(player) and player.flags.get("reached_layer_zero"):
|
||||
return "wake_up"
|
||||
if player.corruption >= 60:
|
||||
return "dark_pact"
|
||||
if player.flags.get("final_choice") == "3":
|
||||
return "new_architect"
|
||||
if player.flags.get("final_choice") == "4":
|
||||
return "new_game_plus"
|
||||
return "rip_and_tear"
|
||||
|
||||
|
||||
def _stats_block(player):
|
||||
slow_print(f"\n{Colors.CYAN}Statistiken:{Colors.END}")
|
||||
print(f" Health übrig: {player.health}/{player.max_health}")
|
||||
print(f" Corruption: {int(player.corruption)}%")
|
||||
print(f" Glory Kills: {player.glory_kills}")
|
||||
print(f" Hacks: {player.hacks}")
|
||||
print(f" Klasse: {player.class_name}")
|
||||
print(f" Waffen: {', '.join(w.name for w in player.weapons)}")
|
||||
print(f" Crucible-Fragmente: {player.inventory.crucible_fragments}/3")
|
||||
if player.flags.get("cheats_used"):
|
||||
print(f" Benutzte Cheats: {', '.join(player.flags['cheats_used'])}")
|
||||
|
||||
|
||||
def _banner(text, color=Colors.GREEN):
|
||||
width = max(len(text) + 8, 55)
|
||||
print(f"""
|
||||
{color}{Colors.BOLD}
|
||||
╔{'═' * (width - 4)}╗
|
||||
║{text.center(width - 4)}║
|
||||
╚{'═' * (width - 4)}╝
|
||||
{Colors.END}
|
||||
""")
|
||||
|
||||
|
||||
def ending(player):
|
||||
dramatic_pause(1)
|
||||
clear_screen()
|
||||
|
||||
kind = determine_ending(player)
|
||||
handlers = {
|
||||
"wake_up": _ending_wake_up,
|
||||
"dark_pact": _ending_dark_pact,
|
||||
"new_architect": _ending_new_architect,
|
||||
"new_game_plus": _ending_new_game_plus,
|
||||
"rip_and_tear": _ending_rip_and_tear,
|
||||
}
|
||||
handlers[kind](player)
|
||||
_stats_block(player)
|
||||
|
||||
dramatic_pause(1)
|
||||
slow_print(f"\n{Colors.GREEN}Danke fürs Spielen! 🐇{Colors.END}")
|
||||
slow_print(f"{Colors.DIM}Erstellt von LXC für Andy{Colors.END}")
|
||||
return kind
|
||||
|
||||
|
||||
def _ending_rip_and_tear(player):
|
||||
_banner("SYSTEM FAILURE - CLEAR", Colors.GREEN)
|
||||
slow_print(f"{Colors.YELLOW}Trinity VEGA:{Colors.END} {Colors.CYAN}'Wir haben es geschafft. Die Welt ist frei.'{Colors.END}")
|
||||
slow_print(f"{Colors.YELLOW}Morpheus Hayden:{Colors.END} {Colors.CYAN}'Aber der Krieg... der Krieg ist nie vorbei.'{Colors.END}")
|
||||
slow_print(f"{Colors.YELLOW}Du:{Colors.END} {Colors.CYAN}'Gut. Dann gibt's noch mehr zu rip and tear.'{Colors.END}")
|
||||
dramatic_pause(1)
|
||||
_banner("NEW GAME+ UNLOCKED", Colors.MAGENTA)
|
||||
|
||||
|
||||
def _ending_new_architect(player):
|
||||
_banner("DER NEUE ARCHITEKT", Colors.CYAN)
|
||||
slow_print(f"{Colors.WHITE}Du setzt dich in den leeren Thron aus Code, den der Archi-Lord hinterlassen hat.{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Von hier aus siehst du jede Zeile der Matrix. Jede Entscheidung. Jeden Bug.{Colors.END}")
|
||||
slow_print(f"{Colors.YELLOW}Morpheus Hayden:{Colors.END} {Colors.CYAN}'Und jetzt? Wirst du besser sein als er?'{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Du antwortest nicht sofort. Macht macht keine Antworten leichter.{Colors.END}")
|
||||
slow_print(f"{Colors.GREEN}'Ich werde es zumindest versuchen.'{Colors.END}")
|
||||
|
||||
|
||||
def _ending_dark_pact(player):
|
||||
_banner("DER DUNKLE PAKT", Colors.RED)
|
||||
slow_print(f"{Colors.RED}Die Corruption in dir hat laengst gewonnen, bevor der letzte Schuss fiel.{Colors.END}")
|
||||
slow_print(f"{Colors.RED}Der Archi-Lord zerfaellt nicht in Nichts -- er zerfaellt in DICH.{Colors.END}")
|
||||
slow_print(f"{Colors.RED}Seine Macht, sein Hunger, seine Krone aus Servern und Schwefel.{Colors.END}")
|
||||
dramatic_pause(1)
|
||||
slow_print(f"{Colors.YELLOW}Trinity VEGA weicht zurueck.{Colors.END} {Colors.CYAN}'...Slayer?'{Colors.END}")
|
||||
slow_print(f"{Colors.RED}{Colors.BOLD}Du:{Colors.END} {Colors.RED}'Der Slayer ist tot. Es gibt nur noch den Dark Lord.'{Colors.END}")
|
||||
slow_print(f"{Colors.DIM}[GEHEIMES ENDE FREIGESCHALTET: DARK LORD]{Colors.END}")
|
||||
|
||||
|
||||
def _ending_new_game_plus(player):
|
||||
_banner("...MIT CHEATS", Colors.YELLOW)
|
||||
slow_print(f"{Colors.GREEN}Archi-Lord:{Colors.END} {Colors.WHITE}'Sie haben tatsaechlich um einen neuen Spielstand gebeten.'{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Die Welt um dich herum zerfaellt -- nicht in Chaos, sondern in ein Ladebildschirm.{Colors.END}")
|
||||
slow_print(f"{Colors.YELLOW}Du:{Colors.END} {Colors.CYAN}'IDDQD. IDKFA. Und diesmal behalte ich beides.'{Colors.END}")
|
||||
|
||||
|
||||
def _ending_wake_up(player):
|
||||
_banner("WAKE UP", Colors.WHITE)
|
||||
slow_print(f"{Colors.WHITE}Es gibt kein Morpheus, kein Orakel, keinen Archi-Lord mehr in diesem Raum.{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Nur ein Cursor, der blinkt. Und die Erinnerung an einen weissen Hasen.{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Du bist nicht aufgewacht IN der Matrix. Du bist aufgewacht AUS der Geschichte.{Colors.END}")
|
||||
dramatic_pause(1.5)
|
||||
slow_print(f"{Colors.DIM}[WAHRES ENDE FREIGESCHALTET: du folgtest dem Hasen UND fandest alle drei Fragmente]{Colors.END}")
|
||||
slow_print(f"{Colors.GREEN}Und irgendwo, in einem Terminal, das wirklich existiert, endet der Text.{Colors.END}")
|
||||
|
||||
|
||||
def game_over(player):
|
||||
clear_screen()
|
||||
_banner("GAME OVER", Colors.RED)
|
||||
|
||||
slow_print(f"\n{Colors.RED}Du bist gefallen...{Colors.END}")
|
||||
slow_print(f"{Colors.DIM}Aber in der Matrix ist Tod nur ein Bug.{Colors.END}")
|
||||
|
||||
choice = menu([
|
||||
("1", "Die blaue Pille schlucken (aufgeben)"),
|
||||
("2", "Neu laden (Programm beenden)"),
|
||||
], "Was tust du")
|
||||
|
||||
if choice == "1":
|
||||
clear_screen()
|
||||
_banner("BLUEPILL ENDING", Colors.CYAN)
|
||||
slow_print(f"{Colors.WHITE}Du wachst in einem Buero auf. Fluoreszierendes Licht. Ein Kaffeebecher dampft.{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Ein Kollege fragt, ob du das Quartalsmeeting vorbereitet hast.{Colors.END}")
|
||||
slow_print(f"{Colors.DIM}Irgendwo, ganz leise, hoerst du ein Kaninchen husten.{Colors.END}")
|
||||
slow_print(f"\n{Colors.GREEN}Danke fürs Spielen! 🐇{Colors.END}")
|
||||
return "bluepill_ending"
|
||||
|
||||
slow_print(f"\n{Colors.DIM}Ein Patch könnte helfen.{Colors.END}")
|
||||
return "game_over_final"
|
||||
Reference in new issue
Block a user