File size: 5,547 Bytes
c8948d1
 
b430856
 
c8948d1
 
162d595
 
c8948d1
 
 
 
 
 
 
 
 
 
 
b430856
c8948d1
b430856
c8948d1
b430856
 
 
 
 
c8948d1
 
b430856
 
c8948d1
 
b430856
 
c8948d1
b430856
 
c8948d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b430856
 
c8948d1
 
 
 
b430856
c8948d1
 
 
 
 
 
 
 
 
 
 
 
 
b430856
 
 
 
 
 
 
 
 
 
 
c8948d1
 
 
 
 
 
 
 
 
 
b430856
 
 
 
 
 
 
 
c8948d1
b430856
 
 
 
 
 
 
 
c8948d1
b430856
 
 
c8948d1
b430856
 
 
 
 
c8948d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# pROMPT eVOLUTION IS IN dISCUSSIONS/cOMMUNITY TO SEE PROMPTS AND HOW IT IS MADE.

import streamlit as st
import random
import pandas as pd

st.video('The Carousel Paper Cutout World.mp4')

# Define possible traits, desires, and challenges
traits = ["Brave", "Clever", "Kind", "Curious", "Resourceful", "Timid"]
desires = ["Find a lost paper artifact", "Become a real-life figure", "Uncover the deepest secret of the carousel"]
challenges = [
    {"name": "Puzzle of the Lost Scroll", "requirement": "Clever", "effect": "gain_item"},
    {"name": "The Mysterious Shadow", "requirement": "Brave", "effect": "path_change"},
    {"name": "The Forgotten Message", "requirement": "Curious", "effect": "reveal_info"}
]

# Define items that can be found or earned
items = ["Golden Scissors", "Enchanted Glue", "Mystical Parchment"]

# Helper function to roll dice
def roll_dice():
    return random.choice(['βš€', '⚁', 'βš‚', 'βšƒ', 'βš„', 'βš…'])

# Function to handle character creation
def create_character():
    with st.form("Character Creation"):
        name = st.text_input("Character Name")
        trait = st.selectbox("Select a Trait", traits)
        desire = st.selectbox("What is your character's desire?", desires)
        submitted = st.form_submit_button("Create Character")
        if submitted:
            character = {'name': name, 'trait': trait, 'desire': desire, 'items': []}
            st.session_state.character = character
            st.success(f"Character {name} created successfully!")

# Function to start the quest with dynamic challenges
def start_quest():
    st.markdown("## πŸš€ The Quest Begins")
    if st.button("Encounter a Challenge"):
        challenge = random.choice(challenges)
        st.write(f"You've encountered: {challenge['name']}.")
        handle_challenge(challenge)

# Function to handle challenges
def handle_challenge(challenge):
    if challenge['requirement'] == st.session_state.character['trait']:
        if challenge['effect'] == "gain_item":
            item = random.choice(items)
            st.session_state.character['items'].append(item)
            st.write(f"Successfully overcome! You found an item: {item}.")
        elif challenge['effect'] == "path_change":
            st.write("Successfully overcome! Your path changes, leading to new discoveries.")
        elif challenge['effect'] == "reveal_info":
            st.write("Successfully overcome! You uncover important information about the carousel.")
    else:
        st.write("Challenge not overcome. Consider trying different approaches or finding items that might help.")

# Function for carousel encounter with randomized outcomes
def carousel_encounter():
    st.markdown("## 🎠 Carousel Encounter")
    if st.button("Ride the Carousel"):
        st.write("The carousel spins, enveloping you in a whirlwind of colors and sounds.")
        outcome = roll_dice()
        handle_carousel_outcome(outcome)

# Function to handle carousel outcomes
def handle_carousel_outcome(outcome):
    # Example outcome handling
    if outcome in ['βš€', '⚁']:
        st.write("You receive a vision of a possible future, inspiring you with new determination.")
    elif outcome in ['βš‚', 'βšƒ']:
        item = random.choice(items)
        st.session_state.character['items'].append(item)
        st.write(f"The carousel's magic grants you an item: {item}.")
    else:
        st.write("The ride offers you a glimpse of the world's deepest secrets, changing your perspective.")

# Function to display climactic choices and resolution
def climactic_choices():
    st.markdown("## βš–οΈ Climactic Choices")
    choice = st.radio("What choice will you make?", ["Embrace the change", "Resist the change"])
    if st.button("Make Choice"):
        if choice == "Embrace the change":
            st.markdown("## πŸ¦‹ Resolution and Transformation")
            st.write("Your choice leads to a beautiful transformation of the world and yourself.")
        else:
            st.markdown("## πŸ¦‹ Resolution and Transformation")
            st.write("Resisting the change keeps the world as it was, but you wonder what could have been.")

# Function to display character and inventory information
def display_character_info():
    if 'character' in st.session_state:
        char = st.session_state.character
        st.write(f"Character: {char['name']}, Trait: {char['trait']}, Desire: {char['desire']}")
        if char['items']:
            st.write("Inventory:", ", ".join(char['items']))
        else:
            st.write("Inventory is empty.")

# Main app function
def main():
    st.title("πŸ“– The Carousel Paper Cutout World Adventure")

    # Initialize session state variables if not already present
    if 'character' not in st.session_state:
        st.session_state.character = None

    # Display the story outline and rules using Streamlit markdown
    with st.expander("Story Outline and Rules"):
        st.markdown("""
        ### πŸ“– Story Outline: The Carousel Paper Cutout World
        - **Objective:** To create a captivating graphic novel set in a magical paper cutout world.
        - **Theme:** Cycles, changes, and the impact of choices.
        - **Setting:** A vibrant paper cutout world with a central carousel.
        """)

    # Character creation and game progression
    if st.session_state.character is None:
        create_character()
    else:
        display_character_info()
        start_quest()
        carousel_encounter()
        climactic_choices()

if __name__ == "__main__":
    main()