diff --git a/data/mapgen.lua b/data/mapgen.lua index 902c077..0b720ab 100644 --- a/data/mapgen.lua +++ b/data/mapgen.lua @@ -50,8 +50,8 @@ local function generate_path () local lastDirection = 0 local coridoor_count = 0 local bossLevel = CURRENT_LEVEL % 5 == 0 - local coverage = 9 + CURRENT_LEVEL - if bossLevel then + local coverage = 8 + CURRENT_LEVEL + if bossLevel or CURRENT_LEVEL == 1 then coverage = 5 end @@ -61,15 +61,7 @@ local function generate_path () while matrix_coverage(map_matrix) < coverage do local direction = random(4) - if lastDirection > 0 then - if random(24) <= 6 then direction = lastDirection end - end - - while lastDirection == reverse_direction(direction) do - direction = random(4) - end - - if coridoor_count < coverage/3 then + if coridoor_count < coverage/2 then if random(3) == 1 and (cx > 1 or cy > 1) then map_matrix[cx][cy].type = "coridoor" coridoor_count = coridoor_count + 1 diff --git a/data/monstergen.lua b/data/monstergen.lua index 3fc3835..c0317b3 100644 --- a/data/monstergen.lua +++ b/data/monstergen.lua @@ -300,7 +300,9 @@ local enemies = {} if(CURRENT_LEVEL > 0) then if (CURRENT_LEVEL == 1) then enemies = concat(enemies, pests) + enemies = concat(enemies, avian) enemies = concat(enemies, misc) + enemies = concat(enemies, dogs) elseif (CURRENT_LEVEL > 15) then enemies = {} enemies = concat(enemies, undead) @@ -342,6 +344,7 @@ function module.add_monsters_to_room(room, roomx, roomy) if (CURRENT_LEVEL > 3) then count = random(4) end + count = count + 1 local i = 0 while i < count do local rx = random(13) + 1 diff --git a/src/input.c b/src/input.c index 9625d83..259a294 100644 --- a/src/input.c +++ b/src/input.c @@ -91,6 +91,8 @@ get_event_key(SDL_Event *event) key = KEY_ESC; break; case SDLK_RETURN: key = KEY_ENTER; break; + case SDLK_SPACE: + key = KEY_SPACE; break; default: key = 0; break; } diff --git a/src/input.h b/src/input.h index f08b438..59e2f47 100644 --- a/src/input.h +++ b/src/input.h @@ -22,22 +22,23 @@ #include #include -#define KEY_LEFT 1 -#define KEY_RIGHT 2 -#define KEY_UP 4 -#define KEY_DOWN 8 -#define KEY_NUM0 16 -#define KEY_NUM1 32 -#define KEY_NUM2 64 -#define KEY_NUM3 128 -#define KEY_NUM4 256 -#define KEY_NUM5 512 -#define KEY_NUM6 1024 -#define KEY_NUM7 2048 -#define KEY_NUM8 4096 -#define KEY_NUM9 8192 -#define KEY_ESC 16384 -#define KEY_ENTER 32768 +#define KEY_LEFT 0x1 +#define KEY_RIGHT 0x2 +#define KEY_UP 0x4 +#define KEY_DOWN 0x8 +#define KEY_NUM0 0x10 +#define KEY_NUM1 0x20 +#define KEY_NUM2 0x40 +#define KEY_NUM3 0x80 +#define KEY_NUM4 0x100 +#define KEY_NUM5 0x200 +#define KEY_NUM6 0x400 +#define KEY_NUM7 0x800 +#define KEY_NUM8 0x1000 +#define KEY_NUM9 0x2000 +#define KEY_ESC 0x4000 +#define KEY_ENTER 0x8000 +#define KEY_SPACE 0x10000 #define KEY_CTRL_M 0x1 #define KEY_CTRL_S 0x2 @@ -47,11 +48,11 @@ #define KEY_SHIFT_NUM3 0x20 #define KEY_SHIFT_NUM4 0x40 #define KEY_SHIFT_NUM5 0x80 -#define KEY_CTRL_F 0x100 +#define KEY_CTRL_F 0x100 -#define MBUTTON_LEFT 1 -#define MBUTTON_MIDDLE 2 -#define MBUTTON_RIGHT 4 +#define MBUTTON_LEFT 0x1 +#define MBUTTON_MIDDLE 0x2 +#define MBUTTON_RIGHT 0x4 typedef struct Input { Uint64 keyState; diff --git a/src/main.c b/src/main.c index 1f69e60..bd84a83 100644 --- a/src/main.c +++ b/src/main.c @@ -103,6 +103,8 @@ static char *how_to_play_tooltip[] = { "", " ATTACK: Walk into a monster to attack it", "", + " HOLD TURN: Press SPACE", + "", " THROW DAGGER: Press 4 then chose a direction (nav keys)", "", " DRINK HEALTH: Press 5 (if you need health and have potions)", diff --git a/src/player.c b/src/player.c index bbe9a1d..0f8f75d 100644 --- a/src/player.c +++ b/src/player.c @@ -306,6 +306,12 @@ handle_next_move(UpdateData *data) if (linkedlist_size(player->projectiles) > 0) return; + if (input_key_is_pressed(data->input, KEY_SPACE)) { + action_spent(data->player); + gui_log("You take a moment and stare at your feet"); + return; + } + RoomMatrix *matrix = data->matrix; Vector2d nextDir = read_direction_from(data->input); if (!vector2d_equals(nextDir, VECTOR2D_NODIR)) diff --git a/src/skill.c b/src/skill.c index cd77d7d..a27d432 100644 --- a/src/skill.c +++ b/src/skill.c @@ -62,7 +62,7 @@ static char *bash_tooltip[] = { " On a successful hit the target will be stunned for 2 turns", "", "COOLDOWN:", - " 2 turns", + " 3 turns", "", "USAGE:", " activate the skill (press 2)", @@ -335,7 +335,7 @@ create_bash(void) Skill *skill = create_default("Bash", s); skill->levelcap = 3; skill->instantUse = false; - skill->resetTime = 2; + skill->resetTime = 3; skill->available = NULL; skill->use = skill_bash; skill->actionRequired = true;