mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
Knights and quit-menu now display circle sizes only if HR knows the formula
This commit is contained in:
parent
85d5ca04cf
commit
986e66ee4b
14
game.cpp
14
game.cpp
@ -6849,12 +6849,20 @@ long long circlesize[100], disksize[100];
|
|||||||
ld circlesizeD[10000];
|
ld circlesizeD[10000];
|
||||||
int lastsize;
|
int lastsize;
|
||||||
|
|
||||||
|
bool sizes_known() {
|
||||||
|
return euclid || (geometry == gNormal && !gp::on);
|
||||||
|
}
|
||||||
|
|
||||||
void computeSizes() {
|
void computeSizes() {
|
||||||
lastsize = nonbitrunc ? 44 : 76;
|
lastsize = nonbitrunc ? 44 : 76;
|
||||||
|
|
||||||
circlesize[0] = 1;
|
circlesize[0] = 1;
|
||||||
|
|
||||||
if(!nonbitrunc) {
|
if(euclid) {
|
||||||
|
for(int i=1; i<100; i++) circlesize[i] = 6 * i;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(!nonbitrunc) {
|
||||||
circlesize[1] = 1*7;
|
circlesize[1] = 1*7;
|
||||||
circlesize[2] = 2*7;
|
circlesize[2] = 2*7;
|
||||||
circlesize[3] = 4*7;
|
circlesize[3] = 4*7;
|
||||||
@ -6922,13 +6930,13 @@ void knightFlavorMessage(cell *c2) {
|
|||||||
else if(msgid == 7 && items[itSpice] < 10 && !peace::on) {
|
else if(msgid == 7 && items[itSpice] < 10 && !peace::on) {
|
||||||
addMessage(XLAT("\"Train in the Desert first!\""));
|
addMessage(XLAT("\"Train in the Desert first!\""));
|
||||||
}
|
}
|
||||||
else if(msgid == 8) {
|
else if(msgid == 8 && sizes_known()) {
|
||||||
if(rad <= lastsize)
|
if(rad <= lastsize)
|
||||||
addMessage(XLAT("\"Our Table seats %1 Knights!\"", llts(circlesize[rad])));
|
addMessage(XLAT("\"Our Table seats %1 Knights!\"", llts(circlesize[rad])));
|
||||||
else
|
else
|
||||||
addMessage(XLAT("\"By now, you should have your own formula, you know?\""));
|
addMessage(XLAT("\"By now, you should have your own formula, you know?\""));
|
||||||
}
|
}
|
||||||
else if(msgid == 9 && rad <= lastsize) {
|
else if(msgid == 9 && rad <= lastsize && sizes_known()) {
|
||||||
addMessage(XLAT("\"There are %1 floor tiles inside our Table!\"", llts(disksize[rad])));
|
addMessage(XLAT("\"There are %1 floor tiles inside our Table!\"", llts(disksize[rad])));
|
||||||
}
|
}
|
||||||
else if(msgid == 10 && !items[itPirate] && !items[itWhirlpool] && !peace::on) {
|
else if(msgid == 10 && !items[itPirate] && !items[itWhirlpool] && !peace::on) {
|
||||||
|
2
quit.cpp
2
quit.cpp
@ -242,7 +242,7 @@ hint hints[] = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
[]() { return !canmove && geometry == gNormal && celldist(cwt.c) >= 50; },
|
[]() { return !canmove && sizes_known() && celldist(cwt.c) >= 50; },
|
||||||
[]() {
|
[]() {
|
||||||
int c = celldist(cwt.c);
|
int c = celldist(cwt.c);
|
||||||
string s = circlesizestr(c);
|
string s = circlesizestr(c);
|
||||||
|
Loading…
Reference in New Issue
Block a user