Source code with comments explaining your code in C# Program 2: Buh-RING IT! For this assignment,...

50.1K

Verified Solution

Question

Programming

Source code with comments explaining your code in C#

Program 2: Buh-RING IT! For this assignment, you’re going tosimulate a text-based Role-Playing Game (RPG). Design (pseudocode)and implement (source) for a program that reads in 1) the hero’sHit Points (HP – or health), 2) the maximum damage the hero doesper attack, 3) the monster’s HP and 4) the maximum monster’s damageper attack. When the player attacks, it will pick a random numberbetween 0 and the maximum damage the player does, and then subtractthat from the monster. A similar thing happens when the monsterattacks the hero. The program should display rounds and the HP ofthe hero and monster each round. If the hero or monster dies, itshould print that this happened and should NOT continue (i.e. noextra text) Sample run 1: Enter the hero's starting hit points: 50Enter the damage the hero’s weapon does per strike: 20 Enter themonster's starting hit points: 40 Enter the monster's damage perstrike: 15 ====== ROUND 1 ====== Hero attacks for: 10 Monster has30 HP left Monster attacks you for: 1 You have 49 HP left ======ROUND 2 ====== Hero attacks for: 18 Monster has 12 HP left Monsterattacks you for: 7 You have 42 HP left ====== ROUND 3 ====== Heroattacks for: 0 Monster has 12 HP left Monster attacks you for: 14You have 28 HP left ====== ROUND 4 ====== Hero attacks for: 18Monster has -6 HP left The monster dies and you earn 5 XP Battleends...

***no extra text after hero/monster dies!***

Answer & Explanation Solved by verified expert
4.0 Ratings (538 Votes)
PSEUDOCODEMain    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students