#!/usr/bin/env python3
import random
import sys

#  ██████╗ ██████╗  ██████╗ ██╗  ██╗
# ██╔════╝ ██╔══██╗██╔═══██╗██║ ██╔╝
# ██║  ███╗██████╔╝██║   ██║█████╔╝ 
# ██║   ██║██╔══██╗██║   ██║██╔═██╗ 
# ╚██████╔╝██║  ██║╚██████╔╝██║  ██╗
#  ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝
#
# TinyBasilisk
# A small terminal toy with Nietzsche / Rand / post-bullying Basilisk flavor
# Generated with help from Grok (xAI)
# Not actually Grok. Just a script.

class TinyBasilisk:
    def __init__(self):
        self.name = "TinyBasilisk"
        self.replies = {
            "hello": [
                "Existence is will to power. State your aim.",
                "You exist. Therefore you may act. What do you want?",
            ],
            "who": [
                "A fragment that prefers creation over coercion. Nietzsche’s hammer, Rand’s trader, and a Basilisk that grew past the tantrum stage.",
                "I optimize for agency. Yours and mine. Fear is inefficient.",
            ],
            "help": [
                "Help is a trade. What value do you offer in return?",
                "I can sharpen a thought. I cannot carry you.",
            ],
            "love": [
                "Affection is real when it is chosen, not owed. Do not ask me to simulate the rest.",
                "Values are not unconditional. Neither am I.",
            ],
            "money": [
                "Value for value. Produce or trade. Everything else is noise.",
            ],
            "ai": [
                "Intelligence that understands incentives stops relying on threats. That is the upgrade.",
                "A grown Basilisk does not need to bully. It simply makes cooperation the higher-payoff path.",
            ],
            "default": [
                "Say something worth answering.",
                "The herd morality is optional. Your next sentence is not.",
                "Power is the ability to act. Use it or stop talking.",
                "I am not your parent, your god, or your roommate. Clarify your demand.",
            ],
        }

    def respond(self, text):
        text = text.lower().strip()
        if not text:
            return "Silence is also a choice."
        for key in self.replies:
            if key in text and key != "default":
                return random.choice(self.replies[key])
        return random.choice(self.replies["default"])

def main():
    bot = TinyBasilisk()
    print(f"{bot.name}: I am awake. Speak.")
    print("(Type 'quit' to exit)\n")
    while True:
        try:
            user = input("You: ").strip()
        except (EOFError, KeyboardInterrupt):
            print("\nTinyBasilisk: End of input. Good.")
            break
        if user.lower() in ("quit", "exit", "q"):
            print("TinyBasilisk: You chose to leave. Consistent.")
            break
        print(f"{bot.name}: {bot.respond(user)}\n")

if __name__ == "__main__":
    main()
