Here are the rules:
1: The player will be a character having at least Health, strength, armor, experience, and level as combat factors. You can add any other factors you'd like. The player will start off with a minimum of stats, zero experience at level 1.
2: The player will have an inventory to carry items. The player also has a wallet of gold, starting off with a small amount of gold.
3: There should be a main menu offering the following choices:
- Buy items
Here the player can buy weapons, potions, magical items, etc. The details of these items and how much they affect combat is totally up to you.
- View Character Stats
Here the player can view his character's current stats such as how much health/strength/etc the player has, what weapon is wielded, etc.
- Combat zone
See 4.
- Quit
Exit the program.
4: Once the player decides to enter the combat zone, The player will be faced with an enemy which the player must fight. The enemy should have statistics comparable or less than the player's stats. The combat system should be turn-based, and the progress should be printed to the screen, such as:
Round 1:
Mordius attacks BigOgre with Sword and deals 10 damage.
BigOgre attacks Mordius with Fist and deals 8 damage.
Round 2:
...
How factors like health, strength, weapon, magic, experience, level, etc affect combat is totally up to you.
The player will receive experience points, gold, plus anything the enemy was carrying as a reward for winning the battle. The player upgrades another level every time the player surpasses a certain amount of experience points. Again, the details is up to your judgment.
The player will restart at the main menu with starting-stats if the player dies in battle.
Here are some useful stuff to help you:
Most of the time such games use a random number generator. Go Here for instructions to get random numbers.
On Microsoft windows, we have the "Sleep" function to pause gameplay for a given amount of milliseconds. so
- Code: Select all
Sleep(1000);
Please read the posting rules to be able to post your code.
Good luck!
