Closed ericoc closed 2 months ago
>>> from pprint import pprint
>>> from helptab import HelpTab
>>> pprint(vars(HelpTab().help_topics['Spell Scry']))
{'aliases': [],
'body_html': '<br>\n'
' By invoking the divine assistance of their deity, clerics '
'can reach<br>\n'
"out and see afar. When casting Scry, the cleric's vision is "
'drawn towards<br>\n'
'a targeted player, mob or object, revealing their location and '
'their condition.<br>\n'
'<br>\n'
' When cast on an object, scry will always succeed unless the '
'object is in<br>\n'
'the possession of a living entity. In which case, it will act '
'the same as if<br>\n'
'you had targeted that entity.<br>\n'
'<br>\n'
' Scry can be viewed as a non-aggressive action and not '
'provoke hostility,<br>\n'
'but the target may feel a slight chill upon a failed scrying '
'attempt, alerting<br>\n'
"them of the cleric's gaze. Be warned - some entities may not "
'view this kindly.<br>\n'
"It's a valuable tool for clerics who wish to keep a watchful "
'eye on allies or<br>\n'
'gather intelligence on potential threats.<br>\n',
'body_text': '\n'
' By invoking the divine assistance of their deity, clerics '
'can reach\n'
"out and see afar. When casting Scry, the cleric's vision is "
'drawn towards\n'
'a targeted player, mob or object, revealing their location and '
'their condition.\n'
'\n'
' When cast on an object, scry will always succeed unless the '
'object is in\n'
'the possession of a living entity. In which case, it will act '
'the same as if\n'
'you had targeted that entity.\n'
'\n'
' Scry can be viewed as a non-aggressive action and not '
'provoke hostility,\n'
'but the target may feel a slight chill upon a failed scrying '
'attempt, alerting\n'
"them of the cleric's gaze. Be warned - some entities may not "
'view this kindly.\n'
"It's a valuable tool for clerics who wish to keep a watchful "
'eye on allies or\n'
'gather intelligence on potential threats.\n',
'components': 'Treasure worth 250 obsidian',
'level': 0,
'minimum': '',
'name': 'Spell Scry',
'player_class': 'Cleric',
'player_level': '10',
'saves': 'against resilience for no effect',
'see_also': [],
'stats': '',
'syntax': 'cast scry <victim>',
'topic': ''}
Very much a work-in-progress:
Created a
HelpTab
class that interacts with the Ishar MUD "helptab
" file. TheHelpTab
class parses sections from the "helptab
" file creating a Python list of childHelpTopic
objects.Each
HelpTopic
object haslevel
,name
,aliases
, andbody
attributes (so far). 🤷♂️Like I said, work-in-progress.