Currently creating a basic RPG as a side hobby.
I have two classes which will battle and have decided to give them integer values for damage and apply a modifier using srand(time(0)).
When running the code, srand produces 1 number as a modifier and maintains it, is there a way to have srand generate a new sequence to give a different attack modifier between 0.5x and 2x or are there alternatives?
Thanks in advance!!
PS, this itsn't all of the code, just an fyi.
TL;DR: You're wasting time. Just call rand() to get a random number. What you do to transform that number into your desired range comes after the obtaining.