You approach the bar and order a drink. While you are nursing your drink you over hear some of the conversation coming from the loud arguement in the corner. They seem to be arguing about who they want their third member of the party to be and where they would ever find (if:$class is "Wizard")[a Wizard] (else-if:$class is "Warrior")[a Warrior] (else-if:$class is "Elf Archer")[an Elf Archer]<!--(else:)[Undefined]--> in this part of the world. [[Decision]] <img src="https://media.istockphoto.com/id/2155884050/photo/3d-rendering-medieval-tavern.jpg?s=2048x2048&w=is&k=20&c=FzONmmD7wpjKZx7hAcmlVBXWvoNCDGjEpxxeN3p67eg=" width="800">{(if:$class is "Wizard")[You attempt to attack the troll using your magical Fireball but your magical attacks seem to be having no affect. You are forced to flee. [[Flee]] ](if:$class is "Warrior")[You attempt to attack the troll using your enchanted great sword but your strikes seem to be having no affect. You are forced to flee. [[Flee]] ](if:$class is "Elf Archer")[You attempt to attack the troll using your flaming arrows but your arrows seem to be having no affect. You are forced to flee. [[Flee]] ]}You attempt to barter with the troll in an attempt to convince it to let you pass.(if: $class is "Warrior")[You look into your bag and find three objects. Which object do you use to barter? [[Look in Bag]] ](if: $class is "Wizard")[You look into your bag and find three objects. Which object do you use to barter? [[Look in Bag]] ](if: $class is "Elf Archer")[You look into your bag and find three objects. Which object do you use to barter? [[Look in Bag]] ]:: Attempt to dispel magic (if: $class is "Wizard")[ You channel your arcane energy and unravel the enchantment. The mist clears in a flash. [[Search the area]] ]:: Battle the shadows The shadow creatures leap from the trees. (if: $class is "Warrior")[ You cleave through the darkness with raw power. ](else-if: $class is "Wizard")[ You cast searing light, burning the creatures from within. ](else-if: $class is "Elf Archer")[ You shoot faster than the eye can follow, dropping several before they reach you. ] [[Search the area]]{(set: $haveWoodFigure to false)}You choose to offer your Carved Wooden Figure up for barter. This enrages the troll and it smashes you into the ground with one fell blow. Thank you for playing!Do you choose to apporach, apologize for ease dropping and annouce that you are (if:$class is "Wizard")[a Wizard] (if:$class is "Warrior")[a Warrior] (if:$class is "Elf Archer")[an Elf Archer] and are in need a party to travel with toward the village and beyond. [[Polite introduction]](set: $politeintroduction to true) OR Do you choose to approach and rudely interrupt their argument and announce that you are (if:$class is "Wizard")[a Wizard] (if:$class is "Warrior")[a Warrior] (if:$class is "Elf Archer")[an Elf Archer] and are in need a party to travel with toward the village and beyond. [[Rude introduction]](set: $rudeintroduction to true)You become an agile, cunning, and deadly Elf Archer. {(set: $class to "Elf Archer") (set: $Health to 100) (set: $Strength to 50) (set: $Agility to 300) (set: $Cunning to 200)} Class is $class Health is $Health Strength is $Strength Agility is $Agility Starting Inventory: {(set: $haveGoldBag to true)}Bag of Gold {(set: $haveSilverTiara to true)}Silver Tiara {(set: $haveWoodFigure to true)}Carved wooden figure {<!-- (if:$Strength > 30)[You can lift the boulder.] (else:)[You could not lift the boulder.] -->} <img src="https://as2.ftcdn.net/v2/jpg/11/63/67/83/1000_F_1163678373_JVJ0sesdDtMN8aImu1s6U1PdaVrbR4W0.jpg" width="400"> [[Start Adventure]](if: $class is "Wizard" )[You manage to flee back to the tavern and enter it to lose the Troll.](else-if: $class is "Elf Archer")[You manage to flee back to the tavern and enter it to lose the Troll.](else-if: $class is "Warrior")[You attempt to flee but the Troll out manuvers you due to your low Agility points. You now stand motionless, the troll now between you and the path to the tavern. You are contemplating your next move.] (if:$class is "Wizard")[ [[Go in Tavern]] ](else-if:$class is "Elf Archer")[[Go in Tavern]](else-if:$class is "Warrior")[ [[Attack]] [[Attempt to Barter]] ]You enter the tavern and are greeted by loud arguing in the back left corner and a low murmur throughout the rest of the tavern. Do you approach the bar or investigate the arguement in the corner? [[Aproach the bar]] [[Investigate the arguement]]You choose to offer your Bag of Gold up for barter. The troll stares blankly at you as though implying the dull looking bag means nothing to them. You return to your bag to try something else. [[Look in Bag]]{(set: $haveGoldChalice to false)}You look into your bag and pull out a Gold Chalice. The troll appears enticed with this item. The troll takes it and allows you to continue down the road to the nearby village. [[To Village]]You approach the corner. As you approach you over hear some of the conversation coming. They seem to be arguing about who they want their third member of the party to be and where they would ever find (if:$class is "Wizard")[a Wizard] (if:$class is "Warrior")[a Warrior] (if:$class is "Elf Archer")[an Elf Archer] in this part of the world. [[Decision]](if: $class is "Warrior")[ [[Gold Bag]] [[Golden Chalice]] [[Carved Wooden Figure]] ](if: $class is "Wizard")[ [[Gold Bag]] [[Silver Necklace]] [[Carved Wooden Figure]] ](if: $class is "Elf Archer")[ [[Gold Bag]] [[Silver Tiara]] [[Carved Wooden Figure]] ]:: Polite introduction response (if: $class is "Wizard")[ "Ah, a scholar!" the robed woman says. "We could use your knowledge." ] (else-if: $class is "Warrior")[ "A strong arm with manners? Rare. You’re welcome among us," the leader says. ] (else-if: $class is "Elf Archer")[ "We were just discussing our need for a scout. You're in." ] [[To Village]]:: Prepare for an ambush The group forms a circle. (if: $class is "Wizard" )[ You predict the shadows' movements and coordinate a counter-attack. [[Battle the shadows]] ](else:)[ You brace for the worst. [[Battle the shadows]] ]:: Press on to the village You continue through the thinning mist. The village gate looms ahead. (if: $wounded is true)[ You limp, favoring your side, but press on. ] Your party grows quiet, sensing that this was only the beginning. To be continued...Story prompts begining with "::" were generated from the below listed prompt and discussion link with open.ai. I edited some of what it produced to shift some of the outcomes/ background code to follow more along the arc I was looking for and to mesh with the code/story I had written already. https://chatgpt.com/share/6818e00f-5950-8007-b12f-e5a73b97cf22 I used open source images for all images provided thus far. I used state setting code along with if-else statements to provide various outcomes specific to the class chosen at the start of the game. I initially ran into some issues with code flow and story flow when setting up the barter system when dealing with the troll. I ended up creating an inventory system using state setting code attached to the players choice of character to provide a list of item options when the player selected the "Attempt to Barter" option. This takes them from the "Look in Bag" prompt to outcomes depending on if-else statements providing different outcomes. I used state setting code to remove the item given to the troll from the player's inventory.:: Retreat to the group (if: $class is "Warrior")[ A beast lunges from the fog as you attempt to retreat! You intercept the creature, deflecting its attack. The beast retreats to the fog and you and your companions form a united front. [[Prepare for ambush]] ](else-if: $class is "Elf Archer")[ A beast lunges from the fog as you attempt to retreat! You circle behind and fire two arrows into its back. The Beast retreats into the fog and you and your companions form a united front. [[Prepare for ambush]] ](else-if: $class is "Wizard")[You retreat just in time. A creature pounces where you stood. You join the others in a united front. [[Prepare for ambush]] ]:: Rude introduction response (if: $class is "Wizard")[ The group seems unimpressed by your magical robes and harsh tone. "We already have a mage," one mutters. "But fine, if you can pull your weight." ] (else-if: $class is "Warrior")[ Your intimidating stature gets a grudging nod. "Arrogant, but strong," they say. "We could use that." ] (else-if: $class is "Elf Archer")[ They glance at your bow and sneer. "Fast fingers, slow brain?" one laughs. Still, they let you join. ] [[To Village]]:: Search the area You find strange symbols carved into trees—warnings, perhaps. (if: $class is "Wizard" )[You recognize them as glyphs of warding. Someone tried to protect this place.] [[Press on to the village]]Choose a character: [[Wizard]] [[Warrior]] [[Elf Archer]]{(set: $haveSilverNecklace to false)}You look into your bag and pull out a Silver Necklace. The troll appears enticed with this item. The troll takes it and allows you to continue down the road to the nearby village. [[To Village]]{(set: $haveSilverTiara to false)}You look into your bag and pull out a Silver Tiara. The troll appears enticed with this item. The troll takes it and allows you to continue down the road to the nearby village. [[To Village]]:: Stand your ground A beast lunges from the fog! (if: $class is "Warrior")[You crush the creature with brute force. [[Search the area]] ](else-if: $class is "Elf Archer")[You dodge gracefully and shoot it down. [[Search the area]] ](else-if: $class is "Wizard" )[ It wounds you before the others arrive to help. [[To Village]] (set: $wounded to true) ] <img src="https://as1.ftcdn.net/jpg/09/34/56/02/1000_F_934560215_jI63FzHDduSuoZB3DhTA2BjuefU7KFwv.jpg" width="800">Hello! Welcome to my simple fantasy adventure game. Please click "Select Character" to Begin. [[Select Character]] [[Read.me]]You begin your adventure outside a weathered tavern overgrown by vines. Do you choose to go in or to travel down the road to a nearby village? <img src="https://as1.ftcdn.net/v2/jpg/10/82/66/98/1000_F_1082669863_NaDDyxwqWlOSX2WqxjAc1bOuUvSLpGn3.jpg" width="400"> [[Go in Tavern]] [[Travel down the road to the village]]:: Investigate the mist <img src="https://raw.githubusercontent.com/vinecal4701/CSC-134/refs/heads/main/misty_dirt_road.jpg" width="400"> The mist thickens as you approach. You feel a magical pressure in the air. (if: $Cunning > 200)[ You sense an enchantment at play—something ancient and watchful. [[Attempt to dispel magic]] ](else:)[ You hear whispers, but can’t decipher them. [[Stand your ground]] [[Retreat to the group]] ]You travel down the road toward the nearby village. Part way there you are attacked by a large Troll. Do you attack, attempt to barter, or attempt to flee? <img src="https://as1.ftcdn.net/v2/jpg/09/89/19/80/1000_F_989198052_Pb4zvKoc4fbjd5j8IJ7T6lDN6XpAWkmG.jpg" width="400"> [[Attack]] [[Attempt to Barter]] [[Flee]]You become a strong battle hardened Warrior. {(set: $class to "Warrior") (set: $Health to 300) (set: $Strength to 250) (set: $Agility to 30) (set: $Cunning to 30)} Class is $class Health is $Health Strength is $Strength Agility is $Agility Starting Inventory: {(set: $haveGoldBag to true)}Bag of Gold {(set: $haveGoldChalice to true)}Golden Chalice {(set: $haveWoodFigure to true)}Carved wooden figure {<!-- (if:$Strength > 30)[You can lift the boulder.] (else:)[You could not lift the boulder.] -->} <img src="https://as2.ftcdn.net/v2/jpg/07/17/96/13/1000_F_717961360_aQ0z7olU9dyxmeJis3hEmXclWzoSEvUd.jpg" width="400"> [[Start Adventure]] {<!--add a very basic inventory to facilitate the troll bartering prompt-->}You become a powerful Wizard {(set: $class to "Wizard") (set: $Health to 50) (set: $Strength to 20) (set: $Agility to 100) (set: $Cunning to 300)} Class is $class Health is $Health Strength is $Strength Agility is $Agility Starting Inventory: {(set: $haveGoldBag to true)}Bag of Gold {(set: $haveSilverNecklace to true)}Silver Necklace {(set: $haveWoodFigure to true)}Carved wooden figure {<!-- (if:$Strength > 30)[You can lift the boulder.] (else:)[You could not lift the boulder.] -->} <img src="https://as1.ftcdn.net/v2/jpg/04/88/49/50/1000_F_488495072_qw53n2jWvKGarj3P2YAUi2smwk9aERFN.jpg" width="400"> [[Start Adventure]]