mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-26 00:47:00 +00:00
killing a tortoise with a saved baby now kills the baby too
This commit is contained in:
parent
39e131d985
commit
b3d074161e
13
game.cpp
13
game.cpp
@ -1981,6 +1981,8 @@ void killMonster(cell *c, eMonster who, flagtype deathflags) {
|
|||||||
if(m == moWolfMoved) m = moWolf;
|
if(m == moWolfMoved) m = moWolf;
|
||||||
if(!isBulletType(m)) kills[m]++;
|
if(!isBulletType(m)) kills[m]++;
|
||||||
|
|
||||||
|
if(saved_tortoise_on(c)) c->item = itNone;
|
||||||
|
|
||||||
if(!c->item) if(m == moButterfly && (deathflags & AF_BULL))
|
if(!c->item) if(m == moButterfly && (deathflags & AF_BULL))
|
||||||
c->item = itBull;
|
c->item = itBull;
|
||||||
|
|
||||||
@ -5513,6 +5515,12 @@ void refreshFriend(cell *c) {
|
|||||||
if(c->monst == moTameBomberbirdMoved) c->monst = moTameBomberbird;
|
if(c->monst == moTameBomberbirdMoved) c->monst = moTameBomberbird;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool saved_tortoise_on(cell *c) {
|
||||||
|
return
|
||||||
|
(c->monst == moTortoise && c->item == itBabyTortoise &&
|
||||||
|
!((tortoise::getb(c) ^ tortoise::babymap[c]) & tortoise::mask));
|
||||||
|
}
|
||||||
|
|
||||||
void moverefresh(bool turn = true) {
|
void moverefresh(bool turn = true) {
|
||||||
int dcs = isize(dcal);
|
int dcs = isize(dcal);
|
||||||
|
|
||||||
@ -5582,9 +5590,8 @@ void moverefresh(bool turn = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tortoises who have found their children no longer move
|
// tortoises who have found their children no longer move
|
||||||
if(c->monst == moTortoise && c->item == itBabyTortoise &&
|
if(saved_tortoise_on(c))
|
||||||
!((tortoise::getb(c) ^ tortoise::babymap[c]) & tortoise::mask))
|
c->stuntime = 2;
|
||||||
c->stuntime = 2;
|
|
||||||
|
|
||||||
if(c->monst == moReptile) {
|
if(c->monst == moReptile) {
|
||||||
if(c->wall == waChasm || cellUnstable(c)) {
|
if(c->wall == waChasm || cellUnstable(c)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user