Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CmdUnwield(Command):
- """
- Unwield a weapon.
- Usage: unwield
- """
- key = 'unwield'
- def func(self):
- caller = self.caller
- wielded_obj = caller.db.wielding['obj']
- wielded_hands = caller.db.wielding['hands']
- left_hand, right_hand = get_hands(caller)
- obj = caller.search(wielded_obj, location=[left_hand, right_hand])
- if obj:
- caller.msg(f"You stop wielding {obj.key}.")
- caller.location.msg_contents(f"{caller.name} stops wielding {obj.key}.", exclude=caller)
- caller.db.wielding = {'obj': None, 'hands': None}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement