import pandas as pd import numpy as np class EncounterTable: def __init__(self): self.table = { 'clear': ['zarn', 'yexil', 'android', 'badder', 'sleeth', 'arn', 'herp', 'podog', 'podog', 'jaget', 'centisteed', 'rakox', 'rakox', 'brutorz', 'hoop', 'hawkoid', 'hopper', 'hopper', None, None], 'mountains': ['hisser', 'blight', 'parn', 'zarn', 'manta', 'orlen', 'zeethh', 'sep', 'arn', 'yexil', 'herp', 'wardent', 'kep plant', 'crep plant', 'cal then', 'ark', 'hawkoid', 'podog', 'carrin', None], 'forest': ['hisser', 'sep', 'blaash', 'blackun', 'terl', 'win seen', 'pineto', 'perth', 'obb', 'kailin', 'gren', 'badder', 'arn', 'lil', 'blood bird', 'horl choo', 'soul besh', 'dabber', 'centisteed', None], 'desert': ['serf', 'kamodo', 'blight', 'perth', 'parn', 'zarn', 'yexil', 'hisser', 'sep', 'cal then', 'manta', 'kep plant', 'carrin', 'podog', None, None, None, None, None, None], 'watery': ['win seen', 'crep plant', 'seroon lou', 'terl', 'ert telden', 'barl nep', 'ert', 'fleshin', 'keeshin', 'narl ep', 'menarl', 'herkel', 'ber lep', 'cren tosh', 'fen', 'gator', None, None, None, None], 'ruins': ['arn', 'obb', 'hoop', 'android', 'badder', 'serf', 'blaash', 'yexil', 'manta', 'ark', 'orlen', 'dabber', 'sleeth', 'carrin', 'squeeker', 'squeeker', 'squeeker', None, None, None], 'deathlands': ['android', 'hisser', 'blight', 'zarn', 'perth', 'blaash', 'serf', 'parn', 'squeeker', 'squeeker', None, None, None, None, None, None, None, None, None, None] } self.table_dataframe = pd.DataFrame(self.table) self.table_dataframe.index = np.arange(1, len(self.table_dataframe) + 1) self.table_dataframe.columns = self.table_dataframe.columns.str.lower() def get_encounter(self, roll, environ): return self.table_dataframe.loc[roll, environ]