mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
lovasz completed
This commit is contained in:
parent
9ffc5cd03f
commit
91bd0c2018
@ -61,6 +61,10 @@ EX void pickupMovedItems(cell *c) {
|
||||
}
|
||||
}
|
||||
|
||||
EX bool in_lovasz() {
|
||||
return specialland == laMotion && bounded && ls::single() && !daily::on;
|
||||
}
|
||||
|
||||
EX bool collectItem(cell *c2, bool telekinesis IS(false)) {
|
||||
|
||||
bool dopickup = true;
|
||||
|
16
menus.cpp
16
menus.cpp
@ -599,7 +599,21 @@ EX void mode_higlights() {
|
||||
clearMessages();
|
||||
welcomeMessage();
|
||||
}));
|
||||
|
||||
|
||||
dialog::addItem(XLAT("Lovász Conjecture"), 'L');
|
||||
dialog::add_action(dialog::add_confirmation([] {
|
||||
popScreenAll();
|
||||
resetModes();
|
||||
set_geometry(gKleinQuartic);
|
||||
gp::param = gp::loc(1, 1);
|
||||
set_variation(eVariation::untruncated);
|
||||
|
||||
firstland = specialland = laMotion;
|
||||
start_game();
|
||||
clearMessages();
|
||||
welcomeMessage();
|
||||
}));
|
||||
|
||||
#if CAP_CRYSTAL
|
||||
if(hiitemsMax(itHolyGrail) || cheater || autocheat) {
|
||||
dialog::addItem(XLAT("Knight of the 16-Cell Table"), '1');
|
||||
|
@ -377,7 +377,7 @@ EX void wandering() {
|
||||
|
||||
if(smallbounded_generation && !c->item && hrand(5) == 0 && c->land != laHalloween) {
|
||||
if(passable(c, NULL, 0) || specialland == laKraken) {
|
||||
if(c->land != laGraveyard && (c->land != laMotion || !ls::single() || daily::on) && !haveOrbPower() && specialland != laHell) for(int it=0; it<1000 && !c->item; it++)
|
||||
if(c->land != laGraveyard && !in_lovasz() && !haveOrbPower() && specialland != laHell) for(int it=0; it<1000 && !c->item; it++)
|
||||
placeLocalOrbs(c);
|
||||
if(!c->item) c->item = wanderingTreasure(c);
|
||||
if(c->item == itShard) {
|
||||
|
16
quit.cpp
16
quit.cpp
@ -327,9 +327,9 @@ EX void showMission() {
|
||||
const bool sweeper = false;
|
||||
#endif
|
||||
|
||||
if(!peace::on && !racing::on && !sweeper)
|
||||
if(!peace::on && !racing::on && !sweeper && !in_lovasz())
|
||||
dialog::addInfo(XLAT("Your score: %1", its(gold())));
|
||||
if(!peace::on && !racing::on && !sweeper)
|
||||
if(!peace::on && !racing::on && !sweeper && !in_lovasz())
|
||||
dialog::addInfo(XLAT("Enemies killed: %1", its(tkills())));
|
||||
|
||||
#if CAP_TOUR
|
||||
@ -352,6 +352,18 @@ EX void showMission() {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if(in_lovasz()) {
|
||||
int score = 0, all = 0;
|
||||
for(cell *c: currentmap->allcells()) {
|
||||
if(c->wall == waChasm || c->item == itOrbInvis)
|
||||
score++;
|
||||
all++;
|
||||
}
|
||||
dialog::addInfo(XLAT("Dropped floors: %1/%2", its(score), its(all)));
|
||||
if(score == all) dialog::addInfo(XLAT("CONGRATULATIONS!"), iinf[itOrbYendor].color);
|
||||
if(score == all && geometry == gKleinQuartic && variation == eVariation::untruncated && gp::param == gp::loc(1,1))
|
||||
achievement_gain_once("LOVASZ", rg::special_geometry);
|
||||
}
|
||||
else {
|
||||
if(0)
|
||||
;
|
||||
|
@ -335,7 +335,7 @@ EX void initgame() {
|
||||
generate_mines();
|
||||
}
|
||||
|
||||
if(specialland == laMotion && bounded && ls::any_order() && !daily::on) {
|
||||
if(in_lovasz()) {
|
||||
cwt.at->item = itOrbInvis;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user