1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-03 11:17:56 +00:00

changed some achievement_gain to achievement_gain_once (this also fixes achievements awarded too soon)

This commit is contained in:
Zeno Rogue
2020-04-06 09:22:05 +02:00
parent a1053d7eea
commit 97fc244ba9
7 changed files with 26 additions and 32 deletions

View File

@@ -324,7 +324,7 @@ EX void degradeDemons() {
cell *c = dcal[i];
if(c->monst == moGreaterM || c->monst == moGreater) {
changes.ccell(c);
achievement_gain("DEMONSLAYER");
achievement_gain_once("DEMONSLAYER");
if(c->monst == moGreaterM) c->monst = moLesserM;
if(c->monst == moGreater) c->monst = moLesser;
}
@@ -846,7 +846,7 @@ EX void fightmessage(eMonster victim, eMonster attacker, bool stun, flagtype fla
playSound(NULL, "hit-axe"+pick123());
addMessage(XLAT("You slash %the1.", victim));
if(victim == moGoblin)
achievement_gain("GOBLINSWORD");
achievement_gain_once("GOBLINSWORD");
}
else if(victim == moKrakenT || victim == moDragonTail || victim == moDragonHead) {
playSound(NULL, "hit-sword"+pick123());
@@ -991,7 +991,7 @@ EX bool attackMonster(cell *c, flagtype flags, eMonster killer) {
}
if(m == moIvyRoot && ntk>tk)
achievement_gain("IVYSLAYER");
achievement_gain_once("IVYSLAYER");
return ntk > tk;
}
@@ -1237,7 +1237,7 @@ EX void stabbingAttack(cell *mf, cell *mt, eMonster who, int bonuskill IS(0)) {
addMessage(XLAT("You trick %the1.", c->monst));
}
if(c->monst == moFlailer && isPrincess(who) && isUnarmed(who))
achievement_gain("PRINCESS_PACIFIST");
achievement_gain_once("PRINCESS_PACIFIST");
if(attackMonster(c, 0, who)) {
numflail++;
@@ -1264,9 +1264,9 @@ EX void stabbingAttack(cell *mf, cell *mt, eMonster who, int bonuskill IS(0)) {
if(who == moPlayer) {
if(numsh) achievement_count("STAB", numsh, 0);
if(numlance && numflail && numsh) achievement_gain("MELEE3");
if(numlance && numflail && numsh) achievement_gain_once("MELEE3");
if(numlance + numflail + numsh + numslash + bonuskill >= 5) achievement_gain("MELEE5");
if(numlance + numflail + numsh + numslash + bonuskill >= 5) achievement_gain_once("MELEE5");
if(numsh == 2) {
if(lastdouble == turncount-1) achievement_count("STAB", 4, 0);