Skip to content

Commit

Permalink
Merge pull request #37 from mmacy/treasure-and-char-work-3
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacy committed Jan 24, 2024
2 parents 016da12 + c5bbf08 commit 03046b2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions osrlib/osrlib/treasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TreasureDetail:


class Treasure:
"""Represents a treasure haul within the game, encapsulating various types of loot.
"""Represents a treasure haul within the game, encapsulating various physical item rewards.
``Treasure`` manages the generation and valuation of treasures comprising coins, gems, jewelry, and magical items.
The treasure is generated based on predefined types, each corresponding to different probabilities and amounts
Expand All @@ -56,13 +56,6 @@ class Treasure:
items (Dict[Union[CoinType, ItemType], int]): A dictionary holding the treasure items. The keys are instances
of either CoinType or ItemType enumerations, and the values are integers representing the quantity of each item.
Methods:
__init__(treasure_type: TreasureType = None): Initializes a new Treasure instance, optionally generating
treasure contents based on the provided type.
total_gp_value(): Property that calculates and returns the total value of the treasure in gold pieces.
from_treasure_type(treasure_type: TreasureType): Class method to create a new Treasure instance with contents
generated based on the specified TreasureType.
Example:
>>> treasure = Treasure.from_treasure_type(TreasureType.A)
>>> treasure.items
Expand Down

0 comments on commit 03046b2

Please sign in to comment.