v3.1.0: fixed unintentional change to enemy reach logic
This commit is contained in:
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
|
||||
@@ -166,9 +167,10 @@ public abstract class ChampionEnemy extends Buff {
|
||||
return false;
|
||||
} else {
|
||||
boolean[] passable = BArray.not(Dungeon.level.solid, null);
|
||||
|
||||
//our own tile is always passable
|
||||
passable[target.pos] = true;
|
||||
for (Char ch : Actor.chars()) {
|
||||
//our own tile is always passable
|
||||
passable[ch.pos] = ch == target;
|
||||
}
|
||||
|
||||
PathFinder.buildDistanceMap(enemy.pos, passable, 4);
|
||||
|
||||
@@ -214,9 +216,10 @@ public abstract class ChampionEnemy extends Buff {
|
||||
return false;
|
||||
} else {
|
||||
boolean[] passable = BArray.not(Dungeon.level.solid, null);
|
||||
|
||||
//our own tile is always passable
|
||||
passable[target.pos] = true;
|
||||
for (Char ch : Actor.chars()) {
|
||||
//our own tile is always passable
|
||||
passable[ch.pos] = ch == target;
|
||||
}
|
||||
|
||||
PathFinder.buildDistanceMap(enemy.pos, passable, 2);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
@@ -78,8 +79,10 @@ public class GnollExile extends Gnoll {
|
||||
if (Dungeon.level.distance( pos, enemy.pos ) <= 2){
|
||||
boolean[] passable = BArray.not(Dungeon.level.solid, null);
|
||||
|
||||
//our own tile is always passable
|
||||
passable[pos] = true;
|
||||
for (Char ch : Actor.chars()) {
|
||||
//our own tile is always passable
|
||||
passable[ch.pos] = ch == this;
|
||||
}
|
||||
|
||||
PathFinder.buildDistanceMap(enemy.pos, passable, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user