import itertools from collections import defaultdict, deque from src.utilities import * from src import debuglog, errlog, plog, users, channels from src.functions import get_players, get_all_players, get_main_role, get_reveal_role, get_target from src.decorators import command, event_listener from src.containers import UserList, UserSet, UserDict, DefaultUserDict from src.dispatcher import MessageDispatcher from src.messages import messages from src.events import Event from src.status import try_misdirection, try_exchange, is_silent from src.roles.helper.shamans import setup_variables, get_totem_target, give_totem, totem_message TOTEMS, LASTGIVEN, SHAMANS, RETARGET = setup_variables("shaman", knows_totem=True) @command("totem", chan=False, pm=True, playing=True, silenced=True, phases=("night", ), roles=("shaman", )) def shaman_totem(var, wrapper, message): """Give a totem to a player.""" totem_types = list(TOTEMS[wrapper.source].keys()) totem, target = get_totem_target(var, wrapper, message, LASTGIVEN, totem_types)
import itertools from collections import defaultdict, deque from src.utilities import * from src import debuglog, errlog, plog, users, channels from src.functions import get_players, get_all_players, get_main_role, get_reveal_role, get_target from src.decorators import command, event_listener from src.containers import UserList, UserSet, UserDict, DefaultUserDict from src.dispatcher import MessageDispatcher from src.messages import messages from src.status import try_misdirection, try_exchange, is_silent from src.roles.helper.shamans import get_totem_target, give_totem, setup_variables from src.roles.helper.wolves import register_killer TOTEMS, LASTGIVEN, SHAMANS = setup_variables("wolf shaman", knows_totem=True) register_killer("wolf shaman") @command("give", "totem", chan=False, pm=True, playing=True, silenced=True, phases=("night",), roles=("wolf shaman",)) def wolf_shaman_totem(var, wrapper, message): """Give a totem to a player.""" target = get_totem_target(var, wrapper, message, LASTGIVEN) if not target: return SHAMANS[wrapper.source] = give_totem(var, wrapper, target, prefix="You", role="wolf shaman", msg=" of {0}".format(TOTEMS[wrapper.source])) relay_wolfchat_command(wrapper.client, wrapper.source.nick, messages["shaman_wolfchat"].format(wrapper.source, target), ("wolf shaman",), is_wolf_command=True)
import itertools from collections import defaultdict, deque from src.utilities import * from src import debuglog, errlog, plog, users, channels from src.functions import get_players, get_all_players, get_main_role, get_reveal_role, get_target from src.decorators import command, event_listener from src.containers import UserList, UserSet, UserDict, DefaultUserDict from src.dispatcher import MessageDispatcher from src.messages import messages from src.status import try_misdirection, try_exchange from src.cats import Win_Stealer from src.roles.helper.shamans import setup_variables, get_totem_target, give_totem TOTEMS, LASTGIVEN, SHAMANS = setup_variables("crazed shaman", knows_totem=False) @command("give", "totem", chan=False, pm=True, playing=True, silenced=True, phases=("night", ), roles=("crazed shaman", )) def crazed_shaman_totem(var, wrapper, message): """Give a random totem to a player.""" target = get_totem_target(var, wrapper, message, LASTGIVEN) if not target:
import itertools from collections import defaultdict, deque from src.utilities import * from src import debuglog, errlog, plog, users, channels from src.functions import get_players, get_all_players, get_main_role, get_reveal_role, get_target from src.decorators import command, event_listener from src.containers import UserList, UserSet, UserDict, DefaultUserDict from src.dispatcher import MessageDispatcher from src.messages import messages from src.status import try_misdirection, try_exchange, is_silent from src.roles.helper.shamans import get_totem_target, give_totem, setup_variables from src.roles.helper.wolves import register_killer TOTEMS, LASTGIVEN, SHAMANS = setup_variables("wolf shaman", knows_totem=True) register_killer("wolf shaman") @command("give", "totem", chan=False, pm=True, playing=True, silenced=True, phases=("night", ), roles=("wolf shaman", )) def wolf_shaman_totem(var, wrapper, message): """Give a totem to a player."""