Reviving the dead on Text RPG
I'm still a newbie programmer of C++. I can use rand(), if, else if, strings, chars, ints, floats, structs. A bunch of other stuff. Even fout.
I am making a pretty nice text rpg on a 6x6x6 cube. I have the x and y coordinates down, z is not in yet.
I have 2 enemies that walk around randomly, a zombie, and a mummy. The liche is stationary.
I want it that every 15 moves, it revives the zombie to 15 health.
Im doing this by every turn, the program adds one to a counter, called int revive.
while (revive != 15)
if (revive == 15)
revive = 0;
zombie_health = 15;
cout << "\nThe Reviver of the Dead sets the zombies health to 15.\n";
Every move, it revives the zombie, unless you are battling it. What is wrong with the code?