I'll create a more complex NSFW text-based RPG with deeper mechanics, multiple storylines, and sophisticated gameplay systems. This will be a mature fantasy adventure with romance elements.
Game Title: "Crimson Desires: Academy of Arcane Arts"
Premise: You're a new student at the prestigious Valdris Academy, where magic, politics, and passion intertwine. Navigate complex relationships, master spells, uncover conspiracies, and explore romantic entanglements in this choice-driven adventure.
import random
import json
import time
from dataclasses import dataclass
from typing import Dict, List, Optional
from enum import Enum
class Affinity(Enum):
FIRE = "Fire"
WATER = "Water"
EARTH = "Earth"
AIR = "Air"
SHADOW = "Shadow"
LIGHT = "Light"
class Relationship(Enum):
STRANGER = 0
ACQUAINTANCE = 25
FRIEND = 50
CLOSE_FRIEND = 75
ROMANTIC_INTEREST = 100
LOVER = 150
SOULMATE = 200
@dataclass
class Character:
name: str
description: str
affinity: Affinity
personality: str
romance_difficulty: int
special_requirements: List[str]
current_relationship: int = 0
unlocked_scenes: List[str] = None
def __post_init__(self):
if self.unlocked_scenes is None:
self.unlocked_scenes = []
class Player:
def __init__(self, name: str):
self.name = name
self.level = 1
self.experience = 0
self.charisma = 10
self.intelligence = 10
self.magical_power = 10
self.reputation = 0
self.gold = 100
self.affinity = None
self.inventory = []
self.spells_known = []
self.relationships = {}
self.completed_quests = []
self.current_chapter = 1
self.secrets_discovered = []
self.achievements = []
class GameState:
def __init__(self):
self.player = None
self.characters = self._initialize_characters()
self.current_location = "dormitory"
self.time_of_day = "morning"
self.day = 1
self.game_flags = {}
def _initialize_characters(self):
return {
"Seraphina": Character(
"Seraphina Nightwhisper",
"A mysterious senior student with silver hair and violet eyes. Master of Shadow magic.",
Affinity.SHADOW,
"Enigmatic, intelligent, secretly vulnerable",
15,
["shadow_affinity", "high_intelligence", "secret_discovered"]
),
"Marcus": Character(
"Marcus Flameheart",
"Confident Fire magic prodigy from a noble family. Your academic rival.",
Affinity.FIRE,
"Arrogant, passionate, competitive",
12,
["fire_affinity", "high_magical_power", "defeat_in_duel"]
),
"Luna": Character(
"Luna Tidecaller",
"Gentle Water magic healer with a hidden wild side.",
Affinity.WATER,
"Kind, nurturing, secretly adventurous",
8,
["water_affinity", "help_with_healing"]
),
"Professor Vex": Character(
"Professor Lydia Vex",
"Young, brilliant Enchantment professor with unconventional methods.",
Affinity.LIGHT,
"Intellectual, flirtatious, boundary-pushing",
20,
["high_intelligence", "top_student", "forbidden_knowledge"]
),
"Raven": Character(
"Raven Stormwind",
"Rebellious Air magic student who breaks all the rules.",
Affinity.AIR,
"Wild, free-spirited, magnetic",
10,
["air_affinity", "rule_breaker", "adventure_seeker"]
)
}
def clear_screen():
print("\n" * 50)
def type_text(text, delay=0.03):
for char in text:
print(char, end='', flush=True)
time.sleep(delay)
print()
def display_stats(player):
print(f"\n{'='*50}")
print(f"Name: {player.name} | Level: {player.level} | Chapter: {player.current_chapter}")
print(f"Charisma: {player.charisma} | Intelligence: {player.intelligence} | Magic: {player.magical_power}")
print(f"Reputation: {player.reputation} | Gold: {player.gold}")
if player.affinity:
print(f"Magical Affinity: {player.affinity.value}")
print(f"{'='*50}\n")
def create_character():
clear_screen()
type_text("Welcome to Valdris Academy of Arcane Arts...")
type_text("Where magic and desire intertwine in ways you never imagined.\n")
name = input("Enter your character's name: ")
player = Player(name)
type_text(f"\nWelcome, {name}. The Sorting Crystal will now determine your magical affinity...\n")
print("Choose your magical nature:")
affinities = list(Affinity)
for i, affinity in enumerate(affinities, 1):
descriptions = {
Affinity.FIRE: "Passionate, aggressive, powerful",
Affinity.WATER: "Adaptive, healing, intuitive",
Affinity.EARTH: "Stable, protective, enduring",
Affinity.AIR: "Free, quick, unpredictable",
Affinity.SHADOW: "Mysterious, subtle, complex",
Affinity.LIGHT: "Pure, revealing, inspiring"
}
print(f"{i}. {affinity.value} - {descriptions[affinity]}")
while True:
try:
choice = int(input("\nChoose (1-6): ")) - 1
if 0 <= choice < len(affinities):
player.affinity = affinities[choice]
break
except ValueError:
pass
print("Invalid choice. Please try again.")
# Affinity bonuses
bonuses = {
Affinity.FIRE: ("magical_power", 3),
Affinity.WATER: ("charisma", 3),
Affinity.EARTH: ("intelligence", 3),
Affinity.AIR: ("charisma", 2),
Affinity.SHADOW: ("intelligence", 2),
Affinity.LIGHT: ("magical_power", 2)
}
stat, bonus = bonuses[player.affinity]
setattr(player, stat, getattr(player, stat) + bonus)
type_text(f"\nThe crystal glows with {player.affinity.value} energy!")
type_text(f"Your {stat.replace('_', ' ')} increases by {bonus}!\n")
return player
def dormitory_scene(game_state):
player = game_state.player
clear_screen()
display_stats(player)
type_text("Your dormitory room overlooks the academy courtyard.")
type_text("Moonlight streams through tall windows, casting ethereal shadows.")
if game_state.time_of_day == "night" and "Seraphina" in player.relationships:
if player.relationships["Seraphina"] >= Relationship.ROMANTIC_INTEREST.value:
type_text("\nA soft knock echoes at your door...")
choice = input("Answer the door? (y/n): ")
if choice.lower() == 'y':
return seraphina_night_visit(game_state)
print("\nWhat would you like to do?")
print("1. Study magical theory (+Intelligence)")
print("2. Practice spells (+Magical Power)")
print("3. Rest (restore energy, advance time)")
print("4. Check inventory and relationships")
print("5. Leave dormitory")
choice = input("\nChoose an action: ")
if choice == "1":
return study_session(game_state)
elif choice == "2":
return spell_practice(game_state)
elif choice == "3":
return rest(game_state)
elif choice == "4":
return check_status(game_state)
elif choice == "5":
return choose_location(game_state)
else:
type_text("You hesitate, lost in thought...")
return dormitory_scene(game_state)
def study_session(game_state):
player = game_state.player
clear_screen()
type_text("You open your spellbooks and begin studying...")
# Random study events
events = [
"focused_study",
"distracted_study",
"breakthrough",
"visitor"
]
event = random.choice(events)
if event == "focused_study":
gain = random.randint(2, 4)
player.intelligence += gain
player.experience += 10
type_text(f"Deep concentration pays off! Intelligence +{gain}")
elif event == "distracted_study":
gain = 1
player.intelligence += gain
type_text("You struggle to focus, but learn something. Intelligence +1")
elif event == "breakthrough":
gain = random.randint(3, 6)
player.intelligence += gain
player.experience += 20
new_spell = random.choice(["Charm Person", "Detect Thoughts", "Suggestion"])
if new_spell not in player.spells_known:
player.spells_known.append(new_spell)
type_text(f"Eureka! You discover the '{new_spell}' spell!")
type_text(f"Intelligence +{gain}")
elif event == "visitor":
return study_visitor(game_state)
advance_time(game_state)
input("\nPress Enter to continue...")
return dormitory_scene(game_state)
def study_visitor(game_state):
player = game_state.player
visitors = ["Luna", "Marcus", "Seraphina"]
visitor = random.choice(visitors)
type_text(f"\nA gentle knock interrupts your studies. {visitor} peeks in.")
if visitor == "Luna":
type_text("'I brought healing tea! You look exhausted.'")
choice = input("Invite Luna in? (y/n): ")
if choice.lower() == 'y':
return luna_study_scene(game_state)
else:
type_text("Luna smiles understandingly and leaves the tea by your door.")
player.relationships["Luna"] = player.relationships.get("Luna", 0) + 5
elif visitor == "Marcus":
type_text("'Still cramming? Real mages learn through practice, not books.'")
choice = input("Challenge his statement? (y/n): ")
if choice.lower() == 'y':
return marcus_debate(game_state)
else:
type_text("Marcus smirks and walks away.")
player.relationships["Marcus"] = player.relationships.get("Marcus", 0) - 2
elif visitor == "Seraphina":
type_text("'The shadows whisper of your dedication. Impressive.'")
choice = input("Ask about the shadows? (y/n): ")
if choice.lower() == 'y':
return seraphina_mystery(game_state)
else:
type_text("Seraphina nods approvingly and melts back into the shadows.")
player.relationships["Seraphina"] = player.relationships.get("Seraphina", 0) + 3
def luna_study_scene(game_state):
player = game_state.player
clear_screen()
type_text("Luna enters with a warm smile, carrying a steaming cup.")
type_text("'This blend helps with mental clarity. My grandmother's recipe.'")
player.relationships["Luna"] = player.relationships.get("Luna", 0) + 10
type_text("\nAs you sip the tea, Luna sits beside you, close enough to feel her warmth.")
type_text("'You know, there's more to magic than what they teach in classes...'")
if player.relationships["Luna"] >= Relationship.FRIEND.value:
type_text("She places her hand on yours, and you feel a gentle magical pulse.")
choice = input("Lean closer? (y/n): ")
if choice.lower() == 'y':
return luna_intimate_moment(game_state)
type_text("You study together, her presence both calming and distracting.")
player.intelligence += 2
player.charisma += 1
type_text("Intelligence +2, Charisma +1")
advance_time(game_state)
input("\nPress Enter to continue...")
return dormitory_scene(game_state)
def luna_intimate_moment(game_state):
player = game_state.player
type_text("\nYou lean closer, and Luna's breath catches.")
type_text("'I... I've wanted to tell you something,' she whispers.")
type_text("Her eyes reflect depths like moonlit pools.")
choice = input("Kiss her? (y/n): ")
if choice.lower() == 'y':
type_text("\nYour lips meet in a gentle, magical kiss.")
type_text("Water magic flows between you, creating tiny rainbows in the air.")
type_text("Luna pulls back, blushing. 'That was... incredible.'")
player.relationships["Luna"] += 25
if "first_kiss_luna" not in player.achievements:
player.achievements.append("first_kiss_luna")
type_text("\n[Achievement Unlocked: Moonlit Kiss]")
else:
type_text("You gently squeeze her hand instead.")
type_text("Luna smiles, understanding. 'When you're ready...'")
player.relationships["Luna"] += 10
def seraphina_night_visit(game_state):
player = game_state.player
clear_screen()
type_text("You open the door to find Seraphina in a flowing nightgown.")
type_text("Shadows dance around her like living silk.")
type_text("'May I come in? I have something... private to discuss.'")
choice = input("Let her in? (y/n): ")
if choice.lower() == 'y':
type_text("\nSeraphina glides in, the shadows following.")
type_text("'The academy has secrets, and you're getting close to uncovering them.'")
type_text("She moves closer, her violet eyes intense.")
type_text("'But knowledge comes with a price. Are you willing to pay it?'")
print("\n1. 'What kind of price?'")
print("2. 'I'm not afraid of secrets.'")
print("3. Kiss her")
choice = input("Choose: ")
if choice == "1":
return seraphina_price_discussion(game_state)
elif choice == "2":
return seraphina_secret_reveal(game_state)
elif choice == "3":
return seraphina_passionate_scene(game_state)
else:
type_text("Seraphina nods, a hint of disappointment in her eyes.")
type_text("'Another time, perhaps.' She vanishes into shadow.")
player.relationships["Seraphina"] -= 5
def seraphina_passionate_scene(game_state):
player = game_state.player
type_text("\nYou step forward and cup her face, pulling her into a deep kiss.")
type_text("Shadow magic erupts around you both, creating a cocoon of