v0.8.0: various bugfixes and small functionality tweaks:

- ankhs are now blessed when thrown into water of health
- demon spawners are no longer removed by unblessed ankhs
- golems now interrupt the hero when teleporting them
- fixed mimics not revealing themselves in some cases where they should
- tweaked when a space is considered open for large enemies
- fixed further AI weirdness with retreating characters
This commit is contained in:
Evan Debenham
2019-12-18 17:26:22 -05:00
parent e874dea93e
commit 6b0b4f60e1
7 changed files with 51 additions and 9 deletions

View File

@@ -129,7 +129,7 @@ public class PathFinder {
public static int getStepBack( int cur, int from, boolean[] passable ) {
int d = buildEscapeDistanceMap( cur, from, 5f, passable );
int d = buildEscapeDistanceMap( cur, from, 5, passable );
for (int i=0; i < size; i++) {
goals[i] = distance[i] == d;
}
@@ -285,7 +285,7 @@ public class PathFinder {
return pathFound;
}
private static int buildEscapeDistanceMap( int cur, int from, float factor, boolean[] passable ) {
private static int buildEscapeDistanceMap( int cur, int from, int lookAhead, boolean[] passable ) {
System.arraycopy(maxVal, 0, distance, 0, maxVal.length);
@@ -311,7 +311,7 @@ public class PathFinder {
}
if (step == cur) {
destDist = (int)(dist * factor) + 1;
destDist = dist + lookAhead;
}
int nextDistance = dist + 1;