diff --git a/commands/command.py b/commands/command.py index f7b4c15..0495e28 100644 --- a/commands/command.py +++ b/commands/command.py @@ -9,7 +9,6 @@ from evennia.commands.command import Command as BaseCommand # from evennia import default_cmds - class Command(BaseCommand): """ Base command (you may see this if a child command had no help text defined) @@ -32,6 +31,22 @@ class Command(BaseCommand): # pass +class CmdMeow(Command): + + key = 'meow' + + def func(self): + args = self.args.strip() + if not args: + self.caller.msg("Who or what would you like to meow at?") + return + target = self.caller.search(args) + if not target: + return + self.caller.msg(f"You meowed at {target.key}!") + target.msg(f"You got meowed at by {self.caller.key}!") + + # ------------------------------------------------------------- # diff --git a/commands/custom_cmdset.py b/commands/custom_cmdset.py new file mode 100644 index 0000000..e862fff --- /dev/null +++ b/commands/custom_cmdset.py @@ -0,0 +1,15 @@ +from evennia import CmdSet +#from commands import encounter_cmdset as encounter +from commands import command as cmd + +class SetSpeciesHuman(CmdSet): + def at_cmdset_creation(self): + self.add(cmd.CmdMeow()) + +class SetSpeciesCatkin(CmdSet): + def at_cmdset_creation(self): + self.add(cmd.CmdMeow()) + +class SetSpeciesDogkin(CmdSet): + def at_cmdset_creation(self): + self.add(cmd.CmdMeow()) diff --git a/commands/encounter_cmdset.py b/commands/encounter_cmdset.py index 5f62298..a5ad2e1 100644 --- a/commands/encounter_cmdset.py +++ b/commands/encounter_cmdset.py @@ -77,14 +77,23 @@ class CmdKiss(EncounterCommand): self.caller.msg(f"You kiss {self.target}{self.adverb}") self.target.msg(f"{self.caller} kisses you{self.adverb}") + class SetSpeciesHuman(CmdSet): def at_cmdset_creation(self): self.add(CmdBite) self.add(CmdKiss) -class SetSpeciesPlaceholder(CmdSet): + +class SetSpeciesCatkin(CmdSet): def at_cmdset_creation(self): - pass + self.add(CmdBite) + self.add(CmdKiss) + +class SetSpeciesDogkin(CmdSet): + def at_cmdset_creation(self): + self.add(CmdBite) + self.add(CmdKiss) + # Special encounter commands diff --git a/typeclasses/characters.py b/typeclasses/characters.py index 7d699e2..83c0ae0 100644 --- a/typeclasses/characters.py +++ b/typeclasses/characters.py @@ -29,6 +29,9 @@ class Character(ClothedCharacter): self.cmdset.remove(SetEncounterSpecial) pass + def apply_basic_cmdset(self): + self.cmdset.add(SPECIES_CMDSET[self.db.species]) + def at_pre_move(self, destination, **kwargs): if self.ndb.encounter_handler: self.msg("You would need to leave the encounter first") diff --git a/world/species.py b/world/species.py index 643f242..81c1824 100644 --- a/world/species.py +++ b/world/species.py @@ -1,9 +1,19 @@ from commands.encounter_cmdset import SetSpeciesHuman +from commands.encounter_cmdset import SetSpeciesCatkin +from commands.encounter_cmdset import SetSpeciesDogkin + +from commands.custom_cmdset import SetSpeciesHuman +from commands.custom_cmdset import SetSpeciesCatkin +from commands.custom_cmdset import SetSpeciesDogkin SPECIES_LIST = [ "Human", + "Catkin", + "Dogkin" ] SPECIES_CMDSET = [ SetSpeciesHuman, + SetSpeciesCatkin, + SetSpeciesDogkin ]