encounter_system #2

Merged
amber merged 3 commits from encounter_system into ambyPlayground 2024-01-13 04:51:18 +00:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 68cd345d75 - Show all commits

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")