diff --git a/Plague.g1a b/Plague.g1a index 8cba6a3..48881a2 100644 Binary files a/Plague.g1a and b/Plague.g1a differ diff --git a/src/core.c b/src/core.c index f79f276..a9bb46b 100644 --- a/src/core.c +++ b/src/core.c @@ -47,10 +47,7 @@ void next_frame(struct game *current_game) current_game->planes[i]->direction = new_dir; // Infect the plane - if (current_game->grid.data[current_game->planes[i]->x + current_game->planes[i]->y * current_game->grid.width] == 1 && - (current_game->mutations_selected[2] == 3 || - current_game->mutations_selected[2] == 2 || - current_game->mutations_selected[2] == 5)) current_game->planes[i]->is_infected = 1; + if (current_game->grid.data[current_game->planes[i]->x + current_game->planes[i]->y * current_game->grid.width] == 1 && current_game->mutations_selected[2] == 4) current_game->planes[i]->is_infected = 1; } diff --git a/src/core.h b/src/core.h index e3b2d3d..704bf20 100644 --- a/src/core.h +++ b/src/core.h @@ -40,7 +40,8 @@ struct game int mutations_bought[3][14]; // Research data - int research, limit, priority; + int research, limit; + float priority; // Humans stats : healthy, infected, dead, healed int humans[4]; diff --git a/src/epidemic_engine.c b/src/epidemic_engine.c index 09d4d40..b504ed3 100644 --- a/src/epidemic_engine.c +++ b/src/epidemic_engine.c @@ -15,7 +15,7 @@ bool can_become_infected(const struct grid epidemic_grid, const int mutations_se extern const uint8_t world[64][128]; // In case of water, low or high temperature - if (world[j][i] == 0 && mutations_selected[2] != 3 && mutations_selected[2] != 2 && mutations_selected[2] != 5) return false; + if (world[j][i] == 0 && mutations_selected[2] != 3 && mutations_selected[2] != 4 && mutations_selected[2] != 6) return false; if (world[j][i] == 1 && mutations_selected[1] != 1 && mutations_selected[1] != 5) return false; if (world[j][i] == 3 && mutations_selected[1] != 2 && mutations_selected[1] != 5) return false; diff --git a/src/mutation_engine.c b/src/mutation_engine.c index 67f69b0..658c14f 100644 --- a/src/mutation_engine.c +++ b/src/mutation_engine.c @@ -80,10 +80,10 @@ void mutation_select(struct game *current_game, const int mutation_menu) end = mutation_buy(current_game, c, mutation_menu, table); } - if (key == KEY_LEFT && c.x > 0) c.x --; - if (key == KEY_RIGHT && c.x < 7) c.x ++; - if (key == KEY_UP && c.y > 0) c.y --; - if (key == KEY_DOWN && c.y < 3) c.y ++; + if (key == KEY_LEFT && c.x > 0) c.x = (c.x - 1) % 8; + if (key == KEY_RIGHT && c.x < 7) c.x = (c.x + 1) % 8; + if (key == KEY_UP && c.y > 0) c.y = (c.y - 1) % 4; + if (key == KEY_DOWN && c.y < 3) c.y = (c.y + 1) % 4; } if (t >= 0) timer_stop(t); } @@ -125,8 +125,7 @@ int mutation_buy(struct game *current_game, const struct cursor c, const int mut // Update update_disease(current_game); - current_game->priority += floor((mutation_data->severity + mutation_data->lethality) / 20); - + current_game->priority += ceil((mutation_data->severity + mutation_data->lethality)/10); const char *msg[5] = {"mutation", "achetee", "", "", ""}; message(msg); }