#include <iostream>
#include <conio.h>
#include <string>
#include <time.h>
#include <Windows.h>
usingnamespace std;
struct armors{
int larmor;
int chmail;
int parmor;
}equip_a;
struct shields{
int lshield;
int wshield;
int ishield;
}equip_s;
struct weapons{
string dagger;
string bsword;
string isword;
string ssword;
string axe;
string hammer;
string none;
}equip_w;
struct stats{
string name;
int dex;
int str;
int health;
int crit;
int block;
int armor;
int damage;
int turn;
int attack;
int critdmg;
}player,comp;
int main()
{
string wield;
string equiped;
string offhand;
equip_w.dagger = "dagger";
equip_w.bsword = "bsword";
equip_w.isword = "isword";
equip_w.ssword = "ssword";
equip_w.axe = "axe";
equip_w.hammer = "hammer";
equip_w.none = "none";
equiped = equip_w.none;
int dubbelhit;
int randh;
int randc;
int rands;
int stundur;
int stun;
int effect;
int pick;
int turnpick;
int answear;
int gold=20;
int price;
int stat_pt;
int put;
int menu;
int plusvw;
int plusvs;
int plusva;
int plusvc;
int randname;
int ulti;
int rcheck;
int hp;
int difficulty;
int plusgold;
int turn=0;
string equiped_true;
player.dex = 0;
player.block = 0;
player.crit = 0;
player.str = 0;
player.health = 100;
player.armor = 0;
stat_pt = 15;
cout << "enter your name: ";
cin >> player.name;
while(stat_pt >= 0){
system("cls");
cout << "stat picking\npoints left: "<< stat_pt << endl;
cout << "1.dex(more crit) "<< player.dex <<"\n2.str(higher dmg) "<< player.str <<"\n3.health(you know...) "<< player.health << endl;
cin >> put;
if(put == 1){
player.dex++;
stat_pt--;
}
if(put == 2){
player.str++;
stat_pt--;
}
if(put == 3){
player.health++;
player.health++;
player.health++;
player.health++;
player.health++;
stat_pt--;
}
if(stat_pt == 0){
break;
}
}
_getch();
system("cls");
cout << "dex :" << player.dex;
cout << "\n" << "str: "<< player.str;
cout << "\n" << "health: " << player.health;
cout << "\n";
_getch();
hp = player.health;
player.crit = player.dex*3;
player.damage = player.str;
player.critdmg = player.damage*2;
(i have only entered the part of the code with the fighting code and the variabels)
in btw i have not yet done the chest part and still have some modifiactions im working on for the shop.
the problem lies in the fighting part.
i think the code should see if i generate a crit or not and deal damage accordingly but the opponents health dont change also there is something laggy about the _getch(); thou i think that has more with my biggest problem to do:
the comp dont spawn any text i made a system that if turn == 1 the user attacks if turn == 2 the comp attacks, but it dosent seem like it registers or even gets to turn2
can you guys see any misstakes please help me i have been looking around for about 2 hours and im stuck
thanks in advance
//spinno
edit its fixed now if a mod could delete this thread it would be awsome