diff options
-rw-r--r-- | apps/plugins/superdom.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index 312c48cdeb..edb432d68f 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c | |||
@@ -176,6 +176,7 @@ static struct settings { | |||
176 | */ | 176 | */ |
177 | int compdiff; | 177 | int compdiff; |
178 | bool spoil_enabled; | 178 | bool spoil_enabled; |
179 | bool persistent_units; | ||
179 | } superdom_settings; | 180 | } superdom_settings; |
180 | 181 | ||
181 | static struct resources humanres; | 182 | static struct resources humanres; |
@@ -529,7 +530,7 @@ static int settings_menu(void) | |||
529 | MENUITEM_STRINGLIST(menu, "Super Domination Settings", NULL, | 530 | MENUITEM_STRINGLIST(menu, "Super Domination Settings", NULL, |
530 | "Computer starting farms", "Computer starting factories", | 531 | "Computer starting farms", "Computer starting factories", |
531 | "Human starting farms", "Human starting factories", | 532 | "Human starting farms", "Human starting factories", |
532 | "Starting cash", "Starting food", "Computer difficulty","Food spoilage", "Moves per turn"); | 533 | "Starting cash", "Starting food", "Computer difficulty","Food spoilage", "Persistent units", "Moves per turn"); |
533 | 534 | ||
534 | while(1) | 535 | while(1) |
535 | { | 536 | { |
@@ -582,6 +583,10 @@ static int settings_menu(void) | |||
582 | 0, "Disabled", 0, NULL); | 583 | 0, "Disabled", 0, NULL); |
583 | break; | 584 | break; |
584 | case 8: | 585 | case 8: |
586 | rb->set_bool_options("Persistent units", &superdom_settings.persistent_units, "Enabled", 0, | ||
587 | "Disabled", 0, NULL); | ||
588 | break; | ||
589 | case 9: | ||
585 | rb->set_int("Moves per turn", "", UNIT_INT, | 590 | rb->set_int("Moves per turn", "", UNIT_INT, |
586 | &superdom_settings.movesperturn, NULL, | 591 | &superdom_settings.movesperturn, NULL, |
587 | 1, 1, 5, NULL); | 592 | 1, 1, 5, NULL); |
@@ -1707,9 +1712,12 @@ static int attack_territory(int colour, int x, int y) | |||
1707 | offres->inds += board[x][y].ind; | 1712 | offres->inds += board[x][y].ind; |
1708 | offres->nukes += board[x][y].nuke; | 1713 | offres->nukes += board[x][y].nuke; |
1709 | board[x][y].colour = colour; | 1714 | board[x][y].colour = colour; |
1710 | board[x][y].men = 0; | 1715 | if(!superdom_settings.persistent_units) |
1711 | board[x][y].tank = false; | 1716 | { |
1712 | board[x][y].plane = false; | 1717 | board[x][y].men = 0; |
1718 | board[x][y].tank = false; | ||
1719 | board[x][y].plane = false; | ||
1720 | } | ||
1713 | draw_board(); | 1721 | draw_board(); |
1714 | if(human) | 1722 | if(human) |
1715 | rb->sleep(HZ*2); | 1723 | rb->sleep(HZ*2); |
@@ -2316,6 +2324,7 @@ static void default_settings(void) | |||
2316 | superdom_settings.movesperturn = 2; | 2324 | superdom_settings.movesperturn = 2; |
2317 | superdom_settings.compdiff=2; | 2325 | superdom_settings.compdiff=2; |
2318 | superdom_settings.spoil_enabled=false; | 2326 | superdom_settings.spoil_enabled=false; |
2327 | superdom_settings.persistent_units=false; | ||
2319 | } | 2328 | } |
2320 | 2329 | ||
2321 | static int average_strength(int colour) | 2330 | static int average_strength(int colour) |