Merge branch 'dev' of github.com:LiquidityC/breakhack into dev
This commit is contained in:
commit
f4f874c3ed
|
@ -116,13 +116,14 @@ create_treasure(int current_level)
|
||||||
unsigned int value;
|
unsigned int value;
|
||||||
|
|
||||||
amt = (unsigned int) 1 + get_random(5*current_level) % 40;
|
amt = (unsigned int) 1 + get_random(5*current_level) % 40;
|
||||||
|
amt = amt == 0 ? 1 : amt;
|
||||||
|
|
||||||
if (current_level > 9) {
|
if (current_level > 9) {
|
||||||
highest_treasure = TREASURE_COUNT;
|
|
||||||
} else if (current_level > 3) {
|
|
||||||
highest_treasure = PLATINUM;
|
highest_treasure = PLATINUM;
|
||||||
} else {
|
} else if (current_level > 3) {
|
||||||
highest_treasure = GOLD;
|
highest_treasure = GOLD;
|
||||||
|
} else {
|
||||||
|
highest_treasure = SILVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
value = get_random(highest_treasure);
|
value = get_random(highest_treasure);
|
||||||
|
|
10
src/player.c
10
src/player.c
|
@ -105,12 +105,6 @@ action_spent(Player *p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
player_step(Player *p)
|
|
||||||
{
|
|
||||||
action_spent(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_monster_collision(Player *player,
|
on_monster_collision(Player *player,
|
||||||
Monster *monster,
|
Monster *monster,
|
||||||
|
@ -267,7 +261,7 @@ move(Player *player, RoomMatrix *matrix, Vector2d direction)
|
||||||
player->sprite->pos.y += TILE_DIMENSION * (int) direction.y;
|
player->sprite->pos.y += TILE_DIMENSION * (int) direction.y;
|
||||||
|
|
||||||
if (!has_collided(player, matrix, direction)) {
|
if (!has_collided(player, matrix, direction)) {
|
||||||
player_step(player);
|
action_spent(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +334,7 @@ use_skill(Skill *skill, SkillData *skillData)
|
||||||
skill->active = false;
|
skill->active = false;
|
||||||
skill->use(skill, skillData);
|
skill->use(skill, skillData);
|
||||||
if (skill->actionRequired)
|
if (skill->actionRequired)
|
||||||
player_step(skillData->player);
|
action_spent(skillData->player);
|
||||||
skill->resetCountdown = skill->resetTime;
|
skill->resetCountdown = skill->resetTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue