Hi everyone, I was bored to day so I decided to make an even more boring game 
Why have I made this game??
1. I don't know, I was bored so I just started coding.
2. For anyone who wants to have a target for their trainers/hacks and stuff
3. For anyone who's just as bored as I'm and wants to play a less boring game so that they won't be that bored anymore 
Ok so here it is:
Code:
#include <iostream>
#include <windows.h>
#include <fstream>
#include <ostream>
#include <ctime>
void engine(/*int h, int m*/);
using namespace std;
int i = 5 , s = 5, a = 5;
char name[40];
int eh = 100, em = 100;
int attribute = 3;
int mode;
int h, m;
int att;
void gui(){
system("cls");
cout<<"Made by: SCHiM, Part of iANDi, Greetings to: DiM\n################################################################################\n";
}
void hturn(int att){
int dmg = 0;
int he = 0;
if(att == 1){
time_t t;
time(&t);
srand(t);
dmg = rand() % 10 + (s*s/(s*2)) ; // change this value to be dynamic later on
cout<<"You hit your enemy for "<<dmg<<" HP\n";
eh = eh - dmg;
Sleep(2000);
}
if(att == 2){
if(m < 10){
cout<<"You have not enouch Mana for this kind of action\n";
goto A;
}
time_t t;
time(&t);
srand(t);
dmg = rand() % 15 + (i*i/(i*2)) ; // change this value to be dynamic later on
cout<<"You hit your enemy for "<<dmg<<" HP\n";
eh = eh - dmg;
m = m - 10; //update mana after magic usage
cout<<"You have used 10 mana (- 10 mana)\n";
Sleep(2000);
}
if (att == 3){
if(m < 15){
cout<<"You have not enouch Mana for this kind of action\n";
goto A;
}
time_t t;
time(&t);
srand(t);
he = rand () % 30 + (i*i/(i*2)); // change this value to be dynamic later on
if( he == 0 ){
he = 10;
}
cout<<"You have healed yourself for "<<he<<" health\n";
h = h + he;
m = m - 15; // updata mana after magic usage
cout<<"You have used 15 mana (- 15 mana)\n";
Sleep(2000);
}
if(1 != 1){
A:
time_t t;
time(&t);
srand(t);
dmg = rand() % 10 + (s*s/(s*2)); // change this value to be dynamic later on
if(dmg == 0){
cout<<"Your attack missed its target!\n";
}
cout<<"You hit your enemy for "<<dmg<<" HP\n";
eh = eh - dmg;
Sleep(2000);
}
}
void ai(){
int r = 0;
int edmg = 0;
if(eh > 65) {
time_t t;
time(&t);
srand(t);
r = rand() % 2;
}
if(eh < 65){
time_t t;
time(&t);
srand(t);
r = rand() % 4;
}
if(r == 0 || r == 1){
time_t t;
time(&t);
srand(t);
edmg = rand() % 10 + (s*s/(s*2)) ;
h = h - edmg;
cout<<"Your enemy hits you for "<<edmg<<" HP\n";
Sleep(2000);
}
if(r == 2){
if(em < 10) {
goto B;
}
time_t t;
time(&t);
srand(t);
edmg = rand() % 15 + (i*i/(i*2)) ;
h = h - edmg;
cout<<"Your enemy hits you with a fireball for "<<edmg<<" HP\n";
Sleep(2000);
em = em - 10;
}
if(r == 3){
if(em < 15) {
goto B;
}
time_t t;
time(&t);
srand(t);
edmg = rand() % 30 + (i*i/(i*2)) ;
eh = eh + edmg;
cout<<"Your enemy has healed him self for "<<edmg<<" HP\n";
Sleep(2000);
em = em - 15;
}
if( 1 != 1)
{
B:
time_t t;
time(&t);
srand(t);
edmg = rand() % 10 + i / (i - 1) ;
h = h - edmg;
cout<<"Your enemy hits you for "<<edmg<<" HP\n";
Sleep(2000);
}
}
void spendpoints(){
system("cls");
cout<<"Exelent\nYou may now spend your attribute points to the following stats:\n1.Intelligence\n2.Strength\n3.Agility\nYour stats determine your chance to hit a target, how many damage you do\nand how many spells you may cast.\n";
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
while (attribute != 0 ){
system("cls");
if (GetKeyState(0x41)<0) {
//GetKeyState(0x41) == 0;
a++;
attribute--;
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
}
if (GetKeyState(0x53)<0) {
//GetKeyState(0x53) == 0;
s++;
attribute--;
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
}
if (GetKeyState(0x49)<0) {
//GetKeyState(0x49) == 0;
i++;
attribute--;
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
}
//Sleep(100);
}
}
void savegame(/*int health, int mana, int points*/){
std::ofstream put( name );
put << h;
put << " ";
put << m;
put << " ";
put << attribute;
put << " ";
put << s;
put << " ";
put << i;
put << " ";
put << a;
put.close();
cout<<"Saved"<<endl;
return 0;
system("pause");
}
void update(){
system("cls");
cout<<"You have: "<<h<<" health and: "<<m<<" mana\n";
cout<<"Your enemy has: "<<eh<<" health\n";
}
void magic(){
system("cls");
cout<<"1.Fireball, 2. heal\n";
cin>>att;
att++;
}
void mainmenu(){
while(1){
gui();
char a[2];
cout<<"######################################MENU######################################\n1.Save game\n2.Fight\n3.Spend Attribute Points\n";
cin>>a;
if(!strcmp(a, "1" )){
//savegame(h , m, attribute);
savegame();
}
if(!strcmp(a, "2" )){
cout<<"1.Easy\n2.Medium\n3.Hard\n";
cin>>mode;
if (mode == 1){
eh = 50;
}
if (mode == 2){
eh = 100;
}
if (mode == 3){
eh = 150;
}
engine();
char n[2];
cout<<"Do you want to continue playing?(Y/N)\n";
cin>>n;
if(!strcmp(n, "n")){
break;
}
}
if(!strcmp(a, "3") && attribute != 0 ){
spendpoints();
} else {
cout<<"You don't have any attribute points to spend\n";
Sleep(3000);
}
}
}
void engine(){
while(h > 0 && eh > 0){
time_t t;
time(&t);
srand(t);
update();
cout<<"1 : attack, 2 : use magic\n";
cin>> att;
if(att == 2){
magic();
}
hturn(att);
ai();
}
if(h > eh){
cout<<"You have won the battle!\n";
cout<<"You have earned 3 attribute points\n";
cout<<"Your health and mana have been reset to 100\n";
m = 100;
h = 100;
attribute = 3;
} else {
cout<<"You face defeat, GAME OVER!\n";
}
}
void LG( ){
int health;
int mana;
std::ifstream erin(name);
erin >> h;
erin >> m;
erin >> attribute;
erin >> s;
erin >> i;
erin >> a;
erin.close();
}
void NG(){
system("cls");
cout<<"You have chosen to start a new game.\nEnter your character name: ";
cin>>name;
system("cls");
cout<<"Exelent\nYou may now spend your attribute points to the following stats:\n1.Intelligence\n2.Strength\n3.Agility\nYour stats determine your chance to hit a target, how many damage you do\nand how many spells you may cast.\n";
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
while (attribute != 0 ){
system("cls");
if (GetKeyState(0x41)<0) {
//GetKeyState(0x41) == 0;
a++;
attribute--;
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
}
if (GetKeyState(0x53)<0) {
//GetKeyState(0x53) == 0;
s++;
attribute--;
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
}
if (GetKeyState(0x49)<0) {
//GetKeyState(0x49) == 0;
i++;
attribute--;
cout<<"\nYour current stats are: \nIntelligence: "<<i<<"\nStrength: "<<s<<"\nAgility: "<<a<<"\nYou currently have: "<<attribute<<" attribute points\nHow would you like to spend them?\n";
cout<<"press:\n S to Assign 1 point to Strength\n A to Assign 1 point to Agility\n I to assign 1 point to Intelligence\n";
system("pause");
}
//Sleep(100);
} // while brace
cout<<"Exelent, Now you have created your hero you may start the game\n";
Sleep(1000);
h = 100;
m = 100;
mainmenu();
} // class brace
void init(){
char a[2];
cout<<"######################################MENU######################################\n1.New game\n2.Load game\n";
cin>>a;
if(!strcmp(a, "1" )){
NG();
} else {
cout<<"Enter the name of the character you want to load: ";
cin>>name;
LG();
mainmenu();
}
}
int main(){
gui();
init();
}
410 lines of useless code, I hope you like it 
BTW: this isn't a native C++ program, it has to be compiled using the .Net framework it's tested on VC++ 2008, and will surely work when using VC++ 2008.
I've also uploaded the exe, to be sure 
also, the game isn't perfect there are a few bugs but I'm to tired to go and fix them now.
I've made an error in the code posted here so that dumb C & p can not use it, I'm sure that anyone with only 0.001% knowledge of C++ knows how to fix it (if you can't tip: void functions are typeles, they don't return anything)
vir scan:
Game.rar MD5:5cdde05093bf3a5f27add50debc5bef8 - VirSCAN.org Scanners did not find malware!
credits:
SCHiM << 100% My work, don't claim otherwise, don't distribute.