1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-27 02:20:36 +00:00

YASC messages in hardcore mode

This commit is contained in:
Zeno Rogue 2024-02-23 00:48:17 +01:00
parent b4b00baa5e
commit de5ddc3034
2 changed files with 19 additions and 1 deletions

View File

@ -1227,11 +1227,13 @@ EX void killThePlayer(eMonster m, int id, flagtype flags) {
} }
else if(hardcore) { else if(hardcore) {
addMessage(XLAT("You are killed by %the1!", m)); addMessage(XLAT("You are killed by %the1!", m));
yasc_message = XLAT("killed by %the1", m);
killHardcorePlayer(id, flags); killHardcorePlayer(id, flags);
} }
else if(m == moLightningBolt && lastmovetype == lmAttack && isAlchAny(playerpos(id))) { else if(m == moLightningBolt && lastmovetype == lmAttack && isAlchAny(playerpos(id))) {
addMessage(XLAT("You are killed by %the1!", m)); addMessage(XLAT("You are killed by %the1!", m));
addMessage(XLAT("Don't play with slime and electricity next time, okay?")); addMessage(XLAT("Don't play with slime and electricity next time, okay?"));
yasc_message = XLAT("killed by %the1", m);
kills[moPlayer]++; kills[moPlayer]++;
items[itOrbSafety] = 0; items[itOrbSafety] = 0;
} }

View File

@ -118,6 +118,7 @@ bool pcmove::checkNeedMove(bool checkonly, bool attacking) {
if(items[itOrbDomination] > ORBBASE && cwt.at->monst) if(items[itOrbDomination] > ORBBASE && cwt.at->monst)
return false; return false;
int flags = 0; int flags = 0;
bool drown = false;
if(cwt.at->monst) { if(cwt.at->monst) {
if(vmsg(miRESTRICTED, siMONSTER, cwt.at, cwt.at->monst)) { if(vmsg(miRESTRICTED, siMONSTER, cwt.at, cwt.at->monst)) {
if(isMountable(cwt.at->monst)) if(isMountable(cwt.at->monst))
@ -132,6 +133,7 @@ bool pcmove::checkNeedMove(bool checkonly, bool attacking) {
addMessage(XLAT("It would be impolite to land on the table!")); addMessage(XLAT("It would be impolite to land on the table!"));
} }
else if(cwt.at->wall == waLake) { else if(cwt.at->wall == waLake) {
drown = true;
if(markOrb2(itOrbAether)) return false; if(markOrb2(itOrbAether)) return false;
if(markOrb2(itOrbFish)) return false; if(markOrb2(itOrbFish)) return false;
if(in_gravity_zone(cwt.at) && passable(cwt.at, NULL, P_ISPLAYER)) return false; if(in_gravity_zone(cwt.at) && passable(cwt.at, NULL, P_ISPLAYER)) return false;
@ -145,6 +147,7 @@ bool pcmove::checkNeedMove(bool checkonly, bool attacking) {
return true; return true;
} }
else if(among(cwt.at->wall, waSea, waCamelotMoat, waLake, waDeepWater)) { else if(among(cwt.at->wall, waSea, waCamelotMoat, waLake, waDeepWater)) {
drown = true;
if(markOrb(itOrbFish)) return false; if(markOrb(itOrbFish)) return false;
if(markOrb2(itOrbAether)) return false; if(markOrb2(itOrbAether)) return false;
if(in_gravity_zone(cwt.at) && passable(cwt.at, NULL, P_ISPLAYER)) return false; if(in_gravity_zone(cwt.at) && passable(cwt.at, NULL, P_ISPLAYER)) return false;
@ -180,8 +183,21 @@ bool pcmove::checkNeedMove(bool checkonly, bool attacking) {
if(vmsg(miWALL, siWALL, cwt.at, moNone)) addMessage(XLAT("Your Aether power has expired! RUN!")); if(vmsg(miWALL, siWALL, cwt.at, moNone)) addMessage(XLAT("Your Aether power has expired! RUN!"));
} }
else return false; else return false;
if(hardcore && !checkonly) if(hardcore && !checkonly) {
if(cwt.at->monst)
yasc_message = XLAT("did not leave %the1", cwt.at->monst);
else if(cwt.at->wall == waChasm)
yasc_message = XLAT("fell into a chasm");
else if(cwt.at->wall == waRoundTable)
yasc_message = XLAT("died by politeness");
else if(cwt.at->wall == waClosedGate)
yasc_message = XLAT("crushed by a gate");
else if(drown)
yasc_message = XLAT("drowned in %the1", cwt.at->wall);
else
yasc_message = XLAT("did not leave %the1", cwt.at->wall);
killHardcorePlayer(multi::cpid, flags); killHardcorePlayer(multi::cpid, flags);
}
return true; return true;
} }