mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-26 10:00:42 +00:00
YASC messages in shmup
This commit is contained in:
parent
de5ddc3034
commit
bf512e39ce
27
shmup.cpp
27
shmup.cpp
@ -263,6 +263,7 @@ void killMonster(monster* m, eMonster who_kills, flagtype flags = 0) {
|
||||
if(m->dead) return;
|
||||
m->dead = true;
|
||||
if(isPlayer(m) && m->fragoff < curtime) {
|
||||
yasc_message = XLAT("killed by %the1", who_kills);
|
||||
if(multi::cpid == m->pid)
|
||||
multi::suicides[multi::cpid]++;
|
||||
else if(multi::cpid >= 0)
|
||||
@ -439,9 +440,11 @@ void shootBullet(monster *m) {
|
||||
}
|
||||
|
||||
EX void killThePlayer(eMonster m) {
|
||||
if(cpid >= 0 && cpid < MAXPLAYER && pc[cpid])
|
||||
if(cpid >= 0 && cpid < MAXPLAYER && pc[cpid]) {
|
||||
yasc_message = XLAT("killed by %the1", m);
|
||||
pc[cpid]->dead = true;
|
||||
}
|
||||
}
|
||||
|
||||
monster *playerCrash(monster *who, shiftpoint where) {
|
||||
if(who->isVirtual) return NULL;
|
||||
@ -1238,6 +1241,7 @@ void movePlayer(monster *m, int delta) {
|
||||
|
||||
if(c2->wall == waMineMine && !markOrb(itOrbAether) && !markOrb(itOrbWinter)) {
|
||||
items[itOrbLife] = 0;
|
||||
if(!m->dead) yasc_message = XLAT("stepped on a mine");
|
||||
m->dead = true;
|
||||
}
|
||||
#if CAP_COMPLEX2
|
||||
@ -1283,16 +1287,27 @@ void movePlayer(monster *m, int delta) {
|
||||
}
|
||||
|
||||
if(!markOrb(itOrbAether)) {
|
||||
if(m->base->wall == waChasm || m->base->wall == waClosedGate)
|
||||
if(m->base->wall == waChasm) {
|
||||
if(!m->dead) yasc_message = XLAT("fell into %the1", m->base->wall);
|
||||
m->dead = true;
|
||||
}
|
||||
|
||||
if(isWatery(m->base) && !m->inBoat && !markOrb(itOrbFish))
|
||||
if(m->base->wall == waClosedGate) {
|
||||
if(!m->dead) yasc_message = XLAT("killed by %the1", m->base->wall);
|
||||
m->dead = true;
|
||||
}
|
||||
|
||||
if(isFireOrMagma(m->base) && !markOrb(itOrbWinter))
|
||||
if(isWatery(m->base) && !m->inBoat && !markOrb(itOrbFish)) {
|
||||
if(!m->dead) yasc_message = XLAT("drowned in %the1", m->base->wall);
|
||||
m->dead = true;
|
||||
}
|
||||
|
||||
if(isFireOrMagma(m->base) && !markOrb(itOrbWinter)) {
|
||||
if(!m->dead) yasc_message = XLAT("burnt in %the1", m->base->wall);
|
||||
m->dead = true;
|
||||
}
|
||||
}
|
||||
|
||||
landvisited[m->base->land] = true;
|
||||
|
||||
playerfire[cpid] = false;
|
||||
@ -2250,8 +2265,10 @@ void moveMonster(monster *m, int delta) {
|
||||
|
||||
if(!peace::on)
|
||||
for(int i=0; i<players; i++)
|
||||
if(crashintomon == pc[i])
|
||||
if(crashintomon == pc[i]) {
|
||||
yasc_message = XLAT("killed by %the1", m->type);
|
||||
pc[i]->dead = true;
|
||||
}
|
||||
|
||||
if(peace::on) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user