I'm making a text based game and I had an idea, but not sure how to accomplish it. It's pretty boring seeing the same thing over and over when you attack an enemy, I have it to where it always says "You miss!" or "You hit the enemy. The hit did X damage." I also have a death message that just says "You have died! For this you lose X exp." I was wandering if there was a way to randomize what text came up. Like, have more than 1 hit messsage, maybe have the "You hit the enemy." one, along with "You strike the enemy with your sword." and others like that.
I tried making a small sample program, just to see if it would work. But I have no clue on how to do it. So I just did random guessing with the random function. I couldnt get anything to work.
If anyone could inform me on how to do this. It would be great.(And yes I know, text based games are boring anyways. But im trying to add a little change to it, make it more interesting =) )