From 198ae61ae413d13c835c597e1253a8b53ead4889 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 13 Sep 2018 00:35:21 +0200 Subject: [PATCH] creating [Baby] Tortoises in the map editor now creates 'local' ones at first, and random ones on another click --- mapeditor.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/mapeditor.cpp b/mapeditor.cpp index 0c8d4e22..f5c47b70 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -554,7 +554,8 @@ namespace mapeditor { int cdir = where.first.spin; saveUndo(c); switch(painttype) { - case 0: + case 0: { + eMonster last = c->monst; c->monst = eMonster(paintwhat); c->hitpoints = 3; c->stuntime = 0; @@ -569,12 +570,21 @@ namespace mapeditor { mirror::createMirror(cellwalker(c, cdir, true), 0); c->monst = moMimic; } + + if(c->monst ==moTortoise && last == moTortoise) { + cell *c1 = c; + for(int i=0; i<100; i++) c1 = c1->cmove(hrand(c1->type)); + tortoise::emap[c] = c1; + } break; - case 1: + } + case 1: { + eItem last = c->item; c->item = eItem(paintwhat); if(c->item == itBabyTortoise) - tortoise::babymap[c] = getBits(c) ^ tortoise::getRandomBits(); + tortoise::babymap[c] = getBits(c) ^ (last == itBabyTortoise ? tortoise::getRandomBits() : 0); break; + } case 2: { eLand last = c->land; c->land = eLand(paintwhat);