So I'm trying to design this program for a class project however I've hit a snag in regards to getting it to run. Specifically in the Dragon function on line 99, the issue starts at line 105 giving me an error about an expected primary-expression before '.' token. Any help would be greatly appreciated!
The function is meant to essentially run the combat simulation. So it needs to work as follows:
1. "Roll a 20 sided dice."
2. Compare the rolled # + the player's strength mod and proficiency mod to the Dragon's AC value.
3. If the result is higher, then subtract the player strength mod value from the Dragon's HP value.
4. If it's lower, it misses and nothing happens.
5. It then rolls a new number for the dragon's turn.
6. Executes the same steps as above but reversed so it's the dragon attacking the player.
7. This should continue to repeat until one of the 2 combatants is dead, their HP reaching 0 or lower.