mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
Orb of shield/shell no longer bypasses 'kraken will destroy boat' warning
This commit is contained in:
parent
4799f7c5f7
commit
7f28389e66
@ -105,6 +105,7 @@ EX bool monstersnear(cell *c, eMonster who) {
|
|||||||
|
|
||||||
int res = 0;
|
int res = 0;
|
||||||
bool fast = false;
|
bool fast = false;
|
||||||
|
bool kraken_will_destroy_boat = false;
|
||||||
|
|
||||||
elec::builder b;
|
elec::builder b;
|
||||||
if(elec::affected(c)) { who_kills_me = moLightningBolt; res++; }
|
if(elec::affected(c)) { who_kills_me = moLightningBolt; res++; }
|
||||||
@ -167,10 +168,9 @@ EX bool monstersnear(cell *c, eMonster who) {
|
|||||||
if(elec::affected(c2)) continue;
|
if(elec::affected(c2)) continue;
|
||||||
if(fast && c2->monst != moWitchSpeed) continue;
|
if(fast && c2->monst != moWitchSpeed) continue;
|
||||||
// Krakens just destroy boats
|
// Krakens just destroy boats
|
||||||
if(c2->monst == moKrakenT && c->wall == waBoat) {
|
if(who == moPlayer && c2->monst == moKrakenT && c->wall == waBoat) {
|
||||||
if(krakensafe(c)) continue;
|
kraken_will_destroy_boat = true;
|
||||||
else if(warningprotection(XLAT("This move appears dangerous -- are you sure?")) && res == 0) m = moWarning;
|
continue;
|
||||||
else continue;
|
|
||||||
}
|
}
|
||||||
// they cannot attack through vines
|
// they cannot attack through vines
|
||||||
if(!canAttack(c2, c2->monst, c, who, AF_NEXTTURN)) continue;
|
if(!canAttack(c2, c2->monst, c, who, AF_NEXTTURN)) continue;
|
||||||
@ -183,11 +183,15 @@ EX bool monstersnear(cell *c, eMonster who) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(who == moPlayer && res && (markOrb2(itOrbShield) || markOrb2(itOrbShell)) && !eaten)
|
if(kraken_will_destroy_boat && !krakensafe(c) && warningprotection(XLAT("This move appears dangerous -- are you sure?"))) {
|
||||||
res = 0;
|
if (res == 0) who_kills_me = moWarning;
|
||||||
|
res++;
|
||||||
if(who == moPlayer && res && markOrb2(itOrbDomination) && c->monst)
|
} else {
|
||||||
res = 0;
|
if(who == moPlayer && res && (markOrb2(itOrbShield) || markOrb2(itOrbShell)) && !eaten)
|
||||||
|
res = 0;
|
||||||
|
if(who == moPlayer && res && markOrb2(itOrbDomination) && c->monst)
|
||||||
|
res = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return !!res;
|
return !!res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user