Void Beasts are now pulled by Orb of Air

This commit is contained in:
Zeno Rogue 2024-03-19 18:52:16 +01:00
parent 1c5709a3c9
commit 0e018df878
2 changed files with 14 additions and 6 deletions

View File

@ -4930,9 +4930,10 @@ EX void drawMarkers() {
}
if(items[itOrbAir] && mouseover->cpdist > 1) {
cell *c1 = mouseover;
int dir = c1->monst == moVoidBeast ? -1 : 1;
for(int it=0; it<10; it++) {
int di;
auto mib = blowoff_destination(c1, di);
auto mib = blowoff_destination_dir(c1, di, dir);
if(!mib.proper()) break;
auto& c2 = mib.t;
shiftmatrix T1 = ggmatrix(c1);

View File

@ -1136,8 +1136,10 @@ void blowoff(const movei& mi) {
auto& ct = mi.t;
bool die = cf->wall == waRichDie;
playSound(ct, "orb-ranged");
if(cf->monst)
addMessage(XLAT("You blow %the1 away!", cf->monst));
if(cf->monst == moVoidBeast)
addMessage(XLAT("You blow %the1 closer!", cf->monst));
else if(cf->monst)
addMessage(XLAT("You blow %the1 away!", cf->monst));
if(cf->wall == waThumperOff) activateActiv(cf, false);
if(isPushable(cf->wall) || cf->wall == waBigStatue)
pushThumper(mi);
@ -1205,9 +1207,9 @@ EX bool monstersnearO(orbAction a, cell *c) {
EX bool isCheck(orbAction a) { return a == roCheck || a == roMultiCheck; }
EX bool isWeakCheck(orbAction a) { return a == roCheck || a == roMultiCheck || a == roMouse; }
EX movei blowoff_destination(cell *c, int& di) {
EX movei blowoff_destination_dir(cell *c, int& di, int rev) {
int d = 0;
for(; d<c->type; d++) if(c->move(d) && c->move(d)->cpdist < c->cpdist) break;
for(; d<c->type; d++) if(c->move(d) && rev*c->move(d)->cpdist < rev*c->cpdist) break;
if(d<c->type) for(int e=d; e<d+c->type; e++) {
int di = e % c->type;
cell *c2 = c->move(di);
@ -1215,11 +1217,16 @@ EX movei blowoff_destination(cell *c, int& di) {
if(dice::on(c) && !dice::can_roll(movei(c, di)))
continue;
#endif
if(c2 && c2->cpdist > c->cpdist && passable(c2, c, P_BLOW)) return movei(c, c2, di);
if(c2 && rev*c2->cpdist > rev*c->cpdist && passable(c2, c, P_BLOW)) return movei(c, c2, di);
}
return movei(c, c, NO_SPACE);
}
EX movei blowoff_destination(cell *c, int& di) {
int rev = c->monst == moVoidBeast ? -1 : 1;
return blowoff_destination_dir(c, di, rev);
}
EX int check_jump(cell *cf, cell *ct, flagtype flags, cell*& jumpthru) {
int partial = 1;
forCellCM(c2, cf) {