Merge branch 'master' into dev

This commit is contained in:
Linus Probert 2018-08-19 20:26:28 +02:00
commit 5f754d551a
8 changed files with 17 additions and 5 deletions

View File

@ -7,7 +7,7 @@ project(breakhack C)
set(breakhack_GAME_TITLE "BreakHack")
set(breakhack_MAJOR_VERSION 0)
set(breakhack_MINOR_VERSION 1)
set(breakhack_PATCH_VERSION 12)
set(breakhack_PATCH_VERSION 13)
set(breakhack_RELEASE_TYPE "(early access)")
include(FindLua)

BIN
assets/Extras/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View File

@ -0,0 +1,8 @@
9a610d5 Adds window icon
6af8d9d Completes #8 First boss
915ea59 Fixes a mistake in music loading.
6cc96a9 Begins #8 First boss
1a09328 Adds boss music and an additional attribution line per request.
6633db7 Adds room objects and FIRE rooms.
0b58e53 Removed "Examples" folder from assets
292f549 Minor compiler warning fix

View File

@ -96,7 +96,7 @@ artifact_create_random(Player *p, Uint8 level)
{
int option = -1;
if (p->stats.lvl >= 4)
option = get_random(LAST_ARTIFACT_EFFECT);
option = get_random(LAST_ARTIFACT_EFFECT - 1);
else if (p->stats.lvl >= 3)
option = get_random(INCREASED_STUN);
else

View File

@ -51,6 +51,7 @@
#include "input.h"
#include "screen.h"
#include "hiscore.h"
#include "io_util.h"
typedef enum Turn_t {
PLAYER,
@ -143,6 +144,9 @@ bool initSDL(void)
return false;
}
// Set the window icon
SDL_SetWindowIcon(gWindow, IMG_Load_RW(io_load_rwops("Extras/icon.png"), true));
gRenderer = SDL_CreateRenderer(gWindow, -1,
SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
if (gRenderer == NULL)

View File

@ -542,7 +542,7 @@ monster_drop_loot(Monster *monster, Map *map, Player *player)
linkedlist_append(&map->items, treasure);
}
if (get_random(19) == 0) {
if (monster->stats.lvl > 2 && get_random(19) == 0) {
Artifact *a = artifact_create_random(player, 1);
a->sprite->pos = monster->sprite->pos;
linkedlist_append(&map->artifacts, a);

View File

@ -576,7 +576,7 @@ void player_update(UpdateData *data)
return;
check_skill_activation(data);
if (!check_skill_trigger(data))
if (player->state != FALLING && !check_skill_trigger(data))
handle_next_move(data);
if (player->state == FALLING && player->stats.hp > 0) {

View File

@ -434,7 +434,7 @@ skill_create(enum SkillType t)
return NULL;
}
#ifdef DEBUG
#ifdef DEBUG_SKILLS
skill->levelcap = 1;
#endif
return skill;