1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-31 01:37:57 +00:00

mirrors now flip Alchemist Lab colors (may be a bit unpredictable in minimal quotient)

This commit is contained in:
Zeno Rogue
2022-04-26 14:42:07 +02:00
parent 49d7ab3ed3
commit 7adb3dac5a
5 changed files with 39 additions and 15 deletions

View File

@@ -302,8 +302,15 @@ EX void prespill(cell* c, eWall t, int rad, cell *from) {
// block spill
if(t == waTemporary) return;
// cwt.at->item = itNone;
if(rad) for(cell *c2: adj_minefield_cells(c))
prespill(c2, t, rad-1, c);
if(rad) for(auto p: adj_minefield_cells_with_orientation(c)) {
prespill(p.first, conditional_flip_slime(p.second, t), rad-1, c);
}
}
EX eWall conditional_flip_slime(bool flip, eWall t) {
if(flip && t == waFloorA) return waFloorB;
if(flip && t == waFloorB) return waFloorA;
return t;
}
EX void spillfix(cell* c, eWall t, int rad) {
@@ -311,8 +318,9 @@ EX void spillfix(cell* c, eWall t, int rad) {
changes.ccell(c);
c->wall = t;
}
if(rad) for(cell *c2: adj_minefield_cells(c))
spillfix(c2, t, rad-1);
if(rad) for(auto p: adj_minefield_cells_with_orientation(c)) {
spillfix(p.first, conditional_flip_slime(p.second, t), rad-1);
}
}
EX void spill(cell* c, eWall t, int rad) {