crystal:: added a conduct for doing Camelot without compasses

This commit is contained in:
Zeno Rogue 2018-12-25 23:54:34 +01:00
parent 8e4e627a37
commit 444bb762d7
4 changed files with 19 additions and 1 deletions

View File

@ -22,6 +22,8 @@ bool pure() {
bool view_coordinates = false;
bool view_east = false;
bool used_compass_inside;
const int MAXDIM = 7;
typedef array<int, MAXDIM> coord;

View File

@ -668,8 +668,11 @@ bool drawItemType(eItem it, cell *c, const transmatrix& V, int icol, int pticks,
else if(it == itCompass) {
transmatrix V2;
if(geometry == gCrystal)
if(geometry == gCrystal) {
if(crystal::compass_probability <= 0) return true;
if(cwt.at->land == laCamelot && celldistAltRelative(cwt.at) < 0) crystal::used_compass_inside = true;
V2 = V * spin(crystal::compass_angle() + M_PI);
}
else {
cell *c1 = c ? findcompass(c) : NULL;
if(c1) {

View File

@ -710,6 +710,18 @@ string generateHelpForLand(eLand l) {
);
}
if(l == laCamelot && geometry == gCrystal) {
if(!crystal::used_compass_inside) s += XLAT("\nSpecial conduct (still valid)\n");
else s += XLAT("\nSpecial conduct failed:\n");
s += XLAT(
"Do not use compases.\n\n");
s += XLAT("Crystal Camelot is an octahedron in 'pure' 3D crystal geometry (and a similar polytope in other pure crystals), "
"and an Euclidean ball in bitruncated/Goldberg crystals.");
}
auto lv = land_validity(specialland);
if(lv.flags & lv::display_in_help)
s += "\n\n" + XLAT(lv.msg);

View File

@ -267,6 +267,7 @@ void initgame() {
timerghost = true;
truelotus = 0;
survivalist = true;
crystal::used_compass_inside = false;
got_survivalist = false;
#if CAP_INV
if(inv::on) inv::init();