v2.2.1: fixed various blink effects working over magical fire
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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] ||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user