b440aa07 by Branden

#First steps coding, Add a new default command

1 parent ac533bb4
......@@ -182,3 +182,29 @@ class Command(BaseCommand):
# else:
# self.character = None
#
class CmdAbilities(Command):
"""
List abilities
Usage:
abilities
Displays a list of your current ability values.
"""
key = "abilities"
aliases = ["abi"]
lock = "cmd:all()"
help_category = "General"
def func(self):
"implements the actual functionality"
str, agi, mag = self.caller.get_abilities()
string = "STR: %s, AGI: %s, MAG: %s" %(str, agi, mag)
self.caller.msg(string)
......
......@@ -15,6 +15,7 @@ own cmdsets by inheriting from them or directly from `evennia.CmdSet`.
"""
from evennia import default_cmds
from commands.command import CmdAbilities
class CharacterCmdSet(default_cmds.CharacterCmdSet):
"""
......@@ -32,6 +33,7 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
#
# any commands you add below will overload the default ones.
#
self.add(CmdAbilities())
class PlayerCmdSet(default_cmds.PlayerCmdSet):
......