Skip to content

Merge pull request #1 from bordasb/master #2

Open
wants to merge 81 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
bc6df43
Merge pull request #1 from bordasb/master
bordasb Feb 12, 2018
804f9b7
Checking stuff out
Feb 12, 2018
eb00df2
testing
Feb 12, 2018
111e3b8
test commit
Feb 12, 2018
653686e
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Feb 12, 2018
36e04af
Main file for the game, currently only contains 1/5 Chapters
Feb 12, 2018
5952538
deleted empty and unnecessary files
Feb 12, 2018
7ed7c3e
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Feb 12, 2018
e7e2ed4
Character Class, needed if you need the character stats
Feb 12, 2018
30668cb
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Feb 16, 2018
447d54c
Added Battle System
Feb 16, 2018
5bebe61
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Feb 16, 2018
57ef066
Finished battle system
Feb 19, 2018
27104e2
Added a Game Over system
Feb 22, 2018
02a3ad8
started out sqlite
Feb 23, 2018
51c7482
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Feb 23, 2018
1e9a92b
made players, weapons, and armory tables
Feb 23, 2018
f00d212
this is shuvas
Mar 9, 2018
37cd7ca
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Mar 9, 2018
4cda045
Create Desert_Story.cpp
osickaa Mar 9, 2018
355dd62
fixed a major bug
Mar 9, 2018
a6156bd
Create ForestChapter(shuvas).cpp
rayamajs Mar 10, 2018
fb235e2
Fixed a Major bug
Mar 10, 2018
644193f
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Mar 10, 2018
96b71d5
Fixed a Major bug
Mar 10, 2018
561b089
Update Desert_Story.cpp
osickaa Mar 12, 2018
0e8a89e
Update Desert_Story.cpp
osickaa Mar 12, 2018
f04b9f6
Added disclaimer and fixed a bug
Mar 12, 2018
f7202bf
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Mar 12, 2018
5fb11b6
Added disclaimer and fixed a bug
Mar 12, 2018
1502d9f
Create forestChapterStory(shuvas)
rayamajs Mar 12, 2018
2b53248
Delete ForestChapter(shuvas).cpp
rayamajs Mar 12, 2018
9deb4e8
Update Desert_Story.cpp
osickaa Mar 12, 2018
5810f2d
Update Desert_Story.cpp
osickaa Mar 12, 2018
b287327
database updates
Mar 13, 2018
321cb33
updated database code
Mar 13, 2018
1d9c452
Delete asd.txt
bordasb Mar 13, 2018
9ddd13b
sigh
Mar 13, 2018
ef0a909
sigh
Mar 13, 2018
0ac8700
Update database.cpp
rayamajs Mar 13, 2018
27debc7
Update database.cpp
rayamajs Mar 13, 2018
5e7f3f8
Update database.cpp
rayamajs Mar 13, 2018
17f2221
Rename forestChapterStory(shuvas) to forestChapter(shuvas).cpp
rayamajs Mar 13, 2018
ba72c11
Delete three.cpp
rayamajs Mar 13, 2018
0ee4e2e
added SQL
Mar 13, 2018
8d9135e
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Mar 13, 2018
b04ac0d
added SQL
Mar 13, 2018
e70543a
added database methods
Mar 14, 2018
1a08cba
deleted unnecessary Database.h file
Mar 14, 2018
6ac874a
added machete and check for machete to database
Mar 14, 2018
d8a97c5
added key and chip
Mar 14, 2018
186ae69
hamza stuff
Mar 14, 2018
d3c2be0
added assign methods for machete, key, and chip
Mar 14, 2018
d39dddd
added my file - shuvas
Mar 14, 2018
8450324
small change
Mar 14, 2018
4e444dc
my file
Mar 14, 2018
666ea70
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Mar 14, 2018
81fff47
Create desert_story1.cpp
osickaa Mar 14, 2018
addce95
added more database functions
Mar 14, 2018
f7c1bbc
renamed desert_story1.cpp to desert_story.cpp
Mar 14, 2018
2ef4f21
bugfixes for database code
Mar 15, 2018
d002b52
fixed indentation in game.cpp
Mar 15, 2018
ce13358
added getplayerlevel and levelupplayer methods
Mar 15, 2018
5c31057
Update game.cpp
oommens Mar 15, 2018
699c8c6
fixes in database.cpp, added miles.cpp, osg.cpp
Mar 15, 2018
c459afa
Merge branch 'dev' of https://github.coventry.ac.uk/bordasb/f5OSG_Pro…
Mar 15, 2018
0eecb23
Update shuvas.cpp
rayamajs Mar 15, 2018
6c14e0e
Update shuvas.cpp
rayamajs Mar 15, 2018
fa97081
Update and rename desert_story.cpp to desert_story_alicja.cpp
osickaa Mar 15, 2018
f40da70
new and improved
mahmo199 Mar 15, 2018
30f4a85
updates to the database
Mar 15, 2018
93af25a
added main.cpp, about to put everything together
Mar 15, 2018
cac5ee0
created header files and compiled database and Alicjas code
Mar 15, 2018
2de4bed
deleted unnecessary screenshots of tables
Mar 15, 2018
b0fae06
Update main.cpp
osickaa Mar 15, 2018
451ed18
put Hamzas code into project, created header for it
Mar 16, 2018
19ffc51
added Shuvas code to main.cpp, created shuvas.h
Mar 16, 2018
0146f01
added Miles code
Mar 16, 2018
44e80ae
added zero limit to database, need to fix playerID in all files
Mar 16, 2018
e304ea7
fixed sqliteFile and playerID
Mar 16, 2018
ac267dc
Add files via upload
oommens Mar 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions character.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#include "character.h"
#include <string>

