mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-05 11:12:49 +00:00
hardcore now can use a formula
This commit is contained in:
parent
f445d02707
commit
322b21e999
@ -1286,7 +1286,7 @@ EX void initConfig() {
|
|||||||
// modes
|
// modes
|
||||||
|
|
||||||
param_b(shmup::on, "mode-shmup", false)->be_non_editable();
|
param_b(shmup::on, "mode-shmup", false)->be_non_editable();
|
||||||
param_b(hardcore, "mode-hardcore", false)->be_non_editable();
|
param_b(hardcore, "mode-hardcore", false)->set_reaction([] { hardcore = !hardcore; switchHardcore_quiet(); });
|
||||||
param_enum(land_structure, "mode-chaos", lsNiceWalls)->be_non_editable();
|
param_enum(land_structure, "mode-chaos", lsNiceWalls)->be_non_editable();
|
||||||
#if CAP_INV
|
#if CAP_INV
|
||||||
param_b(inv::on, "mode-Orb Strategy");
|
param_b(inv::on, "mode-Orb Strategy");
|
||||||
|
@ -276,13 +276,17 @@ EX void enable_cheat() {
|
|||||||
|
|
||||||
// -- game modes --
|
// -- game modes --
|
||||||
|
|
||||||
EX void switchHardcore() {
|
EX void switchHardcore_quiet() {
|
||||||
if(hardcore && !canmove) {
|
if(hardcore && !canmove) {
|
||||||
restart_game();
|
if(delayed_start) stop_game(); else restart_game();
|
||||||
hardcore = false;
|
hardcore = false;
|
||||||
}
|
}
|
||||||
else if(hardcore && canmove) { hardcore = false; }
|
else if(hardcore && canmove) { hardcore = false; }
|
||||||
else { hardcore = true; canmove = true; hardcoreAt = turncount; }
|
else { hardcore = true; canmove = true; hardcoreAt = turncount; }
|
||||||
|
}
|
||||||
|
|
||||||
|
EX void switchHardcore() {
|
||||||
|
switchHardcore_quiet();
|
||||||
if(hardcore)
|
if(hardcore)
|
||||||
addMessage(XLAT("One wrong move and it is game over!"));
|
addMessage(XLAT("One wrong move and it is game over!"));
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user