1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-06 03:49:03 +00:00

bounded Minefield now works according to the standard Minesweeper rules

This commit is contained in:
Zeno Rogue
2019-04-04 14:36:45 +02:00
parent e61c684bca
commit 57f2891826
8 changed files with 52 additions and 2 deletions

View File

@@ -676,6 +676,24 @@ void showEuclideanMenu() {
dialog::addSelItem(XLAT("land"), XLAT1(linf[specialland].name), 'l');
dialog::add_action_push(ge_land_selection);
if(specialland == laMinefield && bounded) {
dialog::addSelItem(XLAT("number of mines"), its(bounded_mine_quantity), 'm');
dialog::add_action([] {
dialog::editNumber(bounded_mine_quantity, 0, bounded_mine_max, (bounded_mine_max+5)/10, 1,
XLAT("number of mines"), "");
dialog::reaction = [] {
if(bounded_mine_quantity < 0) bounded_mine_quantity = 0;
if(bounded_mine_quantity > bounded_mine_max) bounded_mine_quantity = bounded_mine_max;
};
dialog::reaction_final = [] {
bounded_mine_percentage = bounded_mine_quantity * 1. / bounded_mine_max;
stop_game();
start_game();
};
});
}
dialog::addBoolItem(XLAT("pattern"), specialland == laCanvas, 'p');
if(specialland == laCanvas) dialog::lastItem().value = patterns::whichCanvas;
dialog::add_action_push(patterns::showPrePattern);