HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
yendor.cpp File Reference

Yendor Quest/Challenge, Pure Tactics Mode, Peace Mode. More...

#include "hyper.h"

Classes

struct  hr::yendor::yendorlevel
 
struct  hr::yendor::yendorinfo
 
struct  hr::yendor::scoredata
 
struct  hr::tactic::scoredata
 

Namespaces

 hr
 

Macros

#define YF_DEAD   1
 
#define YF_WALLS   2
 
#define YF_END   4
 
#define YF_DEAD5   8
 
#define YF_NEAR_IVY   16
 
#define YF_NEAR_ELEM   32
 
#define YF_NEAR_OVER   64
 
#define YF_NEAR_RED   128
 
#define YF_REPEAT   512
 
#define YF_NEAR_TENT   1024
 
#define YF_START_AL   2048
 
#define YF_START_CR   4096
 
#define YF_CHAOS   8192
 
#define YF_RECALL   16384
 
#define YF_NEAR_FJORD   32768
 
#define YF_START_ANY   (YF_START_AL|YF_START_CR)
 
#define YENDORLEVELS   34
 
#define NOYENDOR   999999
 
#define MAXTAC   20
 

Typedefs

typedef vector< pair< int, string > > hr::subscoreboard
 

Enumerations

enum  eState { ysUntouched, ysLocked, ysUnlocked }
 

Functions

EX int hr::hiitemsMax (eItem it)
 
EX modecode_t hr::modecode ()
 
void hr::displayScore (subscoreboard &s, int x)
 
void hr::yendor::uploadScore ()
 
EX yendorlevel & hr::yendor::clev ()
 
eLand hr::yendor::changeland (int i, eLand l)
 
EX int hr::yendor::hardness ()
 
EX eState hr::yendor::state (cell *yendor)
 
EX bool hr::yendor::exhaustive_distance_appropriate ()
 
EX bool hr::yendor::check (cell *yendor)
 
EX void hr::yendor::onpath ()
 
EX void hr::yendor::init (int phase)
 
bool hr::yendor::levelUnlocked (int i)
 
int hr::yendor::char_to_yendor (char c)
 
EX string hr::yendor::name (int i)
 
EX void hr::yendor::showMenu ()
 
EX void hr::yendor::collected (cell *c2)
 
int hr::tactic::chances (eLand l)
 
int hr::tactic::tacmultiplier (eLand l)
 
bool hr::tactic::tacticUnlocked (eLand l)
 
EX void hr::tactic::record (eLand land, int score, int xc IS(modecode()))
 
void hr::tactic::record ()
 
void hr::tactic::unrecord (eLand land, int xc=modecode())
 
void hr::tactic::unrecord ()
 
void hr::tactic::uploadScoreCode (int code, int lb)
 
void hr::tactic::uploadScore ()
 
EX void hr::tactic::showMenu ()
 
void hr::peace::listLevels ()
 
eLand hr::peace::getNext (eLand last)
 
bool hr::peace::isAvailable (eLand l)
 
void hr::peace::simon::build ()
 
EX void hr::peace::simon::extend ()
 
EX void hr::peace::simon::init ()
 
EX void hr::peace::simon::restore ()
 
EX void hr::peace::showMenu ()
 
int hr::read_mode_args ()
 

Variables

bool hr::peace::on = false
 
EX bool hr::yendor::on = false
 
EX bool hr::yendor::generating = false
 
EX bool hr::yendor::path = false
 
EX bool hr::yendor::everwon = false
 
EX bool hr::yendor::won = false
 
bool hr::yendor::easy = false
 
EX int hr::yendor::challenge
 
EX int hr::yendor::lastchallenge
 
EX map< modecode_t, array< int, YENDORLEVELS > > hr::yendor::bestscore
 
EX eLand hr::yendor::nexttostart
 
yendorlevel hr::yendor::levels [YENDORLEVELS]
 
int hr::yendor::tscorelast
 
eLand hr::yendor::first
 
eLand hr::yendor::second
 
eLand hr::yendor::last
 
EX vector< yendorinfo > hr::yendor::yi
 
EX int hr::yendor::yii = NOYENDOR
 
vector< scoredata > hr::yendor::scoreboard
 
