Prompt:
Create your tavern adventurer!
-
Use
input()for:- Hero's name:
"What's your warrior's name? " - Starting town:
"Where does your adventure begin? (Misty Vale/Stonehaven) " - Store health as 100
- Hero's name:
-
Print using f-string:
โ๏ธ [Name] enters [Town] Tavern, ready for adventure! -
Use
ifto check health:- If 100:
โจ [Name] is at full health! Let's roll dice! - Else:
๐งช [Name] should visit the alchemist first!
- If 100:
Prompt:
You explore the Whispering Woods!
-
Use
input()for:
"What do you see? (owl/troll/fairy) " -
Use
if/elif/else:- Owl:
๐ฆ [Name] gets wise advice! Health +10 - Troll:
๐น ROAR! [Name] loses 25 health! - Fairy:
๐ง [Name] dances with fairies! Health +20
- Owl:
-
Print using f-string:
[Name]'s current health: [health]
Prompt:
A bridge collapses over rapids!
-
Use
input():
"Swim across or climb rocks? (swim/climb) " -
Use
if/elif:- Swim:
๐ Cold water! -30 HP | Remaining: [health] - Climb:
๐ง Risky climb! -15 HP | Remaining: [health]
- Swim:
-
Use
andto check if health is less than or equal to 30 AND greater than 0:
๐จ WARNING: [Name] is shaking with fatigue!
Prompt:
You find a glowing artifact!
-
Use
input():
"Touch it or leave it? " -
Use
if/else:- Touch:
๐ฅ CURSED! [Name] loses 40 health! - Leave:
๐ฎ Wise choice! Find healing spring +25 HP
- Touch:
-
Use
orto check if health is greater than 80 OR choice was "leave":
โจ Mystical energy surrounds you!
Prompt:
Return to town for the harvest festival!
-
Use
if/else:- If health is greater than or equal to 60:
๐ [Name] leads the parade! Crowd cheers! - Else:
๐ฉน [Name] rests at healers' tent
- If health is greater than or equal to 60:
-
Print using f-string:
Final Health: [health] | Fame: [fame_level] -
Check if town is "Misty Vale" AND health is greater than 50:
๐ Local hero achievement unlocked!
Next Steps:
Add more input choices! What if:
- Player can choose weapon type?
- Add tavern minigames with dice rolls?
- Let players name their pet companion?