from typing import Dict
import json


def _load_xp_mult(filepath: str = "data/locations.json") -> Dict[str, float]:
        """
        Loads the known xp multipliers into a dict for dynamic creation
        Locations as needed
        
        Arguments:
            filepath {[str]} -- The filpath of the .json file  

        Returns:
            Dict[str, Location] -- A dict of [lowercase location name, xp multiplier]
        """
        with open(filepath) as file:
            content = json.load(file)

        result = {}
        locations = content["locations"]

        for location in locations:
            name = location['name'].lower()
            xp_mult = location['xp_multiplier']
            result[name] = xp_mult

        return result