mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 17:40:36 +00:00
bow changes mode, disables achievements, displayed in rich presence and bottom line
This commit is contained in:
parent
4ddccfed8e
commit
079094799d
@ -108,6 +108,7 @@ EX bool wrongMode(char flags) {
|
|||||||
if(cheater) return true;
|
if(cheater) return true;
|
||||||
if(casual) return true;
|
if(casual) return true;
|
||||||
if(flags == rg::global) return false;
|
if(flags == rg::global) return false;
|
||||||
|
if(bow::weapon) return true;
|
||||||
|
|
||||||
if(flags != rg::special_geometry && flags != rg::special_geometry_nicewalls) {
|
if(flags != rg::special_geometry && flags != rg::special_geometry_nicewalls) {
|
||||||
if(!BITRUNCATED) return true;
|
if(!BITRUNCATED) return true;
|
||||||
@ -636,6 +637,7 @@ EX void achievement_score(int cat, int number) {
|
|||||||
#ifdef HAVE_ACHIEVEMENTS
|
#ifdef HAVE_ACHIEVEMENTS
|
||||||
if(cheater) return;
|
if(cheater) return;
|
||||||
if(casual) return;
|
if(casual) return;
|
||||||
|
if(bow::weapon) return;
|
||||||
LATE( achievement_score(cat, number); )
|
LATE( achievement_score(cat, number); )
|
||||||
if(disksize) return;
|
if(disksize) return;
|
||||||
if(cat == LB_HALLOWEEN) {
|
if(cat == LB_HALLOWEEN) {
|
||||||
@ -744,6 +746,7 @@ EX void achievement_final(bool really_final) {
|
|||||||
}
|
}
|
||||||
if(cheater) return;
|
if(cheater) return;
|
||||||
if(casual) return;
|
if(casual) return;
|
||||||
|
if(bow::weapon) return;
|
||||||
|
|
||||||
#if CAP_TOUR
|
#if CAP_TOUR
|
||||||
if(tour::on) return;
|
if(tour::on) return;
|
||||||
@ -867,6 +870,7 @@ EX void achievement_victory(bool hyper) {
|
|||||||
#ifdef HAVE_ACHIEVEMENTS
|
#ifdef HAVE_ACHIEVEMENTS
|
||||||
if(cheater) return;
|
if(cheater) return;
|
||||||
if(casual) return;
|
if(casual) return;
|
||||||
|
if(bow::weapon) return;
|
||||||
if(geometry) return;
|
if(geometry) return;
|
||||||
if(CHANGED_VARIATION) return;
|
if(CHANGED_VARIATION) return;
|
||||||
if(randomPatternsMode) return;
|
if(randomPatternsMode) return;
|
||||||
@ -958,6 +962,7 @@ EX string get_rich_presence_text() {
|
|||||||
if(inv::on) res += "OSM ";
|
if(inv::on) res += "OSM ";
|
||||||
if(multi::players > 1) res += "multi ";
|
if(multi::players > 1) res += "multi ";
|
||||||
if(casual) res += "casual ";
|
if(casual) res += "casual ";
|
||||||
|
if(bow::weapon) res += bow::style == bow::cbBull ? "bow/bull " : "bow/geo ";
|
||||||
|
|
||||||
if(cheater || among(cwt.at->land, laCanvas, laCA))
|
if(cheater || among(cwt.at->land, laCanvas, laCA))
|
||||||
return res + "(?)";
|
return res + "(?)";
|
||||||
|
2
hud.cpp
2
hud.cpp
@ -698,6 +698,8 @@ EX void drawStats() {
|
|||||||
if(peace::on) vers += " peace";
|
if(peace::on) vers += " peace";
|
||||||
if(racing::on) vers += " racing";
|
if(racing::on) vers += " racing";
|
||||||
if(daily::on) vers += " strange";
|
if(daily::on) vers += " strange";
|
||||||
|
if(bow::weapon && bow::style == bow::cbBull) vers += " b/bull";
|
||||||
|
if(bow::weapon && bow::style == bow::cbGeodesic) vers += " b/geo";
|
||||||
if(land_structure != default_land_structure())
|
if(land_structure != default_land_structure())
|
||||||
vers += land_structure_name(true);
|
vers += land_structure_name(true);
|
||||||
if(princess::challenge) vers += " Princess";
|
if(princess::challenge) vers += " Princess";
|
||||||
|
@ -438,7 +438,7 @@ EX namespace scores {
|
|||||||
/** \brief the amount of boxes reserved for each hr::score item */
|
/** \brief the amount of boxes reserved for each hr::score item */
|
||||||
#define MAXBOX 500
|
#define MAXBOX 500
|
||||||
/** \brief currently used boxes in hr::score */
|
/** \brief currently used boxes in hr::score */
|
||||||
#define POSSCORE 406
|
#define POSSCORE 408
|
||||||
/** \brief a struct to keep local score from an earlier game */
|
/** \brief a struct to keep local score from an earlier game */
|
||||||
struct score {
|
struct score {
|
||||||
/** \brief version used */
|
/** \brief version used */
|
||||||
@ -933,6 +933,9 @@ EX void applyBoxes() {
|
|||||||
applyBoxI(itCurseWater, true);
|
applyBoxI(itCurseWater, true);
|
||||||
list_invorb();
|
list_invorb();
|
||||||
|
|
||||||
|
applyBoxEnum(bow::weapon, "weapon choice");
|
||||||
|
applyBoxEnum(bow::style, "crossbow style");
|
||||||
|
|
||||||
if(POSSCORE != boxid) printf("ERROR: %d boxes\n", boxid);
|
if(POSSCORE != boxid) printf("ERROR: %d boxes\n", boxid);
|
||||||
if(isize(invorb)) { println(hlog, "ERROR: Orbs not taken into account"); exit(1); }
|
if(isize(invorb)) { println(hlog, "ERROR: Orbs not taken into account"); exit(1); }
|
||||||
}
|
}
|
||||||
|
@ -981,6 +981,11 @@ void save_mode_data(hstream& f) {
|
|||||||
if(casual) {
|
if(casual) {
|
||||||
f.write<char>(1);
|
f.write<char>(1);
|
||||||
}
|
}
|
||||||
|
if(bow::weapon) {
|
||||||
|
f.write<char>(2);
|
||||||
|
f.write<char>(bow::weapon);
|
||||||
|
f.write<char>(bow::style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EX modecode_t modecode(int mode) {
|
EX modecode_t modecode(int mode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user