From 3b7d80bb175b5fccfb2dbc030a714f73d1c66b24 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 30 Jul 2019 13:01:41 +0200 Subject: [PATCH] solv:: Vineyard --- graph.cpp | 2 ++ landgen.cpp | 8 ++++++-- landlock.cpp | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/graph.cpp b/graph.cpp index 643210ab..ee8e4598 100644 --- a/graph.cpp +++ b/graph.cpp @@ -4380,6 +4380,8 @@ color_t transcolor(cell *c, cell *c2, color_t wcol) { if(c2->land == laBarrier) return darkena3(lcolor(c), 0, 0x40); return darkena3(gradient(lcolor(c), lcolor(c2), 0, 1, 2), 0, 0x40); } + if(sol && c->land == laWineyard && c2->master->distance < c->master->distance) + return 0x00800040; if(isAlch(c) && !c->item && (c2->item || !isAlch(c2))) return darkena3(winf[c->wall].color, 0, 0x40); if(c->wall == c2->wall) return 0; if(isFire(c) && !isFire(c2)) return darkena3(wcol, 0, 0x30); diff --git a/landgen.cpp b/landgen.cpp index 54afdd93..6e7ca6f6 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -631,6 +631,10 @@ void giantLandSwitch(cell *c, int d, cell *from) { else if(archimedean && arcm::current.have_line) c->wall = arcm::linespattern(c) ? waVinePlant : waNone; #endif + else if(sol) { + if((c->master->distance & 1) == 1 && (c->master->emeraldval % 3)) + c->wall = waVinePlant; + } else if(euclid && !archimedean) { int x,y; tie(x,y) = cell_to_pair(c); @@ -666,9 +670,9 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(d == 7 && c->wall == waVinePlant && hrand(100) < (randomPatternsMode ? 2 : 10) && !peace::on && !reptilecheat) c->monst = moVineSpirit; ONEMPTY { - if(hrand(5000) < PT(100 + 2 * (kills[moVineBeast] + kills[moVineSpirit]), 200) && notDippingFor(itWine)) + if(hrand(5000) < PT(100 + 2 * (kills[moVineBeast] + kills[moVineSpirit]), 200) && notDippingFor(itWine) && !reptilecheat) c->item = itWine; - if(hrand_monster(8000) < 12 * (items[itWine] + yendor::hardness())) + if(hrand_monster(8000) < 12 * (items[itWine] + yendor::hardness()) && !reptilecheat) c->monst = moVineBeast; } break; diff --git a/landlock.cpp b/landlock.cpp index 7d02b92f..a4900f84 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -979,10 +979,13 @@ land_validity_t& land_validity(eLand l) { if(among(l, laEmerald, laCamelot, laDryForest) && VALENCE != 3) return hedgehogs; + if(l == laWineyard && sol) + return lv::pattern_special; + // ... wineyard pattern is GOOD only in the standard geometry or Euclidean if(l == laWineyard && (NONSTDVAR || sphere) && !randomPatternsMode) return pattern_not_implemented_random; - + if(l == laTrollheim && quotient == qFIELD) return not_enough_space;