const EX char * hr::yendor::chelp
 
auto hr::yendor::hooks
 
EX bool hr::tactic::trailer = false
 
EX bool hr::tactic::on = false
 
EX int hr::tactic::id
 
map< modecode_t, array< int, landtypes > > hr::tactic::recordsum
 
map< modecode_t, array< array< int, MAXTAC >, landtypes > > hr::tactic::lsc
 
eLand hr::tactic::lasttactic
 
map< modecode_t, vector< scoredata > > hr::tactic::scoreboard
 
int hr::tactic::tscorelast
 
int hr::modecodetable [42][6]
 
EX bool hr::peace::hint = false
 
EX bool hr::peace::otherpuzzles
 
eLand hr::peace::simonlevels []
 
eLand hr::peace::explorelevels []
 
eLand * hr::peace::levellist
 
int hr::peace::qty
 
const char * hr::peace::chelp
 
vector< cell * > hr::peace::simon::path
 
int hr::peace::simon::tobuild
 
auto hr::peace::aNext = addHook(hooks_nextland, 100, getNext)
 
auto hr::ah = addHook(hooks_args, 0, read_mode_args)
 

Detailed Description

Yendor Quest/Challenge, Pure Tactics Mode, Peace Mode.

Variable Documentation

◆ chelp [1/2]

const EX char* hr::yendor::chelp
Initial value:
=
"There are many possible solutions to the Yendor Quest. In the Yendor "
"Challenge, you will try many of them!\n\n"
"Each challenge takes part in a specific land, and you have to use what "
"you have available.\n\n"
"You need to obtain an Orb of Yendor in the normal game to activate "
"this challenge, and (ever) collect 10 treasures in one or two lands "
"to activate a specific level.\n\n"
"After you complete each challenge, you can try it again, on a harder "
"difficulty level.\n\n"
"All the solutions showcased in the Yendor Challenge work in the normal "
"play too. However, passages to other lands, and (sometimes) some land features "
"are disabled in the Yendor "
"Challenge, so that you have to use the expected method. Also, "
"the generation rules are changed slightly for the Palace "
"and Minefield while you are looking for the Orb of Yendor, "
"to make the challenge more balanced "
"(but these changes are also active during the normal Yendor Quest).\n\n"
"You get 1000 points for each challenge won, and 1 extra point for "
"each extra difficulty level."

◆ hooks

auto hr::yendor::hooks
Initial value:
= addHook(clearmemory, 0, [] () {
yendor::yii = NOYENDOR; yendor::yi.clear();
}) + addHook(hooks_removecells, 0, [] () {
eliminate_if(yendor::yi, [] (yendorinfo& i) {
for(int j=0; j<YDIST; j++) if(is_cell_removed(i.path[j])) {
DEBB(DF_MEMORY, ("removing a Yendor"));
if(&yi[yii] == &i) yii = NOYENDOR;
return true;
}
return false;
});
})

◆ simonlevels

eLand hr::peace::simonlevels[]
Initial value:
= {
laCrossroads, laCrossroads2, laDesert, laCaves, laAlchemist, laRlyeh, laEmerald,
laWineyard, laDeadCaves, laRedRock, laPalace,
laLivefjord, laDragon,
laNone
}

◆ explorelevels

eLand hr::peace::explorelevels[]
Initial value:
= {
laBurial, laTortoise, laCamelot, laPalace,
laIce, laJungle, laMirror, laDryForest, laCaribbean, laOcean, laZebra,
laOvergrown, laWhirlwind, laWarpCoast, laReptile,
laElementalWall, laAlchemist,
laNone
}

◆ chelp [2/2]

const char* hr::peace::chelp
Initial value:
=
"In the peaceful mode, you just explore the world, "
"without any battles; there are also several "
"navigational puzzles available. In the memory game, "
"you have to collect as many Dodecahedra as you can, "
"and return to the starting point -- hyperbolic geometry "
"makes this extremely difficult! Other hyperbolic puzzles "
"include the Burial Grounds (excavate the treasures "
"using your magical sword), Galápagos (try to find an adult "
"tortoise matching the baby), Camelot (find the center of "
"a large hyperbolic circle), and Palace (follow the mouse). "
"Other places listed are for exploration."