From 22127cadcd8ddbab22eb27d4365f0d451f9aa5d2 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 27 Feb 2020 20:50:30 +0100 Subject: [PATCH] eclectic:: improvements --- landgen.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/landgen.cpp b/landgen.cpp index 8baa94d4..bc842802 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -2490,7 +2490,26 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { if(d == 8) wfc::schedule(c); if(d == 7) { + // auto ce = wfc::centers; + wfc::invoke(); + if(c->wall == waRose) c->wall = waNone; + + /* + experiment: replace Roses with Ivy + for(cell *cx: ce) + forCellEx(c1, cx) + for(cell *c2: {c1, cx}) { + if(c2->wall == waRose) { + c2->wall = waNone; + println(hlog, "building"); + c2->item = itRuby; + forCellEx(c1, c2) c1->wall = waNone; + println(hlog, "res = ", buildIvy(c2, 0, c2->type)); + } + } + */ + if(c->wall == waPalace && hrand(100) < 50) { bool ok = true; forCellEx(c2, c) if(among(c2->wall, waClosedGate, waOpenGate)) @@ -2498,7 +2517,6 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { if(ok) c->wall = waNone; } - wfc::invoke(); bool locked = true; forCellEx(c1, c) if(!c1->wall) locked = false; if(locked) c->item = itEclectic;