This simulates a basic dungeon escape with creature encounters. You must create a simple program that allows the player to move their character across a map and find the exit. There will be one BOSS monster trying to catch the player. When the player makes a move (step) the monster must make 1 step (preferably toward the player). The player must always start off at location row 0 column 0. The destination is at location row 18 and column 19. The monster starts at row18 column 10. This is summarized in the table below.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
This simulates a basic dungeon escape with creature encounters.
You must create a simple program that allows the Player to move their character across a map and find the
exit. There will be one BOSS monster trying to catch the player. When the player makes a move (step) the
monster must make 1 step (preferably toward the player).
The player must always start off at location row 0 column 0. The destination is at location row 18 and column
19. The monster starts at row18 column 10. This is summarized in the table below.
Player starting location
Exit (Player destination)
BOSS monster starting location
0
43
18
Please enter a direction w,a,5,6 of Fita odt:
18
Column
0
19
The most basic Al strategy for the monster must be implemented as follows:
The monster makes a move in a random direction each time the player makes a move. Not that the monster must
actually move a step.
If you implement the Al using a recursive solution to track the player, bonus marks will be applied.
10
The file map1.txt contains the map for the level. The map file is organized as follows:
The first line contains two integers and c representing the number of rows and columns in the map.
The next r lines of the file contain c space separated integers which are either D or 1.
A "1" represents a wall and a "0" means no wall.
An example of the file and how it would be rendered by your program is shown below with the Player (p) and
Monster (m) overlaid.
Transcribed Image Text:This simulates a basic dungeon escape with creature encounters. You must create a simple program that allows the Player to move their character across a map and find the exit. There will be one BOSS monster trying to catch the player. When the player makes a move (step) the monster must make 1 step (preferably toward the player). The player must always start off at location row 0 column 0. The destination is at location row 18 and column 19. The monster starts at row18 column 10. This is summarized in the table below. Player starting location Exit (Player destination) BOSS monster starting location 0 43 18 Please enter a direction w,a,5,6 of Fita odt: 18 Column 0 19 The most basic Al strategy for the monster must be implemented as follows: The monster makes a move in a random direction each time the player makes a move. Not that the monster must actually move a step. If you implement the Al using a recursive solution to track the player, bonus marks will be applied. 10 The file map1.txt contains the map for the level. The map file is organized as follows: The first line contains two integers and c representing the number of rows and columns in the map. The next r lines of the file contain c space separated integers which are either D or 1. A "1" represents a wall and a "0" means no wall. An example of the file and how it would be rendered by your program is shown below with the Player (p) and Monster (m) overlaid.
You must also implement these additional features and information:
1) As the player moves, there is a 25 percent (25%) chance of a small creature attacking (not the BOSS)
The creature's information is as follows:
Name: Kobold
HP: 70
Damage: 20
2) The player starts with:
HP: 400
Damage: 35
3) BOSS monster information:
Name: BlightDragon
HP:600
Damage:50
If the player meets a creature or the BOSS, a fight ensues as follows:
The battle continues until the player or the opponent (BOSS or creature) has HP of 0 or less.
The battle broken up into rounds (similar to our previous labs)
At the start of each round:
1) A random roll out of 100 is done:
If the roll is 50 -100, the player attacks first (player is the attacker, the opponent is the defender)
If the roll is 1 - 49, the opponent attacks first (opponent is the attacker, the player is the defender)
2) The attacker makes a random roll out of 100.
a. If the roll if 50-100, the attacker hits and does their full damage to the defender
b. If the roll is 1-49, the attacker misses
3) If the defender is still alive, the defender makes a random roll out of 100.
a. If the roll if 50-100, the defender hits and does their full damage to the attacker
b. If the roll is 1-49, the defender misses
These steps are repeated until the battle ends.
The game ends when either:
The player has reached the exit
• The player is defeated (HP<=0)
Transcribed Image Text:You must also implement these additional features and information: 1) As the player moves, there is a 25 percent (25%) chance of a small creature attacking (not the BOSS) The creature's information is as follows: Name: Kobold HP: 70 Damage: 20 2) The player starts with: HP: 400 Damage: 35 3) BOSS monster information: Name: BlightDragon HP:600 Damage:50 If the player meets a creature or the BOSS, a fight ensues as follows: The battle continues until the player or the opponent (BOSS or creature) has HP of 0 or less. The battle broken up into rounds (similar to our previous labs) At the start of each round: 1) A random roll out of 100 is done: If the roll is 50 -100, the player attacks first (player is the attacker, the opponent is the defender) If the roll is 1 - 49, the opponent attacks first (opponent is the attacker, the player is the defender) 2) The attacker makes a random roll out of 100. a. If the roll if 50-100, the attacker hits and does their full damage to the defender b. If the roll is 1-49, the attacker misses 3) If the defender is still alive, the defender makes a random roll out of 100. a. If the roll if 50-100, the defender hits and does their full damage to the attacker b. If the roll is 1-49, the defender misses These steps are repeated until the battle ends. The game ends when either: The player has reached the exit • The player is defeated (HP<=0)
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education