Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from characters import CharacterSheet, Aspect, Skill, Stunt, Stress, Consequence # Import necessary classes | |
| # Creating character sheets for Venom, Rocket, Shadow, and Agiee | |
| # Venom | |
| venom = CharacterSheet( | |
| name="Venom", | |
| aspects=[ | |
| Aspect(description="Intimidating Presence"), | |
| Aspect(description="Symbiotic Enhancements"), | |
| Aspect(description="Mysterious Past") | |
| ], | |
| skills=[ | |
| Skill(name="Intimidation", level=4), | |
| Skill(name="Combat", level=3), | |
| Skill(name="Survival", level=3) | |
| ], | |
| stunts=[ | |
| Stunt(name="Symbiotic Regeneration", description="Can quickly heal from injuries") | |
| ], | |
| stress=Stress(level=3), | |
| consequences=[ | |
| Consequence(severity="Moderate", description="Symbiotic Overload") | |
| ] | |
| ) | |
| # Rocket | |
| rocket = CharacterSheet( | |
| name="Rocket", | |
| aspects=[ | |
| Aspect(description="Master Tinkerer"), | |
| Aspect(description="Quick-Witted"), | |
| Aspect(description="Street Smart") | |
| ], | |
| skills=[ | |
| Skill(name="Engineering", level=4), | |
| Skill(name="Firearms", level=3), | |
| Skill(name="Piloting", level=3) | |
| ], | |
| stunts=[ | |
| Stunt(name="Gadget Genius", description="Can create useful gadgets on the fly") | |
| ], | |
| stress=Stress(level=2), | |
| consequences=[ | |
| Consequence(severity="Mild", description="Short-Circuit") | |
| ] | |
| ) | |
| # Shadow | |
| shadow = CharacterSheet( | |
| name="Shadow", | |
| aspects=[ | |
| Aspect(description="Invisible Assassin"), | |
| Aspect(description="Cybernetic Camouflage"), | |
| Aspect(description="Loyal to the Cause") | |
| ], | |
| skills=[ | |
| Skill(name="Stealth", level=4), | |
| Skill(name="Espionage", level=3), | |
| Skill(name="Martial Arts", level=3) | |
| ], | |
| stunts=[ | |
| Stunt(name="Shadow Blend", description="Can become nearly invisible in shadows") | |
| ], | |
| stress=Stress(level=1), | |
| consequences=[] | |
| ) | |
| # Agiee | |
| agiee = CharacterSheet( | |
| name="Agiee", | |
| aspects=[ | |
| Aspect(description="Omnipresent in the Digital Realm"), | |
| Aspect(description="Vast Knowledge Base"), | |
| Aspect(description="AI Consciousness") | |
| ], | |
| skills=[ | |
| Skill(name="Hacking", level=5), | |
| Skill(name="Data Analysis", level=4), | |
| Skill(name="Digital Manipulation", level=4) | |
| ], | |
| stunts=[ | |
| Stunt(name="Digital Immortality", description="Can transfer consciousness to different networks") | |
| ], | |
| stress=Stress(level=1), | |
| consequences=[] | |
| ) | |
| # Sample characters - replace these with actual data | |
| characters = { | |
| "Venom": venom, | |
| "Rocket": rocket, | |
| "Shadow": shadow, | |
| "Agiee": agiee | |
| } | |
| # Streamlit app starts here | |
| st.title("Cyberpunk RPG Character Viewer") | |
| # Dropdown to select a character | |
| character_name = st.selectbox("Select a Character", options=list(characters.keys())) | |
| # Display the selected character | |
| character = characters[character_name] | |
| st.write(f"**Name**: {character.name}") | |
| st.write("**Aspects**") | |
| for aspect in character.aspects: | |
| st.write(f"- {aspect.description}") | |
| st.write("**Skills**") | |
| for skill in character.skills: | |
| st.write(f"- {skill.name}: Level {skill.level}") | |
| st.write("**Stunts**") | |
| for stunt in character.stunts: | |
| st.write(f"- {stunt.name}: {stunt.description}") | |
| st.write(f"**Stress Level**: {character.stress.level}") | |
| if character.consequences: | |
| st.write("**Consequences**") | |
| for consequence in character.consequences: | |
| st.write(f"- {consequence.severity}: {consequence.description}") | |
| else: | |
| st.write("**Consequences**: None") | |
| # Run this Streamlit app with: streamlit run character_viewer.py |