1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-25 10:57:59 +00:00

rewritten undo: part 1

This commit is contained in:
Zeno Rogue
2020-02-29 17:58:59 +01:00
parent eb15070ac4
commit e564622a48
17 changed files with 428 additions and 400 deletions

View File

@@ -85,11 +85,15 @@ EX void moveEffect(const movei& mi, eMonster m) {
if(cf && isPrincess(m)) princess::move(mi);
if(cf && m == moTortoise) {
changes.map_value(tortoise::emap, ct);
changes.map_value(tortoise::emap, cf);
tortoise::emap[ct] = tortoise::getb(cf);
tortoise::emap.erase(cf);
}
if(cf && ct->item == itBabyTortoise && !cf->item) {
changes.map_value(tortoise::babymap, ct);
changes.map_value(tortoise::babymap, cf);
cf->item = itBabyTortoise;
ct->item = itNone;
animateMovement(mi.rev(), LAYER_BOAT);
@@ -1520,7 +1524,7 @@ EX int movevalue(eMonster m, cell *c, cell *c2, flagtype flags) {
isInactiveEnemy(c2,m) ? 1000 :
-500;
else if(monstersnear(c2, NULL, m, NULL, c)) val = 50; // linked with mouse suicide!
else if(monstersnear(c2, m, NULL, c)) val = 50; // linked with mouse suicide!
else if(passable_for(m, c2, c, 0)) {
if(mine::marked_mine(c2) && !ignoresPlates(m))
val = 50;