//comment
using namespace std;

Character::Character()
{

}

Character::Character(const string name){
this->_name = name;

this->_level = 1;
this->_health = _level+10;
this->_hpThres = _level+10;
this->_exp = (this->_level*100)-50;
this->_expThres = (this->_level*100)-50;
this->_attack = (this->_level+3);
this->_defense = _level + 1;
this->_damageMin = this->_attack-2;
this->_damageMax = this->_attack+2;
this->_money = 0;
this->_item = 00;

}

Character::~Character()
{

}




//Functions
//void Character::init(const string name){ }

string Character::getAsString()
{

}
136 changes: 136 additions & 0 deletions character.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#ifndef CHARACTER_H
#define CHARACTER_H
#include <string>
#include <locale>
#include <ctype.h>
#include <cstdlib>
#include <math.h>
#include <unistd.h>
#include <iostream>


unsigned int sleep(unsigned int seconds);

using namespace std;



class Character
{

private:
/*
* The UNDERSCORE is mainly so you know it's private!
*/
string _name;

int _level;
int _health;
int _hpThres;
int _exp;
int _expThres;
int _bonusDEF; // UNUSED
int _bonusATK; // UNUSED
int _totalATK; // UNUSED
int _attack;
int _damageMin;
int _damageMax;
int _defense;
int _money;
int _item;

public:
Character();
Character(const string name);
virtual ~Character();

//Functions

void init (const string name);
string getAsString();


void setBonus(int n, int m){
this->_attack = _attack + n;
this->_defense = _defense + m;
}

void levelUp(int exp){
while (this->_exp >= this->_expThres)
{
this->_exp -= this->_expThres;

if (_level < 40){
this->_level++;
this->_expThres = (_level*100) - 50;
cout << "Congratulations!! You leveled up!!" << endl;
}
}
}

void levelMatch(int lvl){
this->_level = _level + lvl;
this->_health = _level + _health;
this->_hpThres = _level + _hpThres;
}

void damage(int dmg){
if (dmg <= 0)
{
dmg = 1;
}

this->_health = _health - dmg;
}

void CanGuard(bool check){

if(check == true)
{
cout << "Guard failed!";
}

}

void MoneyGain(int munny){
this->_money = _money += munny;
}

void HealthRestore(int hp){

this->_health = pow(_health, 0);

this->_health = _health + (hp-1);

}

void ItemCount(int num){

this->_item = _item + num;

}




//Accessors
inline const string& getName() const {return this->_name;}
inline const int& getLevel() const {return this->_level;}
inline const int& getHealth() const {return this->_health;}
inline const int& getHPThres() const {return this->_hpThres;}
inline const int& getEXP() const {return this->_exp;}
inline const int& getEXPThres() const {return this->_expThres;}
inline const int& getAttack() const {return this->_attack;}
inline const int& getDamageMin() const {return this->_damageMin;}
inline const int& getDamageMax() const {return this->_damageMax;}
inline const int& getDefense() const {return this->_defense;}
inline const int& getMoney() const {return this->_money;}
inline const int& getItem() const {return this->_item;}


//Modifiers


};

#endif
17 changes: 17 additions & 0 deletions characters.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class Characters {
Characters();
}
class Player : Characters {
Player();
}
class Enemy : Characters {

}
class Warlock : Enemy {

}
class Dwarf : Enemy {

}

void Battlesystem::fightEm(Player player, Enemy enemy) {...}
Binary file added database
Binary file not shown.
Loading