v0.9.1b: exploit fixes / QOL improvements to rogue's foresight

This commit is contained in:
Evan Debenham 2020-12-20 21:51:36 -05:00
parent 0ab2cf3cc3
commit c5bd5fda83
2 changed files with 16 additions and 13 deletions

View File

@ -371,7 +371,7 @@ actors.hero.talent.wide_search.desc=_+1:_ The Rogues search radius is increas
actors.hero.talent.silent_steps.title=silent steps actors.hero.talent.silent_steps.title=silent steps
actors.hero.talent.silent_steps.desc=_+1:_ The Rogue will not wake sleeping enemies while he is _3 or more tiles away from them_.\n\n_+2:_ The Rogue will not wake sleeping enemies while he is _not adjacent to them_. actors.hero.talent.silent_steps.desc=_+1:_ The Rogue will not wake sleeping enemies while he is _3 or more tiles away from them_.\n\n_+2:_ The Rogue will not wake sleeping enemies while he is _not adjacent to them_.
actors.hero.talent.rogues_foresight.title=rogue's foresight actors.hero.talent.rogues_foresight.title=rogue's foresight
actors.hero.talent.rogues_foresight.desc=_+1:_ When he first enters a level with a secret room, the Rogue has a _50% chance to notice_ that the level contains a secret.\n\n_+2:_ When he first enters a level with a secret room, the Rogue has a _75% chance to notice_ that the level contains a secret. actors.hero.talent.rogues_foresight.desc=_+1:_ When the Rogue is on a level with a secret room, he has a _50% chance to notice_ that the level contains a secret.\n\n_+2:_ When the Rogue is on a level with a secret room, he has a _75% chance to notice_ that the level contains a secret.
actors.hero.talent.natures_bounty.title=nature's bounty actors.hero.talent.natures_bounty.title=nature's bounty
actors.hero.talent.natures_bounty.desc=_+1:_ The Huntress can find _4 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.\n\n_+2:_ The Huntress can find _6 berries_ hidden in tall grass as she explores the earlier stages of the dungeon. actors.hero.talent.natures_bounty.desc=_+1:_ The Huntress can find _4 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.\n\n_+2:_ The Huntress can find _6 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.

View File

@ -469,22 +469,25 @@ public class GameScene extends PixelScene {
} }
} }
} else if (InterlevelScene.mode == InterlevelScene.Mode.RESET) {
GLog.h(Messages.get(this, "warp"));
} else {
GLog.h(Messages.get(this, "return"), Dungeon.depth);
}
if (Dungeon.hero.hasTalent(Talent.ROGUES_FORESIGHT) if (Dungeon.hero.hasTalent(Talent.ROGUES_FORESIGHT)
&& Dungeon.level instanceof RegularLevel){ && Dungeon.level instanceof RegularLevel){
int reqSecrets = Dungeon.level.feeling == Level.Feeling.SECRETS ? 2 : 1; int reqSecrets = Dungeon.level.feeling == Level.Feeling.SECRETS ? 2 : 1;
for (Room r : ((RegularLevel) Dungeon.level).rooms()){ for (Room r : ((RegularLevel) Dungeon.level).rooms()){
if (r instanceof SecretRoom) reqSecrets--; if (r instanceof SecretRoom) reqSecrets--;
} }
//50%/75% chance
//50%/75% chance, use level's seed so that we get the same result for the same level
Random.pushGenerator(Dungeon.seedCurDepth());
if (reqSecrets <= 0 && Random.Int(4) <= Dungeon.hero.pointsInTalent(Talent.ROGUES_FORESIGHT)){ if (reqSecrets <= 0 && Random.Int(4) <= Dungeon.hero.pointsInTalent(Talent.ROGUES_FORESIGHT)){
GLog.p(Messages.get(this, "secret_hint")); GLog.p(Messages.get(this, "secret_hint"));
} }
} Random.popGenerator();
} else if (InterlevelScene.mode == InterlevelScene.Mode.RESET) {
GLog.h(Messages.get(this, "warp"));
} else {
GLog.h(Messages.get(this, "return"), Dungeon.depth);
} }
boolean unspentTalents = false; boolean unspentTalents = false;