1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-08 01:33:02 +00:00

Clearing in bounded geometries

This commit is contained in:
Zeno Rogue
2018-04-14 10:24:02 +02:00
parent d8e7c74f70
commit d9381c7284
8 changed files with 39 additions and 12 deletions

View File

@@ -741,6 +741,22 @@ namespace clearing {
std::map<heptagon*, clearingdata> bpdata;
cell *current_root;
void new_root() {
if(!current_root || current_root->monst != moMutant) {
auto& ac = currentmap->allcells();
int iter = 0;
while(!current_root || pseudohept(current_root) || current_root->cpdist < 3) {
if(iter++ > 100) return;
current_root = ac[hrand(size(ac))];
}
current_root->monst = moMutant;
current_root->mondir = NODIR;
current_root->stuntime = (mutantphase + 1) & 15;
}
}
int plantdir(cell *c) {
if(!quotient) {
generateAlts(c->master);
@@ -801,11 +817,10 @@ namespace clearing {
vector<cell*> rpath;
void generate(cell *c) {
if(buggyplant) return;
if(sphere) return;
if(buggyplant) return;
if(sphere) return;
if(gp::on) return;
if(quotient) return;
if(euclid) {
if(torus) return;