Create a frog familiar

This commit is contained in:
Howard Abrams 2025-08-26 20:30:22 -07:00
parent e62c23d15d
commit 4d76593b1e
2 changed files with 39 additions and 1 deletions

View file

@ -276,6 +276,36 @@ class CmdSetOctopus(CmdSet):
self.add(CmdOctopus) self.add(CmdOctopus)
class CmdFrog(Command):
"""
Have your frog do some antics.
Usage:
frog <phrase>
Or:
frog's <phrase>
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): class CmdRoll(MuxCommand):
""" """
Roll the dice in your inventory. Roll the dice in your inventory.

View file

@ -6,7 +6,7 @@ from re import split, sub
from evennia.utils import logger, delay 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 typeclasses.objects import Object
from utils.word_list import routput from utils.word_list import routput
@ -133,6 +133,14 @@ class Octopus(Familiar):
"Called when a octopus is first created." "Called when a octopus is first created."
self.cmdset.add(CmdSetOctopus, persistent=True) 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: class Key:
""" """