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
@@ -285,7 +285,7 @@ public class Preparation extends Buff implements ActionIndicator.Action {
AttackLevel lvl = AttackLevel.getLvl(turnsInvis); 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; int dest = -1;
for (int i : PathFinder.NEIGHBOURS8){ for (int i : PathFinder.NEIGHBOURS8){
//cannot blink into a cell that's occupied or impassable, only over them //cannot blink into a cell that's occupied or impassable, only over them
@@ -104,7 +104,7 @@ public class Challenge extends ArmorAbility {
return; 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()) { for (Char c : Actor.chars()) {
if (c != hero) passable[c.pos] = false; 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){ if (hero.hasTalent(Talent.CLOSE_THE_GAP) && !hero.rooted){
int blinkrange = 1 + hero.pointsInTalent(Talent.CLOSE_THE_GAP); 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++){ for (int i = 0; i < PathFinder.distance.length; i++){
if (PathFinder.distance[i] == Integer.MAX_VALUE if (PathFinder.distance[i] == Integer.MAX_VALUE
@@ -92,7 +92,7 @@ public class SmokeBomb extends ArmorAbility {
return; 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 || if ( PathFinder.distance[target] == Integer.MAX_VALUE ||
!Dungeon.level.heroFOV[target] || !Dungeon.level.heroFOV[target] ||
@@ -108,7 +108,7 @@ public class Dagger extends MeleeWeapon {
return; 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) { if (PathFinder.distance[target] == Integer.MAX_VALUE) {
GLog.w(Messages.get(wep, "ability_bad_position")); GLog.w(Messages.get(wep, "ability_bad_position"));
return; return;