Skip to content

Commit

Permalink
Update to v0.9.8-Alpha.5
Browse files Browse the repository at this point in the history
## [0.9.8-Alpha.5] - 2019-04-10
### Updated
* Readme.md with some additional controls

### Added
* SDL display to the winning/losing message
* Element types to monsters
* Element types to spells
* Modifier to damage based on elements (Suggestion: #14, partially implemented)

### Fixed
* src/ui/image_error.xpm variable name including file path
  • Loading branch information
GamerMan7799 committed Apr 10, 2019
1 parent 6af306e commit 074aaf5
Show file tree
Hide file tree
Showing 18 changed files with 353 additions and 218 deletions.
51 changes: 28 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Attacker: The Game

(Check out the gh-pages of this project by going to (here)[http://dragon-wonder.github.io/Attacker-The-Game/]) (WIP)
(Check out the gh-pages of this project by going to [here](http://dragon-wonder.github.io/Attacker-The-Game/)) (WIP)

## Introduction

Expand All @@ -9,9 +9,9 @@ This is game is a dungeon crawler based game... [ADD MORE LATER]

## License and copyright

All of this project was written from scratch by [GamerMan7799] (https://github.com/GamerMan7799) & [xPUREx](https://github.com/xPUREx) unless otherwise noted.
All of this project was written from scratch by [GamerMan7799](https://github.com/GamerMan7799) & [xPUREx](https://github.com/xPUREx) unless otherwise noted.

That being said all parts of this project we own have been released to the Public Domain. (This does not apply to parts that were noted as being someone else's).
That being said all parts of this project we own have been released to the Public Domain. (This does not apply to parts that were noted as being someone else's).

As such you may use any and/or all of this project however you wish; Commercially or not; modify it or not. You do not even have to give credit (though we would greatly appreciate it if you did).

Expand All @@ -24,22 +24,22 @@ Please read these licenses before you decide to distribute any copies of this pr

We are pretty novice programmers at best. Part of the reason we made this was to improve our skills. And part of the reason we made it open source is to get feedback.

We are always open to people contributing to the project by giving suggestions, or helping us with improvements.
We are always open to people contributing to the project by giving suggestions, or helping us with improvements.

If you have any questions or a suggestions or improvement please feel free to leave it as an issue in [this tab] (https://github.com/dragon-wonder/Attacker-The-Game/issues).
If you have any questions or a suggestions or improvement please feel free to leave it as an issue in [this tab](https://github.com/dragon-wonder/Attacker-The-Game/issues).

## Building the Project

### SDL Library

In order to run the program properly you will need to download SDL2-2.0.3 or higher.
In order to run the program properly you will need to download SDL2-2.0.3 or higher.
You will also need SDL2 TTF library, and SDL2 Images library

A link for SDL2 can be found [here] (https://www.libsdl.org/download-2.0.php).
A link for SDL2 can be found [here](https://www.libsdl.org/download-2.0.php).

A link for SDL2 TTF can be found [here] (https://www.libsdl.org/projects/SDL_ttf/).
A link for SDL2 TTF can be found [here](https://www.libsdl.org/projects/SDL_ttf/).

A link for SDL2 Images can be found [here] (https://www.libsdl.org/projects/SDL_image/).
A link for SDL2 Images can be found [here](https://www.libsdl.org/projects/SDL_image/).

You will want to download the Runtime Binaries (if you have windows I recommend 32 bit over 64 bit; even if you have a 64 bit computer).

Expand Down Expand Up @@ -71,14 +71,14 @@ You can download the .exe under the [Releases Tab](https://github.com/dragon-won
If you wish to compile it yourself you can use the Compile.bat files if you have MinGW on your computer.

Any other complier you wish will work; these are just the ones I've used and made scripts to help with the compiling.

### Linux

You should be able to use the Makefile or the Compile.sh script to compile the program. You will also need the SDL library which you can use by enter the following code into your terminal, or downloading from the link above.

Ubuntu, Mint, or Debian
#### Ubuntu, Mint, or Debian

```
```
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-ttf-dev
sudo apt-get install libsdl2-image-dev
Expand All @@ -90,18 +90,23 @@ I don't know you're on your own. Sorry.

## Controls

You can control your charater through the arrow keys or WASD.

"M" or ESC will open up the menu

"Q" will exit the game.

TAB will bring up the console
You can control your character through the arrow keys or WASD.

"I" will open up the inventory
| Key | Action |
|-----------------|--------------------------|
| WASD/Arrow Keys | Movement |
| "M"/ESC | Open menu (WIP) |
| "Q" | Quit game |
| TAB | Open Console (WIP) |
| "I" | Open Inventory (WIP) |
| "N" | Show Player status (WIP) |
| "H" | Heal |
| "V" | Save |

"N" will bring up player status
### Debugging Controls

"H" will heal the player
These controls are only enabled on debug versions of the game. They are used to test new functions.

There are also several debugging controls which will not work in the released version.
| Key | Action |
|-----|----------------|
| "L" | Force level up |
23 changes: 21 additions & 2 deletions docs/ChangesLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
All notable changes to this project will be documented here.
This project adheres to [Semantic Versioning](http://semver.org/)

## [0.9.8-Alpha.5] - 2019-04-10
### Updated
* Readme.md with some additional controls

### Added
* SDL display to the winning/losing message
* Element types to monsters
* Element types to spells
* Modifier to damage based on elements (Suggestion: #14, partially implemented)

### Fixed
* src/ui/image_error.xpm variable name including file path

## [0.9.8-Alpha.4] - 2019-04-09
### Changed
* Updated the Images/readme.md file to have to correct image referenced and correct source paths.
Expand All @@ -13,34 +26,40 @@ This project adheres to [Semantic Versioning](http://semver.org/)
## [0.9.8-Alpha.3] - 2019-04-05
### Added
* Visual Studio Project file

### Fixed
* Some files paths being wrong from when I moved stuff into folders


## [0.9.8-Alpha.2] - 2019-04-05
### Added
* More work on the level up support with SDL (still WIP)

### Changed
* Screen won't refresh constantly when displaying an unchanged screen.
* Changed "cons" stat to "con" to be better in line with the other names
* Improved Doxygen stuff
* Splash screen now appears in Non-private releases
* Moved away from CodeBlocks because things are broken
* Moved src files to folders to better organize code better

### Fixed
* Splash not being correct ratio

## [0.9.8-Alpha.1] - 2019-04-04
### Added
* Level up support with SDL (WIP)

### Removed
* Excess whitespace

### Fixed
* More spelling mistakes

## [0.9.7-Alpha] - 2019-03-30
### Removed
* Some code left in when debugging

### Fixed
* Spelling mistakes

Expand Down Expand Up @@ -127,8 +146,8 @@ This project adheres to [Semantic Versioning](http://semver.org/)
### Updated
* Rewrote the program from the ground up
* Program now uses SDL graphics
* Change log to be more inline with my other programs
* Versioning to be more inline with my other programs
* Change log to be more in line with my other programs
* Versioning to be more in line with my other programs

### Notes
* Reset the versioning, deprecated all earlier versions
Expand Down
123 changes: 95 additions & 28 deletions project/Attacker-the-game.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>E:\Patrick Rye\Documents\GitHub\Attacker-The-Game\SDL2Stuff\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DEFINED_BUILD_MODE_PRIVATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down Expand Up @@ -106,39 +109,103 @@
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\audio\sound.cpp" />
<ClCompile Include="..\src\entities\chest.cpp" />
<ClCompile Include="..\src\entities\door.cpp" />
<ClCompile Include="..\src\entities\monster.cpp" />
<ClCompile Include="..\src\entities\player.cpp" />
<ClCompile Include="..\src\game\calculations.cpp" />
<ClCompile Include="..\src\game\config.cpp" />
<ClCompile Include="..\src\game\core.cpp" />
<ClCompile Include="..\src\game\rooms.cpp" />
<ClCompile Include="..\src\game\save.cpp" />
<ClCompile Include="..\src\main.cpp" />
<ClCompile Include="..\src\ui\menu.cpp" />
<ClCompile Include="..\src\ui\screen.cpp" />
<ClCompile Include="..\src\audio\sound.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\entities\chest.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\entities\door.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\entities\monster.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\entities\player.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\game\calculations.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\game\config.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\game\core.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\game\rooms.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\game\save.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\main.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\ui\menu.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
<ClCompile Include="..\src\ui\screen.cpp">
<DeploymentContent>true</DeploymentContent>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\audio\sound.h" />
<ClInclude Include="..\src\entities\chest.h" />
<ClInclude Include="..\src\entities\door.h" />
<ClInclude Include="..\src\entities\monster.h" />
<ClInclude Include="..\src\entities\player.h" />
<ClInclude Include="..\src\game\calculations.h" />
<ClInclude Include="..\src\game\config.h" />
<ClInclude Include="..\src\game\core.h" />
<ClInclude Include="..\src\game\rooms.h" />
<ClInclude Include="..\src\game\save.h" />
<ClInclude Include="..\src\global.h" />
<ClInclude Include="..\src\ui\menu.h" />
<ClInclude Include="..\src\ui\screen.h" />
<ClInclude Include="..\src\version.h" />
<ClInclude Include="..\src\audio\sound.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\entities\chest.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\entities\door.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\entities\monster.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\entities\player.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\game\calculations.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\game\config.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\game\core.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\game\rooms.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\game\save.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\global.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\ui\menu.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\ui\screen.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
<ClInclude Include="..\src\version.h">
<DeploymentContent>true</DeploymentContent>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\res\boilerplate.rc" />
<ResourceCompile Include="..\res\boilerplate.rc">
<DeploymentContent>true</DeploymentContent>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
46 changes: 20 additions & 26 deletions src/entities/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ healthmana clsMonster::m_health = {100,100};
healthmana clsMonster::m_mana = {0,0};
float clsMonster::m_goldLean = 0.0;
INV clsMonster::m_inv = {25,1};
uchar clsMonster::m_element = elementPhysical;
/*****************************************************************************/
/*A quick note on the base stats, a stat cannot be lower than 6, as a modifier might reduce the value by 5 points.
The base stat point should also add up to be 100. */
const Mons monsters[DEFINED_NUM_OF_MONSTERS] = {
{"Zombie", {1,25,25,10,25,15}, 1.2},
{"Skeleton", {1,35,18,6,25,6}, 1.5},
{"Witch", {1,15,15,20,20,30}, 1.5},
{"Imp", {1,15,15,15,40,15}, 1.4},
{"Golem", {1,20,34,34,6,6}, 1.0},
{"Murloc", {1,20,20,20,20,20}, 0.8},
{"Demon", {1,25,25,20,20,10}, 0.9},
{"Angel", {1,15,15,20,20,30}, 0.9},
{"Harpy", {1,10,10,10,35,35}, 0.7},
{"Elf", {1,20,20,20,20,20}, 1.6},
{"Ghost", {1,20,20,20,20,20}, 0.5},
{"Undead Mutant", {1,34,34,20,6,6}, 0.8},
{"Thunder Spider", {1,20,8,15,33,24}, 1.0}
const Mons clsMonster::monsters[DEFINED_NUM_OF_MONSTERS] = {
{"Zombie", {1,25,25,10,25,15}, 1.2, elementPhysical},
{"Skeleton", {1,35,18,6,25,6}, 1.5, elementPhysical},
{"Witch", {1,15,15,20,20,30}, 1.5, elementWater},
{"Imp", {1,15,15,15,40,15}, 1.4, elementFire},
{"Golem", {1,20,34,34,6,6}, 1.0, elementEarth},
{"Murloc", {1,20,20,20,20,20}, 0.8, elementWater},
{"Demon", {1,25,25,20,20,10}, 0.9, elementDark},
{"Angel", {1,15,15,20,20,30}, 0.9, elementLight},
{"Harpy", {1,10,10,10,35,35}, 0.7, elementWind},
{"Elf", {1,20,20,20,20,20}, 1.6, elementPhysical},
{"Ghost", {1,20,20,20,20,20}, 0.5, elementDark},
{"Undead Mutant", {1,34,34,20,6,6}, 0.8, elementPhysical},
{"Thunder Spider", {1,20,8,15,33,24}, 1.0, elementEnergy}
};

/*****************************************************************************/
clsMonster::clsMonster() {
//ctor
Expand Down Expand Up @@ -68,6 +68,7 @@ void clsMonster::makeMonster(uchar level) {
m_stats = monsters[num].stats;
m_goldLean = monsters[num].goldLean;
m_stats.level = level;
m_element = monsters[num].element;

m_inv.gold = Calculations::goldAmount(level, m_goldLean);
if(rand() % 101 <= DEFINED_KEY_SPAWN_CHANCE) { m_inv.keys = 1; }
Expand Down Expand Up @@ -245,16 +246,9 @@ std::string clsMonster::getName() {
}
}
/*****************************************************************************/
void clsMonster::setHealth(healthmana a) {
/////////////////////////////////////////////////
/// @brief Sets the health of the monster
///
/// @param a = new health
/////////////////////////////////////////////////
m_health = a;
}
void clsMonster::setHealth(healthmana a) { m_health = a; }
/*****************************************************************************/
healthmana clsMonster::getHealth() {
return m_health;
}
healthmana clsMonster::getHealth() { return m_health; }
/*****************************************************************************/
uchar clsMonster::getElement() { return m_element; }
/*****************************************************************************/
Loading

0 comments on commit 074aaf5

Please sign in to comment.