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

dice:: Orb of Chaos works correctly now

This commit is contained in:
Zeno Rogue
2021-06-16 11:22:41 +02:00
parent e6dd27f5bf
commit b9ba311a63
2 changed files with 24 additions and 0 deletions

View File

@@ -564,6 +564,8 @@ void apply_chaos() {
auto wb = cwt-1+wstep;
cell *ca = wa.at;
cell *cb = wb.at;
if(dice::swap_forbidden(ca, cb)) return;
if(dice::swap_forbidden(cb, ca)) return;
if(!items[itOrbChaos] || chaos_forbidden(ca) || chaos_forbidden(cb)) return;
if(ca && is_paired(ca->monst)) killMonster(ca, moPlayer);
if(cb && is_paired(cb->monst)) killMonster(cb, moPlayer);
@@ -596,6 +598,9 @@ void apply_chaos() {
if(ca->monst == moTortoise || cb->monst == moTortoise) {
tortoise::move_adult(ca, cb);
}
if(dice::on(ca) || dice::on(cb)) {
dice::chaos_swap(wa, wb);
}
if(ca->item == itBabyTortoise || cb->item == itBabyTortoise) {
tortoise::move_baby(ca, cb);
}