hazelmud/commands/encounter/actions.py

37 lines
1.2 KiB
Python
Raw Permalink Normal View History

from commands.encounter import EncounterCommand
# Bite (Regular)
class CmdBite(EncounterCommand):
"Bite down on your target with your teeth"
key = "bite"
help_category = "Violence"
def parse(self):
self.args = self.args.strip()
target, *adverb = self.args.split(":")
self.target = target.strip()
self.adverb = ' ' + adverb[0].strip() if adverb else ''
def func(self):
if super().has_target() and super().can_perform():
self.caller.msg(f"You bite {self.target.key}{self.adverb}")
self.target.msg(f"{self.caller.key} bites you{self.adverb}")
# damage calculations, chance to miss, etc
# Kiss (Regular)
class CmdKiss(EncounterCommand):
"Kiss the target with your lips"
key = "kiss"
help_category = "Sex"
def parse(self):
self.args = self.args.strip()
target, *adverb = self.args.split(':')
self.target = target.strip()
self.adverb = ' ' + adverb[0].strip() if adverb else ''
def func(self):
if super().has_target() and super().can_perform():
self.caller.msg(f"You kiss {self.target}{self.adverb}")
self.target.msg(f"{self.caller} kisses you{self.adverb}")