Removed being able to engage yourself in an encounter

This commit is contained in:
Hazel Nova 2024-01-13 04:21:58 +00:00
parent 140d430235
commit 68cd345d75
1 changed files with 4 additions and 1 deletions

View File

@ -177,7 +177,7 @@ class CmdEngage(Command):
Initiates an encounter with the selected target
"""
key = "engage"
aliases = ["encounter"]
aliases = ["encounter", "fight"]
def func(self):
if not self.args:
self.caller.msg("Usage: engage <target>")
@ -185,6 +185,9 @@ class CmdEngage(Command):
target = self.caller.search(self.args)
if not target:
return
if target == self.caller:
self.caller.msg("You can't initiate an encounter with yourself!")
return
if target.ndb.encounter_handler:
target.ndb.encounter_handler.add_character(self.caller)
target.ndb.encounter_handler.msg_all(f"{self.caller} joins the encounter")