Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions