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,63 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Cheat-Codes / Easter Eggs, die an mehreren Eingabepunkten abgefangen werden."""
|
||||
|
||||
from doom_matrix.engine.ui import Colors, slow_print, dramatic_pause
|
||||
|
||||
|
||||
def try_cheat(raw_input, player):
|
||||
"""Prueft, ob raw_input ein Cheat-Code ist. Wendet ihn an und gibt True zurueck,
|
||||
falls ja -- der Aufrufer soll die Eingabeaufforderung dann wiederholen."""
|
||||
code = raw_input.strip().lower()
|
||||
|
||||
if code == "iddqd":
|
||||
player.flags["god_mode"] = not player.flags.get("god_mode", False)
|
||||
state = "AKTIVIERT" if player.flags["god_mode"] else "DEAKTIVIERT"
|
||||
slow_print(f"\n{Colors.YELLOW}{Colors.BOLD}GOD MODE {state}.{Colors.END}")
|
||||
_track(player, code)
|
||||
return True
|
||||
|
||||
if code == "idkfa":
|
||||
for wid in ("super_shotgun", "plasma_rifle", "bfg10000"):
|
||||
player.add_weapon(wid)
|
||||
player.ammo["shells"] = 999
|
||||
player.ammo["cells"] = 999
|
||||
player.ammo["bfg"] = 99
|
||||
slow_print(f"\n{Colors.YELLOW}{Colors.BOLD}ALLE WAFFEN + MUNITION GEWAEHRT.{Colors.END}")
|
||||
_track(player, code)
|
||||
return True
|
||||
|
||||
if code == "thereisnospoon":
|
||||
slow_print(f"\n{Colors.GREEN}Du starrst auf deine Hand. Es gibt keinen Loeffel.{Colors.END}")
|
||||
slow_print(f"{Colors.GREEN}Deine Corruption sinkt leicht -- Klarheit hat ihren Preis in Gewissheit.{Colors.END}")
|
||||
player.corruption = max(0, player.corruption - 10)
|
||||
_track(player, code)
|
||||
return True
|
||||
|
||||
if code == "xyzzy":
|
||||
slow_print(f"\n{Colors.DIM}Ein hohles Echo antwortet. Nichts passiert. (Das war schon 1977 ein Scherz.){Colors.END}")
|
||||
_track(player, code)
|
||||
return True
|
||||
|
||||
if code in ("doom", "knee-deep", "kneedeepinthedead"):
|
||||
_knee_deep_easter_egg(player)
|
||||
_track(player, code)
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _track(player, code):
|
||||
if code not in player.flags["cheats_used"]:
|
||||
player.flags["cheats_used"].append(code)
|
||||
|
||||
|
||||
def _knee_deep_easter_egg(player):
|
||||
slow_print(f"\n{Colors.GREEN}{Colors.BOLD}═══ EASTER EGG: KNEE-DEEP IN THE DEAD ═══{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Fuer einen Moment wird die Welt zu reinem Pixel-Grau.{Colors.END}")
|
||||
slow_print(f"{Colors.WHITE}Ein winziger, viereckiger Imp huepft auf dich zu -- 16x16 Pixel Nostalgie.{Colors.END}")
|
||||
dramatic_pause(0.5)
|
||||
slow_print(f"{Colors.YELLOW}Er kann dir nichts tun. Er ist nur eine Erinnerung.{Colors.END}")
|
||||
slow_print(f"{Colors.YELLOW}Du zerquetschst ihn trotzdem. Fuer alte Zeiten.{Colors.END}")
|
||||
slow_print(f"{Colors.GREEN}+1 Praetor-Token (Nostalgie-Bonus){Colors.END}")
|
||||
player.praetor_tokens += 1
|
||||
Reference in new issue
Block a user