1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 15:37:40 +00:00

changes:: fixed mimics

This commit is contained in:
Zeno Rogue
2020-03-02 13:17:30 +01:00
parent d0bae23b6d
commit 477b0e4ed4

View File

@@ -1228,15 +1228,18 @@ EX namespace mirror {
void unlist() { void unlist() {
for(auto& m: mirrors) for(auto& m: mirrors)
if(m.second.at->monst == moMimic) if(m.second.at->monst == moMimic)
changes.ccell(m.second.at),
m.second.at->monst = moNone; m.second.at->monst = moNone;
} }
void list() { void list() {
for(auto& m: mirrors) for(auto& m: mirrors)
changes.ccell(m.second.at),
m.second.at->monst = moMimic; m.second.at->monst = moMimic;
} }
EX void destroyAll() { EX void destroyAll() {
changes.value_keep(mirrors);
unlist(); unlist();
mirrors.clear(); mirrors.clear();
} }
@@ -1244,6 +1247,7 @@ EX namespace mirror {
EX void createMirror(cellwalker cw, int cpid) { EX void createMirror(cellwalker cw, int cpid) {
if(!shmup::on && inmirror(cw)) if(!shmup::on && inmirror(cw))
cw = reflect(cw); cw = reflect(cw);
changes.ccell(cw.at);
if(cpid == LIGHTNING) if(cpid == LIGHTNING)
castLightningBolt(cw); castLightningBolt(cw);
else if(cellMirrorable(cw.at)) { else if(cellMirrorable(cw.at)) {
@@ -1400,6 +1404,7 @@ EX namespace mirror {
dynamicval<int> d(multi::cpid, pid); dynamicval<int> d(multi::cpid, pid);
gainShard(cw.at, c->wall == waMirror ? "The mirror shatters!" : "The cloud turns into a bunch of images!"); gainShard(cw.at, c->wall == waMirror ? "The mirror shatters!" : "The cloud turns into a bunch of images!");
} }
changes.ccell(c);
c->wall = waNone; c->wall = waNone;
} }
} }
@@ -1415,6 +1420,7 @@ EX namespace mirror {
} }
void go(bool fwd) { void go(bool fwd) {
changes.value_keep(mirrors);
int tk = tkills(); int tk = tkills();
int nummirage = 0; int nummirage = 0;
int j = 0; int j = 0;