mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-25 02:47:40 +00:00
Void Beasts are now pulled by Orb of Air
This commit is contained in:
@@ -4930,9 +4930,10 @@ EX void drawMarkers() {
|
|||||||
}
|
}
|
||||||
if(items[itOrbAir] && mouseover->cpdist > 1) {
|
if(items[itOrbAir] && mouseover->cpdist > 1) {
|
||||||
cell *c1 = mouseover;
|
cell *c1 = mouseover;
|
||||||
|
int dir = c1->monst == moVoidBeast ? -1 : 1;
|
||||||
for(int it=0; it<10; it++) {
|
for(int it=0; it<10; it++) {
|
||||||
int di;
|
int di;
|
||||||
auto mib = blowoff_destination(c1, di);
|
auto mib = blowoff_destination_dir(c1, di, dir);
|
||||||
if(!mib.proper()) break;
|
if(!mib.proper()) break;
|
||||||
auto& c2 = mib.t;
|
auto& c2 = mib.t;
|
||||||
shiftmatrix T1 = ggmatrix(c1);
|
shiftmatrix T1 = ggmatrix(c1);
|
||||||
|
|||||||
15
orbs.cpp
15
orbs.cpp
@@ -1136,7 +1136,9 @@ void blowoff(const movei& mi) {
|
|||||||
auto& ct = mi.t;
|
auto& ct = mi.t;
|
||||||
bool die = cf->wall == waRichDie;
|
bool die = cf->wall == waRichDie;
|
||||||
playSound(ct, "orb-ranged");
|
playSound(ct, "orb-ranged");
|
||||||
if(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));
|
addMessage(XLAT("You blow %the1 away!", cf->monst));
|
||||||
if(cf->wall == waThumperOff) activateActiv(cf, false);
|
if(cf->wall == waThumperOff) activateActiv(cf, false);
|
||||||
if(isPushable(cf->wall) || cf->wall == waBigStatue)
|
if(isPushable(cf->wall) || cf->wall == waBigStatue)
|
||||||
@@ -1205,9 +1207,9 @@ EX bool monstersnearO(orbAction a, cell *c) {
|
|||||||
EX bool isCheck(orbAction a) { return a == roCheck || a == roMultiCheck; }
|
EX bool isCheck(orbAction a) { return a == roCheck || a == roMultiCheck; }
|
||||||
EX bool isWeakCheck(orbAction a) { return a == roCheck || a == roMultiCheck || a == roMouse; }
|
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;
|
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++) {
|
if(d<c->type) for(int e=d; e<d+c->type; e++) {
|
||||||
int di = e % c->type;
|
int di = e % c->type;
|
||||||
cell *c2 = c->move(di);
|
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)))
|
if(dice::on(c) && !dice::can_roll(movei(c, di)))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#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);
|
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) {
|
EX int check_jump(cell *cf, cell *ct, flagtype flags, cell*& jumpthru) {
|
||||||
int partial = 1;
|
int partial = 1;
|
||||||
forCellCM(c2, cf) {
|
forCellCM(c2, cf) {
|
||||||
|
|||||||
Reference in New Issue
Block a user