1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-30 17:02:51 +00:00
This commit is contained in:
Zeno Rogue 2017-07-24 02:02:32 +02:00
parent 5f8c59546a
commit fdc1ac1e6e
6 changed files with 53 additions and 23 deletions

View File

@ -1,6 +1,6 @@
#define VER "10.0c" #define VER "10.0d"
#define VERNUM 10003 #define VERNUM 10004
#define VERNUM_HEX 0xA003 #define VERNUM_HEX 0xA004
#define GEN_M 0 #define GEN_M 0
#define GEN_F 1 #define GEN_F 1

View File

@ -207,6 +207,13 @@ namespace inv {
bool mirroring; bool mirroring;
const char* helptext =
"You are playing in the Orb Strategy Mode. Collecting treasure "
"gives you access to magical Orb powers. In this mode, "
"unlocking requirements are generally higher, and "
"several quests and lands "
"give you extremely powerful Orbs of the Mirror.\n";
void show() { void show() {
gamescreen(2); gamescreen(2);
@ -255,7 +262,7 @@ namespace inv {
int tcol = remaining[i] ? darkenedby(icol, 1) : 0; int tcol = remaining[i] ? darkenedby(icol, 1) : 0;
if(remaining[i] != 1 || !gg) if(remaining[i] != 1 || !gg)
displaystr(px, py, 2, gg?rad:rad*3/2, remaining[i] == 0 ? "X" : remaining[i] == 1 ? "o" : its(remaining[i]), tcol, 8); displaystr(px, py, 2, gg?rad:rad*3/2, remaining[i] <= 0 ? "X" : remaining[i] == 1 ? "o" : its(remaining[i]), tcol, 8);
} }
bool b = hypot(mousex-px, mousey-py) < rad; bool b = hypot(mousex-px, mousey-py) < rad;
@ -314,9 +321,9 @@ namespace inv {
if(col) if(col)
displaystr(vid.xres/2, vid.yres - vid.fsize*4, 2, vid.fsize, XLAT(olrDescriptions[olr], cwt.c->land, tr, treasureType(cwt.c->land)), col, 8); displaystr(vid.xres/2, vid.yres - vid.fsize*4, 2, vid.fsize, XLAT(olrDescriptions[olr], cwt.c->land, tr, treasureType(cwt.c->land)), col, 8);
dialog::displayPageButtons(3, 0);
} }
} }
dialog::displayPageButtons(3, 0);
mouseovers = ""; mouseovers = "";
keyhandler = [] (int sym, int uni) { keyhandler = [] (int sym, int uni) {
if(plain) dialog::handleNavigation(sym, uni); if(plain) dialog::handleNavigation(sym, uni);

View File

@ -1031,7 +1031,6 @@ ld orbprizefun(int tr) {
} }
ld orbcrossfun(int tr) { ld orbcrossfun(int tr) {
if(inv::on) return tr >= 50 ? 1 : 0;
if(tr < 10) return 0; if(tr < 10) return 0;
if(tr > 25) return 1; if(tr > 25) return 1;
return (tr*2 + 50) / 100.; return (tr*2 + 50) / 100.;
@ -1156,7 +1155,7 @@ void placeCrossroadOrbs(cell *c) {
if(oi.orb == itOrbSafety && c->land == laCrossroads5) continue; if(oi.orb == itOrbSafety && c->land == laCrossroads5) continue;
int mul = c->land == laCrossroads5 ? 10 : 1; int mul = c->land == laCrossroads5 ? 10 : 1;
int gch = oi.gchance; int gch = oi.gchance;
gch /= orbcrossfun(treas); if(!inv::on) gch /= orbcrossfun(treas); else gch /= 2;
if(hrand(gch) >= mul) continue; if(hrand(gch) >= mul) continue;
if(hrand(50+items[itHyperstone]) >= 50) continue; if(hrand(50+items[itHyperstone]) >= 50) continue;
c->item = oi.orb; c->item = oi.orb;
@ -4676,7 +4675,7 @@ void setdist(cell *c, int d, cell *from) {
if(d == 7 && c->land == laDeadCaves && c->wall == waDeadwall && hrand(1000) < items[itSilver] + hard && !safety) if(d == 7 && c->land == laDeadCaves && c->wall == waDeadwall && hrand(1000) < items[itSilver] + hard && !safety)
c->monst = moSeep; c->monst = moSeep;
if(d == 7 && c->wall == waVinePlant && hrand(100) < (randomPatternsMode ? 2 : 10)) if(d == 7 && c->wall == waVinePlant && hrand(100) < (randomPatternsMode ? 2 : 10) && !peace::on)
c->monst = moVineSpirit; c->monst = moVineSpirit;
if(d == 7 && c->land == laOcean && !safety) { if(d == 7 && c->land == laOcean && !safety) {
@ -5283,7 +5282,7 @@ void setdist(cell *c, int d, cell *from) {
if(isCrossroads(c->land)) { if(isCrossroads(c->land)) {
if(purehepta && c->land == laCrossroads5 && hrand(100) < 60) if(purehepta && c->land == laCrossroads5 && hrand(100) < 60)
c->wall = waBarrier; c->wall = waBarrier;
else if(c->type == 6 && items[itShard] >= 10 && hrand(8000) < 120*orbcrossfun(items[itShard])) else if(c->type == 6 && !inv::on && items[itShard] >= 10 && hrand(8000) < 120*orbcrossfun(items[itShard]))
c->wall = hrand(2) ? waMirror : waCloud; c->wall = hrand(2) ? waMirror : waCloud;
else if(c->type == 6 && tactic::on && isCrossroads(tactic::lasttactic) && hrand(8000) < 120) else if(c->type == 6 && tactic::on && isCrossroads(tactic::lasttactic) && hrand(8000) < 120)
c->wall = hrand(2) ? waMirror : waCloud; c->wall = hrand(2) ? waMirror : waCloud;

View File

@ -5784,5 +5784,8 @@ S("cheats", "oszustwa")
S("help for keyboard user", "pomoc dla użytkowników klawiatury") S("help for keyboard user", "pomoc dla użytkowników klawiatury")
S("mark heptagons", "oznacz siedmiokąty") S("mark heptagons", "oznacz siedmiokąty")
S("Collect as many Dodecahedra as you can, then return here!",
"Zbierz jak najwięcej Dwunastościanów i tu wróć!")
#undef Orb #undef Orb

View File

@ -124,6 +124,7 @@ void basicrep(string& x) {
rep(x, "%łeś0", choose3(playergender(), "łeś", "łaś", "łoś")); rep(x, "%łeś0", choose3(playergender(), "łeś", "łaś", "łoś"));
rep(x, "%ąłeś0", choose3(playergender(), "ąłeś", "ęłaś", "ęłoś")); rep(x, "%ąłeś0", choose3(playergender(), "ąłeś", "ęłaś", "ęłoś"));
rep(x, "%ógł0", choose3(playergender(), "ógł", "ogła", "ogło")); rep(x, "%ógł0", choose3(playergender(), "ógł", "ogła", "ogło"));
rep(x, "%ł0", choose3(playergender(), "ł", "ła", "ło"));
} }
if(l == 3) { if(l == 3) {

View File

@ -927,11 +927,11 @@ vector<monster*> active, nonvirtual, additional;
cell *findbaseAround(hyperpoint p, cell *around) { cell *findbaseAround(hyperpoint p, cell *around) {
cell *best = around; cell *best = around;
double d0 = intval(p, gmatrix[around] * C0); double d0 = intval(p, ggmatrix(around) * C0);
for(int i=0; i<around->type; i++) { for(int i=0; i<around->type; i++) {
cell *c2 = around->mov[i]; cell *c2 = around->mov[i];
if(c2 && gmatrix.count(c2)) { if(c2) {
double d1 = intval(p, gmatrix[c2] * C0); double d1 = intval(p, ggmatrix(c2) * C0);
if(d1 < d0) { best = c2; d0 = d1; } if(d1 < d0) { best = c2; d0 = d1; }
} }
} }
@ -1730,7 +1730,7 @@ void movePlayer(monster *m, int delta) {
if(c2->wall == waClosePlate || c2->wall == waOpenPlate) if(c2->wall == waClosePlate || c2->wall == waOpenPlate)
toggleGates(c2, c2->wall); toggleGates(c2, c2->wall);
if(c2->item == itOrbYendor) yendor::check(c2); if(c2->item == itOrbYendor && !peace::on) yendor::check(c2);
collectItem(c2); collectItem(c2);
} }
} }
@ -2156,10 +2156,15 @@ void moveBullet(monster *m, int delta) {
continue; continue;
} }
// Hedgehog Warriors only killable outside of the 45 degree angle // Hedgehog Warriors only killable outside of the 45 degree angle
if(m2->type == moHedge) { if(m2->type == moHedge && !peace::on) {
hyperpoint h = inverse(m2->pat) * m->pat * C0; hyperpoint h = inverse(m2->pat) * m->pat * C0;
if(h[0] > fabsl(h[1])) { m->dead = true; continue; } if(h[0] > fabsl(h[1])) { m->dead = true; continue; }
} }
if(peace::on && !isIvy(m2->type)) {
m->dead = true;
m2->stunoff = curtime + 600;
continue;
}
// //
if((m2->type == moPalace || m2->type == moFatGuard || m2->type == moSkeleton || if((m2->type == moPalace || m2->type == moFatGuard || m2->type == moSkeleton ||
m2->type == moVizier || isMetalBeast(m2->type) || m2->type == moTortoise || m2->type == moVizier || isMetalBeast(m2->type) || m2->type == moTortoise ||
@ -2371,7 +2376,7 @@ void moveMonster(monster *m, int delta) {
break; break;
} }
} }
else if(m->type == moWolf) { else if(m->type == moWolf && !peace::on) {
cell *cnext = c; cell *cnext = c;
for(int i=0; i<c->type; i++) { for(int i=0; i<c->type; i++) {
cell *c2 = c->mov[i]; cell *c2 = c->mov[i];
@ -2408,7 +2413,7 @@ void moveMonster(monster *m, int delta) {
directi = 0; directi = 0;
} }
} }
else if(!direct && !invismove) { else if(!direct && !invismove && !peace::on) {
for(int i=0; i<players; i++) for(int i=0; i<players; i++)
if(m->trackroute(pc[i]->pat, step) && (!direct || intval(pc[i]->pat*C0, m->pat*C0) < intval(goal*C0,m->pat*C0))) { if(m->trackroute(pc[i]->pat, step) && (!direct || intval(pc[i]->pat*C0, m->pat*C0) < intval(goal*C0,m->pat*C0))) {
goal = pc[i]->pat; goal = pc[i]->pat;
@ -2418,7 +2423,7 @@ void moveMonster(monster *m, int delta) {
} }
} }
if(!direct) while(true) { if(!direct && !peace::on) while(true) {
if(m->trackroute(gmatrix[c], step)) if(m->trackroute(gmatrix[c], step))
goal = gmatrix[c]; goal = gmatrix[c];
cell *cnext = c; cell *cnext = c;
@ -2442,7 +2447,7 @@ void moveMonster(monster *m, int delta) {
// at most 45 degrees // at most 45 degrees
if(h[0] < fabsl(h[1])) return; if(h[0] < fabsl(h[1])) return;
} }
else { else if(!peace::on) {
nat = nat * rspintox(inverse(m->pat) * goal * C0); nat = nat * rspintox(inverse(m->pat) * goal * C0);
} }
} }
@ -2474,7 +2479,10 @@ void moveMonster(monster *m, int delta) {
igo_retry: igo_retry:
if(igo == IGO) { if(igo == IGO && peace::on)
nat0 = nat0 * spin(rand() % 16);
else if(igo >= IGO) {
if(m->type == moHerdBull) m->type = moRagingBull; if(m->type == moHerdBull) m->type = moRagingBull;
return; return;
} }
@ -2486,7 +2494,7 @@ void moveMonster(monster *m, int delta) {
nat = nat0 * spin(igospan[igo]) * xpush(step) * spin(-igospan[igo]);; // * spintox(wherePC); nat = nat0 * spin(igospan[igo]) * xpush(step) * spin(-igospan[igo]);; // * spintox(wherePC);
if(m->type != moRagingBull) if(m->type != moRagingBull && !peace::on)
if(intval(nat*C0, goal*C0) >= intval(m->pat*C0, goal*C0) && !stunned && !carried) { if(intval(nat*C0, goal*C0) >= intval(m->pat*C0, goal*C0) && !stunned && !carried) {
igo++; goto igo_retry; } igo++; goto igo_retry; }
@ -2506,10 +2514,13 @@ void moveMonster(monster *m, int delta) {
if(d < SCALE2 * 0.1) crashintomon = m2; if(d < SCALE2 * 0.1) crashintomon = m2;
} }
if(!peace::on)
for(int i=0; i<players; i++) for(int i=0; i<players; i++)
if(crashintomon == pc[i]) if(crashintomon == pc[i])
pc[i]->dead = true; pc[i]->dead = true;
if(peace::on) ;
else if(crashintomon && isMimic(crashintomon->type)) { else if(crashintomon && isMimic(crashintomon->type)) {
killMonster(crashintomon, m->type); killMonster(crashintomon, m->type);
crashintomon = NULL; crashintomon = NULL;
@ -2537,7 +2548,7 @@ void moveMonster(monster *m, int delta) {
igo++; goto igo_retry; igo++; goto igo_retry;
} }
if(isPlayerOn(c2)) { if(isPlayerOn(c2) && !peace::on) {
bool usetongue = false; bool usetongue = false;
if(isSlimeMover(m->type) || m->type == moWaterElemental) usetongue = true; if(isSlimeMover(m->type) || m->type == moWaterElemental) usetongue = true;
if(isWatery(c2) && !survivesWater(m->type) && !m->inBoat) usetongue = true; if(isWatery(c2) && !survivesWater(m->type) && !m->inBoat) usetongue = true;
@ -2671,6 +2682,8 @@ void moveMonster(monster *m, int delta) {
} }
} }
if(peace::on && c2->mpdist > 7) return;
if(!(m->type == moRoseBeauty && c2->land != laRose)) { if(!(m->type == moRoseBeauty && c2->land != laRose)) {
if(stunned ? passable(c2, m->base, P_BLOW | reflectflag) : passable_for(m->type, c2, m->base, P_CHAIN | reflectflag)) { if(stunned ? passable(c2, m->base, P_BLOW | reflectflag) : passable_for(m->type, c2, m->base, P_CHAIN | reflectflag)) {
if(c2 != m->base && m->type == moButterfly) if(c2 != m->base && m->type == moButterfly)
@ -2678,8 +2691,11 @@ void moveMonster(monster *m, int delta) {
m->rebasePat(nat); m->rebasePat(nat);
if(m->type == moRagingBull && step > 1e-6) m->stunoff = CHARGING; if(m->type == moRagingBull && step > 1e-6) m->stunoff = CHARGING;
} }
else if(m->type == moRagingBull && m->stunoff == CHARGING) else {
m->stunoff = curtime + BULLSTUN; if(peace::on) { igo++; goto igo_retry; }
if(m->type == moRagingBull && m->stunoff == CHARGING)
m->stunoff = curtime + BULLSTUN;
}
} }
if(direct) { if(direct) {
@ -3124,6 +3140,10 @@ bool drawMonster(const transmatrix& V, cell *c, const transmatrix*& Vboat, trans
queuepoly(mmscale(view, 1.15), shPHead, col); queuepoly(mmscale(view, 1.15), shPHead, col);
ShadowV(view, shPHead); ShadowV(view, shPHead);
} }
else if(peace::on) {
queuepolyat(mmscale(view, 1.15), shDisk, col, PPR_MISSILE);
ShadowV(view, shPHead);
}
else { else {
transmatrix t = view * spin(curtime / 50.0); transmatrix t = view * spin(curtime / 50.0);
queuepoly(mmscale(t, 1.15), shKnife, col); queuepoly(mmscale(t, 1.15), shKnife, col);