World

get_a_star_direction(start_pos: Tuple[int, int], target_pos: Tuple[int, int])Optional[DirectionType][source]

Use a* pathfinding to get a direction from one entity to another. Does not allow diagonals.

get_a_star_path(start_pos: Tuple[int, int], target_pos: Tuple[int, int])List[List[int]][source]

Get a list of coords that dictates the path between 2 entities.

get_cast_positions(entity: EntityID, target_pos: Position, skills: List[Type[Skill]])Dict[Type[Skill], List[Tuple[int, int]]][source]

Check through list of skills to find unblocked cast positions to target

get_chebyshev_distance(start_pos: Tuple[int, int], target_pos: Tuple[int, int])[source]

Get distance from an xy position towards another location. Expected tuple in the form of (x, y). This returns an int indicating the number of tile moves between the two points.

get_direction(start_pos: Tuple[int, int], target_pos: Tuple[int, int])DirectionType[source]

Get the direction between two locations.

get_entity_blocking_movement_map()numpy.ndarray[source]

Return a Numpy array of bools, True for blocking and False for open

get_euclidean_distance(start_pos: Tuple[int, int], target_pos: Tuple[int, int])float[source]

Get distance from an xy position towards another location. Expected tuple in the form of (x, y). This returns a float indicating the straight line distance between the two points.

get_game_map()scripts.engine.world_objects.game_map.GameMap[source]

Get current game_map. Raises AttributeError if game_map doesnt exist.

get_reflected_direction(active_entity: int, current_pos: Tuple[int, int], target_direction: Tuple[int, int])DirectionType[source]

Use surrounding walls to understand how the object should be reflected.

get_tile(tile_pos: Tuple[int, int])scripts.engine.world_objects.tile.Tile[source]

Get the tile at the specified location. Raises exception if out of bounds or doesnt exist.

get_tiles(start_pos: Tuple[int, int], coords: List[Tuple[int, int]])List[scripts.engine.world_objects.tile.Tile][source]

Get multiple tiles based on starting position and coordinates given. Coords are relative to start position given.

is_direction_blocked(entity: int, dir_x: int, dir_y: int)bool[source]

Checks if the entity will collide with something when trying to move in the provided direction. Returns True if blocked.

tile_has_tag(active_entity: int, tile: scripts.engine.world_objects.tile.Tile, tag: TileTagType)bool[source]

Check if a given tag applies to the tile. True if tag applies.

tile_has_tags(active_entity: int, tile: scripts.engine.world_objects.tile.Tile, tags: List[TileTagType])bool[source]

Check a tile has all required tags