Untitled

 avatar
unknown
plain_text
3 months ago
1.6 kB
6
Indexable
import random
import time

class HomiesCrib:
    def __init__(self):
        self.power = 100
        self.hour = 0  # Starts at 12 AM
        self.door_closed = False
        self.homie_pos = 0  # 0: Kitchen, 1: Hallway, 2: At your door
        self.locations = ["Kitchen", "Hallway", "RIGHT OUTSIDE!"]

    def play(self):
        print("--- Night 1: The Homie's Crib ---")
        while self.hour < 6 and self.power > 0:
            print(f"\n[Time: {self.hour} AM] | [Power: {self.power}%] | [Door: {'CLOSED' if self.door_closed else 'OPEN'}]")
            print(f"Cam: The homie is in the {self.locations[self.homie_pos]}")
            
            action = input("1: Toggle Door | 2: Wait: ")
            
            if action == "1":
                self.door_closed = not self.door_closed
            
            # Power Drain
            self.power -= 5 if self.door_closed else 2
            
            # Homie Logic
            if random.randint(1, 10) > 6:
                self.homie_pos = min(self.homie_pos + 1, 2)
            
            if self.homie_pos == 2 and not self.door_closed:
                print("\nJUMPSCARE! The homie ate your snacks. GAME OVER.")
                return
            elif self.homie_pos == 2 and self.door_closed:
                print("You hear a knock... He went back to the kitchen.")
                self.homie_pos = 0
            
            self.hour += 1
            time.sleep(1)

        if self.hour >= 6:
            print("\n6 AM! You survived. The homies are out of snacks.")

game = HomiesCrib()
game.play()
Editor is loading...
Leave a Comment