Merge branch 'main' into clothing_alterations

This commit is contained in:
Hazel Nova 2024-01-14 03:06:03 +00:00
commit 886b3bc21e
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")