v2.2.1: fixed various blink effects working over magical fire

This commit is contained in:
Evan Debenham
2023-10-23 14:31:24 -04:00
parent 54928eb660
commit e4b704e6aa
4 changed files with 5 additions and 5 deletions

View File

@@ -285,7 +285,7 @@ public class Preparation extends Buff implements ActionIndicator.Action {
AttackLevel lvl = AttackLevel.getLvl(turnsInvis);
PathFinder.buildDistanceMap(Dungeon.hero.pos, BArray.not(Dungeon.level.solid, null), lvl.blinkDistance());
PathFinder.buildDistanceMap(Dungeon.hero.pos,BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null), lvl.blinkDistance());
int dest = -1;
for (int i : PathFinder.NEIGHBOURS8){
//cannot blink into a cell that's occupied or impassable, only over them

View File

@@ -104,7 +104,7 @@ public class Challenge extends ArmorAbility {
return;
}
boolean[] passable = BArray.not(Dungeon.level.solid,null);
boolean[] passable = BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null);
for (Char c : Actor.chars()) {
if (c != hero) passable[c.pos] = false;
}
@@ -115,7 +115,7 @@ public class Challenge extends ArmorAbility {
if (hero.hasTalent(Talent.CLOSE_THE_GAP) && !hero.rooted){
int blinkrange = 1 + hero.pointsInTalent(Talent.CLOSE_THE_GAP);
PathFinder.buildDistanceMap(hero.pos, BArray.not(Dungeon.level.solid,null), blinkrange);
PathFinder.buildDistanceMap(hero.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null), blinkrange);
for (int i = 0; i < PathFinder.distance.length; i++){
if (PathFinder.distance[i] == Integer.MAX_VALUE

View File

@@ -92,7 +92,7 @@ public class SmokeBomb extends ArmorAbility {
return;
}
PathFinder.buildDistanceMap(hero.pos, BArray.not(Dungeon.level.solid,null), 6);
PathFinder.buildDistanceMap(hero.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null), 6);
if ( PathFinder.distance[target] == Integer.MAX_VALUE ||
!Dungeon.level.heroFOV[target] ||

View File

@@ -108,7 +108,7 @@ public class Dagger extends MeleeWeapon {
return;
}
PathFinder.buildDistanceMap(Dungeon.hero.pos, BArray.not(Dungeon.level.solid, null), maxDist);
PathFinder.buildDistanceMap(Dungeon.hero.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null), maxDist);
if (PathFinder.distance[target] == Integer.MAX_VALUE) {
GLog.w(Messages.get(wep, "ability_bad_position"));
return;