Question: Write a script to simulate a fight with a medium red dragon in Dungeons and Dragons (DnD): . We want to attempt to attack the

 Write a script to simulate a fight with a medium red

Write a script to simulate a fight with a medium red dragon in Dungeons and Dragons (DnD): . We want to attempt to attack the monster while it still has health .We must first roll to hit roll a 20 sided die and add a +5 modifier. If this sum is 17 or greater we hit the dragon. If we hit the monster, we roll a 12 sided die to deal damage. We get a bonus of +3 to every attack . The dragon starts with 75 health Store the damage of each hit in a vector To simulate a dice roll, use the built in function randi([a,bl) which produces a random integerimage from dndbeyond.com between the values of a and b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!