evennia.contrib.tutorials.evadventure.utils

Various utilities.

evennia.contrib.tutorials.evadventure.utils.get_obj_stats(obj, owner=None)[source]

Get a string of stats about the object.

Parameters
  • obj (EvAdventureObject) – The object to get stats for.

  • owner (EvAdventureCharacter, optional) – If given, it allows us to also get information about if the item is currently worn/wielded.

Returns

str – A stat string to show about the object.

evennia.contrib.tutorials.evadventure.utils.random_probability(self, probabilities)[source]

Given a dictionary of probabilities, return the key of the chosen probability.

Parameters

probabilities (dict) – A dictionary of probabilities, where the key is the action and the value is the probability of that action.