Provide method for characters to be unable to engage in encounter

This commit is contained in:
Hazel Nova 2024-01-14 03:45:02 +00:00
parent df7eb9f31f
commit c013b7d800
1 changed files with 2 additions and 2 deletions

View File

@ -188,8 +188,8 @@ class CmdEngage(Command):
target = self.caller.search(self.args)
if not target:
return
if not inherits_from(target, typeclasses.characters.Character):
self.caller.msg(target.db.engage_err_msg or "You can't initiate an encounter with that.")
if not inherits_from(target, typeclasses.characters.Character) or not target.access(self.caller, 'engage'):
self.caller.msg(target.db.engage_err_msg or f"You can't initiate an encounter with {target.name}.")
return
if target == self.caller:
self.caller.msg("You can't initiate an encounter with yourself!")