public override float GetPathTileCost(CreatureEntity creature, int tx, int ty, BaseTile tile) { bool barrier; if (creature == null) { barrier = IsBarrier(tx, ty); } else { barrier = !creature.CanMove(this, tx, ty); if (!barrier && creature.IsSeen(tx, ty, false)) { barrier = (FindCreature(tx, ty) != null); } } return(barrier ? PathSearch.BARRIER_COST : 1.0f); }