Compare commits
2 Commits
886b3bc21e
...
c013b7d800
Author | SHA1 | Date |
---|---|---|
Hazel Nova | c013b7d800 | |
Hazel Nova | df7eb9f31f |
|
@ -2,6 +2,9 @@ from commands.command import Command
|
|||
from evennia import create_script
|
||||
from evennia import CmdSet
|
||||
|
||||
from evennia.utils import inherits_from
|
||||
import typeclasses.characters
|
||||
|
||||
class EncounterCommand(Command):
|
||||
energy_cost = 1
|
||||
allow_self_target = False
|
||||
|
@ -185,6 +188,9 @@ class CmdEngage(Command):
|
|||
target = self.caller.search(self.args)
|
||||
if not target:
|
||||
return
|
||||
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!")
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue