mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
tactic:: removed lasttactic in favor of specialland. No more treasures on Crossroads in equid lands. Fixed warped walls and CR4 in a4.
This commit is contained in:
parent
10f244f785
commit
9d91390677
@ -60,7 +60,7 @@ bool checkBarriersBack(cellwalker bb, int q, bool cross) {
|
||||
|
||||
// warp coasts use a different algorithm when has_nice_dual() is on
|
||||
bool warped_version(eLand l1, eLand l2) {
|
||||
return has_nice_dual() && (l1 == laWarpCoast || l1 == laWarpSea || l2 == laWarpSea || l2 == laWarpCoast);
|
||||
return (has_nice_dual() && (l1 == laWarpCoast || l1 == laWarpSea || l2 == laWarpSea || l2 == laWarpCoast)) || ((S3==4) && !nonbitrunc);
|
||||
}
|
||||
|
||||
bool checkBarriersNowall(cellwalker bb, int q, int dir, eLand l1=laNone, eLand l2=laNone) {
|
||||
@ -742,7 +742,7 @@ bool buildBarrierNowall(cell *c, eLand l2, bool force) {
|
||||
for(int j=0; j<c->type; j++) swap(ds[j], ds[hrand(j+1)]);
|
||||
|
||||
for(int i=0; i<c->type; i++) {
|
||||
int d = ds[i];
|
||||
int d = (S3>3 && nonbitrunc) ? (2+(i&1)) : ds[i];
|
||||
/* if(warpv && gp::on) {
|
||||
d = hrand(c->type); */
|
||||
if(warpv && c->mov[d] && c->mov[d]->mpdist < c->mpdist) continue;
|
||||
|
@ -444,7 +444,7 @@ void buildEquidistant(cell *c) {
|
||||
c->landparam = 50;
|
||||
return;
|
||||
} */
|
||||
if(geometry) return;
|
||||
if(sphere || euclid) return;
|
||||
eLand b = c->land;
|
||||
if(chaosmode && !inmirror(b)) return;
|
||||
if(!b) {
|
||||
@ -1305,7 +1305,7 @@ void moreBigStuff(cell *c) {
|
||||
|
||||
if(c->land == laOcean || c->land == laWhirlpool) {
|
||||
bool fullwhirlpool = false;
|
||||
if(tactic::on && tactic::lasttactic == laWhirlpool)
|
||||
if(tactic::on && specialland == laWhirlpool)
|
||||
fullwhirlpool = true;
|
||||
if(yendor::on && yendor::clev().l == laWhirlpool)
|
||||
fullwhirlpool = true;
|
||||
|
2
game.cpp
2
game.cpp
@ -6083,7 +6083,7 @@ void activateSafety(eLand l) {
|
||||
if(l == laClearing) l = laOvergrown;
|
||||
if(l == laWhirlpool) l = laOcean;
|
||||
if(l == laCrossroads5) l = laCrossroads2; // could not fit!
|
||||
if(l == laCamelot && !(tactic::on && tactic::lasttactic == laCamelot))
|
||||
if(l == laCamelot && !(tactic::on && specialland == laCamelot))
|
||||
l = laCrossroads;
|
||||
firstland = l;
|
||||
safetyland = l;
|
||||
|
1
hyper.h
1
hyper.h
@ -2307,7 +2307,6 @@ int getHemisphere(cell *c, int which);
|
||||
namespace tactic {
|
||||
extern bool on;
|
||||
extern bool trailer;
|
||||
extern eLand lasttactic;
|
||||
}
|
||||
|
||||
namespace yendor {
|
||||
|
@ -2087,7 +2087,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
else if(!ctof(c) && hyperstonesUnlocked() && hrand(8000) < 100 && !gp::on)
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
else if(!ctof(c) && tactic::on && isCrossroads(tactic::lasttactic) && hrand(8000) < 120 && !gp::on)
|
||||
else if(!ctof(c) && tactic::on && isCrossroads(specialland) && hrand(8000) < 120 && !gp::on)
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
else if(c->land == laCrossroads4 && hrand(24000) < 10 && tactic::on)
|
||||
c->wall = waRose;
|
||||
|
@ -582,7 +582,7 @@ void countHyperstoneQuest(int& i1, int& i2) {
|
||||
|
||||
bool hyperstonesUnlocked() {
|
||||
int i1, i2;
|
||||
if(tactic::on && isCrossroads(tactic::lasttactic) && !tactic::trailer) return true;
|
||||
if(tactic::on && isCrossroads(specialland) && !tactic::trailer) return true;
|
||||
countHyperstoneQuest(i1, i2);
|
||||
return i1 == i2;
|
||||
}
|
||||
@ -756,7 +756,7 @@ eLand getNewLand(eLand old) {
|
||||
if(old == laEWater && lchance(old)) return hrand(2) ? laEEarth : laEAir;
|
||||
if(old == laEFire && lchance(old)) return hrand(2) ? laEEarth : laEAir;
|
||||
|
||||
if(tactic::on && !(tactic::trailer && old == firstland)) return firstland;
|
||||
if(tactic::on && !(tactic::trailer && old == specialland)) return specialland;
|
||||
if(weirdhyperbolic && specialland != old) return specialland;
|
||||
|
||||
if(yendor::on && (yendor::clev().flags & YF_WALLS)) {
|
||||
|
@ -518,8 +518,8 @@ void placeCrossroadOrbs(cell *c) {
|
||||
else continue;
|
||||
}
|
||||
|
||||
if(tactic::on) {
|
||||
if(isCrossroads(tactic::lasttactic) && (oi.flags & orbgenflags::NO_TACTIC))
|
||||
if(tactic::on && isCrossroads(specialland)) {
|
||||
if(oi.flags & orbgenflags::NO_TACTIC)
|
||||
continue;
|
||||
else mintreas = 0;
|
||||
}
|
||||
|
22
system.cpp
22
system.cpp
@ -87,9 +87,11 @@ void initgame() {
|
||||
firstland = safetyland;
|
||||
}
|
||||
|
||||
if(peace::on) firstland = specialland;
|
||||
bool use_special_land =
|
||||
!safety &&
|
||||
(peace::on || tactic::on || geometry || gp::on);
|
||||
|
||||
if(tactic::on && geometry) specialland = firstland;
|
||||
if(use_special_land) firstland = specialland;
|
||||
|
||||
if(firstland == laNone || firstland == laBarrier)
|
||||
firstland = laCrossroads;
|
||||
@ -99,17 +101,16 @@ void initgame() {
|
||||
if(firstland == laHauntedWall) firstland = laGraveyard;
|
||||
if(firstland == laMercuryRiver) firstland = laTerracotta;
|
||||
if(firstland == laMountain && !tactic::on) firstland = laJungle;
|
||||
if(isGravityLand(firstland) && !tactic::on) firstland = weirdhyperbolic ? laCrossroads4 : laCrossroads;
|
||||
if((isGravityLand(firstland) && !isCyclic(firstland)) || firstland == laOcean)
|
||||
firstland = weirdhyperbolic ? laCrossroads4 : laCrossroads;
|
||||
|
||||
cwt.c = currentmap->gamestart(); cwt.spin = 0; cwt.mirrored = false;
|
||||
cwt.c->land = ((geometry || gp::on) && !safety) ? specialland : firstland;
|
||||
cwt.c->land = firstland;
|
||||
|
||||
chaosAchieved = false;
|
||||
|
||||
if(firstland == laElementalWall) cwt.c->land = randomElementalLand();
|
||||
|
||||
if((tactic::on || weirdhyperbolic) && (isGravityLand(firstland) || firstland == laOcean) && firstland != laMountain)
|
||||
cwt.c->land = weirdhyperbolic ? laCrossroads4 : nonbitrunc ? laCrossroads : laCrossroads2;
|
||||
createMov(cwt.c, 0);
|
||||
|
||||
setdist(cwt.c, BARLEV, NULL);
|
||||
@ -141,7 +142,6 @@ void initgame() {
|
||||
if(tactic::on && tactic::trailer)
|
||||
items[treasureType(firstland)] = trailer_cash0;
|
||||
|
||||
tactic::lasttactic = firstland;
|
||||
yendor::lastchallenge = yendor::challenge;
|
||||
|
||||
yendor::init(2);
|
||||
@ -776,16 +776,16 @@ void saveStats(bool emergency = false) {
|
||||
int xcode = modecode();
|
||||
|
||||
if(tactic::on) {
|
||||
int score = items[treasureType(tactic::lasttactic)];
|
||||
int score = items[treasureType(specialland)];
|
||||
|
||||
if(score) {
|
||||
int c =
|
||||
anticheat::certify(dnameof(tactic::lasttactic), turncount, t, (int) timerstart,
|
||||
anticheat::certify(dnameof(specialland), turncount, t, (int) timerstart,
|
||||
xcode*999 + tactic::id + 256 * score);
|
||||
fprintf(f, "TACTICS %s %d %d %d %d %d %d %d %d date: %s\n", VER,
|
||||
tactic::id, tactic::lasttactic, score, turncount, t, int(timerstart),
|
||||
tactic::id, specialland, score, turncount, t, int(timerstart),
|
||||
c, xcode, buf);
|
||||
tactic::record(tactic::lasttactic, score);
|
||||
tactic::record(specialland, score);
|
||||
anticheat::nextid(tactic::id, VER, c);
|
||||
}
|
||||
}
|
||||
|
@ -680,7 +680,7 @@ namespace tactic {
|
||||
|
||||
int xr = vid.xres / 64;
|
||||
|
||||
if(on) record(firstland, items[treasureType(firstland)]);
|
||||
if(on) record(specialland, items[treasureType(specialland)]);
|
||||
|
||||
int xc = modecode();
|
||||
|
||||
@ -725,7 +725,7 @@ namespace tactic {
|
||||
dialog::displayPageButtons(3, true);
|
||||
|
||||
uploadScore();
|
||||
if(on) unrecord(firstland);
|
||||
if(on) unrecord(specialland);
|
||||
|
||||
if(getcstat >= 1000 && getcstat < 1000 + size(landlist)) {
|
||||
int ld = landlist[getcstat-1000];
|
||||
@ -741,7 +741,7 @@ namespace tactic {
|
||||
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
if(uni >= 1000 && uni < 1000 + size(landlist)) {
|
||||
firstland = specialland = landlist[uni - 1000];
|
||||
specialland = landlist[uni - 1000];
|
||||
restartGame(tactic::on ? 0 : rg::tactic);
|
||||
}
|
||||
else if(uni == '0') {
|
||||
|
Loading…
Reference in New Issue
Block a user