Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import copy
- class Item():
- def __init__(self, item_name=None, item_description=None, item_abilities={}):
- self.name = item_name
- self.description = item_description
- self.abilities = copy.deepcopy(item_abilities)
- def set_name(self, item_name):
- self.name = item_name
- def get_name(self):
- return self.name
- def set_description(self, item_description):
- self.description = item_description
- def set_ability(self, item_ability, item_ability_effect):
- self.abilities[item_ability] = item_ability_effect
- def describe(self):
- return self.description
- def get_details(self):
- print('\nThe', self.name)
- print('-' * (len(self.name) + 4))
- print(self.description)
- for ability in self.abilities:
- print(ability + ':', self.abilities[ability])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement