v0.2.3d: tweaked effect of cursed talisman, no longer outright prevents searching.

Additionally, tweaked player sometimes spending 4 turns when finding something, usually only resulted in mobs getting free hits on you, no point to it.
This commit is contained in:
Evan Debenham 2015-01-13 09:20:01 -05:00
parent 51edf3e49a
commit aeee25d3ce

View File

@ -1414,11 +1414,16 @@ public class Hero extends Char {
} }
TalismanOfForesight.Foresight foresight = buff( TalismanOfForesight.Foresight.class ); TalismanOfForesight.Foresight foresight = buff( TalismanOfForesight.Foresight.class );
//cursed talisman of foresight makes unintentionally finding things impossible.
if (foresight != null && foresight.isCursed()){
level = -1;
}
for (int y = ay; y <= by; y++) { for (int y = ay; y <= by; y++) {
for (int x = ax, p = ax + y * Level.WIDTH; x <= bx; x++, p++) { for (int x = ax, p = ax + y * Level.WIDTH; x <= bx; x++, p++) {
if (Dungeon.visible[p] && !(foresight != null && foresight.isCursed())) { if (Dungeon.visible[p]) {
if (intentional) { if (intentional) {
sprite.parent.addToBack( new CheckedCell( p ) ); sprite.parent.addToBack( new CheckedCell( p ) );
@ -1438,7 +1443,7 @@ public class Hero extends Char {
smthFound = true; smthFound = true;
if (foresight != null) if (foresight != null && !foresight.isCursed())
foresight.charge(); foresight.charge();
} }
} }
@ -1449,10 +1454,11 @@ public class Hero extends Char {
if (intentional) { if (intentional) {
sprite.showStatus( CharSprite.DEFAULT, TXT_SEARCH ); sprite.showStatus( CharSprite.DEFAULT, TXT_SEARCH );
sprite.operate( pos ); sprite.operate( pos );
if (smthFound) { if (foresight != null && foresight.isCursed()){
spendAndNext( Random.Float() < level ? TIME_TO_SEARCH : TIME_TO_SEARCH * 2 ); GLog.n("You can't concentrate, searching takes a while.");
spendAndNext(TIME_TO_SEARCH * 3);
} else { } else {
spendAndNext( TIME_TO_SEARCH ); spendAndNext(TIME_TO_SEARCH);
} }
} }