subject

In the game dungeons & dragons, each player plays the role of a fantasy character.
a player performs actions by rolling a 20-sided die, adding a "modifier" number to the roll, and comparing the total to a threshold for success. the modifier depends on her character's competence in performing the action.
for example, suppose alice's character, a barbarian warrior named roga, is trying to knock down a heavy door. she rolls a 20-sided die, adds a modifier of 11 to the result (because her character is good at knocking downdoors), and succeeds if the total is greater than 15.
write code that simulates that procedure. compute three values:
the result of alice's roll(roll_result), the result of her roll plus roga's modifier (modified_result), and a boolean value indicatingwhether the action succeeded (action_succeeded). do not fill in any of the results manually; the entire simulation should happen in code.
hint: a roll of a 20-sided die is a number chosen uniformly from the array make_array(1, 2, 3, 4, 20). so a roll of a 20-sided die plus 11is a number chosen uniformly from that array, plus 11.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:20
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
question
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
You know the right answer?
In the game dungeons & dragons, each player plays the role of a fantasy character.
a pla...
Questions
question
Mathematics, 29.06.2021 18:20
question
Mathematics, 29.06.2021 18:20
question
Social Studies, 29.06.2021 18:20
question
Mathematics, 29.06.2021 18:20
question
Mathematics, 29.06.2021 18:20
Questions on the website: 13722367