crossbow:: peace, dual, and non-shmup multiplayer are incompatible

This commit is contained in:
Zeno Rogue 2023-10-28 08:22:31 +02:00
parent e8ecccdf53
commit c36da1985c
3 changed files with 8 additions and 1 deletions

View File

@ -1542,7 +1542,10 @@ EX void initConfig() {
-> editable({{"blade", "Standard Rogue weapon. Bump into a monster to hit. Most monsters attack you the same way."},
{"crossbow", "Hits all monsters in a straight line, but slow to reload. Press 'f' or click the crossbow icon to target."}},
"weapon selection", 'w')
-> set_value_to = [] (bow::eWeapon wpn) { bool b = game_active; if(wpn != bow::weapon) stop_game(); bow::weapon = wpn; if(b) start_game(); };
-> set_value_to = [] (bow::eWeapon wpn) { bool b = game_active; if(wpn != bow::weapon) stop_game(); bow::weapon = wpn;
peace::on = false; if(dual::state) dual::disable(); if(multi::players > 1 && !shmup::on) multi::players = 1;
if(b) start_game();
};
param_enum(bow::style, "bow_style", "bow_style", bow::style)
-> editable({{"bull line", "Can go in either direction on odd shapes. 3 turns to reload."},
{"geodesic", "Graph geodesic: any sequence of tiles is OK as long as there are no shortcuts. 4 turns to reload."}},

View File

@ -522,6 +522,7 @@ EX void showConfigureMultiplayer() {
dialog::do_if_confirmed([i] {
stop_game();
players = i;
if(multi::players > 1 && !shmup::on) bow::weapon = bow::wBlade;
start_game();
});
});

View File

@ -1481,12 +1481,14 @@ EX void switch_game_mode(char switchWhat) {
tactic::on = yendor::on = princess::challenge =
randomPatternsMode = inv::on = false;
racing::on = false;
bow::weapon = bow::wBlade;
break;
case rg::dualmode:
stop_tour(); tour::on = false;
racing::on = false;
yendor::on = tactic::on = princess::challenge = false;
bow::weapon = bow::wBlade;
if(!dual::state) dual::enable();
else dual::disable();
break;
@ -1569,6 +1571,7 @@ EX void switch_game_mode(char switchWhat) {
shmup::on = !shmup::on;
princess::challenge = false;
if(!shmup::on) racing::on = false;
if(!shmup::on && multi::players > 1) bow::weapon = bow::wBlade;
break;
case rg::randpattern: