diff --git a/commands/misc.py b/commands/misc.py index 7c415cc..1ae0c4c 100755 --- a/commands/misc.py +++ b/commands/misc.py @@ -276,6 +276,36 @@ class CmdSetOctopus(CmdSet): self.add(CmdOctopus) +class CmdFrog(Command): + """ + Have your frog do some antics. + + Usage: + + frog + + Or: + + frog's + + Will announce your frog's antics to the room. + + You can target another character in the antics by preceding the + character's description with a |w/|n, as in |w/elf|n + or |w/blonde elf|n. + """ + key = "frog" + aliases = ["pus"] + + def func(self): + self.obj.at_do(self.caller, self.args.strip()) + + +class CmdSetFrog(CmdSet): + def at_cmdset_creation(self): + self.add(CmdFrog) + + class CmdRoll(MuxCommand): """ Roll the dice in your inventory. diff --git a/typeclasses/npcs.py b/typeclasses/npcs.py index b89cfcf..7693850 100755 --- a/typeclasses/npcs.py +++ b/typeclasses/npcs.py @@ -6,7 +6,7 @@ from re import split, sub from evennia.utils import logger, delay -from commands.misc import CmdSetCat, CmdSetOctopus +from commands.misc import CmdSetCat, CmdSetOctopus, CmdSetFrog from typeclasses.objects import Object from utils.word_list import routput @@ -133,6 +133,14 @@ class Octopus(Familiar): "Called when a octopus is first created." self.cmdset.add(CmdSetOctopus, persistent=True) +class Frog(Familiar): + """ + A puppetable 'frog' that acts based on that 'command'. + """ + def at_object_creation(self): + "Called when a octopus is first created." + self.cmdset.add(CmdSetFrog, persistent=True) + class Key: """